2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

whitespace in tooltip + don't pass empty selector to $() in dropdown.js

This commit is contained in:
fat
2012-12-19 22:26:36 -08:00
parent 7c456c8554
commit 96e5fa6143
5 changed files with 10 additions and 9 deletions
+3 -2
View File
@@ -115,8 +115,9 @@
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
} }
$parent = $(selector) $parent = selector && $(selector)
$parent.length || ($parent = $this.parent())
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent return $parent
} }
-1
View File
@@ -192,7 +192,6 @@
, getPosition: function () { , getPosition: function () {
var el = this.$element[0] var el = this.$element[0]
return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : {
width: el.offsetWidth width: el.offsetWidth
, height: el.offsetHeight , height: el.offsetHeight
+3 -3
View File
@@ -726,8 +726,9 @@
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
} }
$parent = $(selector) $parent = selector && $(selector)
$parent.length || ($parent = $this.parent())
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent return $parent
} }
@@ -1208,7 +1209,6 @@
, getPosition: function () { , getPosition: function () {
var el = this.$element[0] var el = this.$element[0]
return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : { return $.extend({}, el.getBoundingClientRect ? el.getBoundingClientRect() : {
width: el.offsetWidth width: el.offsetWidth
, height: el.offsetHeight , height: el.offsetHeight
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -2
View File
@@ -115,8 +115,9 @@
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
} }
$parent = $(selector) $parent = selector && $(selector)
$parent.length || ($parent = $this.parent())
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent return $parent
} }