dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35235
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18088: Dashboard, misc element validation.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18088 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-01-21 19:01:45 +0100
message:
Dashboard, misc element validation.
modified:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.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-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js 2015-01-21 12:02:34 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/chart.js 2015-01-21 17:59:59 +0000
@@ -4082,12 +4082,14 @@
ns.app.chart = ns.core.web.chart.createChart(ns, legendSet);
// fade
- if (!ns.skipFade && ns.core.init.el && Ext.get(ns.core.init.el)) {
+ if (!ns.skipFade) {
ns.app.chart.on('afterrender', function() {
Ext.defer( function() {
- Ext.get(ns.core.init.el).fadeIn({
- duration: 400
- });
+ if (ns.core.init.el && Ext.get(ns.core.init.el)) {
+ Ext.get(ns.core.init.el).fadeIn({
+ duration: 400
+ });
+ }
}, 300 );
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js 2015-01-21 12:02:34 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventchart.js 2015-01-21 17:59:59 +0000
@@ -4642,9 +4642,11 @@
if (!ns.skipFade) {
chart.on('afterrender', function() {
Ext.defer( function() {
- Ext.get(init.el).fadeIn({
- duration: 400
- });
+ if (init.el && Ext.get(init.el)) {
+ Ext.get(init.el).fadeIn({
+ duration: 400
+ });
+ }
}, 300 );
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js 2015-01-20 19:11:15 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js 2015-01-21 17:59:59 +0000
@@ -3436,7 +3436,9 @@
init.el = config.el;
if (!ns.skipFade) {
- Ext.get(init.el).setStyle('opacity', 0);
+ if (init.el && Ext.get(init.el)) {
+ Ext.get(init.el).setStyle('opacity', 0);
+ }
}
// mouse events
@@ -3448,17 +3450,22 @@
obj = xResponse.sortableIdObjects[i];
el = Ext.get(obj.uuid);
- el.dom.layout = layout;
- el.dom.response = response;
- el.dom.xResponse = xResponse;
- el.dom.metaDataId = obj.id;
- el.dom.onColumnHeaderMouseClick = web.events.onColumnHeaderMouseClick;
- el.dom.onColumnHeaderMouseOver = web.events.onColumnHeaderMouseOver;
- el.dom.onColumnHeaderMouseOut = web.events.onColumnHeaderMouseOut;
+ if (el.dom) {
+ el.dom.layout = layout;
+ el.dom.response = response;
+ el.dom.xResponse = xResponse;
+ el.dom.metaDataId = obj.id;
+ el.dom.onColumnHeaderMouseClick = web.events.onColumnHeaderMouseClick;
+ el.dom.onColumnHeaderMouseOver = web.events.onColumnHeaderMouseOver;
+ el.dom.onColumnHeaderMouseOut = web.events.onColumnHeaderMouseOut;
- el.dom.setAttribute('onclick', 'this.onColumnHeaderMouseClick(this.layout, this.response, this.metaDataId)');
- el.dom.setAttribute('onmouseover', 'this.onColumnHeaderMouseOver(this)');
- el.dom.setAttribute('onmouseout', 'this.onColumnHeaderMouseOut(this)');
+ el.dom.setAttribute('onclick', 'this.onColumnHeaderMouseClick(this.layout, this.response, this.metaDataId)');
+ el.dom.setAttribute('onmouseover', 'this.onColumnHeaderMouseOver(this)');
+ el.dom.setAttribute('onmouseout', 'this.onColumnHeaderMouseOut(this)');
+ }
+ else {
+ console.log('No element.dom, setColumnHeaderMouseHandlers, ' + init.el);
+ }
}
}
};
@@ -3692,9 +3699,11 @@
// fade
if (!ns.skipFade) {
Ext.defer( function() {
- Ext.get(ns.core.init.el).fadeIn({
- duration: 400
- });
+ if (init.el && Ext.get(init.el)) {
+ Ext.get(init.el).fadeIn({
+ duration: 400
+ });
+ }
}, 300 );
}
@@ -3767,9 +3776,11 @@
ns.app.centerRegion.update(getTitleHtml(layout.name) + table.html);
Ext.defer( function() {
- Ext.get(ns.core.init.el).fadeIn({
- duration: 400
- });
+ if (init.el && Ext.get(init.el)) {
+ Ext.get(init.el).fadeIn({
+ duration: 400
+ });
+ }
}, 300 );
// after render
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js 2015-01-21 15:19:10 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js 2015-01-21 17:59:59 +0000
@@ -3334,10 +3334,12 @@
// fade
if (!ns.skipFade) {
- Ext.defer( function() {
- Ext.get(ns.core.init.el).fadeIn({
- duration: 400
- });
+ Ext.defer(function() {
+ if (ns.core.init.el && Ext.get(ns.core.init.el)) {
+ Ext.get(ns.core.init.el).fadeIn({
+ duration: 400
+ });
+ }
}, 300 );
}