diff --git a/js/commands/resize.js b/js/commands/resize.js index c5b3c3869..617c6e7f8 100644 --- a/js/commands/resize.js +++ b/js/commands/resize.js @@ -207,7 +207,6 @@ elFinder.prototype.commands.resize = function() { '', ''), mode = 'resize', - type = uitype.find('input'), width = $(input) .on('change', function() { var w = round(parseInt(width.val())), @@ -1458,35 +1457,35 @@ elFinder.prototype.commands.resize = function() { }).attr('id', id).closest('.ui-dialog').addClass(clsediting); // Fix for https://github.com/Studio-42/elFinder/issues/3684 - uitype[ctrgrup]()[ctrgrup]('disable').find('input') - .on('change', function() { - mode = $(this).val(); - - resetView(); - resizable(true); - croppable(true); - rotateable(true); - - if (mode == 'resize') { - uiresize.show(); - uirotate.hide(); - uicrop.hide(); - resizable(); - isJpeg && grid8px.insertAfter(uiresize.find('.elfinder-resize-grid8')); - } - else if (mode == 'crop') { - uirotate.hide(); - uiresize.hide(); - uicrop.show(); - croppable(); - isJpeg && grid8px.insertAfter(uicrop.find('.elfinder-resize-grid8')); - } else if (mode == 'rotate') { - uiresize.hide(); - uicrop.hide(); - uirotate.show(); - rotateable(); - } - }) + uitype[ctrgrup]()[ctrgrup]('disable').find('input').on('change', function() { + mode = $(this).val(); + + resetView(); + resizable(true); + croppable(true); + rotateable(true); + + if (mode == 'resize') { + uiresize.show(); + uirotate.hide(); + uicrop.hide(); + resizable(); + isJpeg && grid8px.insertAfter(uiresize.find('.elfinder-resize-grid8')); + } + else if (mode == 'crop') { + uirotate.hide(); + uiresize.hide(); + uicrop.show(); + croppable(); + isJpeg && grid8px.insertAfter(uicrop.find('.elfinder-resize-grid8')); + } else if (mode == 'rotate') { + uiresize.hide(); + uicrop.hide(); + uirotate.show(); + rotateable(); + } + }); + // for IE < 9 dialog mising at open second+ time. if (fm.UA.ltIE8) { $('.elfinder-dialog').css('filter', '');