Merge branch 'MDL-61010-master' of git://github.com/andrewnicols/moodle
[moodle.git] / question / yui / build / moodle-question-searchform / moodle-question-searchform.js
CommitLineData
81f7090b
DP
1YUI.add('moodle-question-searchform', function (Y, NAME) {
2
efa5155a 3
efa5155a
RM
4 var SELECTORS = {
5 OPTIONS: '.searchoptions'
6 },
7 NS;
8
9 M.question = M.question || {};
10 NS = M.question.searchform = {};
11
81f7090b 12 NS.init = function() {
efa5155a
RM
13 Y.delegate('change', this.option_changed, Y.config.doc, SELECTORS.OPTIONS, this);
14 };
15
16 NS.option_changed = function(e) {
17 e.target.getDOMNode().form.submit();
18 };
19
81f7090b
DP
20
21
efa5155a 22}, '@VERSION@', {"requires": ["base", "node"]});