/** * @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) { StringBuffer result = new StringBuffer(256); // import the JavaScript for the gallery widget result.append( getJSIncludeFile(CmsWorkplace.getSkinUri() + "components/widgets/" + getNameLower() + "gallery.js")); return result.toString(); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitCall(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitCall(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return "\tinit" + getNameUpper() + "Gallery();\n"; }
widgetDialog.button( "javascript:open" + getNameUpper() + "Gallery('" + A_CmsAjaxGallery.MODE_WIDGET + "');return false;", null, getNameLower() + "gallery", Messages.getButtonName(getNameLower()), widgetDialog.getButtonStyle())); if (showPreview(value)) { result.append( widgetDialog.button( "javascript:preview" + getNameUpper() + "('" + id + "');return false;", null, "preview.png", if (getNameLower().equals("image")) { widgetDialog.getMessages(), param, getConfiguration()); widgetDialog.getMessages(), param, getConfiguration());
/** * @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(16); result.append("function init"); result.append(getNameUpper()); result.append("Gallery() {\n"); result.append("\t"); result.append(getNameLower()); result.append("GalleryPath = '"); // path to download/image/link/html/table gallery result.append(A_CmsAjaxGallery.PATH_GALLERIES); result.append(getNameLower()); result.append("gallery/index.jsp?"); result.append("';\n"); result.append("}\n"); return result.toString(); }
/** * @see org.opencms.widgets.I_CmsADEWidget#getConfiguration(org.opencms.file.CmsObject, org.opencms.xml.types.A_CmsXmlContentValue, org.opencms.i18n.CmsMessages, org.opencms.file.CmsResource, java.util.Locale) */ public String getConfiguration( CmsObject cms, A_CmsXmlContentValue schemaType, CmsMessages messages, CmsResource resource, Locale contentLocale) { CmsGalleryWidgetConfiguration config = new CmsGalleryWidgetConfiguration( cms, messages, schemaType, getConfiguration()); JSONObject linkGalleryInfo = new JSONObject(); try { linkGalleryInfo.put("startupfolder", config.getStartup()); linkGalleryInfo.put("startuptype", config.getType()); linkGalleryInfo.put("editedresource", resource.getRootPath()); } catch (JSONException e) { // TODO: Auto-generated catch block e.printStackTrace(); } return "¶ms=" + linkGalleryInfo.toString(); }
+ getNameUpper() + "Gallery('" + A_CmsAjaxGallery.MODE_WIDGET if (showPreview(value)) { result.append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>"); result.append(widgetDialog.button( "javascript:preview" + getNameUpper() + "('" + id + "');return false;", null, "preview.png", if (getNameLower().equals("image")) { widgetDialog, param, getConfiguration()); widgetDialog, param, getConfiguration());
/** * @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(16); result.append("function init"); result.append(getNameUpper()); result.append("Gallery() {\n"); result.append("\t"); result.append(getNameLower()); result.append("GalleryPath = '"); // path to download/image/link/html/table gallery result.append(A_CmsAjaxGallery.PATH_GALLERIES); result.append(getNameLower()); result.append("gallery/index.jsp?"); result.append("';\n"); result.append("}\n"); return result.toString(); }
/** * @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) { StringBuffer result = new StringBuffer(256); // import the JavaScript for the gallery widget result.append(getJSIncludeFile(CmsWorkplace.getSkinUri() + "components/widgets/" + getNameLower() + "gallery.js")); return result.toString(); }
/** * @see org.opencms.widgets.I_CmsWidget#getDialogInitCall(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog) */ @Override public String getDialogInitCall(CmsObject cms, I_CmsWidgetDialog widgetDialog) { return "\tinit" + getNameUpper() + "Gallery();\n"; }