mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 15:22:05 +02:00
MDL-35569 AJAX Move auto-submitting selects to separate YUI module
This commit is contained in:
@@ -376,8 +376,15 @@ M.util.init_maximised_embed = function(Y, id) {
|
||||
|
||||
/**
|
||||
* Attach handler to single_select
|
||||
*
|
||||
* This code was deprecated in Moodle 2.4 and will be removed in Moodle 2.6
|
||||
*
|
||||
* Please see lib/yui/formautosubmit/formautosubmit.js for its replacement
|
||||
*/
|
||||
M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
if (M.cfg.developerdebug) {
|
||||
Y.log("You are using a deprecated function call (M.util.init_select_autosubmit). Please look at rewriting your call to use moodle-core-formautosubmit");
|
||||
}
|
||||
Y.use('event-key', function() {
|
||||
var select = Y.one('#'+selectid);
|
||||
if (select) {
|
||||
@@ -451,6 +458,9 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
* This function has accessability issues and also does not use the formid passed through as a parameter.
|
||||
*/
|
||||
M.util.init_url_select = function(Y, formid, selectid, nothing) {
|
||||
if (M.cfg.developerdebug) {
|
||||
Y.log("You are using a deprecated function call (M.util.init_url_select). Please look at rewriting your call to use moodle-core-formautosubmit");
|
||||
}
|
||||
YUI().use('node', function(Y) {
|
||||
Y.on('change', function() {
|
||||
if ((nothing == false && Y.Lang.isBoolean(nothing)) || Y.one('#'+selectid).get('value') != nothing) {
|
||||
|
Reference in New Issue
Block a user