* Merge code.
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
$(function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
fixScroll();
|
||||
}, 500);
|
||||
})
|
||||
|
||||
function fixScroll()
|
||||
{
|
||||
var $scrollwrapper = $('div.datatable').first().find('.scroll-wrapper:first');
|
||||
if($scrollwrapper.size() == 0)return;
|
||||
|
||||
var $tfoot = $('div.datatable').first().find('table tfoot:last');
|
||||
var scrollOffset = $scrollwrapper.offset().top + $scrollwrapper.find('.scroll-slide').height();
|
||||
if($tfoot.size() > 0) scrollOffset += $tfoot.height();
|
||||
if($('div.datatable.head-fixed').size() == 0) scrollOffset -= '29';
|
||||
var windowH = $(window).height();
|
||||
if(scrollOffset > windowH + $(window).scrollTop()) $scrollwrapper.css({'position': 'fixed', 'bottom': 50 + 'px'});
|
||||
$(window).scroll(function()
|
||||
{
|
||||
newBottom = $tfoot.hasClass('fixedTfootAction') ? 50 + $tfoot.height() : 50;
|
||||
if(typeof(ssoRedirect) != "undefined") newBottom = 50;
|
||||
if(scrollOffset <= windowH + $(window).scrollTop())
|
||||
{
|
||||
$scrollwrapper.css({'position':'relative', 'bottom': '0px'});
|
||||
}
|
||||
else if($scrollwrapper.css('position') != 'fixed')
|
||||
{
|
||||
$scrollwrapper.css({'position': 'fixed', 'bottom': newBottom + 'px'});
|
||||
bottom = newBottom;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
function addItem(obj)
|
||||
{
|
||||
var item = $('#addItem').html().replace(/%i%/g, i);
|
||||
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
|
||||
var newItem = $('#names' + i).closest('tr');
|
||||
newItem.find('.form-date').datepicker();
|
||||
$("#output" + i).chosen();
|
||||
$("#output_i__chosen").remove();
|
||||
i ++;
|
||||
}
|
||||
|
||||
function deleteItem(obj)
|
||||
{
|
||||
if($('#planForm .table tbody').children().length < 2) return false;
|
||||
$(obj).closest('tr').remove();
|
||||
}
|
||||
Reference in New Issue
Block a user