dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13361
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4268: Creating manifest file with velocity
------------------------------------------------------------
revno: 4268
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-08-09 11:48:09 +0200
message:
Creating manifest file with velocity
added:
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/VelocityCacheManifestResult.java
renamed:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cache.manifest => dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml
dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== renamed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cache.manifest' => 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cache.manifest 2011-08-08 17:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2011-08-09 09:48:09 +0000
@@ -3,43 +3,42 @@
NETWORK:
*
CACHE:
-dhis-web-commons/css/light_blue/dom.js
-dhis-web-commons/css/light_blue/head.png
-dhis-web-commons/css/light_blue/light_blue.css
-dhis-web-commons/css/light_blue/logo_background.png
-dhis-web-commons/css/light_blue/logo_banner.png
-dhis-web-commons/css/light_blue/logo_left.png
-dhis-web-commons/css/light_blue/logo_right.png
-dhis-web-commons/css/light_blue/logo_separator.png
-dhis-web-commons/css/widgets.css
-dhis-web-commons/javascripts/jQuery/jquery-1.6.1.min.js
-dhis-web-commons/javascripts/jQuery/jquery.metadata.js
-dhis-web-commons/javascripts/jQuery/jquery.glob.js
-dhis-web-commons/javascripts/jQuery/jquery.date.js
-dhis-web-commons/javascripts/jQuery/jquery.tmpl.js
-dhis-web-commons/javascripts/commons.js
-dhis-web-commons/javascripts/lists.js
-dhis-web-commons/javascripts/periodType.js
-dhis-web-commons/javascripts/date.js
-main.js
-dhis-web-commons/ouwt/ouwt.js
-dhis-web-commons/fonts/LiberationSans-Regular-webfont.eot
-dhis-web-commons/fonts/LiberationSans-Regular-webfont.woff
-dhis-web-commons/fonts/LiberationSans-Regular-webfont.ttf
-dhis-web-commons/fonts/LiberationSans-Regular-webfont.svg
-dhis-web-commons/fonts/LiberationSans-Bold-webfont.eot
-dhis-web-commons/fonts/LiberationSans-Bold-webfont.woff
-dhis-web-commons/fonts/LiberationSans-Bold-webfont.ttf
-dhis-web-commons/fonts/LiberationSans-Bold-webfont.svg
-dhis-web-commons/images/treeview-gray-line.gif
-images/show_menu.png
-images/hide_menu.png
-images/search.png
-images/colapse.png
-images/help.png
-images/hide.png
-images/ajax-loader-circle.gif
-dhis-web-dataentry/javascript/entry.js
-dhis-web-dataentry/javascript/form.js
-dhis-web-dataentry/javascript/history.js
-dhis-web-dataentry/style/dhis-web-dataentry.css
\ No newline at end of file
+css/light_blue/dom.js
+css/light_blue/head.png
+css/light_blue/light_blue.css
+css/light_blue/logo_background.png
+css/light_blue/logo_banner.png
+css/light_blue/logo_left.png
+css/light_blue/logo_right.png
+css/light_blue/logo_separator.png
+css/widgets.css
+javascripts/jQuery/jquery-1.6.1.min.js
+javascripts/jQuery/jquery.metadata.js
+javascripts/jQuery/jquery.glob.js
+javascripts/jQuery/jquery.date.js
+javascripts/jQuery/jquery.tmpl.js
+javascripts/commons.js
+javascripts/lists.js
+javascripts/periodType.js
+javascripts/date.js
+../main.js
+ouwt/ouwt.js
+fonts/LiberationSans-Regular-webfont.eot
+fonts/LiberationSans-Regular-webfont.woff
+fonts/LiberationSans-Regular-webfont.ttf
+fonts/LiberationSans-Regular-webfont.svg
+fonts/LiberationSans-Bold-webfont.eot
+fonts/LiberationSans-Bold-webfont.woff
+fonts/LiberationSans-Bold-webfont.ttf
+fonts/LiberationSans-Bold-webfont.svg
+images/treeview-gray-line.gif
+../images/show_menu.png
+../images/hide_menu.png
+../images/search.png
+../images/colapse.png
+../images/help.png
+../images/hide.png
+../images/ajax-loader-circle.gif
+../dhis-web-dataentry/javascript/form.js
+../dhis-web-dataentry/javascript/entry.js
+../dhis-web-dataentry/javascript/history.js
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-08-08 17:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-08-09 09:48:09 +0000
@@ -1,5 +1,5 @@
<!DOCTYPE HTML>
-<html#if( $offline && $offline == "true" ) manifest="../cache.manifest"#end>
+<html#if( $offline && $offline == "true" ) manifest="../dhis-web-commons/cacheManifest.action"#end>
<head>
<title>DHIS 2</title>
<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/javascripts/jQuery/ui/css/redmond/jquery-ui-1.8.12.custom.css" />
=== added file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/VelocityCacheManifestResult.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/VelocityCacheManifestResult.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/result/VelocityCacheManifestResult.java 2011-08-09 09:48:09 +0000
@@ -0,0 +1,18 @@
+package org.hisp.dhis.result;
+
+import org.apache.struts2.dispatcher.VelocityResult;
+
+public class VelocityCacheManifestResult
+ extends VelocityResult
+{
+ /**
+ * Determines if a de-serialized file is compatible with this class.
+ */
+ private static final long serialVersionUID = 1038408987156030639L;
+
+ @Override
+ protected final String getContentType( String templateLocation )
+ {
+ return "text/cache-manifest";
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-08 18:21:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-08-09 09:48:09 +0000
@@ -25,6 +25,7 @@
<result-type name="velocity-xml" class="org.hisp.dhis.result.VelocityXMLResult" />
<result-type name="velocity-json" class="org.hisp.dhis.result.VelocityJsonResult" />
<result-type name="velocity-javascript" class="org.hisp.dhis.result.VelocityJavascriptResult" />
+ <result-type name="velocity-cache-manifest" class="org.hisp.dhis.result.VelocityCacheManifestResult" />
<result-type name="outputStreamResult" class="org.hisp.dhis.result.OutputStreamResult" />
<result-type name="gridCsvResult" class="org.hisp.dhis.result.GridCsvResult" />
<result-type name="gridXlsResult" class="org.hisp.dhis.result.GridXlsResult" />
@@ -104,6 +105,7 @@
<param name="message">${exception.class.name}: ${exception.message}</param>
</result>
</global-results>
+
</package>
<!-- Organisation Unit Selection Tree -->
@@ -267,6 +269,12 @@
<package name="dhis-web-commons-i18n" extends="dhis-web-commons" namespace="/dhis-web-commons">
+ <!-- TODO give i18n its own namespace and move cacheManifest action to dhis-web-commons package -->
+
+ <action name="cacheManifest" class="org.hisp.dhis.commons.action.NoAction">
+ <result name="success" type="velocity-cache-manifest">/cacheManifest.vm</result>
+ </action>
+
<action name="i18n" class="org.hisp.dhis.i18n.action.I18nAction">
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-commons/i18n/translate.vm</param>
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml 2011-08-08 17:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml 2011-08-09 09:48:09 +0000
@@ -13,11 +13,6 @@
<param-value>ghostAdmin</param-value>
</context-param>
- <mime-mapping>
- <extension>manifest</extension>
- <mime-type>text/cache-manifest</mime-type>
- </mime-mapping>
-
<filter>
<filter-name>RedirectFilter</filter-name>
<filter-class>org.hisp.dhis.servlet.filter.HttpRedirectFilter</filter-class>
=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2011-08-08 17:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2011-08-09 09:48:09 +0000
@@ -13,11 +13,6 @@
<param-value>databaseAdmin</param-value>
</context-param>
- <mime-mapping>
- <extension>manifest</extension>
- <mime-type>text/cache-manifest</mime-type>
- </mime-mapping>
-
<filter>
<filter-name>RedirectFilter</filter-name>
<filter-class>org.hisp.dhis.servlet.filter.HttpRedirectFilter</filter-class>