From 3ccb33927ab207dc3492a7333cc3117ac38f3eaf Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 13 Nov 2014 13:16:51 +0000 Subject: [PATCH] Foundry Content-Center: - Preview link is now shown - Item Category Step now works with Foundry git-svn-id: https://svn.libreccm.org/ccm/trunk@2967 8810af33-2d31-482b-a856-94f89814c4df --- .../web/themes/foundry/conf/cms.xml | 3 + .../web/themes/foundry/conf/templates.xml | 1 + .../foundry/lib/template-tags/admin/cms.xsl | 307 +++++++++++++++++- .../lib/template-tags/admin/common.xsl | 4 + .../foundry/lib/template-tags/html-tags.xsl | 52 ++- .../foundry/foundry/scripts/category-step.js | 137 ++++++++ .../foundry/templates/admin-layout.xml | 14 +- .../web/themes/foundry/foundry/texts/cms.xml | 18 + 8 files changed, 513 insertions(+), 23 deletions(-) create mode 100644 ccm-sci-bundle/web/themes/foundry/foundry/scripts/category-step.js diff --git a/ccm-sci-bundle/web/themes/foundry/conf/cms.xml b/ccm-sci-bundle/web/themes/foundry/conf/cms.xml index b913fa4ae..9420406cb 100644 --- a/ccm-sci-bundle/web/themes/foundry/conf/cms.xml +++ b/ccm-sci-bundle/web/themes/foundry/conf/cms.xml @@ -1,4 +1,7 @@ horizontal + false + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/conf/templates.xml b/ccm-sci-bundle/web/themes/foundry/conf/templates.xml index 681b7e43f..444d1848a 100644 --- a/ccm-sci-bundle/web/themes/foundry/conf/templates.xml +++ b/ccm-sci-bundle/web/themes/foundry/conf/templates.xml @@ -5,6 +5,7 @@ --> admin-layout.xml + admin-layout.xml portal-workspace.xml portal-workspace-grid.xml admin-layout.xml diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/cms.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/cms.xsl index fef592e11..fff24a6e1 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/cms.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/cms.xsl @@ -1,4 +1,6 @@ + + ]> + + +

+ +

+ +
+ + + +
+ +
+
+ + + + + + +
+ +
+
+ + + + + + +
+ +
+
+ +
    + + + +
