%@ page import=" org.opencms.workplace.*, org.opencms.workplace.editors.*, org.opencms.workplace.commons.* "%><% // initialize the workplace class CmsDialogProperty wp = new CmsDialogProperty(pageContext, request, response); String additionalScript = ""; //////////////////// start of switch statement switch (wp.getAction()) { case CmsDialog.ACTION_CLOSEPOPUP_SAVE: //////////////////// ACTION: save edited properties for the current resource type and close the popup window wp.actionEdit(request); if (wp.hasTemplateChanged()) { // add script to refresh editor content when template has changed additionalScript = "function closeAction() {\n\tthis.refreshOpener = true;\n}\nvar closeObj = new closeAction();\nif (window.opener.popupCloseAction) {\nwindow.opener.popupCloseAction(closeObj);\n}"; } case CmsDialog.ACTION_CLOSEPOPUP: //////////////////// ACTION: close the popup window %>
<% break; case CmsDialog.ACTION_CANCEL: //////////////////// ACTION: cancel button pressed, close dialog wp.actionDeleteResource(); wp.actionCloseDialog(); break; case CmsPropertyAdvanced.ACTION_SAVE_EDIT: //////////////////// ACTION: save edited properties for the current resource type wp.actionEdit(request); wp.actionCloseDialog(); break; case CmsPropertyCustom.ACTION_EDIT: default: //////////////////// ACTION: show edit properties window wp.setParamAction(CmsPropertyAdvanced.DIALOG_SAVE_EDIT); %><%= wp.htmlStart(null, wp.getParamTitle()) %> <%= wp.bodyStart("dialog", "onload=\"window.setTimeout('doSet()',50);\"") %> <%= wp.dialogStart() %> <%= wp.dialogContentStart(wp.getParamTitle()) %> <%= wp.dialogEnd() %> <%= wp.bodyEnd() %> <%= wp.htmlEnd() %> <% } //////////////////// end of switch statement %>