Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.disruptForm = new One.model.ModelFormContainer({
- modelInfo: {
- modelLevelType: 'Event'
- }
- ,createActionName: 'ONEI.CreateDisruption'
- ,defaultActionName: 'ONEI.CreateDisruption'
- ,values: {
- longitude: desc.center.lng
- ,latitude: desc.center.lat
- ,radius: desc.radius
- ,radiusUOM: desc.radiusUOM
- }
- ,listeners: {
- beforetransition: {
- scope: this
- ,fn: function() {
- this.disruptDialog.hide();
- this.disruptForm.getCurrentPage().resetAll();
- this.disruptForm.getCurrentPage().getMessagePanel().hide();
- delete this.disruptForm.sysId;
- }
- }
- }
- ,defaultConfig: {
- prepareFields: function(fields) {
- fields.addAll([{
- xtype: 'numberfield'
- ,name: 'longitude'
- ,ref: '../lonfield'
- ,hidden: true
- },{
- xtype: 'numberfield'
- ,name: 'latitude'
- ,ref: '../latfield'
- ,hidden: true
- },{
- xtype: 'numberfield'
- ,name: 'radius'
- ,ref: '../radfield'
- ,hidden: true
- },{
- xtype: 'textfield'
- ,name: 'radiusUOM'
- ,ref: '../radUOMfield'
- ,hidden: true
- }]);
- }
- ,listeners: {
- actionsuccess: {
- scope: this
- ,fn: function() {
- this.disruptDialog.hide();
- this.disruptForm.getCurrentPage().resetAll();
- this.disruptForm.getCurrentPage().getMessagePanel().hide();
- delete this.disruptForm.sysId;
- this.onCreateDisruption(this.currentDis);
- }
- }
- ,actioncancel: {
- scope: this
- ,fn: function() {
- this.disruptDialog.hide();
- this.disruptForm.getCurrentPage().resetAll();
- this.disruptForm.getCurrentPage().getMessagePanel().hide();
- delete this.disruptForm.sysId;
- }
- }
- ,bbarconfig: {
- scope: this
- ,fn: function(formPanel, bbarcfg) {
- bbarcfg.push({
- xtype: 'button'
- ,text: Labels.get('global/cancel')
- ,scope: formPanel
- ,handler: function() {
- this.fireEvent('actioncancel');
- }
- });
- }
- }
- }
- }
- });
Add Comment
Please, Sign In to add comment