1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
var saveWindow = function(saveItem) {
var sWindow = function () { return new Ext.Window( {
title : 'Save As',
id : 'mySave',
width : 563,
height : 430,
closeAction : 'close',
plain : false,
items : new Ext.FormPanel( {
standardSubmit: true,
id: 'savePref',
submit: function() {
this.getForm().submit({
url: '../ws/ACC/saveUserPreference',
scope: this,
waitMsg: 'Message d\'attente'
});
},
border : true,
width : 550,
bodyStyle: 'padding: 5px',
items: [{
xtype : 'textfield',
name : '',
id : 'name',
fieldLabel: 'Name',
width : 100,
allowBlank: false,
anchor : '-150'
},
{
xtype: 'checkboxgroup',
fieldLabel: '',
border: true,
checked: false,
columns: 1,
items: [
{boxLabel: 'Is defaults', id: 'testCheck2', labelSeparator: '', inputValue: 'isDefault'}
]
},
{
xtype:'fieldset',
checkboxToggle: true,
title: 'Share groups',
id: 'shareGroups',
autoHeight: true,
autoWidth: true,
defaultType: 'checkbox',
collapsed: true,
checked: false,
items: [ grid ]
}]
}),
buttons: [{
text: 'Save',
id: 'btSave',
cls: 'x-btn-text-icon'
},{
text: 'Close',
handler: function() {
Ext.getCmp('mySave').close();
}
}]
}); };
Ext.get('btSave').on('click', function(){
Ext.MessageBox.alert( 'Success : <br> Nom de la preference :'+ Ext.getCmp('name').getValue() + '<br>Vue par default :'+ Ext.getCmp('testCheck2').getValue() + '<br>Share Groups :'+ Ext.getCmp('shareGroups').isVisible() );
});
}; |
Partager