-
-
Save wilig/847903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ExcelSuccessDialog = Ext.extend(Ext.Window, { | |
constructor: function(config) { | |
this.importsuccessForm = new Ext.FormPanel({ | |
frame: true, | |
bodyStyle: 'padding: 10px 10px 0 10px;', | |
labelWidth: 50, | |
defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side'}, | |
items: [{ | |
xtype: 'displayfield', | |
itemID: 'numnew', | |
value: config.num_new + ' asset(s) created' | |
},{ | |
xtype: 'displayfield', | |
itemID: 'nummod', | |
value: config.num_mod + ' asset(s) modified' | |
}] | |
}); | |
Ext.apply(this, { | |
title: 'Successfuly Imported Excel Document', | |
layout:'fit', | |
width:450, | |
height:200, | |
plain: true, | |
modal: true, | |
items: [this.importsuccessForm], | |
fbar: [ | |
{text: 'OK', tabIndex: 5, handler: this.onOK, scope: this }, | |
] | |
}); | |
ExcelSuccessDialog.superclass.constructor.apply(this, arguments); | |
}, | |
onOK: function() { | |
this.close(); | |
}, | |
displayReport(newRecords, modifiedRecords) { | |
this.importsuccessForm.getComponent('numnew').update(newRecords + ' asset(s) created.'); | |
this.importsuccessForm.getComponent('nummod').update(modifiedRecords + ' asset(s) modified.'); | |
this.show(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment