v1.1
This commit is contained in:
4
jquery/common.js
vendored
4
jquery/common.js
vendored
@@ -88,7 +88,7 @@ $.prototype.getEmptyHeight = function()
|
||||
//debug('#'+$(this).attr('id')+'|.'+$(this).attr('class')+' gives '+$(this).outerHeight(true));
|
||||
iTotalHeight += $(this).outerHeight(true);
|
||||
});
|
||||
return $This.height() - iTotalHeight;
|
||||
return $This.innerHeight() - iTotalHeight;
|
||||
};
|
||||
|
||||
$.prototype.getEmptyWidth = function()
|
||||
@@ -98,7 +98,7 @@ $.prototype.getEmptyWidth = function()
|
||||
{
|
||||
iTotalWidth += $(this).outerWidth(true);
|
||||
});
|
||||
return $This.width() - iTotalWidth;
|
||||
return $This.innerWidth() - iTotalWidth;
|
||||
};
|
||||
|
||||
$.prototype.addDefaultValue = function(sDefaultValue, sInitValue)
|
||||
|
||||
97
jquery/databap.js
vendored
97
jquery/databap.js
vendored
@@ -163,100 +163,7 @@ function Databap()
|
||||
|
||||
this.initMenu = function()
|
||||
{
|
||||
//Hover Event: open/close
|
||||
self.$menu.hover
|
||||
(
|
||||
self.openMenu,
|
||||
function()
|
||||
{
|
||||
closeMenu = true;
|
||||
if(typeof oMenuTimer != "undefined") clearTimeout(oMenuTimer);
|
||||
oMenuTimer = setTimeout(self.closeMenu, 1000);
|
||||
}
|
||||
);
|
||||
|
||||
//Close on click
|
||||
self.$menu.find('a').click(self.instantCloseMenu);
|
||||
};
|
||||
|
||||
this.openMenu = function()
|
||||
{
|
||||
//Disable closing
|
||||
closeMenu = false;
|
||||
if(typeof oMenuTimer != "undefined") clearTimeout(oMenuTimer);
|
||||
|
||||
//If not already opened / about to open
|
||||
if(typeof openedMenu == 'undefined' || openedMenu != true)
|
||||
{
|
||||
openedMenu = true;
|
||||
self.$menu.find('#menu_title').hide();
|
||||
|
||||
//Main shadow
|
||||
self.$main.add(self.$title)
|
||||
.click(self.instantCloseMenu)
|
||||
.fadeTo('fast', 0.2);
|
||||
|
||||
//Switch useless button
|
||||
self.$menu.find('.useless_button').removeClass('round').addClass('tiny_top_right');
|
||||
|
||||
//Move menu items
|
||||
var iVPos = Math.max(0, $(window).scrollTop() - 46 - 46);
|
||||
self.$menu.find('#menu_items').css('margin-top', iVPos);
|
||||
|
||||
//Expand menu
|
||||
self.$menu
|
||||
.stop()
|
||||
.animate
|
||||
(
|
||||
{width:'300px'/*, borderWidth:'10px'*/},
|
||||
'fast',
|
||||
function()
|
||||
{
|
||||
self.$menu.find('#menu_box').show();
|
||||
$(this).addClass('opened');
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
this.instantCloseMenu = function()
|
||||
{
|
||||
closeMenu=true;
|
||||
if(typeof oMenuTimer != "undefined") clearTimeout(oMenuTimer);
|
||||
self.closeMenu();
|
||||
};
|
||||
|
||||
this.closeMenu = function()
|
||||
{
|
||||
if(closeMenu == true)
|
||||
{
|
||||
if(typeof oMenuTimer != "undefined") clearTimeout(oMenuTimer);
|
||||
|
||||
//Switch uselecc button
|
||||
self.$menu.find('.useless_button').removeClass('tiny_top_right').addClass('round');
|
||||
|
||||
//Main shadow
|
||||
self.$main.add(self.$title)
|
||||
.off('click')
|
||||
.fadeTo('fast', 1);
|
||||
|
||||
//Reduce menu
|
||||
self.$menu.find('#menu_box').hide();
|
||||
self.$menu
|
||||
.stop()
|
||||
.animate
|
||||
(
|
||||
{width:'20px'/*, borderWidth:'0'*/},
|
||||
'fast',
|
||||
function()
|
||||
{
|
||||
self.$menu.find('#menu_title').show();
|
||||
$(this).removeClass('opened');
|
||||
}
|
||||
);
|
||||
openedMenu = false;
|
||||
closeMenu = false;
|
||||
}
|
||||
self.$menu.find('a').each(function(){$(this).attr('title', $(this).find('span').text());});
|
||||
};
|
||||
|
||||
this.setInitEnd = function(bEnded, bAddScrollBar)
|
||||
@@ -440,7 +347,7 @@ function Databap()
|
||||
{
|
||||
iDelta = $Elem.getEmptyHeight();
|
||||
if(iDelta > 0) $Elem.height('-='+iDelta);
|
||||
//debug('Removing useless '+iDelta+'px from #'+$Elem.attr('id'));
|
||||
debug('Removing useless '+iDelta+'px from #'+$Elem.attr('id'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user