iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
how to set the top and left offset for the customEditor Slidebar, in order to change the position where the slidebar appear.
Thanks,
Vince
Without modifying the code you could add a mousedown event during enter edit mode to the dropdown icon image to reposition the image. However, it is highly suggested to achieve this feature to modify the unophuscated code.
Here is the snippet, again in the sample I always position the sliderbar in top left corner:
function WebGrid1_OnEnterEditMode(controlId, tblName, editObject) { var grid = ISGetObject(controlId); var dropDownID = editObject.gridId + "_DDSlidebar"; Listener.Add(document.getElementById(dropDownID), "onmousedown", function() { repositionSlidebar() });}function repositionSlidebar() { t = null; t = setTimeout(function() { document.getElementById("placeholderSlidebar").style.top = "10px"; document.getElementById("placeholderSlidebar").style.left = "10px"; }, 100);}
Based on the unophuscated code I attached on CustomEditor thread, the this.OnDropdown function, line #128, will be responsible to show the slidebar and position it on the screen. These are the original lines to position the slidebar:
if (left+width > document.body.offsetWidth) ddObj.style.left = left - ((left+width) - document.body.offsetWidth) - 50;if (top+height > document.body.offsetHeight) { var pTop = top - ((top+height) - document.body.offsetHeight) - 20; if (pTop < 0) pTop = 25; ddObj.style.top = pTop;}
For example if you wanted to always position the slidebar 10px from the left and top of the page, please modify the line above to these lines:
ddObj.style.left = "10px";ddObj.style.top = "10px";
ok, thanks.
Anyway using the standard Slidebar, without rewrite it; how to change position?
Vince, the code that Glenn provided above should do it. Doesn't that work for you?
- James
the code is ok, no problem, we are implementing our custom slidebar based on that code.
Anyway on current version we are using the standard Slidebar customEditor and we have to change its position for our demo.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname