diff options
| author | XhmikosR <[email protected]> | 2018-09-25 09:13:51 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2018-10-08 20:12:34 +0300 |
| commit | 5cce25d51510cb9bc81f8ab65fd678c2cbdd66ea (patch) | |
| tree | 8bd3f129510dbac9312803f9afa8cc8316044f40 /js | |
| parent | b8a6855a692ab03281359d8b5595970f9caac1b8 (diff) | |
| download | bootstrap-5cce25d51510cb9bc81f8ab65fd678c2cbdd66ea.tar.xz bootstrap-5cce25d51510cb9bc81f8ab65fd678c2cbdd66ea.zip | |
Minor indentation fixes.
Diffstat (limited to 'js')
| -rw-r--r-- | js/popover.js | 4 | ||||
| -rw-r--r-- | js/tab.js | 10 | ||||
| -rw-r--r-- | js/tests/unit/tab.js | 78 | ||||
| -rw-r--r-- | js/tests/unit/tooltip.js | 28 |
4 files changed, 60 insertions, 60 deletions
diff --git a/js/popover.js b/js/popover.js index f50761212..44b1376b1 100644 --- a/js/popover.js +++ b/js/popover.js @@ -67,8 +67,8 @@ return $e.attr('data-content') || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) + o.content.call($e[0]) : + o.content) } Popover.prototype.arrow = function () { @@ -73,15 +73,15 @@ $active .removeClass('active') .find('> .dropdown-menu > .active') - .removeClass('active') + .removeClass('active') .end() .find('[data-toggle="tab"]') - .attr('aria-expanded', false) + .attr('aria-expanded', false) element .addClass('active') .find('[data-toggle="tab"]') - .attr('aria-expanded', true) + .attr('aria-expanded', true) if (transition) { element[0].offsetWidth // reflow for transition @@ -93,10 +93,10 @@ if (element.parent('.dropdown-menu').length) { element .closest('li.dropdown') - .addClass('active') + .addClass('active') .end() .find('[data-toggle="tab"]') - .attr('aria-expanded', true) + .attr('aria-expanded', true) } callback && callback() diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 85d9f67a2..83bdd67f7 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -95,17 +95,17 @@ $(function () { $(dropHTML) .find('ul > li:first a') - .bootstrapTab('show') + .bootstrapTab('show') .end() .find('ul > li:last a') - .on('show.bs.tab', function (e) { - assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') - }) - .on('shown.bs.tab', function (e) { - assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') - done() - }) - .bootstrapTab('show') + .on('show.bs.tab', function (e) { + assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') + }) + .on('shown.bs.tab', function (e) { + assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') + done() + }) + .bootstrapTab('show') }) QUnit.test('should fire hide and hidden events', function (assert) { @@ -119,24 +119,24 @@ $(function () { $(tabsHTML) .find('li:first a') - .on('hide.bs.tab', function () { - assert.ok(true, 'hide event fired') - }) - .bootstrapTab('show') + .on('hide.bs.tab', function () { + assert.ok(true, 'hide event fired') + }) + .bootstrapTab('show') .end() .find('li:last a') - .bootstrapTab('show') + .bootstrapTab('show') $(tabsHTML) .find('li:first a') - .on('hidden.bs.tab', function () { - assert.ok(true, 'hidden event fired') - done() - }) - .bootstrapTab('show') + .on('hidden.bs.tab', function () { + assert.ok(true, 'hidden event fired') + done() + }) + .bootstrapTab('show') .end() .find('li:last a') - .bootstrapTab('show') + .bootstrapTab('show') }) QUnit.test('should not fire hidden when hide is prevented', function (assert) { @@ -150,18 +150,18 @@ $(function () { $(tabsHTML) .find('li:first a') - .on('hide.bs.tab', function (e) { - e.preventDefault() - assert.ok(true, 'hide event fired') - done() - }) - .on('hidden.bs.tab', function () { - assert.ok(false, 'hidden event fired') - }) - .bootstrapTab('show') + .on('hide.bs.tab', function (e) { + e.preventDefault() + assert.ok(true, 'hide event fired') + done() + }) + .on('hidden.bs.tab', function () { + assert.ok(false, 'hidden event fired') + }) + .bootstrapTab('show') .end() .find('li:last a') - .bootstrapTab('show') + .bootstrapTab('show') }) QUnit.test('hide and hidden events contain correct relatedTarget', function (assert) { @@ -175,17 +175,17 @@ $(function () { $(tabsHTML) .find('li:first a') - .on('hide.bs.tab', function (e) { - assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') - }) - .on('hidden.bs.tab', function (e) { - assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') - done() - }) - .bootstrapTab('show') + .on('hide.bs.tab', function (e) { + assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') + }) + .on('hidden.bs.tab', function (e) { + assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') + done() + }) + .bootstrapTab('show') .end() .find('li:last a') - .bootstrapTab('show') + .bootstrapTab('show') }) QUnit.test('selected tab should have aria-expanded', function (assert) { diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index ad8ca6389..af319ba6e 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -495,8 +495,8 @@ $(function () { function rightTooltip() { var $rightTooltip = $('<div style="right: 0;" rel="tooltip" title="Right tooltip">Right Dynamic Tooltip</div>') - .appendTo($container) - .bootstrapTooltip({ placement: 'right auto', viewport: '#qunit-fixture' }) + .appendTo($container) + .bootstrapTooltip({ placement: 'right auto', viewport: '#qunit-fixture' }) $rightTooltip .one('shown.bs.tooltip', function () { @@ -1258,7 +1258,7 @@ $(function () { var $styles = $(styles).appendTo('head') $('#qunit-fixture').append( - '<div style="position: fixed; top: 0; left: 0;">' + '<div style="position: fixed; top: 0; left: 0;">' + ' <svg width="200" height="200">' + ' <circle cx="100" cy="100" r="10" title="m" id="theCircle" />' + ' </svg>' @@ -1500,28 +1500,28 @@ $(function () { function showingTooltip() { return $tooltip.hasClass('in') || tooltip.hoverState == 'in' } var tests = [ - ['mouseenter', 'mouseleave'], + ['mouseenter', 'mouseleave'], - ['focusin', 'focusout'], + ['focusin', 'focusout'], - ['click', 'click'], + ['click', 'click'], - ['mouseenter', 'focusin', 'focusout', 'mouseleave'], - ['mouseenter', 'focusin', 'mouseleave', 'focusout'], + ['mouseenter', 'focusin', 'focusout', 'mouseleave'], + ['mouseenter', 'focusin', 'mouseleave', 'focusout'], - ['focusin', 'mouseenter', 'mouseleave', 'focusout'], - ['focusin', 'mouseenter', 'focusout', 'mouseleave'], + ['focusin', 'mouseenter', 'mouseleave', 'focusout'], + ['focusin', 'mouseenter', 'focusout', 'mouseleave'], - ['click', 'focusin', 'mouseenter', 'focusout', 'mouseleave', 'click'], - ['mouseenter', 'click', 'focusin', 'focusout', 'mouseleave', 'click'], - ['mouseenter', 'focusin', 'click', 'click', 'mouseleave', 'focusout'] + ['click', 'focusin', 'mouseenter', 'focusout', 'mouseleave', 'click'], + ['mouseenter', 'click', 'focusin', 'focusout', 'mouseleave', 'click'], + ['mouseenter', 'focusin', 'click', 'click', 'mouseleave', 'focusout'] ] assert.ok(!showingTooltip()) $.each(tests, function (idx, triggers) { for (var i = 0, len = triggers.length; i < len; i++) { - $el.trigger(triggers[i]); + $el.trigger(triggers[i]) assert.equal(i < (len - 1), showingTooltip()) } }) |
