Commit 96e5fa61 authored by fat's avatar fat
Browse files

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

parent 7c456c85
Showing with 10 additions and 9 deletions
+10 -9
...@@ -115,8 +115,9 @@ ...@@ -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
} }
......
...@@ -192,7 +192,6 @@ ...@@ -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
......
...@@ -726,8 +726,9 @@ ...@@ -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 @@ ...@@ -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
......
This diff is collapsed.
...@@ -115,8 +115,9 @@ ...@@ -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
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment