dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37210
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19039: Analysis, about window fixes.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 19039 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-04-28 13:34:07 +0200
message:
Analysis, about window fixes.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.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-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-04-27 21:56:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-04-28 11:33:27 +0000
@@ -3750,10 +3750,7 @@
};
AboutWindow = function() {
- var html = '',
- window;
-
- window = Ext.create('Ext.window.Window', {
+ return Ext.create('Ext.window.Window', {
title: NS.i18n.about,
bodyStyle: 'background:#fff; padding:6px',
modal: true,
@@ -3765,14 +3762,15 @@
url: ns.core.init.contextPath + '/api/system/info.json',
success: function(r) {
var info = Ext.decode(r.responseText),
- divStyle = 'padding:3px';
+ divStyle = 'padding:3px',
+ html = '<div class="user-select">';
if (Ext.isObject(info)) {
html += '<div style="' + divStyle + '"><b>' + NS.i18n.time_since_last_data_update + ': </b>' + info.intervalSinceLastAnalyticsTableSuccess + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.version + ': </b>' + info.version + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.revision + ': </b>' + info.revision + '</div>';
- html += '<div style="' + divStyle + '"><b>' + NS.i18n.build_time + ': </b>' + info.buildTime.slice(0,19).replace('T', ' ') + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.username + ': </b>' + ns.core.init.userAccount.username + '</div>';
+ html += '</div>';
}
else {
html += 'No system info found';
@@ -3786,6 +3784,8 @@
w.update(html);
},
callback: function() {
+ document.body.oncontextmenu = true;
+
if (ns.app.aboutButton.rendered) {
ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton);
@@ -3795,11 +3795,19 @@
}
}
});
- }
+ },
+ hide: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ },
+ destroy: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ }
}
});
-
- return window;
};
LayerWidgetEvent = function(layer) {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-04-28 10:02:12 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-04-28 11:33:27 +0000
@@ -3419,10 +3419,7 @@
};
AboutWindow = function() {
- var html = '',
- window;
-
- window = Ext.create('Ext.window.Window', {
+ return Ext.create('Ext.window.Window', {
title: NS.i18n.about,
bodyStyle: 'background:#fff; padding:6px',
modal: true,
@@ -3434,14 +3431,15 @@
url: ns.core.init.contextPath + '/api/system/info.json',
success: function(r) {
var info = Ext.decode(r.responseText),
- divStyle = 'padding:3px';
+ divStyle = 'padding:3px',
+ html = '<div class="user-select">';
if (Ext.isObject(info)) {
html += '<div style="' + divStyle + '"><b>' + NS.i18n.time_since_last_data_update + ': </b>' + info.intervalSinceLastAnalyticsTableSuccess + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.version + ': </b>' + info.version + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.revision + ': </b>' + info.revision + '</div>';
- html += '<div style="' + divStyle + '"><b>' + NS.i18n.build_time + ': </b>' + info.buildTime.slice(0,19).replace('T', ' ') + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.username + ': </b>' + ns.core.init.userAccount.username + '</div>';
+ html += '</div>';
}
else {
html += 'No system info found';
@@ -3455,6 +3453,8 @@
w.update(html);
},
callback: function() {
+ document.body.oncontextmenu = true;
+
if (ns.app.aboutButton.rendered) {
ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton);
@@ -3464,11 +3464,19 @@
}
}
});
- }
+ },
+ hide: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ },
+ destroy: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ }
}
});
-
- return window;
};
LayerWidgetEvent = function(layer) {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2015-04-27 13:33:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2015-04-28 11:33:27 +0000
@@ -4204,10 +4204,7 @@
};
GIS.app.AboutWindow = function() {
- var html = '',
- window;
-
- window = Ext.create('Ext.window.Window', {
+ return Ext.create('Ext.window.Window', {
title: GIS.i18n.about,
bodyStyle: 'background:#fff; padding:6px',
modal: true,
@@ -4219,14 +4216,15 @@
url: gis.init.contextPath + '/api/system/info.json',
success: function(r) {
var info = Ext.decode(r.responseText),
- divStyle = 'padding:3px';
+ divStyle = 'padding:3px',
+ html = '<div class="user-select">';
if (Ext.isObject(info)) {
html += '<div style="' + divStyle + '"><b>' + GIS.i18n.time_since_last_data_update + ': </b>' + info.intervalSinceLastAnalyticsTableSuccess + '</div>';
html += '<div style="' + divStyle + '"><b>' + GIS.i18n.version + ': </b>' + info.version + '</div>';
html += '<div style="' + divStyle + '"><b>' + GIS.i18n.revision + ': </b>' + info.revision + '</div>';
- html += '<div style="' + divStyle + '"><b>' + GIS.i18n.build_time + ': </b>' + info.buildTime.slice(0,19).replace('T', ' ') + '</div>';
html += '<div style="' + divStyle + '"><b>' + GIS.i18n.username + ': </b>' + gis.init.userAccount.username + '</div>';
+ html += '</div>';
}
else {
html += 'No system info found';
@@ -4240,6 +4238,8 @@
w.update(html);
},
callback: function() {
+ document.body.oncontextmenu = true;
+
gis.util.gui.window.setAnchorPosition(w, gis.viewport.aboutButton);
//if (!w.hasHideOnBlurHandler) {
@@ -4247,11 +4247,19 @@
//}
}
});
- }
+ },
+ hide: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ },
+ destroy: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ }
}
});
-
- return window;
};
GIS.app.LayerWidgetEvent = function(layer) {
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-04-27 13:33:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-04-28 11:33:27 +0000
@@ -1916,10 +1916,7 @@
};
AboutWindow = function() {
- var html = '',
- window;
-
- window = Ext.create('Ext.window.Window', {
+ return Ext.create('Ext.window.Window', {
title: NS.i18n.about,
bodyStyle: 'background:#fff; padding:6px',
modal: true,
@@ -1931,14 +1928,15 @@
url: ns.core.init.contextPath + '/api/system/info.json',
success: function(r) {
var info = Ext.decode(r.responseText),
- divStyle = 'padding:3px';
+ divStyle = 'padding:3px',
+ html = '<div class="user-select">';
if (Ext.isObject(info)) {
html += '<div style="' + divStyle + '"><b>' + NS.i18n.time_since_last_data_update + ': </b>' + info.intervalSinceLastAnalyticsTableSuccess + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.version + ': </b>' + info.version + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.revision + ': </b>' + info.revision + '</div>';
- html += '<div style="' + divStyle + '"><b>' + NS.i18n.build_time + ': </b>' + info.buildTime.slice(0,19).replace('T', ' ') + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.username + ': </b>' + ns.core.init.userAccount.username + '</div>';
+ html += '</div>';
}
else {
html += 'No system info found';
@@ -1952,6 +1950,8 @@
w.update(html);
},
callback: function() {
+ document.body.oncontextmenu = true;
+
if (ns.app.aboutButton.rendered) {
ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton);
@@ -1960,12 +1960,20 @@
}
}
}
- });
- }
+ });
+ },
+ hide: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ },
+ destroy: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ }
}
});
-
- return window;
};
// core
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-04-27 13:33:58 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-04-28 11:33:27 +0000
@@ -2062,10 +2062,7 @@
};
AboutWindow = function() {
- var html = '',
- window;
-
- window = Ext.create('Ext.window.Window', {
+ return Ext.create('Ext.window.Window', {
title: NS.i18n.about,
bodyStyle: 'background:#fff; padding:6px',
modal: true,
@@ -2077,14 +2074,15 @@
url: ns.core.init.contextPath + '/api/system/info.json',
success: function(r) {
var info = Ext.decode(r.responseText),
- divStyle = 'padding:3px';
+ divStyle = 'padding:3px',
+ html = '<div class="user-select">';
if (Ext.isObject(info)) {
html += '<div style="' + divStyle + '"><b>' + NS.i18n.time_since_last_data_update + ': </b>' + info.intervalSinceLastAnalyticsTableSuccess + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.version + ': </b>' + info.version + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.revision + ': </b>' + info.revision + '</div>';
- html += '<div style="' + divStyle + '"><b>' + NS.i18n.build_time + ': </b>' + info.buildTime.slice(0,19).replace('T', ' ') + '</div>';
html += '<div style="' + divStyle + '"><b>' + NS.i18n.username + ': </b>' + ns.core.init.userAccount.username + '</div>';
+ html += '</div>';
}
else {
html += 'No system info found';
@@ -2098,6 +2096,8 @@
w.update(html);
},
callback: function() {
+ document.body.oncontextmenu = true;
+
if (ns.app.aboutButton.rendered) {
ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton);
@@ -2106,12 +2106,20 @@
}
}
}
- });
- }
+ });
+ },
+ hide: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ },
+ destroy: function() {
+ document.body.oncontextmenu = function() {
+ return false;
+ };
+ }
}
});
-
- return window;
};
// core