Author: raintang
Date: 2009-06-04 05:42:41 +0200 (Thu, 04 Jun 2009)
New Revision: 35676

Modified:
   
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
   
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
   
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
   
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
   
CMSContainer/trunk/CMSContainer_Demo/www.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/cmsc.org/artikel.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-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
   2009-06-04 03:28:45 UTC (rev 35675)
+++ 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
   2009-06-04 03:42:41 UTC (rev 35676)
@@ -18,15 +18,7 @@
                <%...@include file="/WEB-INF/templates/edit/itemheader.jsp" %>
        </c:if>
 
-
-    <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>
-    </div>
+    <cmsc:field elementid="${elementId}" name="title" edit="${edit}" 
container="h2"/>
     <div class="content">
       <div class="eventinfo">
         <mm:field name="publishdate"><mm:time format="dd-MM-yyyy" /></mm:field>
@@ -37,36 +29,10 @@
       <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}" />
+   <cmsc:field elementid="${elementId}" name="body" 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>
-       
+
       <div class="divider3"></div>
        
       <%-- related articles --%>

Modified: 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
    2009-06-04 03:28:45 UTC (rev 35675)
+++ 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
    2009-06-04 03:42:41 UTC (rev 35676)
@@ -19,50 +19,16 @@
        </c:if>
 
 
-    <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>
-    </div>
+    <cmsc:field elementid="${elementId}" name="title" edit="${edit}" 
container="h2"/>
     <div class="content">
       <!-- top images -->      
       <cmsc-bm:linkedimages width="525" position="top" style="display: block; 
clear: both; padding-bottom: 20px;" />
       <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}" />
+   <cmsc:field elementid="${elementId}" name="body" 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>
-       
       <div class="divider3"></div>
        
       <%-- related articles --%>

Modified: 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
    2009-06-04 03:28:45 UTC (rev 35675)
+++ 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view.jsp
    2009-06-04 03:42:41 UTC (rev 35676)
@@ -18,15 +18,7 @@
                <%...@include file="/WEB-INF/templates/edit/itemheader.jsp" %>
        </c:if>
 
-
-    <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>
-    </div>
+    <cmsc:field elementid="${elementId}" name="title" edit="${edit}" 
container="h2"/>
     <div class="content">
       <div class="eventinfo">
         <mm:field name="publishdate"><mm:time format="dd-MM-yyyy" /></mm:field>
@@ -37,35 +29,8 @@
       <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>
-
-       <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="intro" edit="${edit}" />
+   <cmsc:field elementid="${elementId}" name="body" edit="${edit}" 
options="minHeight:300, htmlarea:true, formId:'contentportlet'"/>
        
       <div class="divider3"></div>
        

Modified: 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
     2009-06-04 03:28:45 UTC (rev 35675)
+++ 
CMSContainer/trunk/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/src/webapp/WEB-INF/templates/view/demo/news/detail_view_simple.jsp
     2009-06-04 03:42:41 UTC (rev 35676)
@@ -18,50 +18,15 @@
                <%...@include file="/WEB-INF/templates/edit/itemheader.jsp" %>
        </c:if>
 
-
-    <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>
-    </div>
+   <cmsc:field elementid="${elementId}" name="title" edit="${edit}" 
container="h2"/>
     <div class="content">
       <!-- top images -->      
       <cmsc-bm:linkedimages width="525" position="top" style="display: block; 
clear: both; padding-bottom: 20px;" />
       <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>
-
-       <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="intro" edit="${edit}" />
+   <cmsc:field elementid="${elementId}" name="body" edit="${edit}" 
options="minHeight:300, htmlarea:true, formId:'contentportlet'"/>
        
       <div class="divider3"></div>
        

Modified: 
CMSContainer/trunk/CMSContainer_Demo/www.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/cmsc.org/artikel.jsp
===================================================================
--- 
CMSContainer/trunk/CMSContainer_Demo/www.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/cmsc.org/artikel.jsp
        2009-06-04 03:28:45 UTC (rev 35675)
+++ 
CMSContainer/trunk/CMSContainer_Demo/www.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/cmsc.org/artikel.jsp
        2009-06-04 03:42:41 UTC (rev 35676)
@@ -17,32 +17,13 @@
                        </mm:relatednodes>
                </cmsc:portletmode>
                
-               <mm:field name="title"> 
-               <c:if test="${edit}">                           
-                               <h2 
id="content_${elementId}_title"><mm:write/></h2>
-                       </c:if>
-                       <c:if test="${!edit}">                          
-                                       <h2><mm:write/></h2>                    
-                       </c:if>
-               </mm:field>             
-               <mm:field name="body">
-                       <c:if test="${edit}">
-                               <div id="content_${elementId}_body">     
-                       </c:if>                                         
-                       <mm:isnotempty><mm:write escape="none" 
/></mm:isnotempty>       
-                       <c:if test="${edit}">
-                               </div>
-                       </c:if>                
-           </mm:field> 
+               <cmsc:field elementid="${elementId}" name="title" 
edit="${edit}" container="h2"/>       
+               <cmsc:field elementid="${elementId}" name="body" edit="${edit}" 
options="minHeight:300, htmlarea:true, formId:'contentportlet'"/>
        </mm:node>
 </mm:cloud>
 
 <cmsc:portletmode name="edit">
        </form>
-       <script type="text/javascript">
-               new InPlaceEditor.Local('content_${elementId}_title');
-               new InPlaceEditor.Local('content_${elementId}_body', 
{minHeight:300, htmlarea:true, formId:'contentportlet'});
-       </script>
 </cmsc:portletmode>
 
 <cmsc:portletmode name="edit">

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

Reply via email to