/** * @see org.opencms.widgets.I_CmsWidget#getDialogIncludes(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogIncludes(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return calendarIncludes(widgetDialog.getLocale()); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogIncludes(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogIncludes(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return calendarIncludes(widgetDialog.getLocale()); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitMethod(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitMethod(CmsObject cms, I_CmsWidgetDialog widgetDialog) { StringBuffer result = new StringBuffer(128); result.append("function initColorPicker() {\n"); result.append("\tcolorPicker.title = \""); result.append(Messages.get().getBundle(widgetDialog.getLocale()).key(Messages.GUI_DIALOG_COLOR_TITLE_0)); result.append("\";\n"); result.append("\tcolorPicker.url=\""); result.append(CmsWorkplace.getSkinUri()); result.append("components/js_colorpicker/index.html\";\n"); result.append("}\n"); return result.toString(); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitMethod(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitMethod(CmsObject cms, I_CmsWidgetDialog widgetDialog) { StringBuffer result = new StringBuffer(128); result.append("function initColorPicker() {\n"); result.append("\tcolorPicker.title = \""); result.append(Messages.get().getBundle(widgetDialog.getLocale()).key(Messages.GUI_DIALOG_COLOR_TITLE_0)); result.append("\";\n"); result.append("\tcolorPicker.url=\""); result.append(CmsWorkplace.getSkinUri()); result.append("components/js_colorpicker/index.html\";\n"); result.append("}\n"); return result.toString(); }
Locale contentLocale = widgetDialog.getLocale(); try { I_CmsXmlContentValue value = (I_CmsXmlContentValue)param;
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = param.getStringValue(cms); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(result) && !"0".equals(result)) { try { result = getCalendarLocalizedTime( widgetDialog.getLocale(), widgetDialog.getMessages(), Long.parseLong(result)); } catch (NumberFormatException e) { if (!CmsMacroResolver.isMacro(result, CmsMacroResolver.KEY_CURRENT_TIME)) { // neither long nor macro, show empty value result = ""; } } } else { result = ""; } return result; }
/** * @see org.opencms.widgets.A_CmsWidget#getWidgetStringValue(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override public String getWidgetStringValue(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { String result = param.getStringValue(cms); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(result) && !"0".equals(result)) { try { result = getCalendarLocalizedTime( widgetDialog.getLocale(), widgetDialog.getMessages(), Long.parseLong(result)); } catch (NumberFormatException e) { if (!CmsMacroResolver.isMacro(result, CmsMacroResolver.KEY_CURRENT_TIME)) { // neither long nor macro, show empty value result = ""; } } } else { result = ""; } return result; }
+ paramId + "');openLinkDialog('" + Messages.get().getBundle(widgetDialog.getLocale()).key(Messages.GUI_BUTTON_LINKTO_0) + "');", null, "link", "button.linkto", widgetDialog.getButtonStyle())); buttonsActive = true; + paramId + "');openAnchorDialog('" + Messages.get().getBundle(widgetDialog.getLocale()).key(Messages.ERR_EDITOR_MESSAGE_NOSELECTION_0) + "');", null, "anchor", Messages.GUI_BUTTON_ANCHOR_0, widgetDialog.getButtonStyle())); buttonsActive = true;
/** * @see org.opencms.widgets.A_CmsSelectWidget#parseSelectOptions(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */ @Override protected List<CmsSelectWidgetOption> parseSelectOptions( CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { List<CmsSelectWidgetOption> options = new ArrayList<CmsSelectWidgetOption>(); String myPath = getResourcePath(cms, widgetDialog); Map<CmsUUID, CmsElementView> views = OpenCms.getADEManager().getElementViews(cms); for (CmsElementView view : views.values()) { if (shouldIgnore(view, views, myPath)) { continue; } String value = ""; if (view.getResource() != null) { value = cms.getSitePath(view.getResource()); } else if ((view.getId() != null) && !view.getId().isNullUUID()) { // synthetic view value = "view://" + view.getId(); } options.add(new CmsSelectWidgetOption(value, false, view.getTitle(cms, widgetDialog.getLocale()))); } if (isSelectParent()) { // options.add(new CmsSelectWidgetOption(CmsElementView.PARENT_NONE, true, "--")); } return options; }