Skip to content
Browse files

MDL-31901: Filemanager and Filepicker, cleaned up requirements and st…

…rings
  • Loading branch information...
1 parent 6c2367c commit 4325db53ab5acef9f99315c0251bf9468e160655 @marinaglancy marinaglancy committed May 4, 2012
Showing with 15 additions and 31 deletions.
  1. +5 −10 files/renderer.php
  2. +3 −0 lib/form/filemanager.js
  3. +6 −20 lib/outputrequirementslib.php
  4. +1 −1 repository/filepicker.js
View
15 files/renderer.php
@@ -101,16 +101,11 @@ public function render_form_filemanager($fm) {
$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)) {
View
3 lib/form/filemanager.js
@@ -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){
View
26 lib/outputrequirementslib.php
@@ -439,27 +439,13 @@ protected function find_module($component) {
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':
View
2 repository/filepicker.js
@@ -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 || {};

0 comments on commit 4325db5

Please sign in to comment.
Something went wrong with that request. Please try again.