EasyUI Forum
September 14, 2025, 12:47:41 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: header panel in Layout  (Read 18590 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: March 21, 2016, 07:25:57 AM »

How can I make toolbar in layout to look like in dialog?

I mean I don't want to have buttons on top-right in "blue" area/header. I would like to have fixed "grey" panel below "blue" header.

Thanks,
/V
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 21, 2016, 09:07:14 AM »

You can put a dialog inside the region panel.
Code:
<div class="easyui-layout" style="width:700px;height:350px;">
<div style="position:relative;width:300px" data-options="
title:'west',
region:'west',
split:true
">
<div class="easyui-dialog" data-options="
inline:true,
fit:true,
shadow:false,
noheader:true,
border:false,
toolbar:[{
text:'Add'
},{
text:'Edit'
}]
">
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
<p>content</p>
</div>
</div>
<div data-options="region:'center'">
</div>
</div>
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: March 22, 2016, 01:46:15 AM »

It works but not completly correct.

1) Title of the layout panel should not be closed by Dialog. In this setup I do not see "collapse" button for my "east" panel.

2) There is a gap between dialog and bottom of "east" panel of the same size as title bar or "east" panel.

Code:
<div class="easyui-layout"  style="height:240px">
<div data-options="region:'center'" title="">test</div>
<div data-options="region:'east',title:'Editor',split:true,collapsed:false" style="width:200px">
<div class="easyui-dialog" data-options="inline:true,fit:true,shadow:false,noheader:true,border:false,
toolbar:[{text:'Add'},{text:'Edit'}]">

<form id="form">
<p><b>test:</b>
<input id="test" name="tcName" class="easyui-textbox" style="width:100%" disabled>
        <p>test</p><p>test</p><p>test</p><p>test</p>
        <p>test</p><p>test</p><p>test</p><p>test</p>
        <p>test</p><p>test</p><p>test</p><p>test</p>
        <p>test</p><p>test</p><p>test</p><p>test</p>
</form>
</div>
</div>
</div>
« Last Edit: March 22, 2016, 02:17:58 AM by mzeddd » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: March 22, 2016, 07:29:37 AM »

Please be careful to add 'position:relative' style to the east panel.
Code:
<div data-options="region:'east',title:'Editor',split:true,collapsed:false" style="width:200px;position:relative">
...
</div>

For more information please refer to http://jsfiddle.net/k0o6afhL/1/
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #4 on: March 23, 2016, 12:58:34 AM »

Yes, got it.

Initially I put it into "data-options" section by mistake what gave me strange result and I removed it.

Now it looks as expected.

Thanks
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #5 on: April 04, 2016, 02:32:54 AM »

Hi,

One comment to http://jsfiddle.net/k0o6afhL/1/ example:

If I set collapsed:true parameter for east panel and run this example then when I open east panel I see that toolbar is located not on top of the panel.

Can you check this?

Thanks,
//V
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: April 04, 2016, 07:45:41 AM »

The updated example below works fine.
http://jsfiddle.net/k0o6afhL/2/
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #7 on: April 12, 2016, 02:40:18 AM »

Thanks stworthy!

I have one more question to this example.

There is a input element in panel. I'm going to have a number of input elements but part of them should be hidden for a while.

So, I put
Code:
<style>
    .hiddenElement {display:none}
</style>
<p class="hiddenElement"><b>test:</b>
<input id="test" name="tcName" class="easyui-textbox" style="width:100%" disabled></p>
<script>
function displayItemsByClassName(className,value){
var items = document.getElementsByClassName(className);
for (var i=0; i<items.length; i++) items[i].style.display = value;
}
</script>
Using displayItemsByClassName('hiddenElement','inline'); function call I show hidden elements but all of them do not look like if they were not hidden at the beginning. Input width is not 100% and behaves really strange when I resize 'east' panel.

Can you advice what should be done in order to get it fixed?
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!