+
+
+
+
+
+ + + + + +
  • + + + + + [X] + + +   + + + + + + + +
  • +
    + + + + + + + + +
      + +
    + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + + + + catBranchToggle + + + catToggle + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + +  + + + + +   + + + + + + [X] + + + + + +    + + + + + + [ ] + + + + + +   + + + + +
      + + + + + + + + + + + + + + + + + + + +
    +
  • +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/common.xsl b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/common.xsl index 0e1d5799c..9a77b7cea 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/common.xsl +++ b/ccm-sci-bundle/web/themes/foundry/foundry/lib/template-tags/admin/common.xsl @@ -65,6 +65,10 @@ + + + + - +

    - If set to true the path in the src is used as it is. + The origin attribute determines the how the path provided in the + src attribute is interpreted. The following values are interpreted:

    +
    +
    absolute
    +
    + The path is interpreted as absolute path and is not processed by Foundry. +
    +
    internal
    +
    + The script is loaded from the internal (foundry/scripts) + scripts directory. +
    +
    theme
    +
    + This is default which is also used when the the origin + attribute is not present. The script is loaded from the scripts + directory of the theme. +
    +
    - +

    - The path of the script to include. If the absolute> attribute is not - set (or not set to true the path is interpreted relative to the + The path of the script to include. If the origin attribute is not + set (or not set to absolute the path is interpreted relative to the theme directory. For example the path of a script included using

    @@ -2002,10 +2020,10 @@
                         network.
                     

    - +

    - The type of the script. Usally this is text/javascript. If the attribute - is not set in the layout template, it is automatically set to + The type of the script. Usally this is text/javascript. If the + attribute is not set in the layout template, it is automatically set to text/javascript.

    @@ -2036,17 +2054,21 @@ - - - + + diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/scripts/category-step.js b/ccm-sci-bundle/web/themes/foundry/foundry/scripts/category-step.js new file mode 100644 index 000000000..ce1436d27 --- /dev/null +++ b/ccm-sci-bundle/web/themes/foundry/foundry/scripts/category-step.js @@ -0,0 +1,137 @@ +/* + Copyright: 2006, 2007, 2008 Sören Bernstein + + This file is part of Mandalay. + + Mandalay is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + Mandalay is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mandalay. If not, see . +*/ + +/* DE + Diese Funktionen sind Teil der AJAX-Seite zum Zuweisen der Kategorien. +*/ + +/* EN + These functions are part of the ajax-pages to assign categories. +*/ + +// DE Lade einen Kategorienzweig nach, wenn dieser aufgeklappt wird +// EN Loading a branch of categories when it is expanded +function catBranchToggle(id, selCats) { + var elToggleTreeImage = document.getElementById("catTreeToggleImage" + id); + var elBranch = document.getElementById("catBranch" + id); + + if(elBranch.style.display == "" || elBranch.style.display == "none") { + if(elBranch.innerHTML == "" || elBranch.innerHTML == "...") { + elBranch.innerHTML = "..."; + elBranch.style.display = "block"; + $(elBranch).load("load-cat.jsp", "nodeID=" + id + "&selectedCats=" + selCats); + } else { + elBranch.style.display = "block"; + } + elToggleTreeImage.src = elToggleTreeImage.src.replace("Expand", "Collapse"); + elToggleTreeImage.alt = "[-]"; + } else { + elBranch.style.display = "none"; + elToggleTreeImage.src = elToggleTreeImage.src.replace("Collapse", "Expand"); + elToggleTreeImage.alt = "[+]"; + } + return false; +} + +// DE Wechselt die Ansicht eines Kategorienzweiges +// EN Toggles display of a branch of categories +function catToggle(id, selCats) { + var elToggleTreeImage = document.getElementById("catTreeToggleImage" + id); + var elBranch = document.getElementById("catBranch" + id); + + if(elBranch.style.display == "" || elBranch.style.display == "none") { + elBranch.style.display = "block"; + elToggleTreeImage.src = elToggleTreeImage.src.replace("Expand", "Collapse"); + elToggleTreeImage.alt = "[-]"; + } else { + elBranch.style.display = "none"; + elToggleTreeImage.src = elToggleTreeImage.src.replace("Collapse", "Expand"); + elToggleTreeImage.alt = "[+]"; + } + return false; +} + +// DE Wählt eine Kategorie aus +// EN Select a category +function catSelect(id) { + var elWidgetHidden = document.getElementById("catWdHd"); + + var found = 0; + + for(var i = 0; i < elWidgetHidden.options.length && found == 0; i++) { + if(elWidgetHidden.options[i].value == id) { + found = 1; + } + } + + if(! found) { + var optHidden = new Option('add ' + id, id, false, true); + elWidgetHidden.options[elWidgetHidden.options.length] = optHidden; + } + + // DE Ändere den Link + // EN Change link + var elToggleLink = document.getElementById("catToggleLink" + id); + elToggleLink.removeAttribute("onclick"); + elToggleLink.setAttribute("onclick", "catDeselect('" + id + "');"); + + // DE Ändere das Icon + // EN Change image + var elToggleImage = document.images["catToggleImage" + id]; + elToggleImage.src = elToggleImage.src.replace("Unselected", "Selected"); + elToggleImage.alt = "[X]"; + + return false; +} + +// DE Macht eine Auswahl rückgängig +// EN Deselect a category +function catDeselect(id) { + var elWidgetHidden = document.getElementById("catWdHd"); + + var found = 0; + + for(var i = 0; i < elWidgetHidden.options.length; i++) { + if(elWidgetHidden.options[i].value == id) { + if(elWidgetHidden.options[i].text == id) { + found = 1; + } + elWidgetHidden.removeChild(elWidgetHidden.options[i]); + } + } + + if (found) { + var optHidden = new Option('del ' + id, id, false, true); + elWidgetHidden.options[elWidgetHidden.options.length] = optHidden; + } + +// DE Ändert den Link + // EN Change link + var elToggleLink = document.getElementById("catToggleLink" + id); + elToggleLink.removeAttribute("onclick"); + elToggleLink.setAttribute("onclick", "catSelect('" + id + "');"); + + // DE Ändert das Icon + // EN Change image + var elToggleImage = document.images["catToggleImage" + id]; + elToggleImage.src = elToggleImage.src.replace("Selected", "Unselected"); + elToggleImage.alt = "[ ]"; + + return false; +} diff --git a/ccm-sci-bundle/web/themes/foundry/foundry/templates/admin-layout.xml b/ccm-sci-bundle/web/themes/foundry/foundry/templates/admin-layout.xml index 2cef00520..6614d49c4 100644 --- a/ccm-sci-bundle/web/themes/foundry/foundry/templates/admin-layout.xml +++ b/ccm-sci-bundle/web/themes/foundry/foundry/templates/admin-layout.xml @@ -7,6 +7,8 @@ + +