commit f91ee1fa14d510828c377175fdd9ae445fc6cc83
parent 628824ae4b07738aa1d99ab7f989b28664a8fa8a
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 7 Sep 2011 04:16:37 +0200
Made the upload dialog a bit nicer
Diffstat:
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/frontend/css/PartKeepr.css b/frontend/css/PartKeepr.css
@@ -110,7 +110,10 @@ td.o2 {
background-image: url(../resources/fugue-icons/icons/gear.png) !important;
}
+.icon-drive-upload {
+ background-image: url(../resources/fugue-icons/icons/drive-upload.png) !important;
+}
-
-
-
+.icon-infocard {
+ background-image: url(../resources/fugue-icons/icons/infocard.png) !important;
+}+
\ No newline at end of file
diff --git a/frontend/js/Dialogs/FileUploadDialog.js b/frontend/js/Dialogs/FileUploadDialog.js
@@ -5,7 +5,10 @@ Ext.define('PartKeepr.FileUploadDialog', {
fileFieldLabel: i18n("File"),
uploadButtonText: i18n('Select File...'),
uploadURL: PartKeepr.getBasePath()+"/TempFile",
+ layout: 'fit',
+ resizable: false,
modal: true,
+ iconCls: 'icon-drive-upload',
initComponent: function () {
if (this.imageUpload) {
@@ -17,6 +20,8 @@ Ext.define('PartKeepr.FileUploadDialog', {
this.uploadButton = Ext.create("Ext.button.Button",
{
text: i18n('Upload'),
+ iconCls: 'icon-drive-upload',
+ width: 120,
handler: Ext.bind(function() {
var form = this.form.getForm();
@@ -63,6 +68,8 @@ Ext.define('PartKeepr.FileUploadDialog', {
this.fileFormatButton = Ext.create("Ext.button.Button", {
text: i18n("Available Formats"),
+ width: 120,
+ iconCls: 'icon-infocard',
handler: this.showAvailableFormats,
scope: this
});
@@ -100,6 +107,8 @@ Ext.define('PartKeepr.FileUploadDialog', {
buttons: this.tbButtons
});
+ this.on("beforedestroy", this.onBeforeDestroy, this);
+
this.items = this.form;
this.callParent();
},
@@ -123,5 +132,8 @@ Ext.define('PartKeepr.FileUploadDialog', {
this.tip.show();
+ },
+ onBeforeDestroy: function () {
+ this.tip.destroy();
}
});