mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-31660 forms: Added checks for form change detection
This commit is contained in:
parent
f788011045
commit
a5dd1f4fb7
1 changed files with 15 additions and 5 deletions
|
@ -144,7 +144,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||||
this.filecount++;
|
this.filecount++;
|
||||||
this.check_buttons();
|
this.check_buttons();
|
||||||
this.refresh(this.currentpath);
|
this.refresh(this.currentpath);
|
||||||
M.core_formchangechecker.set_form_changed();
|
if (typeof M.core_formchangechecker != 'undefined') {
|
||||||
|
M.core_formchangechecker.set_form_changed();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
check_buttons: function() {
|
check_buttons: function() {
|
||||||
var button_addfile = Y.one("#btnadd-"+this.client_id);
|
var button_addfile = Y.one("#btnadd-"+this.client_id);
|
||||||
|
@ -214,7 +216,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||||
scope.mkdir_dialog.hide();
|
scope.mkdir_dialog.hide();
|
||||||
scope.refresh(filepath);
|
scope.refresh(filepath);
|
||||||
Y.one('#fm-newname').set('value', '');
|
Y.one('#fm-newname').set('value', '');
|
||||||
M.core_formchangechecker.set_form_changed();
|
if (typeof M.core_formchangechecker != 'undefined') {
|
||||||
|
M.core_formchangechecker.set_form_changed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -568,7 +572,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||||
callback: function(id, obj, args) {
|
callback: function(id, obj, args) {
|
||||||
scope.filecount--;
|
scope.filecount--;
|
||||||
scope.refresh(obj.filepath);
|
scope.refresh(obj.filepath);
|
||||||
M.core_formchangechecker.set_form_changed();
|
if (typeof M.core_formchangechecker != 'undefined') {
|
||||||
|
M.core_formchangechecker.set_form_changed();
|
||||||
|
}
|
||||||
if (scope.filecount < scope.maxfiles && scope.maxfiles!=-1) {
|
if (scope.filecount < scope.maxfiles && scope.maxfiles!=-1) {
|
||||||
var button_addfile = Y.one("#btnadd-"+scope.client_id);
|
var button_addfile = Y.one("#btnadd-"+scope.client_id);
|
||||||
button_addfile.setStyle('display', 'inline');
|
button_addfile.setStyle('display', 'inline');
|
||||||
|
@ -616,7 +622,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||||
alert(M.str.repository.fileexists);
|
alert(M.str.repository.fileexists);
|
||||||
} else {
|
} else {
|
||||||
scope.refresh(obj.filepath);
|
scope.refresh(obj.filepath);
|
||||||
M.core_formchangechecker.set_form_changed();
|
if (typeof M.core_formchangechecker != 'undefined') {
|
||||||
|
M.core_formchangechecker.set_form_changed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Y.one('#fm-rename-input').set('value', '');
|
Y.one('#fm-rename-input').set('value', '');
|
||||||
scope.rename_dialog.hide();
|
scope.rename_dialog.hide();
|
||||||
|
@ -694,7 +702,9 @@ M.form_filemanager.init = function(Y, options) {
|
||||||
}
|
}
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
scope.refresh(p);
|
scope.refresh(p);
|
||||||
M.core_formchangechecker.set_form_changed();
|
if (typeof M.core_formchangechecker != 'undefined') {
|
||||||
|
M.core_formchangechecker.set_form_changed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue