mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-31901: Filemanager and Filepicker, cleaned up requirements and strings
This commit is contained in:
parent
6c2367ccf1
commit
4325db53ab
@ -101,16 +101,11 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
$module = array(
|
||||
'name'=>'form_filemanager',
|
||||
'fullpath'=>'/lib/form/filemanager.js',
|
||||
'requires' => array('core_filepicker', 'base', 'io-base', 'node', 'json', 'yui2-button', 'yui2-container', 'yui2-layout', 'yui2-menu', 'yui2-treeview', 'core_dndupload'),
|
||||
'strings' => array(array('loading', 'repository'), array('nomorefiles', 'repository'), array('confirmdeletefile', 'repository'),
|
||||
array('add', 'repository'), array('accessiblefilepicker', 'repository'), array('move', 'moodle'),
|
||||
array('cancel', 'moodle'), array('download', 'moodle'), array('ok', 'moodle'),
|
||||
array('emptylist', 'repository'), array('nofilesattached', 'repository'), array('entername', 'repository'), array('enternewname', 'repository'),
|
||||
array('zip', 'editor'), array('unzip', 'moodle'), array('rename', 'moodle'), array('delete', 'moodle'),
|
||||
array('cannotdeletefile', 'error'), array('confirmdeletefile', 'repository'),
|
||||
array('nopathselected', 'repository'), array('popupblockeddownload', 'repository'),
|
||||
array('draftareanofiles', 'repository'), array('path', 'moodle'), array('setmainfile', 'repository'),
|
||||
array('moving', 'repository'), array('files', 'moodle'), array('serverconnection', 'error')
|
||||
'requires' => array('core_filepicker', 'base', 'io-base', 'node', 'json', 'core_dndupload', 'panel', 'resize-plugin', 'dd-plugin'),
|
||||
'strings' => array(
|
||||
array('error', 'moodle'), array('info', 'moodle'), array('confirmdeletefile', 'repository'),
|
||||
array('draftareanofiles', 'repository'), array('entername', 'repository'), array('enternewname', 'repository'),
|
||||
array('invalidjson', 'repository'), array('popupblockeddownload', 'repository')
|
||||
)
|
||||
);
|
||||
if (empty($filemanagertemplateloaded)) {
|
||||
|
@ -107,6 +107,7 @@ M.form_filemanager.init = function(Y, options) {
|
||||
close : true,
|
||||
render : true
|
||||
});
|
||||
this.selectui.plug(Y.Plugin.Drag,{handles:['.yui3-widget-hd']});
|
||||
this.selectui.hide();
|
||||
this.setup_select_file();
|
||||
// setup buttons onclick events
|
||||
@ -231,6 +232,7 @@ M.form_filemanager.init = function(Y, options) {
|
||||
visible : false,
|
||||
render : true
|
||||
});
|
||||
this.msg_dlg.plug(Y.Plugin.Drag,{handles:['.yui3-widget-hd']});
|
||||
node.one('.fp-msg-butok').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
this.msg_dlg.hide();
|
||||
@ -297,6 +299,7 @@ M.form_filemanager.init = function(Y, options) {
|
||||
visible : false,
|
||||
render : true
|
||||
});
|
||||
this.mkdir_dialog.plug(Y.Plugin.Drag,{handles:['.yui3-widget-hd']});
|
||||
node.one('.fp-dlg-butcreate').on('click', perform_action, this);
|
||||
node.one('input').set('id', 'fm-newname-'+this.client_id).
|
||||
on('keydown', function(e){
|
||||
|
@ -439,27 +439,13 @@ class page_requirements_manager {
|
||||
case 'core_filepicker':
|
||||
$module = array('name' => 'core_filepicker',
|
||||
'fullpath' => '/repository/filepicker.js',
|
||||
'requires' => array('base', 'node', 'node-event-simulate', 'json', 'async-queue', 'io-base', 'io-upload-iframe', 'io-form', 'yui2-menu', 'yui2-treeview', 'yui2-dragdrop', 'panel', 'cookie', 'datatable', 'datatable-sort', 'resize-plugin', 'dd-plugin', 'moodle-core_filepicker'),
|
||||
// TODO check if those all are really required
|
||||
'strings' => array(array('add', 'repository'), array('back', 'repository'), array('cancel', 'moodle'), array('close', 'repository'),
|
||||
array('cleancache', 'repository'), array('copying', 'repository'), array('date', 'repository'), array('downloadsucc', 'repository'),
|
||||
array('emptylist', 'repository'), array('error', 'repository'), array('federatedsearch', 'repository'),
|
||||
array('filenotnull', 'repository'), array('getfile', 'repository'), array('help', 'moodle'), array('iconview', 'repository'),
|
||||
array('invalidjson', 'repository'), array('linkexternal', 'repository'), array('listview', 'repository'), array('detailview', 'repository'),
|
||||
array('loading', 'repository'), array('login', 'repository'), array('logout', 'repository'), array('noenter', 'repository'),
|
||||
array('noresult', 'repository'), array('manageurl', 'repository'), array('popup', 'repository'), array('preview', 'repository'),
|
||||
array('refresh', 'repository'), array('save', 'repository'), array('saveas', 'repository'), array('saved', 'repository'),
|
||||
array('saving', 'repository'), array('search', 'repository'), array('searching', 'repository'), array('size', 'repository'),
|
||||
array('submit', 'repository'), array('sync', 'repository'), array('title', 'repository'), array('upload', 'repository'),
|
||||
array('uploading', 'repository'), array('xhtmlerror', 'repository'),
|
||||
array('cancel'), array('chooselicense', 'repository'), array('author', 'repository'),array('next', 'moodle'),
|
||||
array('ok', 'moodle'), array('error', 'moodle'), array('info', 'moodle'), array('norepositoriesavailable', 'repository'), array('norepositoriesexternalavailable', 'repository'),
|
||||
array('attachment', 'repository'), array('nofilesattached', 'repository'), array('filepicker', 'repository'),
|
||||
array('nofilesavailable', 'repository'), array('overwrite', 'repository'),
|
||||
array('renameto', 'repository'), array('fileexists', 'repository'),
|
||||
'requires' => array('base', 'node', 'node-event-simulate', 'json', 'async-queue', 'io-base', 'io-upload-iframe', 'io-form', 'yui2-treeview', 'panel', 'cookie', 'datatable', 'datatable-sort', 'resize-plugin', 'dd-plugin', 'moodle-core_filepicker'),
|
||||
'strings' => array(array('lastmodified', 'moodle'), array('name', 'moodle'), array('type', 'repository'), array('size', 'repository'),
|
||||
array('invalidjson', 'repository'), array('error', 'moodle'), array('info', 'moodle'),
|
||||
array('nofilesattached', 'repository'), array('filepicker', 'repository'), array('logout', 'repository'),
|
||||
array('nofilesavailable', 'repository'), array('norepositoriesavailable', 'repository'),
|
||||
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
|
||||
array('fileexistsdialog_filemanager', 'repository'), array('uselatestfile', 'repository')
|
||||
array('lastmodified', 'moodle'), array('name', 'moodle'), array('type', 'repository')
|
||||
array('fileexistsdialog_filemanager', 'repository'), array('renameto', 'repository')
|
||||
));
|
||||
break;
|
||||
case 'core_comment':
|
||||
|
@ -384,7 +384,7 @@ YUI.add('moodle-core_filepicker', function(Y) {
|
||||
|
||||
}
|
||||
}, '@VERSION@', {
|
||||
requires:['base','node'] // TODO TreeView, Table, etc.
|
||||
requires:['base', 'node', 'yui2-treeview', 'panel', 'cookie', 'datatable', 'datatable-sort']
|
||||
});
|
||||
|
||||
M.core_filepicker = M.core_filepicker || {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user