mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-38090-m' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
1e171d4d37
3 changed files with 15 additions and 3 deletions
7
lib/form/yui/shortforms/shortforms.js
vendored
7
lib/form/yui/shortforms/shortforms.js
vendored
|
@ -84,7 +84,12 @@ YUI.add('moodle-form-shortforms', function(Y) {
|
|||
fieldset.toggleClass(CSS.COLLAPSED);
|
||||
// Get corresponding hidden variable
|
||||
// - and invert it.
|
||||
var statuselement = new Y.one('input[name=mform_isexpanded_'+fieldset.get('id')+']');
|
||||
var statuselement = Y.one('input[name=mform_isexpanded_'+fieldset.get('id')+']');
|
||||
if (!statuselement) {
|
||||
Y.log("M.form.shortforms::switch_state was called on an fieldset without a status field: '" +
|
||||
fieldset.get('id') + "'", 'debug');
|
||||
return;
|
||||
}
|
||||
statuselement.set('value', Math.abs(Number(statuselement.get('value'))-1));
|
||||
}
|
||||
});
|
||||
|
|
7
lib/form/yui/showadvanced/showadvanced.js
vendored
7
lib/form/yui/showadvanced/showadvanced.js
vendored
|
@ -67,7 +67,12 @@ YUI.add('moodle-form-showadvanced', function(Y) {
|
|||
Y.one('#'+this.get('formid')).delegate('click', this.switch_state, SELECTORS.FIELDSETCONTAINSADVANCED+' .'+CSS.MORELESSTOGGLER);
|
||||
},
|
||||
process_fieldset : function(fieldset) {
|
||||
var statuselement = new Y.one('input[name=mform_showmore_'+fieldset.get('id')+']');
|
||||
var statuselement = Y.one('input[name=mform_showmore_'+fieldset.get('id')+']');
|
||||
if (!statuselement) {
|
||||
Y.log("M.form.showadvanced::process_fieldset was called on an fieldset without a status field: '" +
|
||||
fieldset.get('id') + "'", 'debug');
|
||||
return;
|
||||
}
|
||||
var morelesslink = Y.Node.create('<a href="#"></a>');
|
||||
morelesslink.addClass(CSS.MORELESSTOGGLER);
|
||||
if (statuselement.get('value') === '0') {
|
||||
|
|
|
@ -155,12 +155,15 @@ class page_requirements_manager {
|
|||
$sep = empty($CFG->yuislasharguments) ? '?' : '/';
|
||||
|
||||
$this->yui3loader = new stdClass();
|
||||
$this->YUI_config = new stdClass();
|
||||
|
||||
// Set up some loader options.
|
||||
if (debugging('', DEBUG_DEVELOPER)) {
|
||||
$this->yui3loader->filter = 'RAW'; // For more detailed logging info use 'DEBUG' here.
|
||||
$this->YUI_config->debug = true;
|
||||
} else {
|
||||
$this->yui3loader->filter = null;
|
||||
$this->YUI_config->debug = false;
|
||||
}
|
||||
if (!empty($CFG->useexternalyui) and strpos($CFG->httpswwwroot, 'https:') !== 0) {
|
||||
$this->yui3loader->base = 'http://yui.yahooapis.com/' . $CFG->yui3version . '/build/';
|
||||
|
@ -182,7 +185,6 @@ class page_requirements_manager {
|
|||
}
|
||||
|
||||
// Set up JS YUI loader helper object.
|
||||
$this->YUI_config = new stdClass();
|
||||
$this->YUI_config->base = $this->yui3loader->base;
|
||||
$this->YUI_config->comboBase = $this->yui3loader->comboBase;
|
||||
$this->YUI_config->combine = $this->yui3loader->combine;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue