Author: jstroomer
Date: 2010-02-01 14:32:26 +0100 (Mon, 01 Feb 2010)
New Revision: 40763
Modified:
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/stylesheet.xml
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/stylesheet/edit_stylesheet.xml
CMSContainer/trunk/CMSContainer/migration/migration_1.7_to_1.8.txt
Log:
CMSC-1565 Extend stylesheet feature with stylesheet data from database
Increased maxLength from 1024 to 512000
Enlarged the input field from 3 to 15 rows
Added information to migration script
Modified:
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/stylesheet.xml
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/stylesheet.xml
2010-02-01 13:21:16 UTC (rev 40762)
+++
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/stylesheet.xml
2010-02-01 13:32:26 UTC (rev 40763)
@@ -73,7 +73,7 @@
</positions>
</editor>
<datatype base="line"
xmlns="http://www.mmbase.org/xmlns/datatypes">
- <maxLength value="1024"/>
+ <maxLength value="512000"/>
</datatype>
</field>
<field name="media">
Modified:
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/stylesheet/edit_stylesheet.xml
===================================================================
---
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/stylesheet/edit_stylesheet.xml
2010-02-01 13:21:16 UTC (rev 40762)
+++
CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/stylesheet/edit_stylesheet.xml
2010-02-01 13:32:26 UTC (rev 40763)
@@ -32,9 +32,9 @@
<prompt xml:lang="zh">可覆盖</prompt>
<optionlist select="boolean" />
</field>
- <field name="text" dtmaxlength="1024" ftype="text" rows="3">
- <prompt xml:lang="en">Text</prompt>
- <prompt xml:lang="nl">Text</prompt>
+ <field name="text" dtmaxlength="512000" ftype="text" rows="15">
+ <prompt xml:lang="en">Stylesheet body</prompt>
+ <prompt xml:lang="nl">Stylesheet tekst</prompt>
<prompt xml:lang="zh">脚本</prompt>
<optionlist select="boolean" />
</field>
Modified: CMSContainer/trunk/CMSContainer/migration/migration_1.7_to_1.8.txt
===================================================================
--- CMSContainer/trunk/CMSContainer/migration/migration_1.7_to_1.8.txt
2010-02-01 13:21:16 UTC (rev 40762)
+++ CMSContainer/trunk/CMSContainer/migration/migration_1.7_to_1.8.txt
2010-02-01 13:32:26 UTC (rev 40763)
@@ -1,17 +1,46 @@
-MMigration document:
-
-Part: core
-From version: 1.7
-To version: 1.8
-
-Name: Extended the current stylesheet options in CMSc with dynamic
stylesheets, from the database
-Goal: Add a new field "text" to mm_stylesheet
-Type: manual action
---- Start script ---
-ALTER TABLE mm_stylesheet ADD text text default '';
-ALTER TABLE live_stylesheet ADD text text default '';
---- End script ---
-Exceptions/errors/other problems and what to do:
-*
-*
-*
\ No newline at end of file
+MMigration document:
+
+Part: core
+From version: 1.7
+To version: 1.8
+
+Name: Extended the current stylesheet options in CMSc with dynamic
stylesheets, from the database
+Goal: Add a new field "text" to mm_stylesheet
+Type: manual action
+--- Start script ---
+ALTER TABLE mm_stylesheet ADD m_text TEXT;
+ALTER TABLE live_stylesheet ADD m_text TEXT;
+--- End script ---
+
+Check the layouts of your project. You should change the <c:forEach> that
displays the stylesheets to something like this:
+
+--- Start JSP ---
+<c:forEach var="style" items="${stylesheet}">
+ <c:choose>
+ <c:when test="${empty style.resource}">
+ <link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/stylesheet/${style.id}.css"
media="${style.media}" />
+ </c:when>
+ <c:otherwise>
+ <link rel="stylesheet" type="text/css" href="<cmsc:staticurl
page='/${style.resource}'/>" media="${style.media}" />
+ </c:otherwise>
+ </c:choose>
+</c:forEach>
+--- End JSP ---
+
+If you have overridden the web.xml file in your project, make sure it contains
these declarations in the appropriate places
+--- Start XML ---
+<servlet>
+ <description>Returns css text</description>
+ <servlet-name>stylesheet</servlet-name>
+ <servlet-class>com.finalist.cmsc.servlet.StylesheetServlet</servlet-class>
+</servlet>
+<servlet-mapping>
+ <servlet-name>stylesheet</servlet-name>
+ <url-pattern>/stylesheet/*</url-pattern>
+</servlet-mapping>
+--- End XML ---
+
+Exceptions/errors/other problems and what to do:
+*
+*
+*
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs