dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #35632
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18226: Analysis, open reports in new tab with 1) mouse wheel/middle button click or 2) ctrl + left click.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18226 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-02-11 18:07:21 +0100
message:
Analysis, open reports in new tab with 1) mouse wheel/middle button click or 2) ctrl + left click.
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/i18n/i18n_app.properties
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-02-11 13:03:35 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-reports/scripts/app.js 2015-02-11 17:02:00 +0000
@@ -7177,30 +7177,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_event_charts + ' ', //i18n
+ text: NS.i18n.go_to_event_charts + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-event-visualizer';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-visualizer';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-visualizer', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_table_as_chart + ' ', //i18n
+ text: NS.i18n.open_this_table_as_chart + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = ns.app.accordion.treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'eventanalytical', ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventanalytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = ns.app.accordion.treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'eventanalytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventanalytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventanalytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_chart + ' ', //i18n
+ text: NS.i18n.open_last_chart + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['eventchart']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventchart';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventchart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-visualizer/index.html?s=eventchart', '_blank');
+ }
+ }
+ });
+ }
}
}
],
=== 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-02-09 19:24:27 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-visualizer/scripts/app.js 2015-02-11 17:02:00 +0000
@@ -3579,7 +3579,7 @@
if (layout) {
ux.setRecord(element);
}
-
+
store = Ext.Array.contains(includeKeys, element.type) || element.optionSet ? aggWindow.colStore : aggWindow.fixedFilterStore;
if (store === aggWindow.fixedFilterStore) {
@@ -6817,30 +6817,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_event_reports + ' ', //i18n
+ text: NS.i18n.go_to_event_reports + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-event-reports';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-reports';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-reports', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_chart_as_table + ' ', //i18n
+ text: NS.i18n.open_this_chart_as_table + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = ns.app.accordion.treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'eventanalytical', ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventanalytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = ns.app.accordion.treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'eventanalytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventanalytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventanalytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_table + ' ', //i18n
+ text: NS.i18n.open_last_table + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['eventtable']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventtable';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventtable';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-event-reports/index.html?s=eventtable', '_blank');
+ }
+ }
+ });
+ }
}
}
],
=== 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-02-09 17:34:51 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/app.js 2015-02-11 16:47:37 +0000
@@ -8890,29 +8890,62 @@
showSeparator: false,
items: [
{
- text: GIS.i18n.go_to_pivot_tables + ' ', //i18n
+ text: GIS.i18n.go_to_pivot_tables + ' ',
cls: 'gis-menu-item-noicon',
- handler: function() {
- window.location.href = gis.init.contextPath + '/dhis-web-pivot';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-pivot';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-pivot', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: GIS.i18n.open_this_map_as_table + ' ', //i18n
+ text: GIS.i18n.open_this_map_as_table + ' ',
cls: 'gis-menu-item-noicon',
disabled: !(GIS.isSessionStorage && gis.util.layout.getAnalytical()),
- handler: function() {
- if (GIS.isSessionStorage) {
- gis.util.layout.setSessionStorage('analytical', gis.util.layout.getAnalytical(), gis.init.contextPath + '/dhis-web-pivot/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && GIS.isSessionStorage) {
+ gis.util.layout.setSessionStorage('analytical', gis.util.layout.getAnalytical());
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-pivot/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-pivot/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: GIS.i18n.open_last_table + ' ', //i18n
+ text: GIS.i18n.open_last_table + ' ',
cls: 'gis-menu-item-noicon',
disabled: !(GIS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['table']),
- handler: function() {
- window.location.href = gis.init.contextPath + '/dhis-web-pivot/index.html?s=table';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-pivot/index.html?s=table';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-pivot/index.html?s=table', '_blank');
+ }
+ }
+ });
+ }
}
}
],
@@ -8951,29 +8984,62 @@
showSeparator: false,
items: [
{
- text: GIS.i18n.go_to_charts + ' ', //i18n
+ text: GIS.i18n.go_to_charts + ' ',
cls: 'gis-menu-item-noicon',
- handler: function() {
- window.location.href = gis.init.contextPath + '/dhis-web-visualizer';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-visualizer';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-visualizer', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: GIS.i18n.open_this_map_as_chart + ' ', //i18n
+ text: GIS.i18n.open_this_map_as_chart + ' ',
cls: 'gis-menu-item-noicon',
disabled: !GIS.isSessionStorage || !gis.util.layout.getAnalytical(),
- handler: function() {
- if (GIS.isSessionStorage) {
- gis.util.layout.setSessionStorage('analytical', gis.util.layout.getAnalytical(), gis.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && GIS.isSessionStorage) {
+ gis.util.layout.setSessionStorage('analytical', gis.util.layout.getAnalytical());
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: GIS.i18n.open_last_chart + ' ', //i18n
+ text: GIS.i18n.open_last_chart + ' ',
cls: 'gis-menu-item-noicon',
disabled: !(GIS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['chart']),
- handler: function() {
- window.location.href = gis.init.contextPath + '/dhis-web-visualizer/index.html?s=chart';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = gis.init.contextPath + '/dhis-web-visualizer/index.html?s=chart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(gis.init.contextPath + '/dhis-web-visualizer/index.html?s=chart', '_blank');
+ }
+ }
+ });
+ }
}
}
],
=== 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-02-03 14:37:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-02-11 16:47:37 +0000
@@ -5908,30 +5908,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_charts + ' ', //i18n
+ text: NS.i18n.go_to_charts + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-visualizer';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-visualizer';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-visualizer', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_table_as_chart + ' ', //i18n
+ text: NS.i18n.open_this_table_as_chart + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'analytical', ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'analytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_chart + ' ', //i18n
+ text: NS.i18n.open_last_chart + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['chart']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=chart';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=chart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-visualizer/index.html?s=chart', '_blank');
+ }
+ }
+ });
+ }
}
}
],
@@ -5969,30 +6002,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_maps + ' ', //i18n
+ text: NS.i18n.go_to_maps + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-mapping';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_table_as_map + ' ', //i18n
+ text: NS.i18n.open_this_table_as_map + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'analytical', ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'analytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_map + ' ', //i18n
+ text: NS.i18n.open_last_map + ' ',
cls: 'ns-menu-item-noicon',
- disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['map']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=map';
+ disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['chart']),
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=chart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=chart', '_blank');
+ }
+ }
+ });
+ }
}
}
],
=== 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 2014-11-17 15:42:17 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-02-11 17:02:00 +0000
@@ -219,8 +219,8 @@
axes=Axes
general=General
go_to_pivot_tables=Go to pivot tables
-open_this_chart_as_pivot_table=Open this chart as pivot table
-open_last_pivot_table=Open last pivot table
+open_this_chart_as_table=Open this chart as table
+open_last_pivot_table=Open last table
go_to_maps=Go to maps
open_this_chart_as_map=Open this chart as map
open_last_map=Open last map
=== 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-02-05 15:23:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-02-11 17:02:00 +0000
@@ -5846,30 +5846,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_pivot_tables + ' ', //i18n
+ text: NS.i18n.go_to_pivot_tables + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-pivot';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-pivot';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-pivot', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_chart_as_pivot_table + ' ', //i18n
+ text: NS.i18n.open_this_chart_as_table + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'analytical', ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'analytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_pivot_table + ' ', //i18n
+ text: NS.i18n.open_last_pivot_table + ' ',
cls: 'ns-menu-item-noicon',
- disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['table']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=table';
+ disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['chart']),
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=chart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-pivot/index.html?s=chart', '_blank');
+ }
+ }
+ });
+ }
}
}
],
@@ -5908,30 +5941,63 @@
showSeparator: false,
items: [
{
- text: NS.i18n.go_to_maps + ' ', //i18n
+ text: NS.i18n.go_to_maps + ' ',
cls: 'ns-menu-item-noicon',
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-mapping';
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping', '_blank');
+ }
+ }
+ });
+ }
}
},
'-',
{
- text: NS.i18n.open_this_chart_as_map + ' ', //i18n
+ text: NS.i18n.open_this_chart_as_map + ' ',
cls: 'ns-menu-item-noicon',
disabled: !(NS.isSessionStorage && ns.app.layout),
- handler: function() {
- if (NS.isSessionStorage) {
- ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
- ns.core.web.storage.session.set(ns.app.layout, 'analytical', ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical');
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled && NS.isSessionStorage) {
+ ns.app.layout.parentGraphMap = treePanel.getParentGraphMap();
+ ns.core.web.storage.session.set(ns.app.layout, 'analytical');
+
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=analytical', '_blank');
+ }
+ }
+ });
}
}
},
{
- text: NS.i18n.open_last_map + ' ', //i18n
+ text: NS.i18n.open_last_map + ' ',
cls: 'ns-menu-item-noicon',
- disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['map']),
- handler: function() {
- window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=map';
+ disabled: !(NS.isSessionStorage && JSON.parse(sessionStorage.getItem('dhis2')) && JSON.parse(sessionStorage.getItem('dhis2'))['chart']),
+ listeners: {
+ render: function(b) {
+ this.getEl().dom.addEventListener('click', function(e) {
+ if (!b.disabled) {
+ if (e.button === 0 && !e.ctrlKey) {
+ window.location.href = ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=chart';
+ }
+ else if ((e.ctrlKey && Ext.Array.contains([0,1], e.button)) || (!e.ctrlKey && e.button === 1)) {
+ window.open(ns.core.init.contextPath + '/dhis-web-mapping/index.html?s=chart', '_blank');
+ }
+ }
+ });
+ }
}
}
],