← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15158: minor stylechange in js period generator

 

------------------------------------------------------------
revno: 15158
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-05-06 10:32:53 +0700
message:
  minor stylechange in js period generator
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js


--
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/dhis-web-commons/javascripts/dhis2/dhis2.period.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2014-05-05 08:51:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2014-05-06 03:32:53 +0000
@@ -54,21 +54,21 @@
     }
   }
 
-  this.calendar = calendar;
-
   if( typeof format === 'undefined' ) {
     format = dhis2.period.DEFAULT_DATE_FORMAT;
   }
 
-  this.format = format;
-
-  this.defaults = {
-    calendar: this.calendar,
-    dateFormat: this.format,
-    showAnim: '',
-    maxDate: this.calendar.today(),
-    yearRange: 'c-100:c+100'
-  };
+  $.extend(this, {
+    calendar: calendar,
+    format: format,
+    defaults: {
+      calendar: calendar,
+      dateFormat: format,
+      showAnim: '',
+      maxDate: calendar.today(),
+      yearRange: 'c-100:c+100'
+    }
+  });
 };
 
 /**
@@ -156,23 +156,23 @@
     format = dhis2.period.DEFAULT_DATE_FORMAT;
   }
 
-  this.calendar = calendar;
-
-  this.format = format;
-
-  this.generators = {
-    "Daily": dhis2.period.makeDailyPeriodGenerator(calendar, format),
-    "Weekly": dhis2.period.makeWeeklyPeriodGenerator(calendar, format),
-    "Monthly": dhis2.period.makeMonthlyPeriodGenerator(calendar, format),
-    "BiMonthly": dhis2.period.makeBiMonthlyPeriodGenerator(calendar, format),
-    "Quarterly": dhis2.period.makeQuarterlyPeriodGenerator(calendar, format),
-    "SixMonthly": dhis2.period.makeSixMonthlyPeriodGenerator(calendar, format),
-    "SixMonthlyApril": dhis2.period.makeSixMonthlyAprilPeriodGenerator(calendar, format),
-    "Yearly": dhis2.period.makeYearlyPeriodGenerator(calendar, format),
-    "FinancialApril": dhis2.period.makeFinancialAprilPeriodGenerator(calendar, format),
-    "FinancialJuly": dhis2.period.makeFinancialJulyPeriodGenerator(calendar, format),
-    "FinancialOct": dhis2.period.makeFinancialOctoberPeriodGenerator(calendar, format)
-  };
+  $.extend(this, {
+    calendar: calendar,
+    format: format,
+    generators: {
+      "Daily": dhis2.period.makeDailyPeriodGenerator(calendar, format),
+      "Weekly": dhis2.period.makeWeeklyPeriodGenerator(calendar, format),
+      "Monthly": dhis2.period.makeMonthlyPeriodGenerator(calendar, format),
+      "BiMonthly": dhis2.period.makeBiMonthlyPeriodGenerator(calendar, format),
+      "Quarterly": dhis2.period.makeQuarterlyPeriodGenerator(calendar, format),
+      "SixMonthly": dhis2.period.makeSixMonthlyPeriodGenerator(calendar, format),
+      "SixMonthlyApril": dhis2.period.makeSixMonthlyAprilPeriodGenerator(calendar, format),
+      "Yearly": dhis2.period.makeYearlyPeriodGenerator(calendar, format),
+      "FinancialApril": dhis2.period.makeFinancialAprilPeriodGenerator(calendar, format),
+      "FinancialJuly": dhis2.period.makeFinancialJulyPeriodGenerator(calendar, format),
+      "FinancialOct": dhis2.period.makeFinancialOctoberPeriodGenerator(calendar, format)
+    }
+  });
 };
 
 /**