com web/php: Syntax fixes. Hopefully fixes IE issues, see bug #66371: js/common.js

From: Date: Tue, 31 Dec 2013 20:08:10 +0000
Subject: com web/php: Syntax fixes. Hopefully fixes IE issues, see bug #66371: js/common.js
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22237@lists.php.net to get a copy of this message
Commit: 1b05e4a4a5a9e21e47bd973a373e0f827c058a3e Author: Hannes Magnusson <bjori@mongodb.com> Tue, 31 Dec 2013 12:07:39 -0800 Parents: 3a9eab894d0f73cc1f094abccfc23713d1d189ef Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=1b05e4a4a5a9e21e47bd973a373e0f827c058a3e Log: Syntax fixes. Hopefully fixes IE issues, see bug #66371 Bugs: https://bugs.php.net/66371 Changed paths: M js/common.js Diff: diff --git a/js/common.js b/js/common.js index 6e2267a..53f466c 100755 --- a/js/common.js +++ b/js/common.js @@ -441,7 +441,6 @@ $(document).ready(function() { $.scrollTo(0, settings.scrollSpeed, {easing: settings.easingType}); }); - var toTopHidden = true; $(window).scroll(function() { var sd = $(this).scrollTop(); if (sd > settings.min && toTopHidden) @@ -573,16 +572,18 @@ $(document).ready(function() { /* {{{ add-user.php animations */ $(function() { - if ( ! document.getElementById('add-note-usernotes')) + if ( ! document.getElementById('add-note-usernotes')) { return; + } $('#usernotes').animate({marginLeft: 0}, 1000); $('#usernotes .note').removeAttr('style'); var times = [3, 7, 10]; - for (i in times) + for (i in times) { times[i] = times[i] * 1000; + } var notes = []; notes[0] = $('#usernotes .bad'); @@ -636,7 +637,7 @@ function flashMessage(o) timeout: 6000, type: 'success', text: '', - parent: '#flash-message', + parent: '#flash-message' }; // Options are passed, set defaults and generate message @@ -660,7 +661,7 @@ function flashMessage(o) // Only timeout is adjustable via data-timeout="" else { - var options = {timeout: o.data('timeout')}; + options = {timeout: o.data('timeout')}; } var remove = function(o) { @@ -673,8 +674,9 @@ function flashMessage(o) { setTimeout(function() { - if ( ! o.length) + if ( ! o.length) { return; + } remove(o); }, options.timeout); } @@ -684,7 +686,7 @@ function flashMessage(o) }); return true; -}; +} /* }}} */ /**

« previous php.webmaster (#22237) next »