From 93bf5882cc6706aef490481051917bd34778ee11 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 24 Apr 2015 16:20:30 +0000 Subject: [PATCH] Foundry: - More tags for publication types - JavaScript for Double Click Protection in the Content Centre was missing git-svn-id: https://svn.libreccm.org/ccm/trunk@3358 8810af33-2d31-482b-a856-94f89814c4df --- .../lib/template-tags/content-items.xsl | 4 +- .../content-items/scipublications.xsl | 69 +++++++++++++++++-- .../foundry/lib/template-tags/data-tags.xsl | 4 ++ .../web/themes/foundry/foundry/scripts/dcp.js | 31 +++++++++ .../foundry/templates/admin-layout.xml | 1 + 5 files changed, 102 insertions(+), 7 deletions(-) create mode 100644 ccm-core/web/themes/foundry/foundry/scripts/dcp.js diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl index 2b0fb5c5d..5ed079dc4 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items.xsl @@ -417,7 +417,9 @@ + select="if ($contentitem-tree/nav:attribute[@name = 'objectType']) + then $contentitem-tree/nav:attribute[@name = 'objectType'] + else $contentitem-tree/objectType"/> diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/scipublications.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/scipublications.xsl index 04274506f..0b90f5cf9 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/scipublications.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/content-items/scipublications.xsl @@ -108,7 +108,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -227,13 +227,13 @@ - + - + @@ -620,7 +620,11 @@ - + + + @@ -638,4 +642,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-core/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl b/ccm-core/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl index 0c6451da7..77056bc07 100644 --- a/ccm-core/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl +++ b/ccm-core/web/themes/foundry/foundry/lib/template-tags/data-tags.xsl @@ -118,4 +118,8 @@ + + + + diff --git a/ccm-core/web/themes/foundry/foundry/scripts/dcp.js b/ccm-core/web/themes/foundry/foundry/scripts/dcp.js new file mode 100644 index 000000000..dbe667bc1 --- /dev/null +++ b/ccm-core/web/themes/foundry/foundry/scripts/dcp.js @@ -0,0 +1,31 @@ +function doubleClickProtect(element) { + + if (element.nodeName == "INPUT") { + + // change button label + elementClone = element.cloneNode(true); + elementClone.value = "Bitte warten..."; + + // set cloned button and hide the original one + element.parentNode.insertBefore(elementClone, element); + element.style.display = "none"; + + // disable all submit buttons in this form + formElements = element.form.elements; + for (i = 0; i < formElements.length; i++) { + if (formElements[i].tagName == "INPUT" && + formElements[i].type == "submit" && + formElements[i] != element) + formElements[i].setAttribute("disabled", "disabled"); + } + + } else { + + // disable link + link = element.getAttribute("href"); + element.text = "Bitte warten..."; + element.removeAttribute("href"); + location.href = link; + } + +} \ No newline at end of file diff --git a/ccm-core/web/themes/foundry/foundry/templates/admin-layout.xml b/ccm-core/web/themes/foundry/foundry/templates/admin-layout.xml index 6614d49c4..5203e9d84 100644 --- a/ccm-core/web/themes/foundry/foundry/templates/admin-layout.xml +++ b/ccm-core/web/themes/foundry/foundry/templates/admin-layout.xml @@ -9,6 +9,7 @@