Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'w33_MDL-28554_m22_yui' of github.com:skodak/moodle

  • Loading branch information...
commit 733927389589afc78a4ae30bec80e0cb5be0c116 2 parents 0a4ca11 + 9d753c3
Petr Skoda skodak authored
Showing with 23 additions and 25 deletions.
  1. +1 −1  lib/outputrequirementslib.php
  2. +22 −24 repository/filepicker.js
2  lib/outputrequirementslib.php
View
@@ -395,7 +395,7 @@ 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', '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', 'yui2-button', 'yui2-container', 'yui2-layout', 'yui2-menu', 'yui2-treeview', 'yui2-dragdrop', 'yui2-cookie'),
'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'),
46 repository/filepicker.js
View
@@ -1171,31 +1171,29 @@ M.core_filepicker.init = function(Y, options) {
scope.print_msg(M.str.repository.nofilesattached, 'error');
return false;
}
- Y.use('io-upload-iframe', function() {
- scope.request({
- scope: scope,
- action:'upload',
- client_id: client_id,
- params: {'savepath':scope.options.savepath},
- repository_id: scope.active_repo.id,
- form: {id: id, upload:true},
- callback: function(id, o, args) {
- if (scope.options.editor_target&&scope.options.env=='editor') {
- scope.options.editor_target.value=o.url;
- scope.options.editor_target.onchange();
- }
- scope.hide();
- o.client_id = client_id;
- var formcallback_scope = null;
- if (args.scope.options.magicscope) {
- formcallback_scope = args.scope.options.magicscope;
- } else {
- formcallback_scope = args.scope;
- }
- scope.options.formcallback.apply(formcallback_scope, [o]);
+ scope.request({
+ scope: scope,
+ action:'upload',
+ client_id: client_id,
+ params: {'savepath':scope.options.savepath},
+ repository_id: scope.active_repo.id,
+ form: {id: id, upload:true},
+ callback: function(id, o, args) {
+ if (scope.options.editor_target&&scope.options.env=='editor') {
+ scope.options.editor_target.value=o.url;
+ scope.options.editor_target.onchange();
}
- }, true);
- });
+ scope.hide();
+ o.client_id = client_id;
+ var formcallback_scope = null;
+ if (args.scope.options.magicscope) {
+ formcallback_scope = args.scope.options.magicscope;
+ } else {
+ formcallback_scope = args.scope;
+ }
+ scope.options.formcallback.apply(formcallback_scope, [o]);
+ }
+ }, true);
}, this);
},
print_header: function() {
Please sign in to comment.
Something went wrong with that request. Please try again.