← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16888: expose .js as dhis2.period.format in main.vm

 

------------------------------------------------------------
revno: 16888
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-01 11:13:54 +0700
message:
  expose .js as dhis2.period.format in main.vm
modified:
  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/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-09-09 23:57:34 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2014-10-01 04:13:54 +0000
@@ -88,13 +88,14 @@
     <script type="text/javascript" src="../api/files/script.js?_rev=$!{buildRevision}"></script>
     <!-- Create global system calendar -->
     <script>
+      dhis2.period.format = '$dateFormat.js';
       #if( $keyCalendar == 'iso8601')
       dhis2.period.calendar = $.calendars.instance('gregorian');
       #else
       dhis2.period.calendar = $.calendars.instance('$keyCalendar');
       #end
-      dhis2.period.generator = new dhis2.period.PeriodGenerator( dhis2.period.calendar, '$dateFormat.js' );
-      dhis2.period.picker = new dhis2.period.DatePicker( dhis2.period.calendar, '$dateFormat.js' );
+      dhis2.period.generator = new dhis2.period.PeriodGenerator( dhis2.period.calendar, dhis2.period.format );
+      dhis2.period.picker = new dhis2.period.DatePicker( dhis2.period.calendar, dhis2.period.format );
     </script>
   </head>