修改BUG:更新tooltip组件dispose代替destroy
This commit is contained in:
parent
de3f8b4994
commit
1448539857
|
@ -326,9 +326,9 @@
|
|||
return ($(op.header).outerHeight() + $(op.content).outerHeight() + this.outerHeight() > $(window).height()) ? this.removeClass('fixed') : this.addClass('fixed');
|
||||
},
|
||||
lgbTooltip: function (options) {
|
||||
if (/show|hide|destroy/.test(options)) {
|
||||
if (/show|hide|dispose/.test(options)) {
|
||||
this.tooltip(options);
|
||||
if (options === 'destroy') this.removeAttr('data-original-title');
|
||||
if (options === 'dispose') this.removeAttr('data-original-title');
|
||||
}
|
||||
else {
|
||||
this.tooltip($.extend({ delay: { "show": 100, "hide": 100 } }, options));
|
||||
|
@ -336,9 +336,9 @@
|
|||
return this;
|
||||
},
|
||||
lgbPopover: function (options) {
|
||||
if (/show|hide|destroy/.test(options)) {
|
||||
if (/show|hide|dispose/.test(options)) {
|
||||
this.popover(options);
|
||||
if (options === 'destroy') this.removeAttr('data-original-title');
|
||||
if (options === 'dispose') this.removeAttr('data-original-title');
|
||||
}
|
||||
else {
|
||||
this.popover($.extend({ placement: 'auto' }, options));
|
||||
|
@ -369,7 +369,7 @@
|
|||
$(element).parents('.form-group').addClass(errorClass).removeClass(validClass);
|
||||
},
|
||||
unhighlight: function (element, errorClass, validClass) {
|
||||
$(element).lgbTooltip('destroy').parents('.form-group').removeClass(errorClass).addClass(validClass);
|
||||
$(element).lgbTooltip('dispose').parents('.form-group').removeClass(errorClass).addClass(validClass);
|
||||
},
|
||||
errorPlacement: function (label, element) {
|
||||
var $ele = $(element);
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
listCacheUrl(options);
|
||||
}).last().trigger('click');
|
||||
$sortable.on('click', '.btn', function () {
|
||||
$(this).lgbTooltip('destroy');
|
||||
$(this).lgbTooltip('dispose');
|
||||
listCache({ url: $(this).attr('data-url') });
|
||||
listCacheUrl();
|
||||
});
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
var css = this.options.validClass + ' ' + this.options.errorClass;
|
||||
this.$element.find(this.options.childClass).each(function () {
|
||||
var $this = $(this);
|
||||
$this.lgbTooltip('destroy');
|
||||
$this.lgbTooltip('dispose');
|
||||
$this.parent().removeClass(css);
|
||||
});
|
||||
};
|
||||
|
@ -154,7 +154,7 @@
|
|||
var $this = $(element);
|
||||
var $parent = $this.parent();
|
||||
try {
|
||||
if (valid) $this.lgbTooltip('destroy');
|
||||
if (valid) $this.lgbTooltip('dispose');
|
||||
else {
|
||||
if (!$parent.hasClass('has-error')) $this.lgbTooltip({ container: $(window).width() > 768 ? op.container : (this.$element.find('.modal-body') || this.$element.find('.panel-body') || op.container) });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue