Browse Source

Rename methods on dom-event-handlers

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

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

@ -1,6 +1,8 @@
(function ($) {
function enableFormFeatures($forms, validate) {
abp.dom = abp.dom || {};
function initializeForms($forms, validate) {
if ($forms.length) {
$forms.each(function () {
var $form = $(this);
@ -51,27 +53,27 @@
});
}
function initializeToolTip($tooltips){
function initializeToolTips($tooltips){
$tooltips.tooltip({
container: 'body'
});
}
function initializePopover($popovers){
function initializePopovers($popovers){
$popovers.popover({
container: 'body'
});
}
function initializeTimeAgo($timeagos){
function initializeTimeAgos($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);
initializeToolTips(args.$el.findWithSelf('[data-toggle="tooltip"]'));
initializePopovers(args.$el.findWithSelf('[data-toggle="popover"]'));
initializeTimeAgos(args.$el.findWithSelf('.timeago'));
initializeForms(args.$el.findWithSelf('form'), true);
initializeScript(args.$el);
});
@ -82,10 +84,10 @@
});
$(function () {
initializeToolTip($('[data-toggle="tooltip"]'));
initializePopover($('[data-toggle="popover"]'));
initializeTimeAgo($('.timeago'));
enableFormFeatures($('form'));
initializeToolTips($('[data-toggle="tooltip"]'));
initializePopovers($('[data-toggle="popover"]'));
initializeTimeAgos($('.timeago'));
initializeForms($('form'));
$('[data-auto-focus="true"]').first().findWithSelf('input,select').focus();
});

Loading…
Cancel
Save