added previewicon, improved editing
authorSven Hecht <sven@sven-laptop.(none)>
Fri, 26 Jun 2009 19:23:00 +0000 (21:23 +0200)
committerSven Hecht <sven@sven-laptop.(none)>
Fri, 26 Jun 2009 19:23:00 +0000 (21:23 +0200)
web/img/icons/magnifier.png [deleted file]
web/img/icons/preview.png [new file with mode: 0644]
web/php/page/editplant.pg
web/php/page/myplants.pg

diff --git a/web/img/icons/magnifier.png b/web/img/icons/magnifier.png
deleted file mode 100644 (file)
index cf3d97f..0000000
Binary files a/web/img/icons/magnifier.png and /dev/null differ
diff --git a/web/img/icons/preview.png b/web/img/icons/preview.png
new file mode 100644 (file)
index 0000000..cf3d97f
Binary files /dev/null and b/web/img/icons/preview.png differ
index c70d490..1159d9d 100644 (file)
@@ -24,6 +24,7 @@
                                        ,Code: planteditor.getValue()
                                });
                                editor.Save(plant);
+                               Ext.getCmp("PreviewPlant").enable();
                        } else {
                                communication.showMessage("Ihre Pflanze benötigt einen Namen.", "error");
                        }
                                console.error("Lseed.Editor.CheckSyntaxCallback_Callback: 'plantdefinitioneditor' Could not be found.");
                        }
                }.createDelegate(editor)
+       },{
+               id: 'PreviewPlant'
+               ,text: 'Preview'
+               ,icon: 'img/icons/preview.png'
+               ,cls: 'x-btn-text-icon'
+               ,handler: function(){
+                       editor.Preview(editor.LastEditPlant);
+               }
        }]
        ,items: [{
                id: "editplantdefinitionnamefield"
@@ -64,6 +73,9 @@
                ,anchor:'100% -50'
                ,enableKeyEvents: true
                ,listeners: {
+                       keydown: function() {
+                               Ext.getCmp("PreviewPlant").disable();
+                       }
                }
                ,value: ''
        }]
index b68a2dc..84b6dd5 100644 (file)
@@ -41,7 +41,7 @@
                },{
                        id: 'plantlistPreviewPlant'
                        ,text: 'Preview'
-                       ,icon: 'img/icons/edit.png'
+                       ,icon: 'img/icons/preview.png'
                        ,cls: 'x-btn-text-icon'
                        ,disabled: true
                        ,handler: function(){