/** * Returns ajax wait message.<p> * * @return html code */ protected String buildAjaxWaitMessage() { StringBuffer html = new StringBuffer(512); html.append("<table border='0' style='vertical-align:middle; height: 150px;'>\n"); html.append("<tr><td width='40' align='center' valign='middle'><img src='"); html.append(CmsWorkplace.getSkinUri()); html.append("commons/wait.gif' id='ajaxreport-img' width='32' height='32' alt=''></td>\n"); html.append("<td valign='middle'><span id='ajaxreport-txt' style='color: #000099; font-weight: bold;'>\n"); html.append(key(org.opencms.workplace.Messages.GUI_AJAX_REPORT_WAIT_0)); html.append("</span><br></td></tr></table>\n"); return html.toString(); }
/** * Returns ajax wait message.<p> * * @return html code */ protected String buildAjaxWaitMessage() { StringBuffer html = new StringBuffer(512); html.append("<table border='0' style='vertical-align:middle; height: 150px;'>\n"); html.append("<tr><td width='40' align='center' valign='middle'><img src='"); html.append(CmsWorkplace.getSkinUri()); html.append("commons/wait.gif' id='ajaxreport-img' width='32' height='32' alt=''></td>\n"); html.append("<td valign='middle'><span id='ajaxreport-txt' style='color: #000099; font-weight: bold;'>\n"); html.append(key(org.opencms.workplace.Messages.GUI_AJAX_REPORT_WAIT_0)); html.append("</span><br></td></tr></table>\n"); return html.toString(); }
html.append("\t\t\tdocument.getElementById('butContinue').className = 'hide';\n"); html.append("\t\t\tconfMsg.innerHTML = '"); html.append(key(org.opencms.workplace.commons.Messages.GUI_OPERATION_BLOCKING_LOCKS_0)); html.append("';\n"); html.append("\t\t} else {\n"); html.append("\t\tdocument.getElementById('butContinue').className = 'hide';\n"); html.append("\t\tconfMsg.innerHTML = '"); html.append(key(Messages.GUI_AJAX_REPORT_WAIT_0)); html.append("';\n"); html.append("\t}\n");
html.append("\t\t\tdocument.getElementById('butContinue').className = 'hide';\n"); html.append("\t\t\tconfMsg.innerHTML = '"); html.append(key(org.opencms.workplace.commons.Messages.GUI_OPERATION_BLOCKING_LOCKS_0)); html.append("';\n"); html.append("\t\t} else {\n"); html.append("\t\tdocument.getElementById('butContinue').className = 'hide';\n"); html.append("\t\tconfMsg.innerHTML = '"); html.append(key(Messages.GUI_AJAX_REPORT_WAIT_0)); html.append("';\n"); html.append("\t}\n");
/** * Returns the html code to build the header box.<p> * * @return html code * * @throws CmsException if something goes wrong */ public String buildLockHeaderBox() throws CmsException { StringBuffer html = new StringBuffer(512); // include resource info html.append(dialogBlockStart(null)); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_TITLE_0)); html.append(": "); html.append(getJsp().property("Title", getParamResource(), "")); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_STATE_0)); html.append(": "); html.append(getState()); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_PERMALINK_0)); html.append(": "); html.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); html.append(dialogBlockEnd()); return html.toString(); }
result.append(wp.key(Messages.GUI_PERMISSION_SELECT_VIEW_0)); result.append("</td>\n"); String selectedView = wp.getSettings().getPermissionDetailView(); result.append(wp.paramsAsHidden()); result.append("\t<input type=\"submit\" class=\"dialogbutton\" value=\"").append( wp.key(Messages.GUI_LABEL_SUMMARY_0)).append("\""); if (!"long".equals(selectedView)) { result.append(" disabled=\"disabled\""); result.append(wp.paramsAsHidden()); result.append("\t<input type=\"submit\" class=\"dialogbutton\" value=\"").append( wp.key(Messages.GUI_LABEL_DETAILS_0)).append("\""); if ("long".equals(selectedView)) { result.append(" disabled=\"disabled\"");
result.append(wp.key(Messages.GUI_PERMISSION_SELECT_VIEW_0)); result.append("</td>\n"); String selectedView = wp.getSettings().getPermissionDetailView(); result.append(wp.paramsAsHidden()); result.append("\t<input type=\"submit\" class=\"dialogbutton\" value=\"").append( wp.key(Messages.GUI_LABEL_SUMMARY_0)).append("\""); if (!"long".equals(selectedView)) { result.append(" disabled=\"disabled\""); result.append(wp.paramsAsHidden()); result.append("\t<input type=\"submit\" class=\"dialogbutton\" value=\"").append( wp.key(Messages.GUI_LABEL_DETAILS_0)).append("\""); if ("long".equals(selectedView)) { result.append(" disabled=\"disabled\"");
/** * Returns the html code to build the header box.<p> * * @return html code * * @throws CmsException if something goes wrong */ public String buildLockHeaderBox() throws CmsException { StringBuffer html = new StringBuffer(512); // include resource info html.append(dialogBlockStart(null)); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_TITLE_0)); html.append(": "); html.append(getJsp().property("Title", getParamResource(), "")); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_STATE_0)); html.append(": "); html.append(getState()); html.append("<br>\n"); html.append(key(org.opencms.workplace.commons.Messages.GUI_LABEL_PERMALINK_0)); html.append(": "); html.append(OpenCms.getLinkManager().getPermalink(getCms(), getParamResource())); html.append(dialogBlockEnd()); return html.toString(); }
case BUTTON_OK: result.append("<input name=\"ok\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_OK_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" type=\"submit\""); case BUTTON_CANCEL: result.append("<input name=\"cancel\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_CANCEL_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\""); case BUTTON_EDIT: result.append("<input name=\"ok\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_EDIT_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" type=\"submit\""); case BUTTON_DISCARD: result.append("<input name=\"cancel\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_DISCARD_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\""); case BUTTON_CLOSE: result.append("<input name=\"close\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_CLOSE_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\"");
case BUTTON_OK: result.append("<input name=\"ok\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_OK_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" type=\"submit\""); case BUTTON_CANCEL: result.append("<input name=\"cancel\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_CANCEL_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\""); case BUTTON_EDIT: result.append("<input name=\"ok\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_EDIT_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" type=\"submit\""); case BUTTON_DISCARD: result.append("<input name=\"cancel\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_DISCARD_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\""); case BUTTON_CLOSE: result.append("<input name=\"close\" type=\"button\" value=\""); result.append(key(Messages.GUI_DIALOG_BUTTON_CLOSE_0) + "\""); if (attribute.toLowerCase().indexOf("onclick") == -1) { result.append(" onclick=\"submitAction('" + DIALOG_CANCEL + "', form);\"");
html.append(CmsDialog.PARAM_FRAMENAME); html.append("' value=''>\n"); html.append(buildAjaxResultContainer(key(org.opencms.workplace.commons.Messages.GUI_LOCK_RESOURCES_TITLE_0))); html.append("<div id='conf-msg'></div>\n"); html.append(buildLockAdditionalOptions());
html.append( dialog.buildAjaxResultContainer( dialog.key(org.opencms.workplace.commons.Messages.GUI_LOCK_RESOURCES_TITLE_0))); html.append("<div id='conf-msg'></div>\n"); html.append(dialog.buildLockAdditionalOptions());
/** * Gets a formatted file state string.<p> * * @return formatted state string * * @throws CmsException if something goes wrong */ public String getState() throws CmsException { if (CmsStringUtil.isNotEmpty(getParamResource())) { CmsResource file = getCms().readResource(getParamResource(), CmsResourceFilter.ALL); if (getCms().isInsideCurrentProject(getParamResource())) { return key(Messages.getStateKey(file.getState())); } else { return key(Messages.GUI_EXPLORER_STATENIP_0); } } return "+++ resource parameter not found +++"; }
/** * Gets a formatted file state string.<p> * * @return formatted state string * * @throws CmsException if something goes wrong */ public String getState() throws CmsException { if (CmsStringUtil.isNotEmpty(getParamResource())) { CmsResource file = getCms().readResource(getParamResource(), CmsResourceFilter.ALL); if (getCms().isInsideCurrentProject(getParamResource())) { return key(Messages.getStateKey(file.getState())); } else { return key(Messages.GUI_EXPLORER_STATENIP_0); } } return "+++ resource parameter not found +++"; }