MDL-40313 questionbank: Add question filtering API
[moodle.git] / question / yui / src / searchform / js / searchform.js
CommitLineData
efa5155a
RM
1
2 var SELECTORS = {
3 OPTIONS: '.searchoptions'
4 },
5 NS;
6
7 M.question = M.question || {};
8 NS = M.question.searchform = {};
9
10 NS.init = function() {
11 Y.delegate('change', this.option_changed, Y.config.doc, SELECTORS.OPTIONS, this);
12 };
13
14 NS.option_changed = function(e) {
15 e.target.getDOMNode().form.submit();
16 };
17