fixed Layout('init') for external use

pull/2447/head
REJack 2019-12-12 09:49:02 +01:00
parent 72d348d34d
commit 2473021861
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
5 changed files with 12 additions and 8 deletions

View File

@ -166,7 +166,7 @@ const Layout = (($) => {
// Static
static _jQueryInterface(config) {
static _jQueryInterface(config = '') {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
@ -176,8 +176,8 @@ const Layout = (($) => {
$(this).data(DATA_KEY, data)
}
if (config === 'init') {
data[config]()
if (config === 'init' || config === '') {
data['_init']()
}
})
}

8
dist/js/adminlte.js vendored
View File

@ -435,6 +435,10 @@
;
Layout._jQueryInterface = function _jQueryInterface(config) {
if (config === void 0) {
config = '';
}
return this.each(function () {
var data = $(this).data(DATA_KEY);
@ -445,8 +449,8 @@
$(this).data(DATA_KEY, data);
}
if (config === 'init') {
data[config]();
if (config === 'init' || config === '') {
data['_init']();
}
});
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long