Skip to content

Instantly share code, notes, and snippets.

@veriojon
Created November 10, 2010 21:35
Show Gist options
  • Save veriojon/671567 to your computer and use it in GitHub Desktop.
Save veriojon/671567 to your computer and use it in GitHub Desktop.
new dialog
var ExcelErrorDialog = Ext.extend(Ext.Window, {
constructor: function(config) {
this.importerrorForm = new Ext.FormPanel({
frame: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side'},
items: [{
xtype: 'displayfield',
itemID: 'numerrors',
value: '# Errors in Imported File: ' + config.num_error
},{
xtype: 'textarea',
itemID: 'errors',
height: 250,
value: config.err_string
}]
});
Ext.apply(this, {
title: 'Excel Import Errors',
layout:'fit',
width:450,
height:400,
plain: true,
modal: true,
items: [this.importerrorForm],
fbar: [
{text: 'Cancel', tabIndex: 5, handler: this.onCancel, scope: this },
{text: 'Download Errors', tabIndex: 4, handler: this.onDownload(config.filename), scope: this }
]
});
ExcelErrorDialog.superclass.constructor.apply(this, arguments);
},
onCancel: function() {
this.close();
},
onDownload: function(filename) {
this.hide();
Imata.log("file:"+filename);
// window.open("file:"+filename, target="");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment