EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 10, 2024, 11:25:01 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
How to disable/enable dragging of panels within the portal layout?
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to disable/enable dragging of panels within the portal layout? (Read 18803 times)
tslatt
Jr. Member
Posts: 85
How to disable/enable dragging of panels within the portal layout?
«
on:
October 05, 2011, 08:25:33 AM »
I need to be able to disable and enable dragging/moving of panels within the portal layout.
Can anyone tell me how that might be accomplished?
I set up my portal so that when a panel is maximized, (1) all other panels & columns are hidden and (2) the width of the column that the maximized panel is in fills the screen so that the panel fills the screen. However, since dragging is still active, the user can (accidentally) drag the panel into a hidden column, which makes the panel disappear!
Any help would be greatly appreciated!
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: How to disable/enable dragging of panels within the portal layout?
«
Reply #1 on:
October 05, 2011, 06:22:04 PM »
To disable the portal panel, try call the below code:
$('#yourpanelid').panel('panel').draggable('disable');
Logged
tslatt
Jr. Member
Posts: 85
Re: How to disable/enable dragging of panels within the portal layout?
«
Reply #2 on:
October 06, 2011, 11:48:15 AM »
That worked! Thank you so much!
Logged
LWardwell
Newbie
Posts: 7
Re: How to disable/enable dragging of panels within the portal layout?
«
Reply #3 on:
October 24, 2011, 09:27:42 AM »
Without starting a new topic... along these same lines, is it possible to trap a panel resize event? So that the div contents of a panel can then be manually resized to the new panel height? Thanks.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: How to disable/enable dragging of panels within the portal layout?
«
Reply #4 on:
October 24, 2011, 06:13:32 PM »
To trap the panel resize event, override the panel's 'onResize' function:
$('#pp').find('div.portal-p').each(function(){
$(this).panel('options').onResize = function(){
//...
}
});
The simple way is to set the content panel to auto fit its parent container, below is some test code:
<div id="pp" style="position:relative">
...
<div style="width:30%;">
<div title="My Title" closable="true" style="height:280px;">
<div class="easyui-panel" fit="true">
content
</div>
</div>
</div>
</div>
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...