partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 406cd8cf63e7189d214c90b90f7df720021563df
parent 5e82698c62eca7f11f428a4fe20620b24861e06a
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue,  8 Sep 2015 14:37:40 +0200

Replaced brick silk icons with their CSS spritesheet counterparts, added support for the editor grid to allow icon classes

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js | 16++++++++++++++--
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js | 6+++---
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js | 4++--
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectPartGrid.js | 8++++----
4 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js @@ -18,7 +18,12 @@ Ext.define('PartKeepr.EditorGrid', { /** * @cfg {String} text The path to the 'delete' icon */ - deleteButtonIcon: 'resources/silkicons/delete.png', + deleteButtonIcon: '', + + /** + * @cfg {String} text The CSS class for the 'delete' icon + */ + deleteButtonIconCls: 'web-icon delete', /** * @cfg {String} text The text for the "add" button @@ -28,7 +33,12 @@ Ext.define('PartKeepr.EditorGrid', { /** * @cfg {String} text The path to the 'add' icon */ - addButtonIcon: 'resources/silkicons/add.png', + addButtonIcon: '', + + /** + * @cfg {String} text The CSS class for the 'add' icon + */ + addButtonIconCls: 'web-icon add', /** * @cfg {Boolean} boolean Specifies whether to enable the top toolbar or not @@ -95,6 +105,7 @@ Ext.define('PartKeepr.EditorGrid', { text: (this.buttonTextMode !== "hide") ? this.deleteButtonText : '', tooltip: this.deleteButtonText, icon: this.deleteButtonIcon, + iconCls: this.deleteButtonIconCls, handler: Ext.bind(function () { this.fireEvent("itemDelete"); @@ -106,6 +117,7 @@ Ext.define('PartKeepr.EditorGrid', { text: (this.buttonTextMode !== "hide") ? this.addButtonText : '', tooltip: this.addButtonText, icon: this.addButtonIcon, + iconCls: this.addButtonIconCls, handler: Ext.bind(function () { this.fireEvent("itemAdd"); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js @@ -63,7 +63,7 @@ Ext.define('PartKeepr.PartDisplay', { */ this.addButton = new Ext.Button({ text: i18n("Add Stock"), - icon: 'resources/silkicons/brick_add.png', + iconCls: 'web-icon brick_add', handler: Ext.bind(this.addPartPrompt, this) }); @@ -72,7 +72,7 @@ Ext.define('PartKeepr.PartDisplay', { */ this.deleteButton = new Ext.Button({ text: i18n("Remove Stock"), - icon: 'resources/silkicons/brick_delete.png', + iconCls: 'web-icon brick_delete', handler: Ext.bind(this.deletePartPrompt, this) }); @@ -81,7 +81,7 @@ Ext.define('PartKeepr.PartDisplay', { */ this.editButton = new Ext.Button({ text: i18n("Edit Part"), - icon: 'resources/silkicons/brick_edit.png', + iconCls: 'web-icon brick_edit', handler: Ext.bind(function () { this.fireEvent("editPart", this.record.getId()); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js @@ -19,7 +19,7 @@ Ext.define('PartKeepr.PartsGrid', { /** * @cfg {String} Defines the icon of the "Add" button */ - addButtonIcon: 'resources/silkicons/brick_add.png', + addButtonIconCls: 'web-icon brick_add', /** * @cfg {String} Defines the text of the "Delete" button @@ -29,7 +29,7 @@ Ext.define('PartKeepr.PartsGrid', { /** * @cfg {String} Defines the icon of the "Add" button */ - deleteButtonIcon: 'resources/silkicons/brick_delete.png', + deleteButtonIconCls: 'web-icon brick_delete', /** * @cfg {String} Defines the icon of the "Expand Row" button diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectPartGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectPartGrid.js @@ -63,7 +63,7 @@ Ext.define('PartKeepr.ProjectPartGrid', { disabled: true, itemId: 'delete', scope: this, - icon: 'resources/silkicons/brick_delete.png', + iconCls: 'web-icon brick_delete', handler: this.onDeleteClick }); @@ -72,7 +72,7 @@ Ext.define('PartKeepr.ProjectPartGrid', { disabled: true, itemId: 'view', scope: this, - icon: 'resources/silkicons/brick_go.png', + iconCls: 'web-icon brick_go', handler: this.onViewClick }); @@ -81,12 +81,12 @@ Ext.define('PartKeepr.ProjectPartGrid', { items: [{ text: i18n('Add'), scope: this, - icon: 'resources/silkicons/brick_add.png', + iconCls: 'web-icon brick_add', handler: this.onAddClick },{ text: i18n("Create new Part"), scope: this, - icon: 'resources/silkicons/brick_add.png', + iconCls: 'web-icon brick_add', handler: this.onAddPartClick }, this.deleteButton,