fix lint warnings

This commit is contained in:
vitalets
2012-11-22 13:54:42 +04:00
parent 29a5db1c35
commit a74ffb571d
2 changed files with 8 additions and 7 deletions

@ -26,6 +26,7 @@
/** /**
* move popover to new position. This function mainly copied from bootstrap-popover. * move popover to new position. This function mainly copied from bootstrap-popover.
*/ */
/*jshint laxcomma: true*/
setPosition: function () { setPosition: function () {
(function() { (function() {
@ -37,7 +38,7 @@
, placement , placement
, tp; , tp;
placement = typeof this.options.placement == 'function' ? placement = typeof this.options.placement === 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement; this.options.placement;
@ -58,16 +59,16 @@
switch (inside ? placement.split(' ')[1] : placement) { switch (inside ? placement.split(' ')[1] : placement) {
case 'bottom': case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}; tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2};
break break;
case 'top': case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}; tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2};
break break;
case 'left': case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}; tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth};
break break;
case 'right': case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}; tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width};
break break;
} }
$tip $tip
@ -76,7 +77,7 @@
.addClass('in'); .addClass('in');
}).call(this.container()); }).call(this.container());
/*jshint laxcomma: false*/
} }
}); });

@ -132,7 +132,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
disable: function() { disable: function() {
this.options.disabled = true; this.options.disabled = true;
this.hide(); this.hide();
this.$element.addClass('editable-disabled') this.$element.addClass('editable-disabled');
this.handleEmpty(); this.handleEmpty();
//do not stop focus on this element //do not stop focus on this element
this.$element.attr('tabindex', -1); this.$element.attr('tabindex', -1);