EasyUI Forum
October 16, 2024, 12:10:28 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Minimiza a window  (Read 17882 times)
mapner
Jr. Member
**
Posts: 63


View Profile
« on: August 05, 2012, 07:04:42 AM »

When I minimize a window, does it go? Is there a way to get it to stick to the bottom of the main application window?

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


View Profile Email
« Reply #1 on: August 05, 2012, 07:51:42 PM »

The code below shows a simple way to implement the window sticking function.
Code:
$.fn.window.defaults.onMinimize = function(){
var title = $(this).window('options').title;
var s = $('<div class="ws"></div>').appendTo($('div.wb')).html(title);
s.hover(
function(){$(this).addClass('ws-over')},
function(){$(this).removeClass('ws-over')}
);
s.bind('click', {w:this}, function(e){
$(e.data.w).window('open');
s.remove();
});
};

Prepare a <div> that acts as the task bar:
Code:
<div id="bb" class="wb">
When minimize a window, a new small window dock will appear in the task bar.

The css style definition:
Code:
<style>
.wb{
width:100%;
height:30px;
background:#fafafa;
z-index:99999999999;
position:fixed;
bottom:0;
left:0;
}
.ws{
border:1px solid #ccc;
background:#91C8FF;
width:100px;
padding:0 5px;
display:inline-block;
margin:2px;
line-height:25px;
}
.ws-over{
background:#FFF955;
}
</style>
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!