diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index f59263f1..7131727d 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -13,6 +13,8 @@ } var FORMDATA_IS_SUPPORTED = typeof(FormData) !== 'undefined'; + var animateIn = 'fadeIn'; + // var animateIn = 'slideDown'; String.prototype.reverse = function () { return this.split('').reverse().join(''); @@ -180,7 +182,7 @@ }, /* manage errors in forms */ manage_errors: function (target) { - $('div.error', target).hide().slideDown('slow'); + $('div.error', target).hide()[animateIn]('slow'); }, after_ajax: function (xhr) { /* called whenever an ajax request completes */ @@ -616,7 +618,7 @@ var flash = $('.w2p_flash'); web2py.hide_flash(); flash.html(message).addClass(status); - if (flash.html()) flash.append(' × ').slideDown(); + if (flash.html()) flash.append(' × ')[animateIn](); }, hide_flash: function () { $('.w2p_flash').fadeOut(0).html(''); @@ -630,7 +632,7 @@ for (var k = 0; k < triggers[id].length; k++) { var dep = $('#' + triggers[id][k], target); var tr = $('#' + triggers[id][k] + '__row', target); - if (t.is(dep.attr('data-show-if'))) tr.slideDown(); + if (t.is(dep.attr('data-show-if'))) tr[animateIn](); else tr.hide(); } }; @@ -823,4 +825,4 @@ web2py_event_handlers = jQuery.web2py.event_handlers; web2py_trap_link = jQuery.web2py.trap_link; web2py_calc_entropy = jQuery.web2py.calc_entropy; */ -/* compatibility code - end*/ \ No newline at end of file +/* compatibility code - end*/