function ownerTypeChange(e){}function applySelected(){var e=getSelectedFiles();if(!e)return false;if(client=="xheditor"&&window.callback){window.callback("!"+e.files.join(" "));return false}if(callback){if(typeof target[callback]=="function"){target[callback](e.files,e.infos)}}else{if(insertTo){$(insertTo).val(e.files.join(","));return false}App.message({title:App.i18n.SYS_INFO,text:App.i18n.NO_CALLBACK_NAME,type:"error"});return false}return false}function getSelectedFiles(){var t=[],a=[];$("input.check-table:checked").each(function(){var e=$(this).data("info");t.push(e.view_url);a.push(e)});if(t.length<1){App.message({title:App.i18n.SYS_INFO,text:App.i18n.PLEASE_SELECT,type:"error"});return false}return{files:t,infos:a}}$(function(){$("#timerange").on("focus",function(){if($(this).data("attached"))return false;$(this).data("attached",true);App.daterangepicker("#timerange",{showShortcuts:true,shortcuts:{"prev-days":[1,3,5,7],"next-days":[3,5,7],prev:["week","month"],next:["week","month"]}})});$('[data-toggle="tooltip"]:not([data-original-title])').tooltip();function e(e){e.preventDefault();var t=$("#search-form").serializeArray();t.push({name:"partial",value:1});if($(this).attr("name")=="subdir"){var a=$("#fileUploadButtonContainer").attr("data-original-title")?"data-original-title":"title";if($("#subdir").val()){$("#fileUploadButtonContainer").attr(a,App.t("上传到搜索框中所选文件夹: %s",$("#subdir").val()))}else{$("#fileUploadButtonContainer").attr(a,App.t("如要上传到某个文件夹请在搜索框中选中"))}}n($("#search-form").attr("action"),t)}if(dialogMode){$("#search-form").on("submit",e);$("#timerange,#type,#table,#ownerId,#used,#subdir").on("change",e)}else{$("#timerange,#type,#table,#ownerId,#used,#subdir").on("change",function(){$("#search-form").submit()})}function t(){App.uploadPreviewer("#input-file-upload",{url:uploadURL},function(e){var t=$("#search-form").serializeArray();t.push({name:"partial",value:1});n($("#search-form").attr("action"),t)});$('#checkedAll,input[type=checkbox][name="id[]"]:checked').prop("checked",false);App.attachCheckedAll("#checkedAll",'input[type=checkbox][name="id[]"]')}function n(e,t){$.get(e,t,function(e){$("#table-container").html(e);a();$("#table-container .pagination a").on("click",function(e){e.preventDefault();var t=$(this).attr("href");n(t,{})})},"html")}function a(){$("#table-container thead").data("sort-trigger",function(){var e=$("#table-container thead");var t=e.data("sort-url");n(t,{partial:1})});App.tableSorting("#table-container");App.float("#tbody-content img.previewable",null,null,"right")}t();a()});