Browse Source

Refactor dom-event-handlers.js.

pull/4161/head
Halil İbrahim Kalkan 6 years ago
parent
commit
d2056574cd
  1. 34
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js

34
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js

@ -50,20 +50,28 @@
scriptObject.initDom && scriptObject.initDom($el);
});
}
abp.dom.onNodeAdded(function (args) {
args.$el.findWithSelf('[data-toggle="tooltip"]').tooltip({
function initializeToolTip($tooltips){
$tooltips.tooltip({
container: 'body'
});
}
args.$el.findWithSelf('[data-toggle="popover"]').popover({
function initializePopover($popovers){
$popovers.popover({
container: 'body'
});
}
args.$el.findWithSelf('.timeago').timeago();
function initializeTimeAgo($timeagos){
$timeagos.timeago();
}
abp.dom.onNodeAdded(function (args) {
initializeToolTip(args.$el.findWithSelf('[data-toggle="tooltip"]'));
initializePopover(args.$el.findWithSelf('[data-toggle="popover"]'));
initializeTimeAgo(args.$el.findWithSelf('.timeago'));
enableFormFeatures(args.$el.findWithSelf('form'), true);
initializeScript(args.$el);
});
@ -74,18 +82,10 @@
});
$(function () {
initializeToolTip($('[data-toggle="tooltip"]'));
initializePopover($('[data-toggle="popover"]'));
initializeTimeAgo($('.timeago'));
enableFormFeatures($('form'));
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
});
$('[data-toggle="popover"]').popover({
container: 'body'
});
$('.timeago').timeago();
$('[data-auto-focus="true"]').first().findWithSelf('input,select').focus();
});

Loading…
Cancel
Save