]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update a few source files to comply to new JSCS rules
authorHeinrich Fenkart <hnrch02@gmail.com>
Thu, 19 Jun 2014 09:41:23 +0000 (11:41 +0200)
committerHeinrich Fenkart <hnrch02@gmail.com>
Thu, 19 Jun 2014 19:08:05 +0000 (21:08 +0200)
docs/assets/js/_src/customizer.js
js/carousel.js
js/collapse.js
js/dropdown.js
js/modal.js
js/tab.js

index aec869797de5cbc95e23032ad1066cd97b78289f..5bbb0b64bbdae0987c7214130f8536887bfcf40a 100644 (file)
@@ -233,7 +233,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
       if (('variables.less' === filename) && vars) lessSource += generateCustomLess(vars)
     })
 
-    lessSource = lessSource.replace(/@import[^\n]*/gi, '') //strip any imports
+    lessSource = lessSource.replace(/@import[^\n]*/gi, '') // strip any imports
     return lessSource
   }
 
index 05631f7a33d65f147e68baf5c00ac86547e180ae..7418ec5f513505eb6a0c7c9e03c3acc826903d40 100644 (file)
     $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
       var href
       var $this   = $(this)
-      var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
       var options = $.extend({}, $target.data(), $this.data())
       var slideIndex = $this.attr('data-slide-to')
       if (slideIndex) options.interval = false
index d37b8898cfc76f75f9a8502c42b693ed3704e3d8..c67939a7debd100b01b96a97ebab24885b3aa6a6 100644 (file)
       var $this   = $(this)
       var target  = $this.attr('data-target')
           || e.preventDefault()
-          || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+          || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
       var $target = $(target)
       var data    = $target.data('bs.collapse')
       var option  = data ? 'toggle' : $this.data()
index f4f6358cd66de1371558001eced7142526986771..704eda96c0aabaa77def47268fad2b5040413e90 100644 (file)
 
       if (!selector) {
         selector = $this.attr('href')
-        selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+        selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
       }
 
       var $parent = selector && $(selector)
index 2241e7b1e0e3f3bea3113934a2f304020fd4cd70..359e1fc678f87543304bb0e6fc2d03c5e1e92406 100644 (file)
     $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
       var $this   = $(this)
       var href    = $this.attr('href')
-      var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+      var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
       var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
 
       if ($this.is('a')) e.preventDefault()
 
       $target.one('show.bs.modal', function (showEvent) {
-        if (showEvent.isDefaultPrevented()) return  // only register focus restorer if modal will actually get shown
+        if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
         $target.one('hidden.bs.modal', function () {
           $this.is(':visible') && $this.trigger('focus')
         })
index c8122157f3031bf113e8503e1ac0ad4f66cf2b2d..de93ec83f162db1495d9116c8b19305c0c2c485a 100644 (file)
--- a/js/tab.js
+++ b/js/tab.js
@@ -30,7 +30,7 @@
 
       if (!selector) {
         selector = $this.attr('href')
-        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
       }
 
       if ($this.parent('li').hasClass('active')) return