added refreshbutton
authorSven Hecht <sven@sven-laptop.(none)>
Fri, 26 Jun 2009 19:52:20 +0000 (21:52 +0200)
committerSven Hecht <sven@sven-laptop.(none)>
Fri, 26 Jun 2009 19:52:20 +0000 (21:52 +0200)
web/js/communication.js
web/php/page/previewplant.pg

index 68d5577..519f67c 100644 (file)
@@ -106,7 +106,7 @@ Lseed.Communication = function() {
                        default:
                                content = contentmsg.content;
                                if (contentmsg.contentname == "previewplant") {
-
+                                       content.plantid = contentmsg.plantid;
                                        content.html = '<img src="php/PlantImages.php?plantid='+contentmsg.plantid+'"/>';
                                }
                                this.loadTab(content, contentmsg.contentname);
index e9504d7..72a33f6 100644 (file)
@@ -3,4 +3,17 @@
        ,closable: true
        ,style: 'padding: 5px;'
        ,title: 'Pflanze anschauen'
+       ,tbar: [{
+               id: 'previewReload'
+               ,text: 'Reload'
+               ,icon: 'img/icons/arrow_refresh.png'
+               ,cls: 'x-btn-text-icon'
+               ,handler: function(){
+                       var cmp = Ext.getCmp('ContentPanel_previewplant');
+                       if (cmp) {
+                               communication.closeTab('previewplant');
+                               editor.Preview({data:{ID:cmp.plantid}});
+                       }
+               }
+       }]
 }