Skip to content

Commit

Permalink
MDL-31901: Introducing renderers for filepicker:
Browse files Browse the repository at this point in the history
- create repository renderer, implement functions for returning HTML templates used in filepicker
- let filepicker use HTML from templates
- move CSS for filemanager and filepicker to the separate css file in base theme
- use only YUI3 in filepicker (get rid of YUI2)
- add button for 'View details' in filepicker (though this view mode is still not ready)
  • Loading branch information
marinaglancy committed May 21, 2012
1 parent 4adecd7 commit b5e7b63
Show file tree
Hide file tree
Showing 9 changed files with 944 additions and 674 deletions.
3 changes: 2 additions & 1 deletion lang/en/repository.php
Expand Up @@ -76,6 +76,7 @@
$string['date'] = 'Date';
$string['deleted'] = 'Repository deleted';
$string['deleterepository'] = 'Delete this repository';
$string['detailview'] = 'View details';
$string['disabled'] = 'Disabled';
$string['download'] = 'Download';
$string['downloadfolder'] = 'Download all';
Expand Down Expand Up @@ -156,7 +157,7 @@
$string['refresh'] = 'Refresh';
$string['refreshnonjsfilepicker'] = 'Please close this window and refresh non-javascript file picker';
$string['removed'] = 'Repository removed';
$string['renameto'] = 'Rename to';
$string['renameto'] = 'Rename to "{$a}"';
$string['repositories'] = 'Repositories';
$string['repository'] = 'Repository';
$string['repositorycourse'] = 'Course repositories';
Expand Down
9 changes: 5 additions & 4 deletions lib/outputrequirementslib.php
Expand Up @@ -428,7 +428,7 @@ protected function js_fix_url($url) {
* @return array description of module or null if not found
*/
protected function find_module($component) {
global $CFG;
global $CFG, $PAGE;

$module = null;

Expand All @@ -439,12 +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-button', 'yui2-container', 'yui2-layout', 'yui2-menu', 'yui2-treeview', 'yui2-dragdrop', 'yui2-cookie'),
'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'),
// 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('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'),
Expand All @@ -453,7 +454,7 @@ protected function find_module($component) {
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('nofilesattached', 'repository'), array('filepicker', 'repository'),
array('attachment', 'repository'), array('nofilesattached', 'repository'), array('filepicker', 'repository'),
array('nofilesavailable', 'repository'), array('overwrite', 'repository'),
array('renameto', 'repository'), array('fileexists', 'repository'),
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
Expand Down

0 comments on commit b5e7b63

Please sign in to comment.