dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #36934
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18890: PT DV search/filter in dynamic dimensions.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 18890 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2015-04-12 21:50:35 +0200
message:
PT DV search/filter in dynamic dimensions.
modified:
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/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-pivot/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-04-09 09:18:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/i18n/i18n_app.properties 2015-04-12 19:46:09 +0000
@@ -181,3 +181,4 @@
this_month=This month
this_sixmonth=This six-month
this_bimonth=This bi-month
+excluded_dimensions=Excluded dimensions
=== 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-12 16:29:02 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-pivot/scripts/app.js 2015-04-12 19:46:09 +0000
@@ -208,7 +208,7 @@
height: 25,
items: {
xtype: 'label',
- text: NS.i18n.dimensions,
+ text: NS.i18n.excluded_dimensions,
cls: 'ns-toolbar-multiselect-leftright-label'
}
},
@@ -3296,10 +3296,10 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var value = indicatorGroup.getValue(),
store = indicatorAvailableStore;
@@ -3310,7 +3310,7 @@
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -3534,10 +3534,10 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var value = dataElementGroup.getValue(),
store = dataElementAvailableStore;
@@ -3548,7 +3548,7 @@
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -3805,17 +3805,17 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var store = dataSetAvailableStore;
store.loadPage(this.getValue(), false);
},
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -4950,9 +4950,9 @@
var onSelect,
availableStore,
selectedStore,
- //dataLabel,
- //dataSearch,
- //dataFilter,
+ dataLabel,
+ dataSearch,
+ dataFilter,
available,
selected,
panel,
@@ -4982,7 +4982,7 @@
this.lastPage = null;
this.nextPage = 1;
this.isPending = false;
- //indicatorSearch.hideFilter();
+ dataSearch.hideFilter();
},
loadPage: function(filter, append, noPaging, fn) {
var store = this,
@@ -5000,7 +5000,7 @@
return;
}
- path = '/dimensions/' + dimension.id + '/items' + (filter ? '/query/' + filter : '') + '.json';
+ path = '/dimensions/' + dimension.id + '/items.json' + (filter ? '?filter=name:like:' + filter : '');
if (noPaging) {
params.paging = false;
@@ -5068,74 +5068,74 @@
}
});
- //dataLabel = Ext.create('Ext.form.Label', {
- //text: NS.i18n.available,
- //cls: 'ns-toolbar-multiselect-left-label',
- //style: 'margin-right:5px'
- //});
-
- //dataSearch = Ext.create('Ext.button.Button', {
- //width: 22,
- //height: 22,
- //cls: 'ns-button-icon',
- //style: 'background: url(images/search_14.png) 3px 3px no-repeat',
- //showFilter: function() {
- //dataLabel.hide();
- //this.hide();
- //dataFilter.show();
- //dataFilter.reset();
- //},
- //hideFilter: function() {
- //dataLabel.show();
- //this.show();
- //dataFilter.hide();
- //dataFilter.reset();
- //},
- //handler: function() {
- //this.showFilter();
- //}
- //});
-
- //dataFilter = Ext.create('Ext.form.field.Trigger', {
- //cls: 'ns-trigger-filter',
- //emptyText: 'Filter available..',
- //height: 22,
- //hidden: true,
- //enableKeyEvents: true,
- //fieldStyle: 'height:22px; border-right:0 none',
- //style: 'height:22px',
- //onTriggerClick: function() {
- //if (this.getValue()) {
- //this.reset();
- //this.onKeyUp();
- //}
- //},
- //onKeyUp: function() {
- //var value = indicatorGroup.getValue(),
- //store = availableStore;
-
- //if (Ext.isString(value) || Ext.isNumber(value)) {
- //store.loadPage(null, this.getValue(), false);
- //}
- //},
- //listeners: {
- //keyup: {
- //fn: function(cmp) {
- //cmp.onKeyUp();
- //},
- //buffer: 100
- //},
- //show: function(cmp) {
- //cmp.focus(false, 50);
- //},
- //focus: function(cmp) {
- //cmp.addCls('ns-trigger-filter-focused');
- //},
- //blur: function(cmp) {
- //cmp.removeCls('ns-trigger-filter-focused');
- //}
- //}
- //});
+ dataLabel = Ext.create('Ext.form.Label', {
+ text: NS.i18n.available,
+ cls: 'ns-toolbar-multiselect-left-label',
+ style: 'margin-right:5px'
+ });
+
+ dataSearch = Ext.create('Ext.button.Button', {
+ width: 22,
+ height: 22,
+ cls: 'ns-button-icon',
+ style: 'background: url(images/search_14.png) 3px 3px no-repeat',
+ showFilter: function() {
+ dataLabel.hide();
+ this.hide();
+ dataFilter.show();
+ dataFilter.reset();
+ },
+ hideFilter: function() {
+ dataLabel.show();
+ this.show();
+ dataFilter.hide();
+ dataFilter.reset();
+ },
+ handler: function() {
+ this.showFilter();
+ }
+ });
+
+ dataFilter = Ext.create('Ext.form.field.Trigger', {
+ cls: 'ns-trigger-filter',
+ emptyText: 'Filter available..',
+ height: 22,
+ hidden: true,
+ enableKeyEvents: true,
+ fieldStyle: 'height:22px; border-right:0 none',
+ style: 'height:22px',
+ onTriggerClick: function() {
+ if (this.getValue()) {
+ this.reset();
+ this.onKeyUpHandler();
+ }
+ },
+ onKeyUpHandler: function() {
+ var value = this.getValue(),
+ store = availableStore;
+
+ if (Ext.isString(value) || Ext.isNumber(value)) {
+ store.loadPage(value, false, true);
+ }
+ },
+ listeners: {
+ keyup: {
+ fn: function(cmp) {
+ cmp.onKeyUpHandler();
+ },
+ buffer: 100
+ },
+ show: function(cmp) {
+ cmp.focus(false, 50);
+ },
+ focus: function(cmp) {
+ cmp.addCls('ns-trigger-filter-focused');
+ },
+ blur: function(cmp) {
+ cmp.removeCls('ns-trigger-filter-focused');
+ }
+ }
+ });
available = Ext.create('Ext.ux.form.MultiSelect', {
cls: 'ns-toolbar-multiselect-left',
@@ -5144,6 +5144,9 @@
displayField: 'name',
store: availableStore,
tbar: [
+ dataLabel,
+ dataSearch,
+ dataFilter,
'->',
{
xtype: 'button',
=== 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-09 09:29:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/i18n/i18n_app.properties 2015-04-12 19:47:58 +0000
@@ -263,3 +263,4 @@
this_month=This month
this_sixmonth=This six-month
this_bimonth=This bi-month
+excluded_dimensions=Excluded dimensions
=== 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-12 16:33:06 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/app.js 2015-04-12 19:47:58 +0000
@@ -280,7 +280,7 @@
height: 25,
items: {
xtype: 'label',
- text: NS.i18n.dimensions,
+ text: NS.i18n.excluded_dimensions,
cls: 'ns-toolbar-multiselect-leftright-label'
}
},
@@ -3476,10 +3476,10 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var value = indicatorGroup.getValue(),
store = indicatorAvailableStore;
@@ -3490,7 +3490,7 @@
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -3714,10 +3714,10 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var value = dataElementGroup.getValue(),
store = dataElementAvailableStore;
@@ -3728,7 +3728,7 @@
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -3985,17 +3985,17 @@
onTriggerClick: function() {
if (this.getValue()) {
this.reset();
- this.onKeyUp();
+ this.onKeyUpHandler();
}
},
- onKeyUp: function() {
+ onKeyUpHandler: function() {
var store = dataSetAvailableStore;
store.loadPage(this.getValue(), false);
},
listeners: {
keyup: {
fn: function(cmp) {
- cmp.onKeyUp();
+ cmp.onKeyUpHandler();
},
buffer: 100
},
@@ -5130,6 +5130,9 @@
var onSelect,
availableStore,
selectedStore,
+ dataLabel,
+ dataSearch,
+ dataFilter,
available,
selected,
panel,
@@ -5177,7 +5180,7 @@
return;
}
- path = '/dimensions/' + dimension.id + '/items' + (filter ? '/query/' + filter : '') + '.json';
+ path = '/dimensions/' + dimension.id + '/items.json' + (filter ? '?filter=name:like:' + filter : '');
if (noPaging) {
params.paging = false;
@@ -5245,6 +5248,75 @@
}
});
+ dataLabel = Ext.create('Ext.form.Label', {
+ text: NS.i18n.available,
+ cls: 'ns-toolbar-multiselect-left-label',
+ style: 'margin-right:5px'
+ });
+
+ dataSearch = Ext.create('Ext.button.Button', {
+ width: 22,
+ height: 22,
+ cls: 'ns-button-icon',
+ style: 'background: url(images/search_14.png) 3px 3px no-repeat',
+ showFilter: function() {
+ dataLabel.hide();
+ this.hide();
+ dataFilter.show();
+ dataFilter.reset();
+ },
+ hideFilter: function() {
+ dataLabel.show();
+ this.show();
+ dataFilter.hide();
+ dataFilter.reset();
+ },
+ handler: function() {
+ this.showFilter();
+ }
+ });
+
+ dataFilter = Ext.create('Ext.form.field.Trigger', {
+ cls: 'ns-trigger-filter',
+ emptyText: 'Filter available..',
+ height: 22,
+ hidden: true,
+ enableKeyEvents: true,
+ fieldStyle: 'height:22px; border-right:0 none',
+ style: 'height:22px',
+ onTriggerClick: function() {
+ if (this.getValue()) {
+ this.reset();
+ this.onKeyUpHandler();
+ }
+ },
+ onKeyUpHandler: function() {
+ var value = this.getValue(),
+ store = availableStore;
+
+ if (Ext.isString(value) || Ext.isNumber(value)) {
+ store.loadPage(value, false, true);
+ }
+ },
+ listeners: {
+ keyup: {
+ fn: function(cmp) {
+ cmp.onKeyUpHandler();
+ },
+ buffer: 100
+ },
+ show: function(cmp) {
+ cmp.focus(false, 50);
+ },
+ focus: function(cmp) {
+ cmp.addCls('ns-trigger-filter-focused');
+ },
+ blur: function(cmp) {
+ cmp.removeCls('ns-trigger-filter-focused');
+ }
+ }
+ });
+
available = Ext.create('Ext.ux.form.MultiSelect', {
cls: 'ns-toolbar-multiselect-left',
width: (ns.core.conf.layout.west_fieldset_width - ns.core.conf.layout.west_width_padding) / 2,
@@ -5252,11 +5324,9 @@
displayField: 'name',
store: availableStore,
tbar: [
- {
- xtype: 'label',
- text: NS.i18n.available,
- cls: 'ns-toolbar-multiselect-left-label'
- },
+ dataLabel,
+ dataSearch,
+ dataFilter,
'->',
{
xtype: 'button',