dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17188
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6759: (patient) Show Editor for filter row when clicking Filter button in Tabular report.
------------------------------------------------------------
revno: 6759
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-26 21:52:52 +0700
message:
(patient) Show Editor for filter row when clicking Filter button in Tabular report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/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-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-04-26 14:37:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-04-26 14:52:52 +0000
@@ -951,6 +951,29 @@
menuDisabled: true
}
+ var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+ clicksToEdit: 1,
+ editStyle: 'row',
+ autoScroll: true,
+ errorSummary: false,
+ listeners: {
+ beforeedit: function( editor, e)
+ {
+ if( editor.rowIdx > 0 )
+ {
+ return false;
+ }
+ },
+ edit: function( editor, e ){
+ TR.exe.execute();
+ },
+ canceledit: function( grid, eOpts ){
+ var grid = TR.datatable.datatable;
+ grid.getView().getNode(0).classList.add('hidden');
+ }
+ }
+ });
+
// grid
this.datatable = Ext.create('Ext.grid.Panel', {
height: TR.util.viewport.getSize().y - 60,
@@ -979,6 +1002,7 @@
grid.getView().getNode(0).classList.remove('hidden');
var record = grid.getView().getRecord( grid.getView().getNode(0) );
grid.getView().getSelectionModel().select(record, false, false);
+ rowEditing.startEdit(0, 0);
}
else {
TR.exe.execute();
@@ -1106,30 +1130,7 @@
}
}
],
- plugins: [
- Ext.create('Ext.grid.plugin.RowEditing', {
- clicksToEdit: 1,
- editStyle: 'row',
- autoScroll: true,
- errorSummary: false,
- listeners: {
- beforeedit: function( editor, e)
- {
- if( editor.rowIdx > 0 )
- {
- return false;
- }
- },
- edit: function( editor, e ){
- TR.exe.execute();
- },
- canceledit: function( grid, eOpts ){
- var grid = TR.datatable.datatable;
- grid.getView().getNode(0).classList.add('hidden');
- }
- }
- })
- ],
+ plugins: [rowEditing],
store: TR.store.datatable
});