修改BUG:移除lgbTooltip

This commit is contained in:
Argo-MacBookPro 2018-08-03 18:12:35 +08:00
parent 07440eb7eb
commit f7d4ac1e57
11 changed files with 27 additions and 37 deletions

View File

@ -502,3 +502,7 @@ label.dropdown-item:first-child {
.form-inline .form-row, .form-inline .row {
width: 100%;
}
.btn-xs {
padding: 1px 5px;
}

View File

@ -29,7 +29,7 @@
.tasks-widget .task-list > li {
position: relative;
font-size: 12px;
font-size: 0.75rem;
}
.tasks-widget .task-list li.last-line {
@ -69,14 +69,10 @@
.tasks-widget .task-list li > .task-title .badge {
position: relative;
display: inline-block;
top: -19px;
top: -16px;
left: -12px;
}
.tasks-widget .task-list li > .task-title .label-success {
background-color: #5cb85c;
}
.tasks-widget .task-list li > .task-title .hidden-phone {
padding-top: 12px;
margin-right: 4px;

View File

@ -29,7 +29,7 @@
$dialogRoleHeader.text($.format('{0}-角色授权窗口', row.GroupName));
$dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogRole.modal('show');
}
});
@ -47,7 +47,7 @@
$dialogUserHeader.text($.format('{0}-用户授权窗口', row.GroupName));
$dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogUser.modal('show');
}
});

View File

@ -325,16 +325,6 @@
var op = $.extend({ header: "header", content: ".main-content" }, options);
return ($(op.header).outerHeight() + $(op.content).outerHeight() + this.outerHeight() > $(window).height()) ? this.removeClass('fixed') : this.addClass('fixed');
},
lgbTooltip: function (options) {
if (/show|hide|dispose/.test(options)) {
this.tooltip(options);
if (options === 'dispose') this.removeAttr('data-original-title');
}
else {
this.tooltip($.extend({ delay: { "show": 100, "hide": 100 } }, options));
}
return this;
},
lgbPopover: function (options) {
if (/show|hide|dispose/.test(options)) {
this.popover(options);
@ -369,13 +359,13 @@
$(element).parents('.form-group').addClass(errorClass).removeClass(validClass);
},
unhighlight: function (element, errorClass, validClass) {
$(element).lgbTooltip('dispose').parents('.form-group').removeClass(errorClass).addClass(validClass);
$(element).tooltip('dispose').parents('.form-group').removeClass(errorClass).addClass(validClass);
},
errorPlacement: function (label, element) {
var $ele = $(element);
if (!$ele.attr('data-original-title')) $ele.lgbTooltip({ container: parent });
if (!$ele.attr('data-original-title')) $ele.tooltip({ container: parent });
$ele.attr('data-original-title', $(label).text());
$ele.lgbTooltip('show');
$ele.tooltip('show');
$('#' + $ele.attr('aria-describedby')).addClass(this.settings.errorClass);
}
});

View File

@ -52,7 +52,7 @@
$dialogRoleHeader.text($.format('{0}-角色授权窗口', row.Name));
$dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogRole.modal('show');
}
});

View File

@ -35,7 +35,7 @@
$dialogUserHeader.text($.format('{0}-用户授权窗口', row.RoleName));
$dialogUserForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogUser.modal('show');
}
});
@ -53,7 +53,7 @@
$dialogGroupHeader.text($.format('{0}-部门授权窗口', row.RoleName));
$dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogGroup.modal('show');
}
});

View File

