Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Nov 18, 2024
1 parent 83c0067 commit 23ddef4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/assets/backend/js/behaviour/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var App = function () {
}

function getJQueryObject(a){
return (a instanceof jQuery) ? a : $(a);
return (typeof(a)=='object' && a instanceof jQuery) ? a : $(a);
}

/*SubMenu hover */
Expand Down
2 changes: 1 addition & 1 deletion public/assets/backend/js/behaviour/general.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/assets/backend/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ App.editor.dropzone = function (elem,options,onSuccss,onError,onRemove) {
var sep = options.url.indexOf('?')>=0?'&':'?';
options.url += sep+'client=dropzone';
}
var d = $(elem).dropzone($.extend({
var d = App.getJQueryObject(elem).dropzone($.extend({
paramName: "file", maxFilesize: 0.5, // MB
//addRemoveLinks : true,
acceptedFiles: 'image/*',
Expand Down Expand Up @@ -1149,7 +1149,7 @@ App.editor.popup = function(elem,options){
}
};
App.loader.defined(typeof ($.fn.magnificPopup), 'magnificPopup', function(){
$(elem).magnificPopup($.extend(defaults, options||{}));
App.getJQueryObject(elem).magnificPopup($.extend(defaults, options||{}));
});
};
App.editor.galleryPopup = function(elem,options){
Expand All @@ -1161,7 +1161,7 @@ App.editor.galleryPopup = function(elem,options){
};
App.editor.inputmask = function(elem,options) {
App.loader.defined(typeof ($.fn.inputmask), 'inputmask',function(){
$(elem).inputmask(options);
App.getJQueryObject(elem).inputmask(options);
});
}
App.editor.clipboard = function(elem,options) {
Expand Down
Loading

0 comments on commit 23ddef4

Please sign in to comment.