← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12511: (DV) Plugin fix.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 12511 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-10-08 19:08:09 +0200
message:
  (DV) Plugin fix.
modified:
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.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-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html	2013-09-30 13:03:49 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html	2013-10-08 17:07:19 +0000
@@ -4,6 +4,7 @@
     <link rel="stylesheet" type="text/css" href="../../dhis-web-commons/javascripts/ext/resources/css/ext-plugin-gray.css" />
 
     <script src="../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
+    <script src="../../dhis-web-commons/javascripts/simpleRegression.js"></script>
 	<script src="scripts/core.js"></script>
 	<script src="scripts/plugin.js"></script>
 

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js	2013-10-01 17:16:31 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/plugin.js	2013-10-08 17:07:19 +0000
@@ -1,10 +1,5 @@
 Ext.onReady(function() {
 
-    // load trend line lib
-    Ext.Loader.setConfig({enabled: true});
-    Ext.Loader.setPath('regression', '../../dhis-web-commons/javascripts');
-    Ext.require('regression.simpleRegression');
-
 	// chart tips css
 	var css = '.dv-chart-tips { border-radius: 2px; padding: 0px 3px 1px; border: 2px solid #777; background-color: #f1f1f1; } \n';
 	css += '.dv-chart-tips .x-tip-body { background-color: #f1f1f1; font-size: 13px; font-weight: normal; color: #444; -webkit-text-stroke: 0; } \n';
@@ -78,11 +73,15 @@
 			Ext.data.JsonP.request({
 				url: config.url + '/dhis-web-visualizer/initialize.action',
 				success: function(r) {
-                    dv = DV.core.getInstance(r);
-
-                    dv.init.el = config.el;
-                    dv.isPlugin = true;
-                    dv.viewport = createViewport();
+					var init = r;
+
+					DV.i18n = init.i18n;
+
+					dv = DV.core.getInstance(init);
+
+					dv.init.el = config.el;
+					dv.isPlugin = true;
+					dv.viewport = createViewport();
 
 					if (config.uid) {
 						dv.engine.loadChart(config.uid, dv);