From dd09a05d0b94f7b668463e4d3d61a224aaa0b087 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Thu, 7 Jul 2016 12:25:32 +0200 Subject: [PATCH] Fix infoPanel action bars initialization when in editor mode. Fix #1145 --- .../gui.ajax/res/js/ui/prototype/class.InfoPanel.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/plugins/gui.ajax/res/js/ui/prototype/class.InfoPanel.js b/core/src/plugins/gui.ajax/res/js/ui/prototype/class.InfoPanel.js index 06b4e4f525..01475ae5b8 100644 --- a/core/src/plugins/gui.ajax/res/js/ui/prototype/class.InfoPanel.js +++ b/core/src/plugins/gui.ajax/res/js/ui/prototype/class.InfoPanel.js @@ -89,12 +89,15 @@ Class.create("InfoPanel", AjxpPane, { document.stopObserving("ajaxplorer:user_logged", this.userLogHandler ); this.htmlElement.up('div.dialogBox').setStyle({width:Math.min(450, document.viewport.getWidth())+'px'}); this.htmlElement.up('div.dialogContent').setStyle({padding:0}); - this.htmlElement.down('#ip_content_info_panel').setStyle({position:"relative", top:0, left:0, width:'100%', height: Math.min(450, document.viewport.getHeight()-28)+'px', overflow:'auto'}); + this.contentContainer = this.htmlElement.down('#ip_content_info_panel'); + this.contentContainer.setStyle({position:"relative", top:0, left:0, width:'100%', height: Math.min(450, document.viewport.getHeight()-28)+'px', overflow:'auto'}); try{ this.htmlElement.down('#ip_content_modal_action_form').remove(); this.htmlElement.down('#ip_scroller_modal_action_form').remove(); }catch (e){} modal.refreshDialogPosition(); + this.options.skipActions = true; + this.addActions("unique"); }, /** @@ -148,7 +151,7 @@ Class.create("InfoPanel", AjxpPane, { update : function(objectOrEvent){ if(!this.htmlElement) return; var passedNode; - if(objectOrEvent.__className && objectOrEvent.__className == "AjxpNode"){ + if(objectOrEvent instanceof AjxpNode){ passedNode = objectOrEvent; } this.insertedTemplates = $A();