mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
Merge branch 'w33_MDL-28554_m22_yui' of github.com:skodak/moodle
This commit is contained in:
commit
7339273895
@ -395,7 +395,7 @@ 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', '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'),
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user