This commit is contained in:
Bellord
2026-09-02 08:36:31 +03:00
parent 329ecf3bc5
commit ca94090b05
7 changed files with 32 additions and 20 deletions
+23 -13
View File
@@ -37,15 +37,12 @@ var __PluginManagerConfigHandler__ = function() {
},
jQueryProxy: {
path: root + '/jquery/proxy',
js: '/jquery-proxy.min.js',
module: '/jquery-proxy.min.js',
type: 'HMD',
alias: [],
alias: ['jquery/proxy'],
deps: [],
onInstall: function(plugin){
var jQueryPlugin = __pmGlobal__.pm.plugins.jQuery
if(jQueryPlugin.isInstalled()){
}
plugin.module.exports.onInstall(plugin);
},
},
jQuery: {
@@ -57,17 +54,15 @@ var __PluginManagerConfigHandler__ = function() {
if(hasJQuery()){
plugin.module.exports = window.jQuery;
plugin.config.module = '';
} else {
var jQueryProxyPlugin = __pmGlobal__.pm.plugins.jQueryProxy;
if(jQueryProxyPlugin.isInstalled()){
jQueryProxyPlugin.module.exports.onJQueryRegister(plugin);
}
}
},
onInstall: function(plugin){
var jQueryProxyPlugin = __pmGlobal__.pm.plugins.jQueryProxy;
if(jQueryProxyPlugin.isInstalled()){
jQueryProxyPlugin.module.exports.onJQueryInstall(plugin);
jQueryProxyPlugin.module.exports.onJQueryInstall(plugin, jQueryProxyPlugin);
}
if(!hasJQuery()){
window.$ = window.jQuery = plugin.module.exports;
}
},
},
@@ -316,7 +311,6 @@ var __PluginManagerConfigHandler__ = function() {
path: root + '/lightGallery',
css: '/css/lightgallery.css',
module: '/lightgallery.min.js',
js: [],
type: 'UMD',
deps: [],
},
@@ -328,6 +322,22 @@ var __PluginManagerConfigHandler__ = function() {
deps: ['lightGallery'],
alias: ['lgVideo'],
},
'lightGallery.autoplay': {
path: root + '/lightGallery',
css: '/css/lg-autoplay.css',
module: '/plugins/autoplay/lg-autoplay.min.js',
type: 'UMD',
deps: ['lightGallery'],
alias: ['lgAutoplay'],
},
'lightGallery.thumbnail': {
path: root + '/lightGallery',
css: '/css/lg-thumbnail.css',
module: '/plugins/thumbnail/lg-thumbnail.min.js',
type: 'UMD',
deps: ['lightGallery'],
alias: ['lgThumbnail'],
},
owlCarousel: {
path: root + '/owlCarousel',
css: '/owlCarousel.css',
File diff suppressed because one or more lines are too long
View File
+1
View File
@@ -0,0 +1 @@
kit.exec('jquery/proxy');
+1
View File
@@ -0,0 +1 @@
kit.exec("jquery/proxy");
+5 -5
View File
@@ -32,7 +32,7 @@ __PluginManager__.register('jQueryProxy',function(require, exports, module, glob
JQueryProxy.prototype.hasJQueryIniter = function(){
return window.hasOwnProperty('jQuery') && Object.is(window.jQuery, J);
};
JQueryProxy.prototype.onJQueryRegister = function(plugin){
JQueryProxy.prototype.onInstall = function(plugin){
if(!this.hasJQuery()){
(function(w){
w.$ = w.jQuery = J;
@@ -40,15 +40,15 @@ __PluginManager__.register('jQueryProxy',function(require, exports, module, glob
})(window);
}
};
JQueryProxy.prototype.onJQueryInstall = function(plugin){
JQueryProxy.prototype.onJQueryInstall = function(jQueryPlugin, jQueryProxyPlugin){
var self = this;
if(!plugin.module.initer){
if(!jQueryProxyPlugin.module.initer){
return;
}
(function(w){
var q = plugin.module.initer.queue;
var q = jQueryProxyPlugin.module.initer.queue;
if(self.hasJQueryIniter()){
w.$ = w.jQuery = plugin.module.exports;
w.$ = w.jQuery = jQueryPlugin.module.exports;
for (var ch of q){
var root = w;
for (var c of ch){
+1 -1
View File
@@ -1 +1 @@
__PluginManager__.register("jQueryProxy",function(require,exports,module,global){var init=function(c,prop="$",args=[]){c.push([prop,args]);return new Proxy({},{get(target,prop){return function(){return init(c,prop,arguments)}}})};var J=function(){if(!J.init){J.init=true;__PluginManager__.ready("jQuery")}var c=[];J.queue.push(c);return init(c,"$",arguments)};J.queue=[];J.init=false;function JQueryProxy(){}JQueryProxy.prototype.J=J;JQueryProxy.prototype.hasJQuery=function(){return window.hasOwnProperty("jQuery")&&window.jQuery.hasOwnProperty("fn")};JQueryProxy.prototype.hasJQueryIniter=function(){return window.hasOwnProperty("jQuery")&&Object.is(window.jQuery,J)};JQueryProxy.prototype.onJQueryRegister=function(plugin){if(!this.hasJQuery()){(function(w){w.$=w.jQuery=J;plugin.module.initer=J})(window)}};JQueryProxy.prototype.onJQueryInstall=function(plugin){var self=this;if(!plugin.module.initer){return}(function(w){var q=plugin.module.initer.queue;if(self.hasJQueryIniter()){w.$=w.jQuery=plugin.module.exports;for(var ch of q){var root=w;for(var c of ch){try{root=root[c[0]].apply(root,c[1])}catch(e){console.warn(ch,e);break}}}}})(window)};module.exports=new JQueryProxy});
__PluginManager__.register("jQueryProxy",function(require,exports,module,global){var init=function(c,prop="$",args=[]){c.push([prop,args]);return new Proxy({},{get(target,prop){return function(){return init(c,prop,arguments)}}})};var J=function(){if(!J.init){J.init=true;__PluginManager__.ready("jQuery")}var c=[];J.queue.push(c);return init(c,"$",arguments)};J.queue=[];J.init=false;function JQueryProxy(){}JQueryProxy.prototype.J=J;JQueryProxy.prototype.hasJQuery=function(){return window.hasOwnProperty("jQuery")&&window.jQuery.hasOwnProperty("fn")};JQueryProxy.prototype.hasJQueryIniter=function(){return window.hasOwnProperty("jQuery")&&Object.is(window.jQuery,J)};JQueryProxy.prototype.onInstall=function(plugin){if(!this.hasJQuery()){(function(w){w.$=w.jQuery=J;plugin.module.initer=J})(window)}};JQueryProxy.prototype.onJQueryInstall=function(jQueryPlugin,jQueryProxyPlugin){var self=this;if(!jQueryProxyPlugin.module.initer){return}(function(w){var q=jQueryProxyPlugin.module.initer.queue;if(self.hasJQueryIniter()){w.$=w.jQuery=jQueryPlugin.module.exports;for(var ch of q){var root=w;for(var c of ch){try{root=root[c[0]].apply(root,c[1])}catch(e){console.warn(ch,e);break}}}}})(window)};module.exports=new JQueryProxy});