diff --git a/ccm-cms/src/main/java/com/arsdigita/cms/ui/authoring/PageCreateForm.java b/ccm-cms/src/main/java/com/arsdigita/cms/ui/authoring/PageCreateForm.java index 9e708cebf..350df60d8 100755 --- a/ccm-cms/src/main/java/com/arsdigita/cms/ui/authoring/PageCreateForm.java +++ b/ccm-cms/src/main/java/com/arsdigita/cms/ui/authoring/PageCreateForm.java @@ -282,6 +282,10 @@ public class PageCreateForm return item -> { }; } + + protected StringParameter getSelectedLanguageParam() { + return selectedLanguageParam; + } private class ContentTypePrintListener implements PrintListener { diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms.xsl b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms.xsl index d978857c8..354c9b7ab 100644 --- a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms.xsl +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms.xsl @@ -27,7 +27,11 @@ + + + + \ No newline at end of file diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/journal-search-widget.xsl b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/journal-search-widget.xsl new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/journal-search-widget.xsl @@ -0,0 +1 @@ + diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publication-search-widget.xsl b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publication-search-widget.xsl new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publication-search-widget.xsl @@ -0,0 +1 @@ + diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publisher-search-widget.xsl b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publisher-search-widget.xsl new file mode 100644 index 000000000..119738cdd --- /dev/null +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/publisher-search-widget.xsl @@ -0,0 +1,118 @@ + + + + + + + +
+ + +

+ +

+

+ +

+ +
+ +

+ + + +

+
+
+ + +

+ + +

+
+ + + + +
+
+ + + + + + + +
+ + + +
+ + + $name + + + $place + + +
+
+
+ +
+ +
diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/series-search-widget.xsl b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/series-search-widget.xsl new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/lib/cms/series-search-widget.xsl @@ -0,0 +1 @@ + diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/scripts/cms-admin.js b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/scripts/cms-admin.js index 3a9505a9a..81e13da80 100644 --- a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/scripts/cms-admin.js +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/scripts/cms-admin.js @@ -24,7 +24,13 @@ function getAssetsForSelectAssetDialog(dialogId) { var dispatcherPrefix = dialog.getAttribute('data-dispatcherPrefix'); var request = new XMLHttpRequest(); - var url = dispatcherPrefix.substring(0, dispatcherPrefix.length - "/ccm".length) + "/content-sections/" + contentSection + "/assets/"; + var url = dispatcherPrefix.substring( + 0, + dispatcherPrefix.length - "/ccm".length + ) + + "/content-sections/" + + contentSection + + "/assets/"; if (type !== null && type.length > 0) { url = url + "?type=" + type; } @@ -102,7 +108,8 @@ function getItemsForSelectItemDialog(dialogId) { var dispatcherPrefix = dialog.getAttribute('data-dispatcherPrefix'); var request = new XMLHttpRequest(); - var url = dispatcherPrefix.substring(0, dispatcherPrefix.length - "/ccm".length) + "/content-sections/" + contentSection + "/items/?version=DRAFT"; + var url = dispatcherPrefix.substring(0, + dispatcherPrefix.length - "/ccm".length) + "/content-sections/" + contentSection + "/items/?version=DRAFT"; if (type !== null && type.length > 0) { url = url + "?type=" + type; } @@ -148,17 +155,17 @@ function getItemsForSelectItemDialog(dialogId) { function setSelectedItem(itemId, itemTitle, targetId, dialogId) { var target = document.querySelector('#' + targetId); var targetText = document.querySelector("#" + targetId + "-selected"); - + target.value = itemId; targetText.textContent = itemTitle; - + toggleSelectItemDialog('hide', dialogId); } function toggleSelectItemDialog(mode, dialogId) { - + var dialog = document.querySelector('#' + dialogId); - + if ('show' === mode) { dialog.setAttribute('open', 'open'); getItemsForSelectItemDialog(dialogId); @@ -167,6 +174,46 @@ function toggleSelectItemDialog(mode, dialogId) { } } +function getJournalsForSelectAssetDialog(dialogId) { + + var dialog = document.querySelector("#" + dialogId); + var type = dialog.getAttribute("data-assettype"); + var targetId = dialog.getAttribute('data-targetId'); + var filter = document.querySelector('#' + dialogId + '-journals-filter'); + var query = filter.value; + var dispatcherPrefix = dialog.getAttribute('data-dispatcherPrefix'); + + var request = new XMLHttpRequest(); + var url = dispatcherPrefix.substring( + 0, + dispatcherPrefix.length - "/ccm".length + ) + + "/sci-publications/journals"; + + request.open("GET", url); + request.addEventListener("load", function (event) { + if (request.status >= 200 && request.status < 300) { + var journals = JSON.parse(request.responseText); + var tableRows = ""; + var i; + for (i = 0; i < journals.length; ++i) { + var journal = journals[i]; + tableRows = tableRows + + "" + + "" + + "" + + journal["title"] + + "" + + ""; + } + document + .querySelector("#" + dialogId + " tbody") + .innerHTML = tableRows; + } + }); + request.send(); +} + document.addEventListener('DOMContentLoaded', function () { var i; @@ -185,7 +232,8 @@ document.addEventListener('DOMContentLoaded', function () { }); } - var closeButtons = document.querySelectorAll('.asset-search-widget-dialog .close-button'); + var closeButtons = document.querySelectorAll( + '.asset-search-widget-dialog .close-button'); for (i = 0; i < closeButtons.length; ++i) { closeButtons[i].addEventListener('click', function (event) { @@ -201,7 +249,8 @@ document.addEventListener('DOMContentLoaded', function () { } - var applyButtons = document.querySelectorAll('.asset-search-widget-dialog .apply-filter'); + var applyButtons = document.querySelectorAll( + '.asset-search-widget-dialog .apply-filter'); for (i = 0; i < applyButtons.length; ++i) { applyButtons[i].addEventListener('click', function (event) { @@ -217,29 +266,30 @@ document.addEventListener('DOMContentLoaded', function () { } }); -document.addEventListener('DOMContentLoaded', function() { - +document.addEventListener('DOMContentLoaded', function () { + var i; - + var buttons = document.querySelectorAll('.select-item-button'); for (i = 0; i < buttons.length; ++i) { - - buttons[i].addEventListener('click', function(event) { - + + buttons[i].addEventListener('click', function (event) { + var button = event.currentTarget; var dialogId = button.getAttribute('data-dialogId'); - + toggleSelectItemDialog('show', dialogId); event.stopPropagation(); return false; }); } - - var closeButtons = document.querySelectorAll('.item-search-widget-dialog .close-button'); - for(i = 0; i < closeButtons.length; ++i) { - - closeButtons[i].addEventListener('click', function(event) { - + + var closeButtons = document.querySelectorAll( + '.item-search-widget-dialog .close-button'); + for (i = 0; i < closeButtons.length; ++i) { + + closeButtons[i].addEventListener('click', function (event) { + var button = event.currentTarget; var dialogId = button.getAttribute('data-dialogId'); @@ -249,8 +299,9 @@ document.addEventListener('DOMContentLoaded', function() { return false; }); } - - var applyButtons = document.querySelectorAll('.item-search-widget-dialog .apply-filter'); + + var applyButtons = document.querySelectorAll( + '.item-search-widget-dialog .apply-filter'); for (i = 0; i < applyButtons.length; ++i) { applyButtons[i].addEventListener('click', function (event) { diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/styles/admin.css b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/styles/admin.css index c76d0c190..bf7c27b7e 100644 --- a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/styles/admin.css +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/styles/admin.css @@ -1441,7 +1441,12 @@ img.cmsImageDisplay { } div.asset-search-widget dialog, -div.item-search-widget dialog { +div.item-search-widget dialog, +div.journal-search-widget dialog, +div.publication-search-widget dialog, +div.publisher-search-widget dialog, +div.series-search-widget dialog { + background-color: #e6e4f2; border: 0px solid transparent; @@ -1464,22 +1469,38 @@ div.item-search-widget dialog { } div.asset-search-widget dialog[open="open"], -div.item-search-widget dialog[open="open"] { +div.item-search-widget dialog[open="open"], +div.journal-search-widget dialog[open="open"], +div.publication-search-widget dialog[open="open"], +div.publisher-search-widget dialog[open="open"], +div.series-search-widget dialog[open="open"] { display: block; } div.asset-search-widget dialog .controls, -div.item-search-widget dialog .controls { +div.item-search-widget dialog .controls, +div.journal-search-widget .controls, +div.publication-search-widget .controls, +div.publisher-search-widget .controls, +div.series-search-widget .controls { padding: 0.5em; } div.asset-search-widget dialog .controls .apply-filter, -div.item-search-widget dialog .controls .apply-filter{ +div.item-search-widget dialog .controls .apply-filter, +div.journal-search-widget .controls .apply-filter, +div.publication-search-widget .controls .apply-filter, +div.publisher-search-widget .controls .apply-filter, +div.series-search-widget .controls .apply-filter { margin-left: 0.5em; } div.asset-search-widget dialog .controls label, -div.item-search-widget dialog .controls label { +div.item-search-widget dialog .controls label, +div.journal-search-widget .controls .label , +div.publication-search-widget .controls .label, +div.publisher-search-widget .controls .label, +div.series-search-widget .controls .label { font-weight: bold; @@ -1487,14 +1508,22 @@ div.item-search-widget dialog .controls label { } div.asset-search-widget dialog .dialogarea controls button, -div.item-search-widget dialog .dialogarea controls button{ +div.item-search-widget dialog .dialogarea controls button, +div.journal-search-widget .dialogarea controls button, +div.publication-search-widget .dialogarea controls button, +div.publisher-search-widget .dialogarea controls button, +div.series-search-widget { margin-left: 0.5em; } div.asset-search-widget dialog .dialogarea table, -div.item-search-widget dialog .dialogarea table { +div.item-search-widget dialog .dialogarea table, +div.journal-search-widget .dialogarea table , +div.publication-search-widget .dialogarea table, +div.publisher-search-widget .dialogarea table, +div.series-search-widget .dialogarea table { margin-top: 1em; margin-left: 0.5em; @@ -1502,7 +1531,11 @@ div.item-search-widget dialog .dialogarea table { } div.asset-search-widget dialog .titlebar, -div.item-search-widget dialog .titlebar { +div.item-search-widget dialog .titlebar, +.div.journal-search-widget dialog .titlebar, +div.publication-search-widget dialog .titlebar, +div.publisher-search-widget dialog .titlebar, +div.series-search-widget dialog .titlebar { margin-top: 0; padding: 0.5em 1em; @@ -1520,7 +1553,11 @@ div.item-search-widget dialog .titlebar { } div.asset-search-widget dialog .titlebar .close-button, -div.item-search-widget dialog .titlebar .close-button { +div.item-search-widget dialog .titlebar .close-button, +div.journal-search-widget.titlebar .close-button, +div.publication-search-widget .titlebar .close-button, +div.publisher-search-widget .titlebar .close-button, +div.series-search-widget.titlebar .close-button { background-color: transparent; @@ -1537,12 +1574,20 @@ div.item-search-widget dialog .titlebar .close-button { } div.asset-search-widget dialog .titlebar .close-button:after, -div.item-search-widget dialog .titlebar .close-button:after { +div.item-search-widget dialog .titlebar .close-button:after, +div.journal-search-widget .titlebar .close-button:after , +div.publication-search-widget .titlebar .close-button:after , +div.publisher-search-widget .titlebar .close-button:after , +div.series-search-widget .titlebar .close-button:after { content: '\2715'; } div.asset-search-widget dialog .titlebar .close-button span, -div.item-search-widget dialog .titlebar .close-button span { +div.item-search-widget dialog .titlebar .close-button span, +div.journal-search-widget .titlebar .close-button span , +div.publication-search-widget .titlebar .close-button span , +div.publisher-search-widget .titlebar .close-button span , +div.series-search-widget .titlebar .close-button span { position: absolute; top: -999px; @@ -1553,24 +1598,40 @@ div.item-search-widget dialog .titlebar .close-button span { } div.asset-search-widget dialog .titlebar .close-button:hover, -div.item-search-widget dialog .titlebar .close-button:hover { +div.item-search-widget dialog .titlebar .close-button:hover, +div.journal-search-widget dialog .titlebar .close-button:hover , +div.publication-search-widget dialog .titlebar .close-button:hover , +div.publisher-search-widget dialog .titlebar .close-button:hover , +div.series-search-widget dialog .titlebar .close-button:hover { cursor: pointer; } div.asset-search-widget dialog .selectable-assets table, -div.item-search-widget dialog .selectable-items table{ +div.item-search-widget dialog .selectable-items table, +div.journal-search-widget dialog .selectable-items table , +div.publication-search-widget dialog .selectable-items table , +div.publisher-search-widget dialog .selectable-items table , +div.series-search-widget dialog .selectable-items table { width: 100%; padding: 0.35em; table-layout: fixed; } div.asset-search-widget dialog .selectable-assets table tbody tr td, -div.item-search-widget dialog .selectable-items table tbody tr td{ +div.item-search-widget dialog .selectable-items table tbody tr td, +div.journal-search-widget dialog .selectable-items table tbody tr td , +div.publication-search-widget dialog .selectable-items table tbody tr td , +div.publisher-search-widget dialog .selectable-items table tbody tr td , +div.series-search-widget dialog .selectable-items table tbody tr td { overflow: hidden; } div.asset-search-widget dialog .selectable-assets table thead th, -div.item-search-widget dialog .selectable-items table thead th{ +div.item-search-widget dialog .selectable-items table thead th, +div.journal-search-widget dialog .selectable-items table thead th , +div.publication-search-widget dialog .selectable-items table thead th , +div.publisher-search-widget dialog .selectable-items table thead th , +div.series-search-widget dialog .selectable-items table thead th { text-align: center; } diff --git a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/texts/cms.xml b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/texts/cms.xml index ef5147bc0..ad63c9d6d 100644 --- a/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/texts/cms.xml +++ b/ccm-theme-foundry/src/main/resources/themes/foundry/foundry/texts/cms.xml @@ -53,8 +53,7 @@ Ohne Auswahl schließen Close without selecting an asset - - + Zugewiesene Kategorien bearbeiten Edit assigned categories @@ -123,6 +122,51 @@ Close + + Filtern nach + Filter using + + + Anwenden + Apply + + + Kein Verlag ausgewählt + No publisher selected + + + Ausgewählter Verlag + Selected publisher + + + Name + Name + + + Type + Typ + + + Verlag auswählen + Select publisher + + + Name + Name + + + Name + Name + + + Wählen Sie den zu verwendenden Verlag aus + Select the publisher to use + + + Ohne Auswahl schließen + Close without selecting an publisher + + Item Summary Zusammenfassung