From 4fe37339653c909368ba772ea9214c0b2a511fee Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Fri, 16 Aug 2013 16:26:07 -0700 Subject: update bootstrap to 3.0.0-rc2 --- bower_components/bootstrap/js/tests/index.html | 0 bower_components/bootstrap/js/tests/phantom.js | 0 bower_components/bootstrap/js/tests/server.js | 0 bower_components/bootstrap/js/tests/unit/affix.js | 0 bower_components/bootstrap/js/tests/unit/alert.js | 0 bower_components/bootstrap/js/tests/unit/button.js | 0 .../bootstrap/js/tests/unit/carousel.js | 0 .../bootstrap/js/tests/unit/collapse.js | 35 +++ .../bootstrap/js/tests/unit/dropdown.js | 12 +- bower_components/bootstrap/js/tests/unit/modal.js | 301 +++++++++++---------- .../bootstrap/js/tests/unit/phantom.js | 0 .../bootstrap/js/tests/unit/popover.js | 0 .../bootstrap/js/tests/unit/scrollspy.js | 0 bower_components/bootstrap/js/tests/unit/tab.js | 0 .../bootstrap/js/tests/unit/tooltip.js | 0 .../bootstrap/js/tests/unit/transition.js | 0 .../bootstrap/js/tests/vendor/jquery.js | 0 .../bootstrap/js/tests/vendor/qunit.css | 0 .../bootstrap/js/tests/vendor/qunit.js | 0 19 files changed, 202 insertions(+), 146 deletions(-) mode change 100644 => 100755 bower_components/bootstrap/js/tests/index.html mode change 100644 => 100755 bower_components/bootstrap/js/tests/phantom.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/server.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/affix.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/alert.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/button.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/carousel.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/collapse.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/dropdown.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/modal.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/phantom.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/popover.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/scrollspy.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/tab.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/tooltip.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/transition.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/jquery.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/qunit.css mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/qunit.js (limited to 'bower_components/bootstrap/js/tests') diff --git a/bower_components/bootstrap/js/tests/index.html b/bower_components/bootstrap/js/tests/index.html old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/phantom.js b/bower_components/bootstrap/js/tests/phantom.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/server.js b/bower_components/bootstrap/js/tests/server.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/affix.js b/bower_components/bootstrap/js/tests/unit/affix.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/alert.js b/bower_components/bootstrap/js/tests/unit/alert.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/button.js b/bower_components/bootstrap/js/tests/unit/button.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/carousel.js b/bower_components/bootstrap/js/tests/unit/carousel.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/collapse.js b/bower_components/bootstrap/js/tests/unit/collapse.js old mode 100644 new mode 100755 index 73799c75..11b2cf83 --- a/bower_components/bootstrap/js/tests/unit/collapse.js +++ b/bower_components/bootstrap/js/tests/unit/collapse.js @@ -126,4 +126,39 @@ $(function () { target3.click() }) + test("should allow dots in data-parent", function () { + $.support.transition = false + stop() + + var accordion = $('
') + .appendTo($('#qunit-fixture')) + + var target1 = $('') + .appendTo(accordion.find('.accordion-group').eq(0)) + + var collapsible1 = $('
') + .appendTo(accordion.find('.accordion-group').eq(0)) + + var target2 = $('') + .appendTo(accordion.find('.accordion-group').eq(1)) + + var collapsible2 = $('
') + .appendTo(accordion.find('.accordion-group').eq(1)) + + var target3 = $('') + .appendTo(accordion.find('.accordion-group').eq(2)) + + var collapsible3 = $('
') + .appendTo(accordion.find('.accordion-group').eq(2)) + .on('show.bs.collapse', function () { + ok(target1.hasClass('collapsed')) + ok(target2.hasClass('collapsed')) + ok(!target3.hasClass('collapsed')) + + start() + }) + + target3.click() + }) + }) diff --git a/bower_components/bootstrap/js/tests/unit/dropdown.js b/bower_components/bootstrap/js/tests/unit/dropdown.js old mode 100644 new mode 100755 index e45bd0a4..02256965 --- a/bower_components/bootstrap/js/tests/unit/dropdown.js +++ b/bower_components/bootstrap/js/tests/unit/dropdown.js @@ -165,9 +165,9 @@ $(function () { .appendTo('#qunit-fixture') .find('[data-toggle="dropdown"]') .dropdown() - + stop() - + dropdown .parent('.dropdown') .bind('show.bs.dropdown', function () { @@ -177,7 +177,7 @@ $(function () { ok(true, 'hide was called') start() }) - + dropdown.click() $(document.body).click() }) @@ -199,9 +199,9 @@ $(function () { .appendTo('#qunit-fixture') .find('[data-toggle="dropdown"]') .dropdown() - + stop() - + dropdown .parent('.dropdown') .bind('shown.bs.dropdown', function () { @@ -211,7 +211,7 @@ $(function () { ok(true, 'hide was called') start() }) - + dropdown.click() $(document.body).click() }) diff --git a/bower_components/bootstrap/js/tests/unit/modal.js b/bower_components/bootstrap/js/tests/unit/modal.js old mode 100644 new mode 100755 index 90762ea9..2c610d83 --- a/bower_components/bootstrap/js/tests/unit/modal.js +++ b/bower_components/bootstrap/js/tests/unit/modal.js @@ -1,156 +1,177 @@ $(function () { - module("modal") + module("modal") - test("should provide no conflict", function () { - var modal = $.fn.modal.noConflict() - ok(!$.fn.modal, 'modal was set back to undefined (org value)') - $.fn.modal = modal - }) + test("should provide no conflict", function () { + var modal = $.fn.modal.noConflict() + ok(!$.fn.modal, 'modal was set back to undefined (org value)') + $.fn.modal = modal + }) - test("should be defined on jquery object", function () { - var div = $("") - ok(div.modal, 'modal method is defined') - }) + test("should be defined on jquery object", function () { + var div = $("") + ok(div.modal, 'modal method is defined') + }) - test("should return element", function () { - var div = $("") - ok(div.modal() == div, 'document.body returned') - $('#modal-test').remove() - }) + test("should return element", function () { + var div = $("") + ok(div.modal() == div, 'document.body returned') + $('#modal-test').remove() + }) - test("should expose defaults var for settings", function () { - ok($.fn.modal.Constructor.DEFAULTS, 'default object exposed') - }) + test("should expose defaults var for settings", function () { + ok($.fn.modal.Constructor.DEFAULTS, 'default object exposed') + }) - test("should insert into dom when show method is called", function () { - stop() - $.support.transition = false - $("") - .on("shown.bs.modal", function () { - ok($('#modal-test').length, 'modal inserted into dom') - $(this).remove() - start() - }) - .modal("show") - }) + test("should insert into dom when show method is called", function () { + stop() + $.support.transition = false + $("") + .on("shown.bs.modal", function () { + ok($('#modal-test').length, 'modal inserted into dom') + $(this).remove() + start() + }) + .modal("show") + }) - test("should fire show event", function () { - stop() - $.support.transition = false - $("") - .on("show.bs.modal", function () { - ok(true, "show was called") - }) - .on("shown.bs.modal", function () { - $(this).remove() - start() - }) - .modal("show") - }) + test("should fire show event", function () { + stop() + $.support.transition = false + $("") + .on("show.bs.modal", function () { + ok(true, "show was called") + }) + .on("shown.bs.modal", function () { + $(this).remove() + start() + }) + .modal("show") + }) - test("should not fire shown when default prevented", function () { - stop() - $.support.transition = false - $("") - .on("show.bs.modal", function (e) { - e.preventDefault() - ok(true, "show was called") - start() - }) - .on("shown.bs.modal", function () { - ok(false, "shown was called") - }) - .modal("show") - }) + test("should not fire shown when default prevented", function () { + stop() + $.support.transition = false + $("") + .on("show.bs.modal", function (e) { + e.preventDefault() + ok(true, "show was called") + start() + }) + .on("shown.bs.modal", function () { + ok(false, "shown was called") + }) + .modal("show") + }) - test("should hide modal when hide is called", function () { - stop() - $.support.transition = false + test("should hide modal when hide is called", function () { + stop() + $.support.transition = false - $("") - .on("shown.bs.modal", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal inserted into dom') - $(this).modal("hide") - }) - .on("hidden.bs.modal", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - $('#modal-test').remove() - start() - }) - .modal("show") - }) + $("") + .on("shown.bs.modal", function () { + ok($('#modal-test').is(":visible"), 'modal visible') + ok($('#modal-test').length, 'modal inserted into dom') + $(this).modal("hide") + }) + .on("hidden.bs.modal", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + $('#modal-test').remove() + start() + }) + .modal("show") + }) - test("should toggle when toggle is called", function () { - stop() - $.support.transition = false - var div = $("") - div - .on("shown.bs.modal", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal inserted into dom') - div.modal("toggle") - }) - .on("hidden.bs.modal", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("toggle") - }) + test("should toggle when toggle is called", function () { + stop() + $.support.transition = false + var div = $("") + div + .on("shown.bs.modal", function () { + ok($('#modal-test').is(":visible"), 'modal visible') + ok($('#modal-test').length, 'modal inserted into dom') + div.modal("toggle") + }) + .on("hidden.bs.modal", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + div.remove() + start() + }) + .modal("toggle") + }) - test("should remove from dom when click [data-dismiss=modal]", function () { - stop() - $.support.transition = false - var div = $("") - div - .on("shown.bs.modal", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - ok($('#modal-test').length, 'modal inserted into dom') - div.find('.close').click() - }) - .on("hidden.bs.modal", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("toggle") - }) + test("should remove from dom when click [data-dismiss=modal]", function () { + stop() + $.support.transition = false + var div = $("") + div + .on("shown.bs.modal", function () { + ok($('#modal-test').is(":visible"), 'modal visible') + ok($('#modal-test').length, 'modal inserted into dom') + div.find('.close').click() + }) + .on("hidden.bs.modal", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + div.remove() + start() + }) + .modal("toggle") + }) - test("should allow modal close with 'backdrop:false'", function () { - stop() - $.support.transition = false - var div = $("
", { id: 'modal-test', "data-backdrop": false }) - div - .on("shown.bs.modal", function () { - ok($('#modal-test').is(":visible"), 'modal visible') - div.modal("hide") - }) - .on("hidden.bs.modal", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("show") - }) + test("should allow modal close with 'backdrop:false'", function () { + stop() + $.support.transition = false + var div = $("
", { id: 'modal-test', "data-backdrop": false }) + div + .on("shown.bs.modal", function () { + ok($('#modal-test').is(":visible"), 'modal visible') + div.modal("hide") + }) + .on("hidden.bs.modal", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + div.remove() + start() + }) + .modal("show") + }) - test("should close modal when clicking outside of modal-content", function () { - stop() - $.support.transition = false - var div = $("") - div - .bind("shown.bs.modal", function () { - ok($('#modal-test').length, 'modal insterted into dom') - $('.contents').click() - ok($('#modal-test').is(":visible"), 'modal visible') - $('#modal-test').click() - }) - .bind("hidden.bs.modal", function() { - ok(!$('#modal-test').is(":visible"), 'modal hidden') - div.remove() - start() - }) - .modal("show") - }) + test("should close modal when clicking outside of modal-content", function () { + stop() + $.support.transition = false + var div = $("") + div + .bind("shown.bs.modal", function () { + ok($('#modal-test').length, 'modal insterted into dom') + $('.contents').click() + ok($('#modal-test').is(":visible"), 'modal visible') + $('#modal-test').click() + }) + .bind("hidden.bs.modal", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + div.remove() + start() + }) + .modal("show") + }) + + test("should trigger hide event once when clicking outside of modal-content", function () { + stop() + $.support.transition = false + var div = $("") + var triggered + div + .bind("shown.bs.modal", function () { + triggered = 0 + $('#modal-test').click() + }) + .one("hidden.bs.modal", function() { + div.modal("show") + }) + .bind("hide.bs.modal", function () { + triggered += 1 + ok(triggered === 1, 'modal hide triggered once') + start() + }) + .modal("show") + }) }) diff --git a/bower_components/bootstrap/js/tests/unit/phantom.js b/bower_components/bootstrap/js/tests/unit/phantom.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/popover.js b/bower_components/bootstrap/js/tests/unit/popover.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/scrollspy.js b/bower_components/bootstrap/js/tests/unit/scrollspy.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/tab.js b/bower_components/bootstrap/js/tests/unit/tab.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/tooltip.js b/bower_components/bootstrap/js/tests/unit/tooltip.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/unit/transition.js b/bower_components/bootstrap/js/tests/unit/transition.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/vendor/jquery.js b/bower_components/bootstrap/js/tests/vendor/jquery.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/vendor/qunit.css b/bower_components/bootstrap/js/tests/vendor/qunit.css old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/tests/vendor/qunit.js b/bower_components/bootstrap/js/tests/vendor/qunit.js old mode 100644 new mode 100755 -- cgit v1.2.3