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

Loading…
Cancel
Save