Author: andre
Date: 2010-06-11 17:38:11 +0200 (Fri, 11 Jun 2010)
New Revision: 42533

Added:
   openimages/trunk/src/main/webapp/editors/inc/htmleditorsmall.jspx
Modified:
   openimages/trunk/src/main/webapp/editors/inc/form-create.jspx
   openimages/trunk/src/main/webapp/editors/inc/form-edit.jspx
Log:
added htmleditor to these forms

Modified: openimages/trunk/src/main/webapp/editors/inc/form-create.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/inc/form-create.jspx       
2010-06-11 14:46:32 UTC (rev 42532)
+++ openimages/trunk/src/main/webapp/editors/inc/form-create.jspx       
2010-06-11 15:38:11 UTC (rev 42533)
@@ -2,8 +2,8 @@
     class="from-create"
     xmlns:jsp="http://java.sun.com/JSP/Page";
     xmlns:c="http://java.sun.com/jsp/jstl/core";
+    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
     xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
-    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
     >
 
 <jsp:output omit-xml-declaration="true" />
@@ -12,16 +12,19 @@
 <mm:import externid="type" />
 
 <jsp:directive.include file="settings.jspx" />
+<fmt:setBundle basename="eu.openimages.messages" scope="request" />
+<mm:import externid="locale">client</mm:import>
 
 <mm:import externid="mmajaxeditor" />
 <mm:import externid="role">related</mm:import>
 <mm:import externid="dir" />
 <mm:import externid="submit$type" />
-<mm:import externid="locale">client</mm:import>
 
 <mm:content expires="0" type="application/xml" language="${locale}">
 <mm:cloud method="asis">
   
+  <jsp:directive.include file="htmleditorsmall.jspx" />
+
   <mm:form id="create_$type">
     <mm:import id="buffer">
       <mm:createnode type="$type" id="new_node" commitonclose="false">
@@ -42,7 +45,8 @@
           <input name="dir"    type="hidden" value="${dir}" />
           <input name="mmajaxeditor" type="hidden" value="${mmajaxeditor}" />
           <div>
-            <input type="submit" name="submit${type}" value="Save" 
class="submit" />
+            <c:set var="button_save"><fmt:message key="users.form.save" 
/></c:set>
+            <input type="submit" name="submit${type}" value="${button_save}" 
class="submit" />
           </div>
         </fieldset>
       </mm:createnode>

Modified: openimages/trunk/src/main/webapp/editors/inc/form-edit.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/inc/form-edit.jspx 2010-06-11 
14:46:32 UTC (rev 42532)
+++ openimages/trunk/src/main/webapp/editors/inc/form-edit.jspx 2010-06-11 
15:38:11 UTC (rev 42533)
@@ -2,20 +2,24 @@
     class="from-edit"
     xmlns:jsp="http://java.sun.com/JSP/Page";
     xmlns:c="http://java.sun.com/jsp/jstl/core";
+    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
     xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
-    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
     >
 
 <jsp:output omit-xml-declaration="true" />
 
 <mm:import externid="nr" required="true" />
 <mm:import externid="mmajaxeditor" />
+
 <jsp:directive.include file="settings.jspx" />
+<fmt:setBundle basename="eu.openimages.messages" scope="request" />
 <mm:import externid="locale">client</mm:import>
 
 <mm:content expires="0" type="application/xml" language="${locale}">
 <mm:cloud method="asis">
 
+  <jsp:directive.include file="htmleditorsmall.jspx" />
+  
   <mm:form id="edit_$nr">
     <c:if test="${!empty mmajaxeditor}">
       <mm:hasrank minvalue="project manager">
@@ -34,6 +38,7 @@
               <mm:fieldinfo type="forid">
                 <label for="${_}"><mm:fieldinfo type="guiname" /></label>
               </mm:fieldinfo>
+              <p class="info"><mm:fieldinfo type="description" escape="inline" 
/></p>
               <mm:maywrite><mm:fieldinfo type="input" /><mm:fieldinfo 
type="errors" /></mm:maywrite>
               <mm:maywrite inverse="true"><mm:fieldinfo type="guivalue" 
escape="none" /></mm:maywrite>
             </div>
@@ -45,7 +50,8 @@
             <mm:nodeinfo type="type"><input name="type" type="hidden" 
value="${_}" /></mm:nodeinfo>
             <input name="mmajaxeditor" type="hidden" value="${mmajaxeditor}" />
             <div>
-              <input type="submit" name="submit${nr}" value="Save" 
class="submit" />
+              <c:set var="button_save"><fmt:message key="users.form.save" 
/></c:set>
+              <input type="submit" name="submit${nr}" value="${button_save}" 
class="submit" />
             </div>
           </fieldset>
         </mm:maywrite>

Added: openimages/trunk/src/main/webapp/editors/inc/htmleditorsmall.jspx
===================================================================
--- openimages/trunk/src/main/webapp/editors/inc/htmleditorsmall.jspx           
                (rev 0)
+++ openimages/trunk/src/main/webapp/editors/inc/htmleditorsmall.jspx   
2010-06-11 15:38:11 UTC (rev 42533)
@@ -0,0 +1,27 @@
+<jsp:root 
+    xmlns:jsp="http://java.sun.com/JSP/Page";
+    xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0";
+    version="2.0">
+
+  <script type="text/javascript">
+  tinyMCE.init({
+      theme: "advanced",
+      mode : "specific_textareas",
+      editor_selector : /(mm_f_intro|mm_f_body|mm_f_description)/,
+      plugins : "fullscreen,xhtmlxtras",
+      content_css : "${mm:link('/style/css/tiny_mce.css')}",
+      // language : 
"${requestScope['javax.servlet.jsp.jstl.fmt.locale.request']}",
+      
+      theme_advanced_toolbar_align : "left",
+      theme_advanced_blockformats : "p,div,h3,h4,h5,h6,blockquote",
+      theme_advanced_path_location : "bottom",
+      theme_advanced_toolbar_location : "top",
+    
+      theme_advanced_buttons1 : 
"formatselect,bold,italic,|,bullist,numlist,|,link,unlink,|,fullscreen",
+      theme_advanced_buttons2 : "",
+      theme_advanced_buttons3 : "",
+      theme_advanced_resizing : true    
+  });
+  </script>
+
+</jsp:root>

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to