芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/moodledata/localcache/js/a3faaa3c6c14a92cc9037c1585685f690a88d208
M.form_filepicker={};M.form_filepicker.Y=null;M.form_filepicker.instances=[];M.form_filepicker.callback=function(params){var html='
'+params.file+'
';html+='
';M.form_filepicker.Y.one('#file_info_'+params.client_id+' .filepicker-filename').setContent(html);var elementid=M.core_filepicker.instances[params.client_id].options.elementid;M.form_filepicker.instances[elementid].fileadded=!0;M.form_filepicker.Y.one('#'+elementid).simulate('change')};M.form_filepicker.init=function(Y,options){M.form_filepicker.Y=Y;M.form_filepicker.instances[options.elementid]={};M.form_filepicker.instances[options.elementid].fileadded=!1;options.formcallback=M.form_filepicker.callback;if(!M.core_filepicker.instances[options.client_id]){M.core_filepicker.init(Y,options)} Y.on('click',function(e,client_id){e.preventDefault();if(this.ancestor('.fitem.disabled')==null){M.core_filepicker.instances[client_id].show()}},'#filepicker-button-'+options.client_id,null,options.client_id);var item=document.getElementById('nonjs-filepicker-'+options.client_id);if(item){item.parentNode.removeChild(item)} item=document.getElementById('filepicker-wrapper-'+options.client_id);if(item){item.style.display=''} var dndoptions={clientid:options.client_id,acceptedtypes:options.accepted_types,author:options.author,maxfiles:-1,maxbytes:options.maxbytes,itemid:options.itemid,repositories:options.repositories,formcallback:options.formcallback,containerprefix:'#file_info_',containerid:'file_info_'+options.client_id,contextid:options.context.id};M.form_dndupload.init(Y,dndoptions)}