|
Author: jleroux
Date: Thu Dec 9 09:29:03 2010 New Revision: 1043874 URL: http://svn.apache.org/viewvc?rev=1043874&view=rev Log: A patch from Sascha Rodekamp "We need to replace all references to whizzywig.js" (https://issues.apache.org/jira/browse/OFBIZ-4030) - OFBIZ-4030 We had still some references to whizzywig in *.ftl, *.java files. We use now only elrte Editor and removed whizzywig.js Note that this patch fix a bug which is still in trunk, I don't care about trunk since we will merge soon. But I have opened a new issue for R10.04 at https://issues.apache.org/jira/browse/OFBIZ-4050 Modified: ofbiz/branches/jquery/applications/content/widget/content/DataResourceForms.xml ofbiz/branches/jquery/applications/content/widget/forum/BlogForms.xml ofbiz/branches/jquery/applications/content/widget/forum/ForumForms.xml ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml Modified: ofbiz/branches/jquery/applications/content/widget/content/DataResourceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/content/widget/content/DataResourceForms.xml?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/content/widget/content/DataResourceForms.xml (original) +++ ofbiz/branches/jquery/applications/content/widget/content/DataResourceForms.xml Thu Dec 9 09:29:03 2010 @@ -500,7 +500,7 @@ under the License. <alt-target use-when="electronicText==null" target="addHtmlText"/> <auto-fields-entity entity-name="ElectronicText"/> <field name="dataResourceId" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"><display/></field> - <field name="textData" id-name="textData" encode-output="false"><textarea cols="120" rows="20" visual-editor-enable="true"/></field> + <field name="textData" id-name="textData" encode-output="true"><textarea cols="120" rows="20" visual-editor-enable="true" /></field> <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> </forms> Modified: ofbiz/branches/jquery/applications/content/widget/forum/BlogForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/content/widget/forum/BlogForms.xml?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/content/widget/forum/BlogForms.xml (original) +++ ofbiz/branches/jquery/applications/content/widget/forum/BlogForms.xml Thu Dec 9 09:29:03 2010 @@ -70,8 +70,8 @@ under the License. <field name="contentId" title="${uiLabelMap.ContentBlogEntryId}" use-when="contentId!=void&&contentId!=null"><display/></field> <field name="contentName" title="${uiLabelMap.ContentArticleName}"><text size="40"/></field> <field name="description"><textarea cols="60" rows="2"/></field> - <field name="summaryData" title="${uiLabelMap.ContentSummary}" widget-style="inputBox dojo-ResizableTextArea"><textarea cols="60" rows="4"/></field> - <field name="articleData" title="${uiLabelMap.ContentBlogArticle}" widget-style="inputBox dojo-ResizableTextArea"><textarea cols="100" rows="20" visual-editor-enable="true"/></field> + <field name="summaryData" title="${uiLabelMap.ContentSummary}" widget-style="inputBox"><textarea cols="60" rows="4"/></field> + <field name="articleData" title="${uiLabelMap.ContentBlogArticle}" widget-style="inputBox"><textarea cols="100" rows="20" visual-editor-enable="true"/></field> <field name="uploadedFile" title="${uiLabelMap.ContentImage}"><file size="25"/></field> <field name="templateDataResourceId" title="${uiLabelMap.ContentTemplate}"> <drop-down> Modified: ofbiz/branches/jquery/applications/content/widget/forum/ForumForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/content/widget/forum/ForumForms.xml?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/applications/content/widget/forum/ForumForms.xml (original) +++ ofbiz/branches/jquery/applications/content/widget/forum/ForumForms.xml Thu Dec 9 09:29:03 2010 @@ -219,7 +219,7 @@ under the License. <field name="ownerContentId"><hidden value="${parameters.forumId}"/></field> <field name="caContentId"><hidden value="${parameters.forumMessageIdTo}"/></field> <field name="caContentAssocTypeId"><hidden value="RESPONSE"/></field> - <field name="forumMessageText" parameter-name="textData"><textarea rows="10" visual-editor-enable="true" visual-editor-buttons="undo redo bold italic underline bullet indent outdent link"/></field> + <field name="forumMessageText" parameter-name="textData"><textarea rows="10" visual-editor-enable="true" visual-editor-buttons="compact"/></field> <field name="addButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> <form name="AddForumThreadMessage" type="single" extends="AddForumMessage" target="updateForumThreadMessage" Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original) +++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Thu Dec 9 09:29:03 2010 @@ -424,7 +424,7 @@ public class MacroFormRenderer implement visualEdtiorEnalble = "true"; buttons = textareaField.getVisualEditorButtons(context); if (UtilValidate.isEmpty(buttons)) { - buttons = "all"; + buttons = "maxi"; } } String readonly = ""; Modified: ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original) +++ ofbiz/branches/jquery/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Thu Dec 9 09:29:03 2010 @@ -487,21 +487,28 @@ public class HtmlFormRenderer extends Ht writer.append("</textarea>"); if (textareaField.getVisualEditorEnable()) { - writer.append("<script language=\"javascript\" src=\"/images/htmledit/whizzywig.js\" type=\"text/javascript\"></script>"); - writer.append("<script language=\"javascript\" type=\"text/javascript\"> buttonPath = \"/images/htmledit/\"; cssFile=\"/images/htmledit/simple.css\";makeWhizzyWig(\""); - if (UtilValidate.isNotEmpty(idName)) { - writer.append(idName); - } else { - writer.append("htmlEditArea"); - } - writer.append("\",\""); + writer.append("<script language=\"javascript\" src=\"/images/jquery/plugins/elrteEditor/elrte.min.js\" type=\"text/javascript\"></script>"); + writer.append("<link href=\"/images/jquery/plugins/elrteEditor/css/elrte.full.css\" rel=\"stylesheet\" type=\"text/css\">"); + writer.append("<script language=\"javascript\" type=\"text/javascript\"> var opts = { cssClass : 'el-rte', toolbar : "); + // define the toolsbar String buttons = textareaField.getVisualEditorButtons(context); if (UtilValidate.isNotEmpty(buttons)) { writer.append(buttons); } else { - writer.append("all"); + writer.append("maxi"); } - writer.append("\") </script>"); + writer.append(", doctype : '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">', //'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\">'"); + writer.append(", cssfiles : ['/images/jquery/plugins/elrteEditor/css/elrte-inner.css'] "); + writer.append("}"); + // load the wysiwyg editor + writer.append("jQuery('#"); + if (UtilValidate.isNotEmpty(idName)) { + writer.append(idName); + } else { + writer.append("htmlEditArea"); + } + writer.append("').elrte(opts);"); + writer.append("</script>"); } this.addAsterisks(writer, context, modelFormField); Modified: ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl (original) +++ ofbiz/branches/jquery/framework/widget/templates/htmlFormMacroLibrary.ftl Thu Dec 9 09:29:03 2010 @@ -76,8 +76,17 @@ under the License. <#if value?has_content>${value}</#if><#t/> </textarea><#lt/> <#if visualEdtiorEnalble?has_content> - <script language="javascript" src="/images/htmledit/whizzywig.js" type="text/javascript"></script><#rt/> - <script language="javascript" type="text/javascript"> buttonPath = "/images/htmledit/"; cssFile="/images/htmledit/simple.css"; makeWhizzyWig("${id?default("")}", "${buttons?default("")}")</script> + <script language="javascript" src="/images/jquery/plugins/elrteEditor/elrte.min.js" type="text/javascript"></script><#rt/> + <link href="/images/jquery/plugins/elrteEditor/css/elrte.full.css" rel="stylesheet" type="text/css"> + <script language="javascript" type="text/javascript"> + var opts = { + cssClass : 'el-rte', + toolbar : '${buttons?default("maxi")}', + doctype : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', //'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">', + cssfiles : ['/images/jquery/plugins/elrteEditor/css/elrte-inner.css'] + } + jQuery('#${id?default("")}').elrte(opts); + </script> </#if> </#macro> Modified: ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ebaystore/webapp/ebaystore/store/productsearchExport.ftl Thu Dec 9 09:29:03 2010 @@ -493,17 +493,25 @@ under the License. <td width="60%" valign="top"> <table cellspacing="0"> <tr><td> - <script language="javascript" src="/images/htmledit/whizzywig.js" type="text/javascript"></script> - <script language="javascript" type="text/javascript"> buttonPath = "/images/htmledit/"; cssFile="/images/htmledit/simple.css";</script> + <script language="javascript" src="/images/jquery/plugins/elrteEditor/elrte.min.js" type="text/javascript"></script> + <link href="/images/jquery/plugins/elrteEditor/css/elrte.full.css" rel="stylesheet" type="text/css"> + <script language="javascript" type="text/javascript"> + var opts = { + cssClass : 'el-rte', + toolbar : 'maxi', + doctype : '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', //'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">', + cssfiles : ['/images/jquery/plugins/elrteEditor/css/elrte-inner.css'] + } + </script> <textarea id="description" name="description" style="width:800px; height:300px"> <#if item.getDescription()?exists>description<#else>${item.getDescription()?if_exists}</#if> </textarea> <script type="text/javascript"> - makeWhizzyWig("description", "all"); + jQuery('#description').elrte(opts); </script> </td></tr> </table> - </td> + </td> <td width="30%" valign="top"> <table align="left" width="60%" height="100%" cellspacing="0"> <tr> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml?rev=1043874&r1=1043873&r2=1043874&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/ForumForms.xml Thu Dec 9 09:29:03 2010 @@ -33,11 +33,11 @@ under the License. <field name="pubPtContentId"><hidden value="${parameters.forumId}"/></field> <field name="contentAssocTypeId"><hidden value="${contentAssoc.contentAssocTypeId}"/></field> <field name="textData" map-name="dummy"> - <textarea rows="10" visual-editor-enable="true" visual-editor-buttons="undo redo bold italic underline bullet indent outdent link"/> + <textarea rows="10" visual-editor-enable="true" visual-editor-buttons="compact"/> </field> <field name="addButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> - + <form name="EditCombo" target="uploadContentAndImage" title="" type="upload" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox"> <field name="imageData" > |
| Free forum by Nabble | Edit this page |
