EasyUI Forum
April 29, 2024, 03:00:25 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: [solved] hiding and showing window's footer  (Read 6052 times)
TheunisP
Newbie
*
Posts: 14


View Profile Email
« on: April 16, 2017, 01:12:29 PM »

Sorry to bother but it is late and I'm staring at the screen and cant get this to work. I want to hide & show a window's footer. I tried a couple of attacks but lack of sleep is getting at me, any one help?

my window=windowcandidate and footer=windowcandidatefooter

$('#windowcandidate').panel('footer').remove(); //since panel is part window ne?

showing & refreshing is another mission ;-)

any ideas?
« Last Edit: April 28, 2017, 07:50:32 AM by TheunisP » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 17, 2017, 01:09:10 AM »

Please try to set the footer height to 0 to hide the footer panel.
Code:
$('#w').window('footer').css('height',0);
$('#w').window('resize');

To display the footer panel again, set the 'height' to a normal value.
Code:
$('#w').window('footer').css('height','');
$('#w').window('resize');
Logged
TheunisP
Newbie
*
Posts: 14


View Profile Email
« Reply #2 on: April 17, 2017, 10:36:44 AM »

that was a great push in the right direction - thnx man - however the footer still showed an odd 10px of stuff when settting the hight to 0px - go figure ;-) anyway this got rid of it and I figure display block will bring it back

$easy('#windowcandidate').window('footer').css('display','none');

but hit another stumble block, the resize works on the semi - after resize the window is almost cut in 1/2 resulting in the container tab & form to be cut-off and a scroll bar being added

any ideas? I'll check the forum for resize issues anyway ;-)
Logged
TheunisP
Newbie
*
Posts: 14


View Profile Email
« Reply #3 on: April 17, 2017, 11:04:39 AM »

ok fixed that by forcing a specific resize:

$easy('#windowcandidate').window('resize',{width:1000,height:650});

just 1 strange thing though, the container window's inner border-bottom dissapears?! stranger and stranger

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


View Profile Email
« Reply #4 on: April 18, 2017, 08:01:52 AM »

Here is the extended methods to show or hide the footer.
Code:
(function($){
$.extend($.fn.panel.methods,{
showFooter: function(jq){
return jq.each(function(){
var opts = $(this).panel('options');
$(opts.oldFooter).insertAfter(this).show();
$(this).addClass('panel-body-nobottom');
$(this).panel('resize');
});
},
hideFooter: function(jq){
return jq.each(function(){
var opts = $(this).panel('options');
opts.oldFooter = $(this).panel('footer').hide().appendTo('body');
$(this).removeClass('panel-body-nobottom');
$(this).panel('resize');
});
}
})
})(jQuery);
Logged
TheunisP
Newbie
*
Posts: 14


View Profile Email
« Reply #5 on: April 28, 2017, 07:51:18 AM »

I made this [solved] since I think we have a working solution(s) - thanks again stworthy
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!