From eca8ff380388c1187bc2c86e0ae7fa80aa33111e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 19:50:02 +0300 Subject: Use single quotes consistently. --- js/.jshintrc | 1 + js/affix.js | 2 +- js/alert.js | 2 +- js/button.js | 2 +- js/carousel.js | 2 +- js/collapse.js | 2 +- js/dropdown.js | 2 +- js/modal.js | 2 +- js/popover.js | 2 +- js/scrollspy.js | 2 +- js/tab.js | 2 +- js/tests/unit/affix.js | 10 +-- js/tests/unit/alert.js | 14 ++-- js/tests/unit/button.js | 20 ++--- js/tests/unit/carousel.js | 34 ++++---- js/tests/unit/collapse.js | 24 +++--- js/tests/unit/dropdown.js | 34 ++++---- js/tests/unit/modal.js | 152 +++++++++++++++++----------------- js/tests/unit/phantom.js | 16 ++-- js/tests/unit/popover.js | 28 +++---- js/tests/unit/scrollspy.js | 10 +-- js/tests/unit/tab.js | 32 +++---- js/tests/unit/tooltip.js | 198 ++++++++++++++++++++++---------------------- js/tests/unit/transition.js | 6 +- js/tooltip.js | 4 +- js/transition.js | 2 +- 26 files changed, 303 insertions(+), 302 deletions(-) (limited to 'js') diff --git a/js/.jshintrc b/js/.jshintrc index fdfdfbbfb..c8cccda37 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -10,5 +10,6 @@ "expr" : true, "laxbreak" : true, "laxcomma" : true, + "quotmark" : "single", "validthis": true } \ No newline at end of file diff --git a/js/affix.js b/js/affix.js index 552bffa3f..0650ce3ae 100644 --- a/js/affix.js +++ b/js/affix.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // AFFIX CLASS DEFINITION // ====================== diff --git a/js/alert.js b/js/alert.js index 695ad74d0..13a0cab91 100644 --- a/js/alert.js +++ b/js/alert.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // ALERT CLASS DEFINITION // ====================== diff --git a/js/button.js b/js/button.js index c9fdde5e4..6c66960d8 100644 --- a/js/button.js +++ b/js/button.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // BUTTON PUBLIC CLASS DEFINITION // ============================== diff --git a/js/carousel.js b/js/carousel.js index 6391a36df..26f3832ff 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // CAROUSEL CLASS DEFINITION // ========================= diff --git a/js/collapse.js b/js/collapse.js index 1a079938e..7bc9fcb42 100644 --- a/js/collapse.js +++ b/js/collapse.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // COLLAPSE PUBLIC CLASS DEFINITION // ================================ diff --git a/js/dropdown.js b/js/dropdown.js index b84d219bd..3f71c7569 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // DROPDOWN CLASS DEFINITION // ========================= diff --git a/js/modal.js b/js/modal.js index 5544cf04e..15b81c362 100644 --- a/js/modal.js +++ b/js/modal.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // MODAL CLASS DEFINITION // ====================== diff --git a/js/popover.js b/js/popover.js index 996962aa2..d26d386b6 100644 --- a/js/popover.js +++ b/js/popover.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // POPOVER PUBLIC CLASS DEFINITION // =============================== diff --git a/js/scrollspy.js b/js/scrollspy.js index 2efe14fdd..8c4d13490 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // SCROLLSPY CLASS DEFINITION // ========================== diff --git a/js/tab.js b/js/tab.js index 6b0f5f672..c584ebf98 100644 --- a/js/tab.js +++ b/js/tab.js @@ -18,7 +18,7 @@ * ======================================================================== */ -+function ($) { "use strict"; ++function ($) { 'use strict'; // TAB CLASS DEFINITION // ==================== diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js index b74bc51e4..6085a141e 100644 --- a/js/tests/unit/affix.js +++ b/js/tests/unit/affix.js @@ -1,22 +1,22 @@ $(function () { - module("affix") + module('affix') - test("should provide no conflict", function () { + test('should provide no conflict', function () { var affix = $.fn.affix.noConflict() ok(!$.fn.affix, 'affix was set back to undefined (org value)') $.fn.affix = affix }) - test("should be defined on jquery object", function () { + test('should be defined on jquery object', function () { ok($(document.body).affix, 'affix method is defined') }) - test("should return element", function () { + test('should return element', function () { ok($(document.body).affix()[0] == document.body, 'document.body returned') }) - test("should exit early if element is not visible", function () { + test('should exit early if element is not visible', function () { var $affix = $('
').affix() $affix.data('bs.affix').checkPosition() ok(!$affix.hasClass('affix'), 'affix class was not added') diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 98b10059e..5e39bbab6 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -1,22 +1,22 @@ $(function () { - module("alert") + module('alert') - test("should provide no conflict", function () { + test('should provide no conflict', function () { var alert = $.fn.alert.noConflict() ok(!$.fn.alert, 'alert was set back to undefined (org value)') $.fn.alert = alert }) - test("should be defined on jquery object", function () { + test('should be defined on jquery object', function () { ok($(document.body).alert, 'alert method is defined') }) - test("should return element", function () { + test('should return element', function () { ok($(document.body).alert()[0] == document.body, 'document.body returned') }) - test("should fade element out on clicking .close", function () { + test('should fade element out on clicking .close', function () { var alertHTML = '
' + '×' + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' @@ -28,7 +28,7 @@ $(function () { ok(!alert.hasClass('in'), 'remove .in class on .close click') }) - test("should remove element when clicking .close", function () { + test('should remove element when clicking .close', function () { $.support.transition = false var alertHTML = '
' @@ -44,7 +44,7 @@ $(function () { ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom') }) - test("should not fire closed when close is prevented", function () { + test('should not fire closed when close is prevented', function () { $.support.transition = false stop(); $('
') diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 115edefaf..45397aeff 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -1,22 +1,22 @@ $(function () { - module("button") + module('button') - test("should provide no conflict", function () { + test('should provide no conflict', function () { var button = $.fn.button.noConflict() ok(!$.fn.button, 'button was set back to undefined (org value)') $.fn.button = button }) - test("should be defined on jquery object", function () { + test('should be defined on jquery object', function () { ok($(document.body).button, 'button method is defined') }) - test("should return element", function () { + test('should return element', function () { ok($(document.body).button()[0] == document.body, 'document.body returned') }) - test("should return set state to loading", function () { + test('should return set state to loading', function () { var btn = $('') equal(btn.html(), 'mdo', 'btn text equals mdo') btn.button('loading') @@ -29,7 +29,7 @@ $(function () { }, 0) }) - test("should return reset state", function () { + test('should return reset state', function () { var btn = $('') equal(btn.html(), 'mdo', 'btn text equals mdo') btn.button('loading') @@ -51,14 +51,14 @@ $(function () { }) - test("should toggle active", function () { + test('should toggle active', function () { var btn = $('') ok(!btn.hasClass('active'), 'btn does not have active class') btn.button('toggle') ok(btn.hasClass('active'), 'btn has class active') }) - test("should toggle active when btn children are clicked", function () { + test('should toggle active when btn children are clicked', function () { var btn = $('') , inner = $('') btn @@ -69,7 +69,7 @@ $(function () { ok(btn.hasClass('active'), 'btn has class active') }) - test("should toggle active when btn children are clicked within btn-group", function () { + test('should toggle active when btn children are clicked within btn-group', function () { var btngroup = $('
') , btn = $('') , inner = $('') @@ -81,7 +81,7 @@ $(function () { ok(btn.hasClass('active'), 'btn has class active') }) - test("should check for closest matching toggle", function () { + test('should check for closest matching toggle', function () { var group = '
' + '