mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-37397-m' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
d9a3d932db
14
lib/yui/formautosubmit/formautosubmit.js
vendored
14
lib/yui/formautosubmit/formautosubmit.js
vendored
@ -40,9 +40,17 @@ YUI.add('moodle-core-formautosubmit',
|
||||
}
|
||||
|
||||
// Assign this select items 'nothing' value and lastindex (current value)
|
||||
var thisselect = Y.one('select#' + this.get('selectid'));
|
||||
thisselect.setData('nothing', this.get('nothing'));
|
||||
thisselect.setData('startindex', thisselect.get('selectedIndex'));
|
||||
if (this.get('selectid')) {
|
||||
var thisselect = Y.one('select#' + this.get('selectid'));
|
||||
if (thisselect) {
|
||||
if (this.get('nothing')) {
|
||||
thisselect.setData('nothing', this.get('nothing'));
|
||||
}
|
||||
thisselect.setData('startindex', thisselect.get('selectedIndex'));
|
||||
} else {
|
||||
Y.log("Warning: A single_select element was renderered, but the output is not displayed on the page.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user