Author: mfang
Date: 2009-06-04 05:00:24 +0200 (Thu, 04 Jun 2009)
New Revision: 35670

Modified:
   
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-community-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
Log:
CMSC-479 Create a cmsc:field tag which will help with making one-click edit 
templates

Modified: 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-community-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-community-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
  2009-06-04 02:56:58 UTC (rev 35669)
+++ 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-community-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
  2009-06-04 03:00:24 UTC (rev 35670)
@@ -20,12 +20,7 @@
 
 
     <div class="heading">
-      <h2 id="content_${elementId}_title"><mm:field name="title"/></h2>
-         <c:if test="${edit}">
-                 <script type="text/javascript">
-                       new InPlaceEditor.Local('content_${elementId}_title');
-                 </script>
-         </c:if>
+      <cmsc:field elementid="${elementId}" name="title" edit="${edit}" 
container="h2"/>
     </div>
     <div class="content">
       <!-- top images -->      
@@ -33,35 +28,9 @@
       <cmsc-bm:linkedimages width="220" position="top-left" style="float: 
left; padding: 0px 20px 20px 0px;" />
       <cmsc-bm:linkedimages width="220" position="top-right" style="float: 
right; padding: 0px 0px 20px 20px;" />
 
-       <c:if test="${edit}">
-               <div id="content_${elementId}_intro" class="intro">
-       </c:if>
-      <mm:field name="intro" escape="none">
-        <mm:isnotempty>
-          <p><mm:write /></p>
-          <c:if test="${edit}">
-                       </div>
-                       <script type="text/javascript">
-                               new 
InPlaceEditor.Local('content_${elementId}_intro', {minHeight:300, 
htmlarea:true, formId:'contentportlet'});
-                       </script>
-                 </c:if>
-        </mm:isnotempty>
-      </mm:field>
+       <cmsc:field elementid="${elementId}" name="intro" edit="${edit}" 
options="minHeight:300, htmlarea:true, formId:'contentportlet'"/>
 
-       <c:if test="${edit}">
-               <div id="content_${elementId}_body" class="body">
-       </c:if>
-      <mm:field name="body" escape="none">
-        <mm:isnotempty>
-          <p><mm:write /></p>
-        </mm:isnotempty>
-      </mm:field>
-       <c:if test="${edit}">
-               </div>
-               <script type="text/javascript">
-                       new InPlaceEditor.Local('content_${elementId}_body', 
{minHeight:300, htmlarea:true, formId:'contentportlet'});
-               </script>
-       </c:if>
+       <cmsc:field elementid="${elementId}" name="body" edit="${edit}" 
options="minHeight:300, htmlarea:true, formId:'contentportlet'"/>
        
       <div class="divider3"></div>
        

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

Reply via email to