commit 3cf793c8c64adb151125dbf623d45bb959b1234c
parent 799e9461c901d89b5db1a95626ef2c273061c935
Author: Felicitus <felicitus@felicitus.org>
Date: Thu, 5 Nov 2015 14:17:24 +0100
Removed printing buttons, related to #467
Diffstat:
1 file changed, 1 insertion(+), 38 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js
@@ -19,8 +19,6 @@ Ext.define('PartKeepr.PartEditorWindow', {
height: 415,
saveText: i18n("Save"),
- saveAndPrintText: i18n("Save + Print"),
- printText: i18n("Print"),
cancelText: i18n("Cancel"),
/* Default edit mode. If mode = "create", we show additional fields */
@@ -68,25 +66,13 @@ Ext.define('PartKeepr.PartEditorWindow', {
handler: Ext.bind(this.onCancelEdit, this)
});
- this.saveAndPrintButton = Ext.create("Ext.button.Button", {
- text: this.saveAndPrintText,
- glyph: 0xf02f,
- handler: Ext.bind(this.onItemSaveAndPrint, this)
- });
-
- this.printButton = Ext.create("Ext.button.Button", {
- text: this.printText,
- glyph: 0xf02f,
- handler: Ext.bind(this.onItemPrint, this)
- });
-
this.bottomToolbar = Ext.create("Ext.toolbar.Toolbar", {
enableOverflow: true,
defaults: {minWidth: 100},
dock: 'bottom',
ui: 'footer',
pack: 'start',
- items: [ this.saveButton, this.cancelButton, this.partMode == "create" ? this.saveAndPrintButton : this.printButton ]
+ items: [ this.saveButton, this.cancelButton ]
});
this.dockedItems = [ this.bottomToolbar ];
@@ -152,29 +138,6 @@ Ext.define('PartKeepr.PartEditorWindow', {
this.editor._onItemSave();
},
/**
- * Prints the currently shown part. Only possible if the part was saved before.
- */
- onItemPrint: function() {
- this.printItem(this.editor.record.data.id);
- },
- /**
- * Prints a single part which is identified by its id.
- */
- printItem: function( id ){
- var val = Ext.create("PartKeepr.PrintingWindow");
- val.setObjectType('PartKeepr\\PartBundle\\Entity\\Part');
- val.setContext("PartEditor");
- val.setObjectIds([id]);
- val.show();
- },
- /**
- * Called if one presses the save and print button.
- */
- onItemSaveAndPrint: function () {
- this.editor.on("itemSaved", function(record){ this.printItem(record.data.id);}, this, {"single": true});
- this.onItemSave();
- },
- /**
* Called when the item was saved
*/
onItemSaved: function () {