From 5cce25d51510cb9bc81f8ab65fd678c2cbdd66ea Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 25 Sep 2018 09:13:51 +0300 Subject: [PATCH] Minor indentation fixes. --- js/popover.js | 4 +-- js/tab.js | 10 +++--- js/tests/unit/tab.js | 78 ++++++++++++++++++++-------------------- js/tests/unit/tooltip.js | 28 +++++++-------- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/js/popover.js b/js/popover.js index f50761212c..44b1376b12 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 () { diff --git a/js/tab.js b/js/tab.js index 66d2f04871..df727065ba 100644 --- a/js/tab.js +++ b/js/tab.js @@ -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 85d9f67a25..83bdd67f7e 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 ad8ca6389b..af319ba6ee 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -495,8 +495,8 @@ $(function () { function rightTooltip() { var $rightTooltip = $('
Right Dynamic Tooltip
') - .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( - '
' + '
' + ' ' + ' ' + ' ' @@ -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()) } }) -- 2.47.2