diff --git a/css/common.css b/css/common.css index e5e528b4f..3842d197e 100644 --- a/css/common.css +++ b/css/common.css @@ -247,6 +247,12 @@ div.elfinder { opacity: .8; } +.elfinder div.elfinder-bottomtray > div { + top: initial; + right: initial; + left: initial; +} + .elfinder.elfinder-ltr div.elfinder-bottomtray { left: 0; } @@ -261,3 +267,22 @@ div.elfinder { font-size: 14px; padding: 2px 4px; } + +/* progressbar */ +.elfinder-ui-progressbar { + pointer-events: none; + position: absolute; + width: 0; + height: 2px; + top: 0px; + border-radius: 2px; + filter: blur(1px); +} + +.elfinder-ltr .elfinder-ui-progressbar { + left: 0; +} + +.elfinder-rtl .elfinder-ui-progressbar { + right: 0; +} \ No newline at end of file diff --git a/css/dialog.css b/css/dialog.css index 4a4f139c3..b2240a32f 100644 --- a/css/dialog.css +++ b/css/dialog.css @@ -284,12 +284,48 @@ .elfinder-dialog-notify .ui-dialog-titlebar { height: 5px; + overflow: hidden; } -.elfinder-dialog-notify .ui-dialog-titlebar-close { +.elfinder.elfinder-touch > .elfinder-dialog-notify .ui-dialog-titlebar { + height: 10px; +} + +.elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button { + top: 2px; +} + +.elfinder.elfinder-touch > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button { + top: 4px; +} + +.elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button { + left: -18px; + right: 18px; +} + +.elfinder > .elfinder-dialog-notify .ui-dialog-titlebar .elfinder-titlebar-button.elfinder-titlebar-button-right { + left: 18px; + right: -18px; +} + +.ui-dialog-titlebar .elfinder-ui-progressbar { + position: absolute; + top: 17px; +} + +.elfinder-touch .ui-dialog-titlebar .elfinder-ui-progressbar { + top: 26px; +} + +.elfinder-dialog-notify.elfinder-titlebar-button-hide .ui-dialog-titlebar-close { display: none; } +.elfinder-dialog-notify.elfinder-dialog-minimized.elfinder-titlebar-button-hide .ui-dialog-titlebar span.elfinder-dialog-title { + max-width: initial; +} + .elfinder-dialog-notify .ui-dialog-content { padding: 0; } @@ -338,6 +374,22 @@ border-radius: 2px; } +.elfinder-notify-cancel { + position: relative; + top: -18px; + right: calc(-50% + 15px); +} + +.elfinder-notify-cancel .ui-icon-close { + background-position: -80px -128px; + width: 18px; + height: 18px; + border-radius: 9px; + border: none; + background-position: -80px -128px; + cursor: pointer; +} + /* icons */ .elfinder-dialog-icon-open, .elfinder-dialog-icon-readdir, diff --git a/css/theme.css b/css/theme.css index a48e85f34..dde053595 100644 --- a/css/theme.css +++ b/css/theme.css @@ -400,6 +400,15 @@ background-color: inherit; } +.elfinder-notify-cancel .elfinder-notify-button { + background-color: #707070; + background-image: url("../img/ui-icons_ffffff_256x240.png"); +} + +.elfinder-notify-cancel .elfinder-notify-button.ui-state-hover { + background-color: #aaa; +} + /* edit dialog */ .elfinder-dialog-edit select.elfinder-edit-changed { border-bottom: 2px solid #13ae10; @@ -414,3 +423,8 @@ .elfinder .elfinder-ui-tooltip.ui-widget-shadow { box-shadow: 2px 6px 4px -4px #cecdcd; } + +/* progressbar */ +.elfinder-ui-progressbar { + background-color: #419bf3; +} \ No newline at end of file diff --git a/js/commands/info.js b/js/commands/info.js index ed53db4ba..9e1a7c303 100644 --- a/js/commands/info.js +++ b/js/commands/info.js @@ -111,8 +111,14 @@ customActions = [], style = '', hashClass = 'elfinder-font-mono elfinder-info-hash', - size, tmb, file, title, dcnt, rdcnt, path, getHashAlgorisms, hideItems, hashProg; - + getHashAlgorisms = [], + ndialog = fm.ui.notify, + size, tmb, file, title, dcnt, rdcnt, path, hideItems, hashProg; + + if (ndialog.is(':hidden') && ndialog.children('.elfinder-notify').length) { + ndialog.elfinderdialog('open').height('auto'); + } + if (!cnt) { return $.Deferred().reject(); } diff --git a/js/commands/search.js b/js/commands/search.js index 691502697..3867e161f 100644 --- a/js/commands/search.js +++ b/js/commands/search.js @@ -38,7 +38,8 @@ elFinder.prototype.commands.search = function() { data.type = sType; } return data; - }; + }, + rootCnt; if (typeof q == 'string' && q) { if (typeof target == 'object') { @@ -64,10 +65,11 @@ elFinder.prototype.commands.search = function() { if (! onlyMimes.length || mime.length) { if (target === '' && fm.api >= 2.1) { + rootCnt = Object.keys(fm.roots).length; $.each(fm.roots, function(id, hash) { reqDef.push(fm.request({ data : setType({cmd : 'search', q : q, target : hash, mimes : mime}), - notify : {type : 'search', cnt : 1, hideCnt : (reqDef.length? false : true)}, + notify : {type : 'search', cnt : 1, hideCnt : (rootCnt > 1? false : true)}, cancel : true, preventDone : true })); diff --git a/js/elFinder.js b/js/elFinder.js index bea0696d2..719539f20 100644 --- a/js/elFinder.js +++ b/js/elFinder.js @@ -2340,7 +2340,7 @@ var elFinder = function(elm, opts, bootCallback) { } catch(e) {} } else { if (hasNotify && notify.type) { - p = p * notify.cnt + p = p * notify.cnt; if (prog < p) { self.notify({ type: notify.type, @@ -5245,7 +5245,7 @@ var elFinder = function(elm, opts, bootCallback) { self.ui = { // container for nav panel and current folder container workzone : $('
').appendTo(node).elfinderworkzone(self), - // container for folders tree / places + // contaainer for folders tree / places navbar : $('').appendTo(node).elfindernavbar(self, self.options.uiOptions.navbar || {}), // container for for preview etc at below the navbar navdock : $('').appendTo(node).elfindernavdock(self, self.options.uiOptions.navdock || {}), @@ -5260,19 +5260,22 @@ var elFinder = function(elm, opts, bootCallback) { cwd : $('').appendTo(node).elfindercwd(self, self.options.uiOptions.cwd || {}), // notification dialog window notify : self.dialog('', { - cssClass : 'elfinder-dialog-notify', + cssClass : 'elfinder-dialog-notify' + (self.options.notifyDialog.canClose? '' : ' elfinder-titlebar-button-hide'), position : self.options.notifyDialog.position, absolute : true, resizable : false, autoOpen : false, - closeOnEscape : false, + allowMinimize : true, + closeOnEscape : self.options.notifyDialog.canClose? true : false, title : ' ', width : self.options.notifyDialog.width? parseInt(self.options.notifyDialog.width) : null, - minHeight : null + minHeight : null, + minimize : function() { self.ui.notify.trigger('minimize'); } }), statusbar : $('').hide().appendTo(node), toast : $('').appendTo(node), - bottomtray : $('