Confirmedusers, editor, Administrators
886
edits
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
slideSpeed: 400, | slideSpeed: 400, | ||
easing: false, | easing: false, | ||
callback: false | callback: false, | ||
callback_ticking: false | |||
}, | }, | ||
thisCallArgs: { | thisCallArgs: { | ||
slideSpeed: 400, | slideSpeed: 400, | ||
easing: false, | easing: false, | ||
callback: false | callback: false, | ||
callback_ticking: false | |||
}, | }, | ||
methods: { | methods: { | ||
up: function (arg1,arg2,arg3) { | up: function (arg1,arg2,arg3,arg4) { | ||
if(typeof arg1 == 'object') { | if(typeof arg1 == 'object') { | ||
for(p in arg1) { | for(p in arg1) { | ||
Line 36: | Line 38: | ||
sR.thisCallArgs.callback = sR.defaults.callback; | sR.thisCallArgs.callback = sR.defaults.callback; | ||
} | } | ||
if(typeof arg4 == 'function') { | |||
sR.thisCallArgs.callback_ticking = arg4; | |||
}else{ | |||
sR.thisCallArgs.callback_ticking = sR.defaults.callback_ticking; | |||
} | |||
var $cells = $(this).find('td'); | var $cells = $(this).find('td'); | ||
$cells.wrapInner('<div class="slideRowUp" />'); | $cells.wrapInner('<div class="slideRowUp" />'); | ||
Line 47: | Line 55: | ||
$(this).parent().css({'display':'none'}); | $(this).parent().css({'display':'none'}); | ||
$(this).css({'padding': currentPadding}); | $(this).css({'padding': currentPadding}); | ||
}}); | }, | ||
progress: function($promise, $progress, $remains){ | |||
if(typeof sR.thisCallArgs.callback_ticking == "function") | |||
sR.thisCallArgs.callback_ticking.call(this); | |||
}}); | |||
var wait = setInterval(function () { | var wait = setInterval(function () { | ||
if($cellContentWrappers.is(':animated') === false) { | if($cellContentWrappers.is(':animated') === false) { | ||
Line 58: | Line 70: | ||
return $(this); | return $(this); | ||
}, | }, | ||
down: function (arg1,arg2,arg3) { | down: function (arg1,arg2,arg3,arg4) { | ||
if(typeof arg1 == 'object') { | if(typeof arg1 == 'object') { | ||
for(p in arg1) { | for(p in arg1) { | ||
Line 81: | Line 93: | ||
sR.thisCallArgs.callback = sR.defaults.callback; | sR.thisCallArgs.callback = sR.defaults.callback; | ||
} | } | ||
if(typeof arg4 == 'function') { | |||
sR.thisCallArgs.callback_ticking = arg4; | |||
}else{ | |||
sR.thisCallArgs.callback_ticking = sR.defaults.callback_ticking; | |||
} | |||
var $cells = $(this).find('td'); | var $cells = $(this).find('td'); | ||
$cells.wrapInner('<div class="slideRowDown" style="display:none;" />'); | $cells.wrapInner('<div class="slideRowDown" style="display:none;" />'); | ||
$cellContentWrappers = $cells.find('.slideRowDown'); | $cellContentWrappers = $cells.find('.slideRowDown'); | ||
$(this).show(); | $(this).show(); | ||
$cellContentWrappers.slideDown(sR.thisCallArgs.slideSpeed, sR.thisCallArgs.easing, function() { $(this).replaceWith( $(this).contents()); }); | $cellContentWrappers.slideDown({ | ||
duration: sR.thisCallArgs.slideSpeed, | |||
easing: sR.thisCallArgs.easing, | |||
complete: function() { $(this).replaceWith( $(this).contents()); }, | |||
progress: function($promise, $progress, $remains){ | |||
if(typeof sR.thisCallArgs.callback_ticking == "function") | |||
sR.thisCallArgs.callback_ticking.call(this); | |||
} | |||
}); | |||
var wait = setInterval(function () { | var wait = setInterval(function () { | ||
Line 288: | Line 314: | ||
hide(id);*/ | hide(id);*/ | ||
$("." + $el.attr("data-tt-id")).slideRow("up", 400, function(){updateLines()}); | $("." + $el.attr("data-tt-id")).slideRow("up", 400, function(){updateLines()}, function(){updateLines()}); | ||
} | } | ||
else { | else { | ||
Line 297: | Line 323: | ||
});*/ | });*/ | ||
window.location.hash = '#' + $el.attr("data-tt-id"); | window.location.hash = '#' + $el.attr("data-tt-id"); | ||
$("." + $el.attr("data-tt-id")).slideRow("down", 400, function(){updateLines()}); | $("." + $el.attr("data-tt-id")).slideRow("down", 400, function(){updateLines()}, function(){updateLines()}); | ||
} | } | ||
updateLines(); | updateLines(); |