plainblack.com
Username Password
search
Bookmark and Share

Positionable slidePanel (top only)

The top-position of the slidePanel you seen on the left of your site when you are in Admin mode can be changed with this package. It fixes some (not all) of the bugs that are in the javascript of the slidePanel.

Usage:
1. import this package, for example here: root/import/macro/adminbar?func=manageAssets
2. Enter the desired offset by changing this.ypos=165; in this file:
slidepanel/slidepanel-rijk.js?func=edit;proceed=manageAssets
3. use ^AdminBar(1k2znwdV-mKqS9G2QrDRbw); instead of ^AdminBar();

Explanation: 

The slidePanel is positioned by a javascript in the extras folder of WebGUI.

On line 235 of this script you seem to be able to change the y-position (top) of the slidePanelBar. However, changing this value is not taken into account by several functions. Below is a diff of the changes. All changes have comments.

15c15
<       var i=parseInt(this.obj.style.height);
---
>       var i=parseInt(this.obj.style.height);
17,18c17,18
<       var k=parseInt(this.objf.style.top);
<       if (k==slidePanelLinkTop)
---
>       var k=parseInt(this.objf.style.top)+this.parentYpos;    //Arjan: the panel is positioned by the function createSlidePanelBar. Original: var k=parseIn t(this.objf.style.top);
>       if (k==(slidePanelLinkTop+this.parentYpos)) //Arjan: slidePanelLinkTop didn't take into account the position of the SlidePanelBar. Original: if (k==s lidePanelLinkTop)
148c148
<                       document.write((this.height-(this.panels.length)*slidePanelButtonHeight)+'px; left:');
---
>               document.write((this.height-this.ypos-(this.panels.length)*slidePanelButtonHeight)+'px; left:'); // Arjan: the height of the scroll-down butt on should take into account the positioning of the PanelBar. Original: document.write((this.height-(this.panels.length)*slidePanelButtonHeight)+'px; left:');
165a166
>               this.panels[i].parentYpos=this.ypos; //Arjan: added so that the top-position of the PanelBar will be accessable in the function testScroll.
216c217
<                     this.panels[i].obj.style.top=this.height-((l-i)*slidePanelButtonHeight)+"px";
---
>             this.panels[i].obj.style.top=this.height-(((l-i)*slidePanelButtonHeight)+this.ypos)+"px"; //Arjan: the panel should be positioned in relation t o the PanelBar as well. Original: this.panels[i].obj.style.top=this.height-((l-i)*slidePanelButtonHeight)+"px";
235c236
<       this.ypos=0;                            // bar y-pos
---
>       this.ypos=165;                            // bar y-pos //Arjan: changed

Kind regards,

Arjan Widlak. 

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
Downloadroot_import_macro_adminbar_slidepanel-positionable.wgpkg root_import_macro_adminbar_slidepanel-positionable.wgpkg
LinksNo Support Offered
Statistics Downloads: 356
Views: 2805
Rating: 0
Updated: 5/26/2007
Keywords packages
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved