EasyUI Forum
May 01, 2024, 04:35:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Title in collapsed Layout Panel  (Read 19915 times)
skellenb
Newbie
*
Posts: 4


View Profile Email
« on: June 29, 2012, 06:13:43 AM »

Hi,

Is there a way to set/show the Title in a collapsed Layout Panel?

When collapsed east or west panel the Title should be visible rotated 90 degrees like in ExtJS
In north, south and Center Panel the Title should be visible like when its expanden...



Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 02, 2012, 02:16:37 AM »

This feature is not available in current version. The code below shows a simple way to display the rotated title when the west panel is collapsed.
Code:
$(function(){
var p = $('body').layout('panel','west').panel({
onCollapse:function(){
var title = $('body').layout('panel','west').panel('options').title;  // get the west panel title
var p = $('body').data('layout').panels['expandWest'];  // the west expand panel
p.html('<div style="-moz-transform: rotate(90deg);padding:6px 2px">'+title+'</div>');
}
});
});
Logged
skellenb
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: July 03, 2012, 03:07:51 PM »

many thanks for the Help Grin

can i do something like this to show the title in collapsed east panel (closed at init with collapsed=true)??

Code:
$.parser.onComplete = function(){
$('body').css('visibility','visible');
var title = $('#mainlayout').layout('panel','east').panel('options').title;  // get the east panel title
var p = $('#mainlayout').data('layout').panels['expandEast'];  // the east expand panel
p.html('<div style="-moz-transform: rotate(90deg);-webkit-transform: rotate(90deg);-ms-transform: rotate(90deg);padding:6px 2px;font-weight:bold;">'+title+'</div>');
};

Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #3 on: March 04, 2014, 05:48:51 AM »

This feature is not available in current version. The code below shows a simple way to display the rotated title when the west panel is collapsed.
Code:
$(function(){
var p = $('body').layout('panel','west').panel({
onCollapse:function(){
var title = $('body').layout('panel','west').panel('options').title;  // get the west panel title
var p = $('body').data('layout').panels['expandWest'];  // the west expand panel
p.html('<div style="-moz-transform: rotate(90deg);padding:6px 2px">'+title+'</div>');
}
});
});

Hello
this code does not work for me. I'm using 1.3.5
Is there any other way to see collapsed panel Title?
Thanks.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #4 on: March 17, 2014, 10:21:28 AM »

Hello Stworthy
do you (or anybody else) have some small working example of this?
Thanks!
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #5 on: March 18, 2014, 06:15:42 AM »

would be good to have it as option so users can simply enamble/disable with title on collapsed layout and do not put extra code.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #6 on: March 20, 2014, 02:53:26 PM »

mzeddd
do you have working example of using this?
thank you
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #7 on: March 20, 2014, 08:41:13 PM »

Example from stworthy works fine in Firefox for me

But for Opera and other browsers it should be updated with another CSS transform parameters like in example from skellenb

So, if we put extra CSS parameters from skellenb's example to stworthy's example we get it working

Code:
<script>
$(function(){
var p = $('body').layout('panel','west').panel({
onCollapse:function(){
var title = $('body').layout('panel','west').panel('options').title;  // get the west panel title
var p = $('body').data('layout').panels['expandWest'];  // the west expand panel
p.html('<div style="-moz-transform: rotate(90deg);padding:6px 2px;-ms-transform: rotate(90deg);-webkit-transform: rotate(90deg)">'+title+'</div>');
}
});
});
</script>
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #8 on: March 21, 2014, 07:10:58 AM »

It works, thank you very much.
Logged
srg
Newbie
*
Posts: 5


View Profile Email
« Reply #9 on: March 27, 2014, 02:34:25 AM »

I think this may help you.........

<div class="easyui-panel" id="" title="TITLE" data-options="collapsible:true,cls:'panelTopLevel'"></div>


Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!