mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -3,3 +3,4 @@ kit.config = kit.config || {};
|
||||
|
||||
kit.config.defaultPath = '/local/templates.dev/kit/assets';
|
||||
kit.config.requiredDependencies = ['bsCore', 'toolkit'];
|
||||
kit.config.debug = false;
|
||||
+3
-4
@@ -231,7 +231,7 @@ window.kit = window.kit || {};
|
||||
script.onerror = () => reject(new Error(`Ошибка загрузки скрипта ${src}`));
|
||||
document.head.append(script);
|
||||
} else {
|
||||
console.warn(`Скрип ${src} уже загружен`);
|
||||
global.config.debug && console.warn(`Скрип ${src} уже загружен`);
|
||||
resolve(script);
|
||||
}
|
||||
}).then(resolveCallback, rejectCallback);
|
||||
@@ -282,7 +282,7 @@ window.kit = window.kit || {};
|
||||
document.head.append(link);
|
||||
resolve(link);
|
||||
} else {
|
||||
console.warn(`Скрип ${src} уже загружен`);
|
||||
global.config.debug && console.warn(`Скрип ${src} уже загружен`);
|
||||
resolve(link);
|
||||
}
|
||||
});
|
||||
@@ -427,7 +427,7 @@ window.kit = window.kit || {};
|
||||
} else if(plugin.config.type === moduleTypeList.import && typeof plugin.config.module === 'string') {
|
||||
setGlobalExtension(pluginId, plugin.config.alias, (typeof module.exports === 'object' && module.exports.default !== undefined)?module.exports.default:module.exports);
|
||||
}
|
||||
console.log('PluginManager.install: plugin ' + pluginId + ' установлен');
|
||||
console.log('%cPluginManager.install: plugin ' + pluginId + ' установлен', "color: green;");
|
||||
plugin.state = stateList.installed;
|
||||
}.bind(this);
|
||||
|
||||
@@ -574,7 +574,6 @@ window.kit = window.kit || {};
|
||||
alias: 'pm',
|
||||
type: moduleTypeList.loader,
|
||||
loader: function(module, exports, require, global) {
|
||||
console.warn('global.config', JSON.stringify(global.config));
|
||||
global.config = global.config || {};
|
||||
global.config = Object.assign(defaultConfig, global.config);
|
||||
}
|
||||
|
||||
@@ -123,31 +123,22 @@ kit.PluginManager.registerPlugins({
|
||||
});
|
||||
|
||||
kit.exec([], function () {
|
||||
console.log('start init');
|
||||
|
||||
function _init(){
|
||||
console.log('_init');
|
||||
console.log('%ckit._init', 'color:#2053ff');
|
||||
kit.PluginManager.install('jquery');
|
||||
kit.PluginManager.install('toolkit');
|
||||
kit.PluginManager.install('tooltip');
|
||||
kit.PluginManager.install('bsCore');
|
||||
|
||||
}
|
||||
|
||||
if (/complete|interactive|loaded/.test(document.readyState)) {
|
||||
// In case the document has finished parsing, document's readyState will
|
||||
// be one of "complete", "interactive" or (non-standard) "loaded".
|
||||
console.log('1');
|
||||
_init();
|
||||
} else {
|
||||
console.log('2');
|
||||
// The document is not ready yet, so wait for the DOMContentLoaded event
|
||||
document.addEventListener("DOMContentLoaded", _init);
|
||||
}
|
||||
console.log('readyState', document.readyState);
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
console.log('DOMContentLoaded', document.readyState);
|
||||
});
|
||||
$(function(){
|
||||
console.log('$', document.readyState, typeof kit.toolkit);
|
||||
});
|
||||
});
|
||||
@@ -1,6 +1,7 @@
|
||||
kit.PluginManager.register('datepicker', function(module, exports, require, global){
|
||||
|
||||
var jQuery = $ = require('jquery');
|
||||
var $, jQuery;
|
||||
jQuery = $ = require('jquery');
|
||||
|
||||
|
||||
;(function (window, $, undefined) {
|
||||
|
||||
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
kit.PluginManager.register('jquery', function(module, exports, require){
|
||||
kit.PluginManager.register('jquery', function(module, exports, require, global){
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.6.0
|
||||
@@ -35,7 +35,7 @@ kit.PluginManager.register('jquery', function(module, exports, require){
|
||||
return factory( w );
|
||||
};
|
||||
} else {
|
||||
factory( global );
|
||||
factory( global, true );
|
||||
}
|
||||
|
||||
// Pass this if window is not defined yet
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -762,7 +762,7 @@
|
||||
--kit-color-button-content-active: var(--kit-color-error-b2, var(--kit-color-error));
|
||||
--kit-color-button-material-active: var(--kit-color-error-b3, var(--kit-color-error));
|
||||
}
|
||||
.kit-button {
|
||||
.kit-button, a.kit-button {
|
||||
|
||||
--kit-color-button-text: var(--kit-color-button-text-default);
|
||||
--kit-color-button-content: var(--kit-color-button-content-default);
|
||||
|
||||
@@ -706,8 +706,6 @@ kit.PluginManager.register('toolkit',function(module, exports, require) {
|
||||
|
||||
this.init();
|
||||
|
||||
console.log('Inputs constructor');
|
||||
|
||||
window.addEventListener('resize', function () {
|
||||
return _this.refresh();
|
||||
}, false);
|
||||
|
||||
Reference in New Issue
Block a user