diff --git a/CHANGELOG.md b/CHANGELOG.md index 23098685c..cf15da69c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ ## Changelog -#### Version 19.20-beta1 (May 12, 2018) +#### Version 19.17 (May 12, 2018) +* Add new tree-view for mail folders [#431](https://github.com/qooob/authentic-theme/issues/431) * Add Swedish and Albanian language translation updates * Fix help tooltip to be used inside of any container [#1134](https://github.com/qooob/authentic-theme/issues/1134) - +* Fix File-Manager minor bugs [#1137](https://github.com/qooob/authentic-theme/issues/1137) [#1138](https://github.com/qooob/authentic-theme/issues/1138) #### Version 19.16 (May 2, 2018) * Fix to perfect progressive output processor [sourceforge.net/5112](https://sourceforge.net/p/webadmin/bugs/5112) diff --git a/extensions/mail/mail.min.js b/extensions/mail/mail.min.js index dc923bbb8..cff4da8fb 100644 --- a/extensions/mail/mail.min.js +++ b/extensions/mail/mail.min.js @@ -1 +1 @@ -var mail=function(){var _g={load:load,load_content:get_pjax_content,link:v___location_prefix+'/mailbox/index.cgi?id=',path:{extensions:v___server_extensions_path,css:v___server_css_path,js:v___server_js_path},lang:{noRecords:theme_language('theme_xhred_datatable_szerorecords')}};var folders=function(){var strings={files:{fancytree:'jquery.fancytree'},selectors:{navigation:'aside .navigation',folders:'data-mail-folders'}};(function(){_g.load.bundle(_g.path.js+"/"+strings.files.fancytree,_g.path.css+"/"+strings.files.fancytree,[get],1);})();function get(key){key=key?'?key='+key:String();$.post(_g.path.extensions+"/mail/folders.cgi"+key+"",function(data){if(!!key){tree.reload(data);}else{tree.init(data);}});}function adjust(){tree.adjust();}var tree={container:'['+strings.selectors.folders+']',init:function init(data){var _this=this;$(strings.selectors.navigation).prepend('
');$(this.container).fancytree({source:data,escapeTitles:false,autoActivate:false,autoScroll:true,keyboard:false,toggleEffect:false,init:function init(e,d){},activate:function activate(e,d){_this.adjust();_this.expand(d.node);_g.load_content(_g.link+d.node.key);}});$(this.container).mCustomScrollbar({axis:"xy",theme:"minimal",keyboard:false,scrollInertia:300,scrollButtons:true,autoHideScrollbar:false});},expand:function expand(node){var expanded=node.isExpanded();!expanded&&node.toggleExpanded();},reload:function reload(data){var _this2=this;$(this.container).fancytree("getTree").reload(data);setTimeout(function(){_this2.adjust();_this2.expand(_this2.get_active_node());},1e2);},adjust:function adjust(){var $_=this.get_active_node();if($_&&$_.li&&$($_.li).length){$(this.container).mCustomScrollbar("scrollTo",$($_.li),{scrollOffset:[$(this.container),3,4]});}},get_active_node:function get_active_node(){return $(this.container).fancytree("getActiveNode");}};return{get:get,adjust:adjust};}();return{folders:{get:folders.get,adjust:folders.adjust}};}(); +var mail=function(){var _g={load:load,load_content:get_pjax_content,link:v___location_prefix+'/mailbox/index.cgi?id=',path:{extensions:v___server_extensions_path,css:v___server_css_path,js:v___server_js_path},lang:{noRecords:theme_language('theme_xhred_datatable_szerorecords')}};var folders=function(){var strings={files:{fancytree:'jquery.fancytree'},selectors:{navigation:'aside .navigation',folders:'data-mail-folders'}};(function(){_g.load.bundle(_g.path.js+"/"+strings.files.fancytree,_g.path.css+"/"+strings.files.fancytree,[get],1);})();function get(key){key=key?'?key='+key:String();$.post(_g.path.extensions+"/mail/folders.cgi"+key+"",function(data){if(!!key){tree.reload(data);}else{tree.init(data);}});}function adjust(){tree.adjust();}var tree={container:'['+strings.selectors.folders+']',init:function init(data){var _this=this;$(strings.selectors.navigation).prepend('');$(this.container).fancytree({source:data,escapeTitles:false,autoActivate:false,autoScroll:true,keyboard:false,toggleEffect:false,init:function init(e,d){},activate:function activate(e,d){_this.adjust();_this.expand(d.node);_g.load_content(_g.link+d.node.key);}});$(this.container).mCustomScrollbar({axis:"xy",theme:"minimal",keyboard:false,scrollInertia:300,scrollButtons:true,autoHideScrollbar:false});},expand:function expand(node){var expanded=node.isExpanded();!expanded&&node.toggleExpanded();},reload:function reload(data){var _this2=this;var tree=$(this.container).fancytree("getTree");tree.$container.empty();tree.reload(data);setTimeout(function(){_this2.adjust();_this2.expand(_this2.get_active_node());},1e2);},adjust:function adjust(){var $_=this.get_active_node();if($_&&$_.li&&$($_.li).length){$(this.container).mCustomScrollbar("scrollTo",$($_.li),{scrollOffset:[$(this.container),3,4]});}},get_active_node:function get_active_node(){return $(this.container).fancytree("getActiveNode");}};return{get:get,adjust:adjust};}();return{folders:{get:folders.get,adjust:folders.adjust}};}(); diff --git a/extensions/mail/mail.src.js b/extensions/mail/mail.src.js index 0589fdd9a..eb30bc5dc 100644 --- a/extensions/mail/mail.src.js +++ b/extensions/mail/mail.src.js @@ -103,7 +103,9 @@ const mail = (function() { !expanded && node.toggleExpanded(); }, reload: function(data) { - $(this.container).fancytree("getTree").reload(data); + let tree = $(this.container).fancytree("getTree"); + tree.$container.empty(); + tree.reload(data); setTimeout(() => { this.adjust(); this.expand(this.get_active_node()); diff --git a/theme.info b/theme.info index 05f3f87a6..a9a2a0bf9 100644 --- a/theme.info +++ b/theme.info @@ -1,7 +1,7 @@ desc=Authentic Theme longdesc=Webmin/Usermin/Virtualmin/Cloudmin theme based on Bootstrap and Font Awesome (https://github.com/qooob/authentic-theme) -version=19.16 -mversion=2 +version=19.17 +mversion=1 depends=1.880 1.740 webmin=1 usermin=1