File: //usr/local/usermin-1.750/authentic-theme/extensions/file-manager/file-manager-reinit.min.js
/*!
* Authentic Theme (https://github.com/authentic-theme/authentic-theme)
* Copyright Ilia Rostovtsev <programming@rostovtsev.io>
* Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE)
*/
function checkSelected(){return _f__table().dataTable().$("tr.hl-aw",{filter:"applied"}).length}function invertSelection(){var e=document.querySelectorAll(".container-fluid .ui_checked_columns");for(i=0;i<e.length;i++)rowClick(e[i])}function selectAll(){var e=document.querySelectorAll(".container-fluid .ui_checked_columns");for(i=0;i<e.length;i++){e[i].getElementsByTagName("input")[0].checked||rowClick(e[i])}}function invertSelection(){var e=document.querySelectorAll(".container-fluid .ui_checked_columns");for(i=0;i<e.length;i++)rowClick(e[i])}function renameDialog(e){e=Convert.htmlUnEscape(e),$($v__fm__container_fluid+" #renameForm input[name=name]").val(e),$($v__fm__container_fluid+" #renameForm input[name=file]").val(e),$($v__fm__container_fluid+" #renameDialog").modal({backdrop:"static",keyboard:!0,show:!0})}function removeDialog(){checkSelected()&&($("#items-to-remove").html(""),$(".ui_checked_checkbox input[type='checkbox']:checked").each(function(){$("#items-to-remove").append(Convert.htmlEscape($(this).val()+"<br>"))}),$("#removeDialog").modal({backdrop:"static",keyboard:!0,show:!0}))}function uploadFiles(){var e=document.getElementById("upfiles");if(e.files.length>0)$("#upload-form").submit();else{if($('button[onclick="uploadFiles()"]').hasClass("disabled"))return;e.click()}}function countUploads(e){$("#upload-form p").text((e&&e.files.length>0?e.files.length:"")+" "+(e&&e.files.length>0?1===e.files.length?theme_language("theme_xhred_global_file_selected"):theme_language("theme_xhred_global_files_selected"):theme_language("theme_xhred_upload_initial_info")));var l=$("#readyForUploadDialog").find('button[onclick="uploadFiles()"]');if(!e||0===e.files.length)return void l.addClass("disabled");l.removeClass("disabled")}