MDL-26388, pop up a dialog when attaching a file already being used in draft area.

This commit is contained in:
Dongsheng Cai
2011-05-02 10:27:50 +08:00
parent 7daba2713e
commit 9fb4a6300b
11 changed files with 415 additions and 183 deletions
+5 -1
View File
@@ -595,7 +595,11 @@ M.form_filemanager.init = function(Y, options) {
scope: scope,
params: params,
callback: function(id, obj, args) {
scope.refresh(obj.filepath);
if (obj == false) {
alert(M.str.repository.fileexists);
} else {
scope.refresh(obj.filepath);
}
Y.one('#fm-rename-input').set('value', '');
scope.rename_dialog.hide();
}
+4 -1
View File
@@ -415,7 +415,10 @@ class page_requirements_manager {
array('cancel'), array('chooselicense', 'repository'), array('author', 'repository'),
array('ok', 'moodle'), array('error', 'moodle'), array('info', 'moodle'), array('norepositoriesavailable', 'repository'), array('norepositoriesexternalavailable', 'repository'),
array('nofilesattached', 'repository'), array('filepicker', 'repository'),
array('nofilesavailable', 'repository')
array('nofilesavailable', 'repository'), array('overwrite', 'repository'),
array('renameto', 'repository'), array('fileexists', 'repository'),
array('fileexistsdialogheader', 'repository'), array('fileexistsdialog_editor', 'repository'),
array('fileexistsdialog_filemanager', 'repository')
));
break;
case 'core_comment':