From e2cabe4971927e3dbbbda4c81ae8f74abdee2d15 Mon Sep 17 00:00:00 2001
From: XhmikosR <xhmikosr@users.sourceforge.net>
Date: Thu, 29 May 2014 07:35:22 +0300
Subject: [PATCH] Minor style tweaks.

---
 docs/assets/js/_src/customizer.js |  6 ++----
 js/affix.js                       |  4 +++-
 js/carousel.js                    | 11 ++++++++---
 js/modal.js                       |  2 +-
 js/tests/unit/affix.js            |  4 +++-
 js/tests/unit/popover.js          |  4 +++-
 js/tests/unit/tooltip.js          | 17 +++++++++--------
 js/tooltip.js                     |  2 +-
 8 files changed, 30 insertions(+), 20 deletions(-)

diff --git a/docs/assets/js/_src/customizer.js b/docs/assets/js/_src/customizer.js
index d9c1f09eb8..4fc3c7cbc7 100644
--- a/docs/assets/js/_src/customizer.js
+++ b/docs/assets/js/_src/customizer.js
@@ -80,8 +80,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
     .error(function (err) {
       try {
         showError('<strong>Ruh roh!</strong> Could not save gist file, configuration not saved.', err)
-      }
-      catch (sameErr) {
+      } catch (sameErr) {
         // deliberately ignore the error
       }
       callback('<none>', '<none>')
@@ -416,8 +415,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
       // than "blob:", which means it has been polyfilled and is not supported by
       // this browser.
       failback()
-    }
-    else {
+    } else {
       $('<img>')
         .on('load', function () {
           $compileBtn.prop('disabled', false)
diff --git a/js/affix.js b/js/affix.js
index c7e1b797e1..5af32fee64 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -86,7 +86,9 @@
       .trigger($.Event(affixType.replace('affix', 'affixed')))
 
     if (affix == 'bottom') {
-      this.$element.offset({ top: scrollHeight - this.$element.height() - offsetBottom })
+      this.$element.offset({
+        top: scrollHeight - this.$element.height() - offsetBottom
+      })
     }
   }
 
diff --git a/js/carousel.js b/js/carousel.js
index bda09543fa..e2cb67a5ef 100644
--- a/js/carousel.js
+++ b/js/carousel.js
@@ -36,7 +36,7 @@
     wrap: true
   }
 
-  Carousel.prototype.cycle =  function (e) {
+  Carousel.prototype.cycle = function (e) {
     e || (this.paused = false)
 
     this.interval && clearInterval(this.interval)
@@ -106,7 +106,10 @@
     if ($next.hasClass('active')) return (this.sliding = false)
 
     var relatedTarget = $next[0]
-    var slideEvent = $.Event('slide.bs.carousel', { relatedTarget: relatedTarget, direction: direction })
+    var slideEvent = $.Event('slide.bs.carousel', {
+      relatedTarget: relatedTarget,
+      direction: direction
+    })
     this.$element.trigger(slideEvent)
     if (slideEvent.isDefaultPrevented()) return
 
@@ -133,7 +136,9 @@
           $next.removeClass([type, direction].join(' ')).addClass('active')
           $active.removeClass(['active', direction].join(' '))
           that.sliding = false
-          setTimeout(function () { that.$element.trigger(slidEvent) }, 0)
+          setTimeout(function () {
+            that.$element.trigger(slidEvent)
+          }, 0)
         })
         .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
     } else {
diff --git a/js/modal.js b/js/modal.js
index 21f8ddfd17..2004a23ded 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -208,7 +208,7 @@
     this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
   }
 
-  Modal.prototype.setScrollbar =  function () {
+  Modal.prototype.setScrollbar = function () {
     var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
     if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
   }
diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js
index 03f25eb592..1cdfc7f907 100644
--- a/js/tests/unit/affix.js
+++ b/js/tests/unit/affix.js
@@ -54,7 +54,9 @@ $(function () {
 
     setTimeout(function () {
       window.scrollTo(0, document.body.scrollHeight)
-      setTimeout(function () { window.scroll(0, 0) }, 0)
+      setTimeout(function () {
+        window.scroll(0, 0)
+      }, 0)
     }, 0)
   })
 })
diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js
index 2ccf2cbbff..16f94e1438 100644
--- a/js/tests/unit/popover.js
+++ b/js/tests/unit/popover.js
@@ -167,7 +167,9 @@ $(function () {
   })
 
   test('should destroy popover', function () {
-    var popover = $('<div/>').bootstrapPopover({ trigger: 'hover' }).on('click.foo', function () {})
+    var popover = $('<div/>').bootstrapPopover({
+      trigger: 'hover'
+    }).on('click.foo', function () {})
     ok(popover.data('bs.popover'), 'popover has data')
     ok($._data(popover[0], 'events').mouseover && $._data(popover[0], 'events').mouseout, 'popover has hover event')
     ok($._data(popover[0], 'events').click[0].namespace == 'foo', 'popover has extra click.foo event')
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index 466f88a64b..2e175583e5 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -312,8 +312,9 @@ $(function () {
 
   test('should show tooltip with delegate selector on click', function () {
     var div = $('<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>')
-    div.appendTo('#qunit-fixture')
-                     .bootstrapTooltip({ selector: 'a[rel="tooltip"]', trigger: 'click' })
+    div.appendTo('#qunit-fixture').bootstrapTooltip({
+      selector: 'a[rel="tooltip"]', trigger: 'click'
+    })
     div.find('a').trigger('click')
     ok($('.tooltip').is('.fade.in'), 'tooltip is faded in')
   })
@@ -443,12 +444,12 @@ $(function () {
   test('tooltips should be placed dynamically, with the dynamic placement option', function () {
     $.support.transition = false
     var ttContainer = $('<div id="dynamic-tt-test"/>').css({
-      height : 400,
-      overflow : 'hidden',
-      position : 'absolute',
-      top : 0,
-      left : 0,
-      width : 600
+      height: 400,
+      overflow: 'hidden',
+      position: 'absolute',
+      top: 0,
+      left: 0,
+      width: 600
     })
     .appendTo('body')
 
diff --git a/js/tooltip.js b/js/tooltip.js
index 0dd4c1fa68..3b8ac17f6d 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -304,7 +304,7 @@
 
   Tooltip.prototype.fixTitle = function () {
     var $e = this.$element
-    if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+    if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
       $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
     }
   }
-- 
GitLab