=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties 2015-04-11 17:59:06 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/i18n/i18n_app.properties 2015-04-27 12:19:17 +0000 @@ -198,3 +198,4 @@ this_month=This month this_sixmonth=This six-month this_bimonth=This bi-month +about=About === 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-11 17:59:06 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-04-27 12:19:17 +0000 @@ -3745,6 +3745,58 @@ return; }; + AboutWindow = function() { + var html = '', + window; + + window = Ext.create('Ext.window.Window', { + title: NS.i18n.about, + bodyStyle: 'background:#fff; padding:6px', + modal: true, + resizable: false, + hideOnBlur: true, + listeners: { + show: function(w) { + Ext.Ajax.request({ + url: ns.core.init.contextPath + '/api/system/info.json', + success: function(r) { + var info = Ext.decode(r.responseText), + divStyle = 'padding:3px'; + + if (Ext.isObject(info)) { + html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; + html += '
Version: ' + info.version + '
'; + html += '
Revision: ' + info.revision + '
'; + html += '
Build time: ' + info.buildTime.slice(0,19).replace('T', ' ') + '
'; + } + else { + html += 'No system info found'; + } + + w.update(html); + }, + failure: function(r) { + html += r.status + '\n' + r.statusText + '\n' + r.responseText; + + w.update(html); + }, + callback: function() { + if (ns.app.aboutButton.rendered) { + ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton); + + if (!w.hasHideOnBlurHandler) { + ns.core.web.window.addHideOnBlurHandler(w); + } + } + } + }); + } + } + }); + + return window; + }; + LayerWidgetEvent = function(layer) { // stores @@ -7217,6 +7269,7 @@ interpretationItem, pluginItem, shareButton, + aboutButton, statusBar, defaultButton, centerRegion, @@ -7647,6 +7700,24 @@ } }); + aboutButton = Ext.create('Ext.button.Button', { + text: NS.i18n.about, + menu: {}, + handler: function() { + if (ns.app.aboutWindow && ns.app.aboutWindow.destroy) { + ns.app.aboutWindow.destroy(); + } + + ns.app.aboutWindow = AboutWindow(); + ns.app.aboutWindow.show(); + }, + listeners: { + added: function() { + ns.app.aboutButton = this; + } + } + }); + statusBar = Ext.create('Ext.ux.toolbar.StatusBar', { height: 27, listeners: { @@ -7849,6 +7920,7 @@ } } }, + aboutButton, { xtype: 'button', text: NS.i18n.home, === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties 2015-04-11 17:59:06 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/i18n/i18n_app.properties 2015-04-27 12:21:07 +0000 @@ -223,3 +223,4 @@ this_month=This month this_sixmonth=This six-month this_bimonth=This bi-month +about=About === 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-16 23:50:18 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-04-27 12:21:07 +0000 @@ -3414,6 +3414,58 @@ return; }; + AboutWindow = function() { + var html = '', + window; + + window = Ext.create('Ext.window.Window', { + title: NS.i18n.about, + bodyStyle: 'background:#fff; padding:6px', + modal: true, + resizable: false, + hideOnBlur: true, + listeners: { + show: function(w) { + Ext.Ajax.request({ + url: ns.core.init.contextPath + '/api/system/info.json', + success: function(r) { + var info = Ext.decode(r.responseText), + divStyle = 'padding:3px'; + + if (Ext.isObject(info)) { + html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; + html += '
Version: ' + info.version + '
'; + html += '
Revision: ' + info.revision + '
'; + html += '
Build time: ' + info.buildTime.slice(0,19).replace('T', ' ') + '
'; + } + else { + html += 'No system info found'; + } + + w.update(html); + }, + failure: function(r) { + html += r.status + '\n' + r.statusText + '\n' + r.responseText; + + w.update(html); + }, + callback: function() { + if (ns.app.aboutButton.rendered) { + ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton); + + if (!w.hasHideOnBlurHandler) { + ns.core.web.window.addHideOnBlurHandler(w); + } + } + } + }); + } + } + }); + + return window; + }; + LayerWidgetEvent = function(layer) { // stores @@ -6800,6 +6852,7 @@ interpretationItem, pluginItem, shareButton, + aboutButton, centerRegion, getLayoutWindow, viewport; @@ -7336,6 +7389,24 @@ } }); + aboutButton = Ext.create('Ext.button.Button', { + text: NS.i18n.about, + menu: {}, + handler: function() { + if (ns.app.aboutWindow && ns.app.aboutWindow.destroy) { + ns.app.aboutWindow.destroy(); + } + + ns.app.aboutWindow = AboutWindow(); + ns.app.aboutWindow.show(); + }, + listeners: { + added: function() { + ns.app.aboutButton = this; + } + } + }); + defaultButton = Ext.create('Ext.button.Button', { text: NS.i18n.chart, iconCls: 'ns-button-icon-chart', @@ -7527,6 +7598,7 @@ } } }, + aboutButton, { xtype: 'button', text: NS.i18n.home, === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties 2015-04-10 15:31:02 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/i18n/i18n_app.properties 2015-04-27 12:16:18 +0000 @@ -426,3 +426,4 @@ this_month=This month this_sixmonth=This six-month this_bimonth=This bi-month +about=About === 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-13 16:34:54 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2015-04-27 12:16:18 +0000 @@ -2583,6 +2583,56 @@ return window; }; + GIS.app.AboutWindow = function() { + var html = '', + window; + + window = Ext.create('Ext.window.Window', { + title: GIS.i18n.about, + bodyStyle: 'background:#fff; padding:6px', + modal: true, + resizable: false, + hideOnBlur: true, + listeners: { + show: function(w) { + Ext.Ajax.request({ + url: gis.init.contextPath + '/api/system/info.json', + success: function(r) { + var info = Ext.decode(r.responseText), + divStyle = 'padding:3px'; + + if (Ext.isObject(info)) { + html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; + html += '
Version: ' + info.version + '
'; + html += '
Revision: ' + info.revision + '
'; + html += '
Build time: ' + info.buildTime.slice(0,19).replace('T', ' ') + '
'; + } + else { + html += 'No system info found'; + } + + w.update(html); + }, + failure: function(r) { + html += r.status + '\n' + r.statusText + '\n' + r.responseText; + + w.update(html); + }, + callback: function() { + gis.util.gui.window.setAnchorPosition(w, gis.viewport.aboutButton); + + //if (!w.hasHideOnBlurHandler) { + //ns.core.web.window.addHideOnBlurHandler(w); + //} + } + }); + } + } + }); + + return window; + }; + GIS.app.MapControlPanel = function(name, fn) { var button, panel; @@ -8636,6 +8686,7 @@ eastRegion, downloadButton, shareButton, + aboutButton, defaultButton, layersPanel, resizeButton, @@ -8921,6 +8972,20 @@ } }); + aboutButton = Ext.create('Ext.button.Button', { + text: GIS.i18n.about, + menu: {}, + handler: function() { + if (viewport.aboutWindow && viewport.aboutWindow.destroy) { + viewport.aboutWindow.destroy(); + viewport.aboutWindow = null; + } + + viewport.aboutWindow = GIS.app.AboutWindow(); + viewport.aboutWindow.show(); + } + }); + centerRegion = new GeoExt.panel.Map({ region: 'center', map: gis.olmap, @@ -9247,6 +9312,8 @@ } }); + a.push(aboutButton); + a.push({ xtype: 'button', text: GIS.i18n.home, @@ -9510,6 +9577,7 @@ centerRegion: centerRegion, downloadButton: downloadButton, shareButton: shareButton, + aboutButton: aboutButton, layersPanel: layersPanel, items: [ centerRegion, === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-04-25 11:22:40 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-04-27 11:10:41 +0000 @@ -185,4 +185,4 @@ column_dimensions=Column dimensions row_dimensions=Row dimensions report_filter=Report filter -info=Info +about=About === 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-25 12:28:25 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-04-27 12:16:18 +0000 @@ -1914,14 +1914,15 @@ return; }; - InfoWindow = function() { + AboutWindow = function() { var html = '', window; window = Ext.create('Ext.window.Window', { - title: 'System info', + title: NS.i18n.about, bodyStyle: 'background:#fff; padding:6px', modal: true, + resizable: false, hideOnBlur: true, listeners: { show: function(w) { @@ -1932,7 +1933,7 @@ divStyle = 'padding:3px'; if (Ext.isObject(info)) { - html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; + html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; html += '
Version: ' + info.version + '
'; html += '
Revision: ' + info.revision + '
'; html += '
Build time: ' + info.buildTime.slice(0,19).replace('T', ' ') + '
'; @@ -1947,16 +1948,17 @@ html += r.status + '\n' + r.statusText + '\n' + r.responseText; w.update(html); - } - }); - - if (ns.app.infoButton.rendered) { - ns.core.web.window.setAnchorPosition(w, ns.app.infoButton); - - if (!w.hasHideOnBlurHandler) { - ns.core.web.window.addHideOnBlurHandler(w); - } - } + }, + callback: function() { + if (ns.app.aboutButton.rendered) { + ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton); + + if (!w.hasHideOnBlurHandler) { + ns.core.web.window.addHideOnBlurHandler(w); + } + } + } + }); } } }); @@ -2765,6 +2767,7 @@ favoriteUrlItem, apiUrlItem, shareButton, + aboutButton, defaultButton, centerRegion, setGui, @@ -6057,19 +6060,20 @@ } }); - infoButton = Ext.create('Ext.button.Button', { - text: NS.i18n.info, + aboutButton = Ext.create('Ext.button.Button', { + text: NS.i18n.about, + menu: {}, handler: function() { - if (ns.app.infoWindow && ns.app.infoWindow.destroy) { - ns.app.infoWindow.destroy(); + if (ns.app.aboutWindow && ns.app.aboutWindow.destroy) { + ns.app.aboutWindow.destroy(); } - ns.app.infoWindow = InfoWindow(); - ns.app.infoWindow.show(); + ns.app.aboutWindow = AboutWindow(); + ns.app.aboutWindow.show(); }, listeners: { added: function() { - ns.app.infoButton = this; + ns.app.aboutButton = this; } } }); @@ -6159,12 +6163,6 @@ favoriteButton, downloadButton, shareButton, - { - xtype: 'tbseparator', - height: 18, - style: 'border-color:transparent; border-right-color:#d1d1d1; margin-right:4px', - }, - infoButton, '->', defaultButton, { @@ -6365,7 +6363,8 @@ } } }, - { + aboutButton, + { xtype: 'button', text: NS.i18n.home, handler: function() { === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-04-12 20:00:37 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-04-27 12:16:18 +0000 @@ -267,3 +267,4 @@ series_dimensions=Series dimensions category_dimensions=Category dimensions report_filter=Report filter +about=About === 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-22 12:10:13 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-04-27 12:16:18 +0000 @@ -2061,6 +2061,58 @@ return; }; + AboutWindow = function() { + var html = '', + window; + + window = Ext.create('Ext.window.Window', { + title: NS.i18n.about, + bodyStyle: 'background:#fff; padding:6px', + modal: true, + resizable: false, + hideOnBlur: true, + listeners: { + show: function(w) { + Ext.Ajax.request({ + url: ns.core.init.contextPath + '/api/system/info.json', + success: function(r) { + var info = Ext.decode(r.responseText), + divStyle = 'padding:3px'; + + if (Ext.isObject(info)) { + html += '
Data was updated: ' + info.intervalSinceLastAnalyticsTableSuccess + ' ago
'; + html += '
Version: ' + info.version + '
'; + html += '
Revision: ' + info.revision + '
'; + html += '
Build time: ' + info.buildTime.slice(0,19).replace('T', ' ') + '
'; + } + else { + html += 'No system info found'; + } + + w.update(html); + }, + failure: function(r) { + html += r.status + '\n' + r.statusText + '\n' + r.responseText; + + w.update(html); + }, + callback: function() { + if (ns.app.aboutButton.rendered) { + ns.core.web.window.setAnchorPosition(w, ns.app.aboutButton); + + if (!w.hasHideOnBlurHandler) { + ns.core.web.window.addHideOnBlurHandler(w); + } + } + } + }); + } + } + }); + + return window; + }; + // core extendCore = function(core) { var conf = core.conf, @@ -2678,6 +2730,7 @@ favoriteUrlItem, apiUrlItem, shareButton, + aboutButton, defaultButton, centerRegion, setGui, @@ -6152,6 +6205,24 @@ } }); + aboutButton = Ext.create('Ext.button.Button', { + text: NS.i18n.about, + menu: {}, + handler: function() { + if (ns.app.aboutWindow && ns.app.aboutWindow.destroy) { + ns.app.aboutWindow.destroy(); + } + + ns.app.aboutWindow = AboutWindow(); + ns.app.aboutWindow.show(); + }, + listeners: { + added: function() { + ns.app.aboutButton = this; + } + } + }); + defaultButton = Ext.create('Ext.button.Button', { text: NS.i18n.chart, iconCls: 'ns-button-icon-chart', @@ -6437,6 +6508,7 @@ } } }, + aboutButton, { xtype: 'button', text: NS.i18n.home,