mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
+9
-4
@@ -26,7 +26,12 @@ kit.config = kit.config || {};
|
||||
this.global = global;
|
||||
this.registerPlugins(plugins);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @type {kit.PluginManager|PluginManager}
|
||||
* @private
|
||||
*/
|
||||
var __proto = PluginManager.prototype;
|
||||
|
||||
__proto.__checkState = function(pluginId, state){
|
||||
@@ -50,7 +55,6 @@ kit.config = kit.config || {};
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pluginId
|
||||
* @param {kitModuleTypeLoader|{}} config
|
||||
* @return {boolean}
|
||||
@@ -456,7 +460,7 @@ kit.config = kit.config || {};
|
||||
|
||||
if(!this.__checkState(pluginId, stateList.registered)) {
|
||||
console.warn('PluginManager.require: plugin ' + pluginId + ' is not register');
|
||||
return false;
|
||||
return undefined;
|
||||
}
|
||||
if(typeof callback !== 'function') {
|
||||
callback = function(){};
|
||||
@@ -626,6 +630,7 @@ kit.config = kit.config || {};
|
||||
debug: false,
|
||||
defaultPhoneMask: '+7 (999) 999-99-99',
|
||||
};
|
||||
|
||||
var manager = new PluginManager(global);
|
||||
manager.register('PluginManager', {
|
||||
alias: 'pm',
|
||||
@@ -649,7 +654,7 @@ kit.config = kit.config || {};
|
||||
global.ready = manager.ready.bind(manager);
|
||||
global.exec = manager.exec.bind(manager);
|
||||
global.require = manager.require.bind(manager);
|
||||
/** @type {kitCore} */
|
||||
/** @type {kit} */
|
||||
window.__pmGlobal__ = global;
|
||||
})(kit);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ __PluginManager__.registerPlugins({
|
||||
},
|
||||
jQuery: {
|
||||
path: __pmConfig__.assetsPath + '/jquery',
|
||||
module: '/jquery.min.js',
|
||||
module: '/jquery.js',
|
||||
type: 'loader',
|
||||
alias: '$',
|
||||
},
|
||||
@@ -283,6 +283,25 @@ __PluginManager__.registerPlugins({
|
||||
js: '/makeCSSAnimations.js',
|
||||
deps: ['jQuery', 'support'],
|
||||
},
|
||||
mCustomScrollbar: {
|
||||
path: __pmConfig__.assetsPath + '/mCustomScrollbar',
|
||||
alias: 'malihu-custom-scrollbar-plugin',
|
||||
js: '/mCustomScrollbar.js',
|
||||
css: '/jquery.mCustomScrollbar.css',
|
||||
deps: ['jQuery', 'jqueryMousewheel'],
|
||||
onInstall: function (plugin) {
|
||||
plugin.module.exports(kit.require('jQuery'));
|
||||
}
|
||||
},
|
||||
jqueryMousewheel: {
|
||||
path: __pmConfig__.assetsPath + '/jqueryMousewheel',
|
||||
alias: 'jquery-mousewheel',
|
||||
js: '/jquery.mousewheel.js',
|
||||
deps: ['jQuery'],
|
||||
onInstall: function (plugin) {
|
||||
plugin.module.exports(kit.require('jQuery'));
|
||||
}
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user