BUG 7084 the problem with the grid was solved reassign all cases by task.

This commit is contained in:
Alvaro Campos
2011-12-16 15:33:06 -04:00
parent 724bbabedd
commit f1928f2703
2 changed files with 30 additions and 17 deletions

View File

@@ -1563,13 +1563,13 @@ Ext.onReady ( function() {
region: 'center', region: 'center',
store: storeReassignCases, store: storeReassignCases,
cm: reassignCm, cm: reassignCm,
autoHeight: true, autoHeight: true,
viewConfig: { viewConfig: {
forceFit:true forceFit:true
} }
}); });
var gridForm = new Ext.FormPanel({ var gridForm = new Ext.FormPanel({
id: 'reassign-form', id: 'reassign-form',
frame: true, frame: true,
@@ -1597,38 +1597,44 @@ var gridForm = new Ext.FormPanel({
}), }),
//autoExpandColumn: 'company', //autoExpandColumn: 'company',
height: 350, height: 350,
title : 'Cases to reassign - Task List', title : _('ID_CASES_TO_REASSIGN_TASK_LIST'),
border : true, border : true,
listeners: {
click: function() { listeners: {
click: function() {
rows = this.getSelectionModel().getSelections(); rows = this.getSelectionModel().getSelections();
var application = ''; var application = '';
if( rows.length > 0 ) { if( rows.length > 0 ) {
comboUsersToReassign.enable();
var ids = ''; var ids = '';
for(i=0; i<rows.length; i++) { for(i=0; i<rows.length; i++) {
// filtering duplicate tasks // filtering duplicate tasks
application = rows[i].get('APP_UID'); application = rows[i].get('APP_UID');
} }
} else {
comboUsersToReassign.disable();
} }
comboUsersToReassign.clearValue(); comboUsersToReassign.clearValue();
storeUsersToReassign.removeAll(); storeUsersToReassign.removeAll();
storeUsersToReassign.setBaseParam('application',application); storeUsersToReassign.setBaseParam('application',application);
//storeUsersToReassign.load(); //storeUsersToReassign.load();
//alert(record.USERS); //alert(record.USERS);
} // Allow rows to be rendered. } // Allow rows to be rendered.
} }
} }
},{ },{
columnWidth: 0.4, columnWidth: 0.4,
xtype: 'fieldset', xtype: 'fieldset',
labelWidth: 70, labelWidth: 50,
title:'User List', title: _('ID_USER_LIST'),
defaults: {width: 120, border:false}, // Default config options for child items defaults: {width: 170, border:false}, // Default config options for child items
defaultType: 'textfield', defaultType: 'textfield',
autoHeight: true, autoHeight: true,
bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', bodyStyle: Ext.isIE ? 'text-align: right;padding:0 0 5px 15px;' : 'text-align: right; padding:10px 15px;',
border: false, border: false,
style: { style: {
"margin-left": "10px", // when you add custom margin in IE 6... "margin-left": "10px", // when you add custom margin in IE 6...
"margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else
}, },
@@ -1772,6 +1778,7 @@ function reassign(){
storeReassignCases.setBaseParam( 'APP_UIDS', ids); storeReassignCases.setBaseParam( 'APP_UIDS', ids);
storeReassignCases.load(); storeReassignCases.load();
newPopUp.show(); newPopUp.show();
comboUsersToReassign.disable();
//grid = reassignGrid.store.data; //grid = reassignGrid.store.data;
//Ext.Msg.alert ( grid ); //Ext.Msg.alert ( grid );

View File

@@ -55,23 +55,29 @@
// create the combo instance // create the combo instance
var comboUsersToReassign = new Ext.form.ComboBox({ var comboUsersToReassign = new Ext.form.ComboBox({
width : 280,
boxMaxWidth : 180, fieldLabel : _('ID_SEARCH'),
fieldLabel : 'Search',
editable : true, editable : true,
forceSelection: false, forceSelection: false,
minChars : 0, minChars : 0,
valueField : 'userId', valueField : 'userId',
displayField : 'userFullname', displayField : 'userFullname',
selectOnFocus : true, selectOnFocus : true,
typeAhead : true, typeAhead : true,
autocomplete : true, autocomplete : true,
hideTrigger : Boolean,
alignTo : 'right',
mode : 'remote', mode : 'remote',
triggerAction : 'all', triggerAction : 'all',
emptyText : _('ID_ENTER_SEARCH_TERM'),
disabled : true,
width : 280,
boxMaxWidth : 180,
//lazyRender : true, //lazyRender : true,
// store : new Ext.data.Store(), // store : new Ext.data.Store(),
store : storeUsersToReassign, store : storeUsersToReassign,
listeners:{ listeners:{
'select': function(comp, record, index) { 'select': function(comp, record, index) {
var row = Ext.getCmp('TasksToReassign').getSelectionModel().getSelected(); var row = Ext.getCmp('TasksToReassign').getSelectionModel().getSelected();
row.set('APP_REASSIGN_USER_UID', record.get('userUid')); row.set('APP_REASSIGN_USER_UID', record.get('userUid'));