]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Minor indentation fixes.
authorXhmikosR <xhmikosr@gmail.com>
Tue, 25 Sep 2018 06:13:51 +0000 (09:13 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 8 Oct 2018 17:12:34 +0000 (20:12 +0300)
js/popover.js
js/tab.js
js/tests/unit/tab.js
js/tests/unit/tooltip.js

index f50761212c43802b5113156046f9e4ce26758381..44b1376b1258f8e69409ed40710e0ac16c960833 100644 (file)
@@ -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 () {
index 66d2f0487142fb1a94b1faa2bf2c0fbbfaf75837..df727065ba37ee653773b5f75d8bd0279b26a502 100644 (file)
--- a/js/tab.js
+++ b/js/tab.js
       $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
       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()
index 85d9f67a256175d0405d50ec9bd6ab6f1dfc581f..83bdd67f7e215fb04348721fb70892ca2be3edec 100644 (file)
@@ -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) {
index ad8ca6389b28c67f3529db1f24ea5eb187caef7b..af319ba6ee8e31ea14cada04a0e724af5536451c 100644 (file)
@@ -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())
       }
     })