@ -70,7 +70,7 @@
swal: false,
callback: function (result) {
if ($.isArray(result)) {
var html = '<li class="{4}"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp" role="tooltip" title="{1}">{2}</span><span class="badge badge-sm label-success">{0}</span><span class="task-value" title="{3}">{3}</span><div class="pull-right hidden-phone"><span>{7}</span><button class="btn btn-danger btn-xs fa fa-trash-o" title="{1}" data-url="{5}?cacheKey={1}" role="tooltip" data-self="{6}" data-placement="left"></button></div></div></li>';
var html = '<li class="{4}"><i class="fa fa-ellipsis-v"></i><div class="task-title"><span class="task-title-sp" role="tooltip" title="{1}">{2}</span><span class="badge badge-success">{0}</span><span class="task-value" title="{3}">{3}</span><div class="pull-right hidden-phone"><span>{7}</span><button class="btn btn-danger btn-xs fa fa-trash-o" title="{1}" data-url="{5}?cacheKey={1}" role="tooltip" data-self="{6}" data-placement="left"></button></div></div></li>';
var content = result.sort(function (x, y) {
return x.Key > y.Key ? 1 : -1;
}).map(function (ele) {
@ -114,7 +114,7 @@
}).join('');
$sortable.append($.format('<li class="title">{0}</li>', item.Desc));
$sortable.append(content);
$sortable.find('[role="tooltip"]').lgbTooltip({ container: 'body' });
$sortable.find('[role="tooltip"]').tooltip();
}
}
});
@ -148,7 +148,7 @@
listCacheUrl(options);
}).last().trigger('click');
$sortable.on('click', '.btn', function () {
$(this).lgbTooltip('dispose');
$(this).tooltip('dispose');
listCache({ url: $(this).attr('data-url') });
listCacheUrl();
});

View File

@ -31,7 +31,7 @@
$dialogRoleHeader.text($.format('{0}-角色授权窗口', row.DisplayName));
$dialogRoleForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogRole.modal('show');
}
});
@ -49,7 +49,7 @@
$dialogGroupHeader.text($.format('{0}-部门授权窗口', row.DisplayName));
$dialogGroupForm.html(html).find('[role="tooltip"]').each(function (index, label) {
if (label.title == "") label.title = "未设置";
}).lgbTooltip();
}).tooltip();
$dialogGroup.modal('show');
}
});

View File

@ -165,7 +165,7 @@ $(function () {
scrollTop: 0
}, 200);
});
$('[role="tooltip"]').lgbTooltip();
$('[role="tooltip"]').tooltip();
// breadcrumb
var arch = $('#nav-accordion').find('a.active').last();

View File

@ -74,7 +74,7 @@
var element = document.getElementById(name);
var $element = $(element);
that.tooltip.call(that, element, false);
$element.lgbTooltip('show');
$element.tooltip('show');
}
},
defaultMessage: function (element, rule) {
@ -87,7 +87,7 @@
settings: $.validator.defaults
}, this.defaults(), options)
this.$element.on('input.lgb.validate', this.options.childClass, function () {
if (!that.validElement(this)) $(this).lgbTooltip('show');
if (!that.validElement(this)) $(this).tooltip('show');
}).on('inserted.bs.tooltip', this.options.childClass, function () {
$('#' + $(this).attr('aria-describedby')).addClass(that.options.errorClass);
});
@ -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('dispose');
$this.tooltip('dispose');
$this.parent().removeClass(css);
});
};
@ -154,9 +154,9 @@
var $this = $(element);
var $parent = $this.parent();
try {
if (valid) $this.lgbTooltip('dispose');
if (valid) $this.tooltip('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) });
if (!$parent.hasClass('has-error')) $this.tooltip();
}
}
catch (e) {

View File

@ -15,7 +15,7 @@
return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.Id, noti.DisplayName);
}).join('');
$taskUsers.append(content);
$('#tasks-users').find('[role="tooltip"]').lgbTooltip();
$('#tasks-users').find('[role="tooltip"]').tooltip();
}
$btnRefreshUser.toggleClass('fa-spin');
}
@ -23,7 +23,7 @@
}
listData();
$btnRefreshUser.lgbTooltip().on('click', function () {
$btnRefreshUser.tooltip().on('click', function () {
listData();
});