dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16795
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6480: Minifying vm/html a bit on main page
------------------------------------------------------------
revno: 6480
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-04-04 12:51:40 +0200
message:
Minifying vm/html a bit on main page
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.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
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2011-10-03 09:23:01 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macros.vm 2012-04-04 10:51:40 +0000
@@ -1,14 +1,3 @@
-
-#*
-Displays a table which lists a set of objects and it's common operations: Filter,
-add, update, translate, remove and show details. The macro produces code against
-some specific conventions for the scripts and actions to call. Call it this way:
-
-#objectList( [name of object, e.g. DataElement], [list of such objects, e.g. $dataElements] )
-
-@param objectName The litteral name of the type of object to display, e.g. DataElement
-@param objects A Velocity list of the objects to be formatted, typically prepared by an action.
-*#
#macro( objectList $objectName $objects )
<table class="objectListTable">
<col>
@@ -44,20 +33,10 @@
</table>
#end
-#*
-Supportive method for displaying rows with alternating colors in a table.
-
-@param mark boolean alternating the color.
-*#
#macro( alternate $mark )
#if ( $mark ) class="listAlternateRow"#else class="listRow"#end
#end
-#*
-Formats a boolean into a readable value
-
-@param bool the boolean to format.
-*#
#macro( formatBool $bool )
#if ( $bool )
$i18n.getString( "yes" )
@@ -128,27 +107,12 @@
</form>
#end
-
-
-
-#*************************************************************************************************************#
-#* Helpers for building attribute forms. Note that these will have dynamic validation rules applied to them. *#
-
#macro( trHeader $text )
<tr>
<th colspan="2">$text</th>
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trTextInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -164,15 +128,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trBooleanSelectInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -192,15 +147,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trDateInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -222,15 +168,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trNumberInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -246,15 +183,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trIntegerInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -270,15 +198,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trPositiveIntegerInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -294,15 +213,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trNegativeIntegerInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -318,16 +228,6 @@
</tr>
#end
-#****************************************************
- Required args:
- id
- text
- mandatory
- choices Array of choices.
- Optional args:
- name Will use id if omitted.
- value
-*****************************************************#
#macro( trMultipleChoiceInput $args )
#if( "$!args.name" == "" )
#set( $name = $!args.id )
@@ -378,12 +278,6 @@
});
#end
-#****************************************************
- Required args:
- attributes
- Optional args:
- attributeValues
-*****************************************************#
#macro( tblDynamicAttributes $args )
#if( $args.attributes.size() > 0 )
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/macrosdoc.vm 2012-04-04 10:51:40 +0000
@@ -0,0 +1,118 @@
+
+## Documentation for macros.vm - not available on web
+
+#*
+Displays a table which lists a set of objects and it's common operations: Filter,
+add, update, translate, remove and show details. The macro produces code against
+some specific conventions for the scripts and actions to call. Call it this way:
+
+#objectList( [name of object, e.g. DataElement], [list of such objects, e.g. $dataElements] )
+
+@param objectName The litteral name of the type of object to display, e.g. DataElement
+@param objects A Velocity list of the objects to be formatted, typically prepared by an action.
+*#
+#macro( objectList $objectName $objects ) #end
+
+#*
+Supportive method for displaying rows with alternating colors in a table.
+
+@param mark boolean alternating the color.
+*#
+#macro( alternate $mark ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trTextInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trBooleanSelectInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trDateInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trNumberInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trIntegerInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trPositiveIntegerInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trNegativeIntegerInput $args ) #end
+
+#****************************************************
+ Required args:
+ id
+ text
+ mandatory
+ choices Array of choices.
+ Optional args:
+ name Will use id if omitted.
+ value
+*****************************************************#
+#macro( trMultipleChoiceInput $args ) #end
+
+#****************************************************
+ Required args:
+ attributes
+ Optional args:
+ attributeValues
+*****************************************************#
+#macro( tblDynamicAttributes $args ) #end
\ 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 2012-04-01 19:29:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2012-04-04 10:51:40 +0000
@@ -5,38 +5,35 @@
<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/javascripts/jQuery/ui/css/redmond/jquery-ui-1.8.12.custom.css" />
<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/${stylesheet}" />
<link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css" />
-
- <link type="image/png" rel="icon" href="../images/favicon.png" />
-
#foreach ( $style in $stylesheets )
<link type="text/css" rel="stylesheet" href="$style">
- #end
-
+ #end
+ <link type="image/png" rel="icon" href="../images/favicon.png" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
- var dateFormat = 'yy-mm-dd';
- var maintenanceModulesNo = ${maintenanceModules.size()};
- var serviceModulesNo = ${serviceModules.size()};
- </script>
+ var dateFormat = 'yy-mm-dd';
+ var maintenanceModulesNo = ${maintenanceModules.size()};
+ var serviceModulesNo = ${serviceModules.size()};
+ </script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.ext.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.metadata.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tablesorter.min.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.upload-1.0.2.min.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.utils.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery-ui-1.8.12.custom.min.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery.blockUI.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.cookie.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.glob.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.date.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
- <script type="text/javascript" src="../dhis-web-commons/messagesJavaScript.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.metadata.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tablesorter.min.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.upload-1.0.2.min.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.utils.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery-ui-1.8.12.custom.min.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery.blockUI.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.cookie.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.glob.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.date.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tmpl.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/i18nJavaScript.action"></script>
+ <script type="text/javascript" src="../dhis-web-commons/messagesJavaScript.action"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>
@@ -75,39 +72,37 @@
<div id="menuLink4" class="menuLink">$i18n.getString( "log_out" )</div>
<div id="menuDropDown1" class="menuDropDownArea" >
- <ul class="menuDropDownBox">
- #foreach( $module in $maintenanceModules )
- #if( $auth.hasAccess( $module.name, "index" ) )
- <li class="menuDropDownItem" onclick="window.location.href='${module.defaultAction}'">
- <a href="${module.defaultAction}">$i18n.getString( $module.name ) </a>
- </li>
- #end
- #end
- </ul>
+ <ul class="menuDropDownBox">
+ #foreach( $module in $maintenanceModules )
+ #if( $auth.hasAccess( $module.name, "index" ) )
+ <li class="menuDropDownItem" onclick="window.location.href='${module.defaultAction}'">
+ <a href="${module.defaultAction}">$i18n.getString( $module.name ) </a></li>
+ #end
+ #end
+ </ul>
</div>
<div id="menuDropDown2" class="menuDropDownArea">
- <ul class="menuDropDownBox">
- #foreach( $module in $serviceModules )
- #if( $auth.hasAccess( $module.name, "index" ) )
- <li class="menuDropDownItem" onclick="window.location.href='${module.defaultAction}'">
- <a href="${module.defaultAction}">$i18n.getString( $module.name ) </a>
- </li>
- #end
- #end
- </ul>
+ <ul class="menuDropDownBox">
+ #foreach( $module in $serviceModules )
+ #if( $auth.hasAccess( $module.name, "index" ) )
+ <li class="menuDropDownItem" onclick="window.location.href='${module.defaultAction}'">
+ <a href="${module.defaultAction}">$i18n.getString( $module.name ) </a></li>
+ #end
+ #end
+ </ul>
</div>
<div id="menuDropDown3" class="menuDropDownArea">
- <ul class="menuDropDownBox">
- <li class="menuDropDownItem" id="menuDropDownHelpCenter">$i18n.getString( "help_center" ) </li>
- <li class="menuDropDownItem" id="menuDropDownChangeLog">$i18n.getString( "change_log" ) </li>
- <li class="menuDropDownItem" id="menuDropDownSupportiveSoftware">$i18n.getString( "supportive_software" ) </li>
- <li class="menuDropDownItem" id="menuDropDownUserAccount">$i18n.getString( "user_account" ) </li>
- <li class="menuDropDownItem" id="menuDropDownModuleOverview">$i18n.getString( "system_overview" ) </li>
- <li class="menuDropDownItem" id="menuDropDownWebApi">$i18n.getString( "web_api" ) </li>
- <li class="menuDropDownItem" id="menuDropDownAboutDHIS2">$i18n.getString( "about_dhis2" ) </li>
- </ul>
+ <ul class="menuDropDownBox">
+ <li class="menuDropDownItem" id="menuDropDownHelpCenter">$i18n.getString( "help_center" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownChangeLog">$i18n.getString( "change_log" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownSupportiveSoftware">$i18n.getString( "supportive_software" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownUserAccount">$i18n.getString( "user_account" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownModuleOverview">$i18n.getString( "system_overview" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownWebApi">$i18n.getString( "web_api" ) </li>
+ <li class="menuDropDownItem" id="menuDropDownAboutDHIS2">$i18n.getString( "about_dhis2" ) </li>
+ </ul>
</div>
<span id="headerText" onclick="window.location.href='../dhis-web-commons-about/modules.action'" style="cursor:pointer">