[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 var FORMATCHOOSER = function() { 2 FORMATCHOOSER.superclass.constructor.apply(this, arguments); 3 }; 4 5 Y.extend(FORMATCHOOSER, Y.Base, { 6 initializer: function(params) { 7 if (params && params.formid) { 8 var updatebut = Y.one('#' + params.formid + ' #id_updatecourseformat'); 9 var formatselect = Y.one('#' + params.formid + ' #id_format'); 10 var ancestor = updatebut.ancestor('fieldset'); 11 var action = Y.one('form.mform').get('action'); 12 if (updatebut && formatselect) { 13 updatebut.setStyle('display', 'none'); 14 formatselect.on('change', function() { 15 Y.one('form.mform').set('action', action + '#' + ancestor.get('id')); 16 updatebut.simulate('click'); 17 }); 18 } 19 } 20 } 21 }); 22 23 M.course = M.course || {}; 24 M.course.init_formatchooser = function(params) { 25 return new FORMATCHOOSER(params); 26 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |