Permalink
Browse files

MDL-38049 form: Collapsed sections are hidden on page load

  • Loading branch information...
1 parent 8673a98 commit 0b8bb3fe5fac3ef9666b92683d64d63106be4add @FMCorz FMCorz committed Mar 13, 2013
Showing with 4 additions and 6 deletions.
  1. +1 −3 lib/form/yui/shortforms/shortforms.js
  2. +1 −1 lib/tests/behat/behat_forms.php
  3. +2 −2 theme/base/style/core.css
@@ -23,8 +23,7 @@ YUI.add('moodle-form-shortforms', function(Y) {
},
CSS = {
COLLAPSED : 'collapsed',
- FHEADER : 'fheader',
- JSPROCESSED : 'jsprocessed'
+ FHEADER : 'fheader'
},
ATTRS = {};
@@ -67,7 +66,6 @@ YUI.add('moodle-form-shortforms', function(Y) {
Y.one('#'+this.get('formid')).delegate('click', this.switch_state, SELECTORS.FIELDSETCOLLAPSIBLE+' .'+CSS.FHEADER);
},
process_fieldset : function(fieldset) {
- fieldset.addClass(CSS.JSPROCESSED);
// Get legend element.
var legendelement = fieldset.one(SELECTORS.LEGENDFTOGGLER);
@@ -112,7 +112,7 @@ protected function expand_all_fields() {
try {
// Expand fieldsets.
- $fieldsets = $this->find_all('css', 'fieldset.collapsed.jsprocessed a.fheader');
+ $fieldsets = $this->find_all('css', 'fieldset.collapsed a.fheader');
// We are supposed to have fieldsets here, otherwise exception.
@@ -241,8 +241,8 @@ a.skip:active {position: static;display: block;}
.mform fieldset.error {border: 1px solid #A00;}
.mform fieldset.collapsible legend a.fheader {padding: 0 5px 0 20px; background: url([[pix:t/expanded]]) 2px center no-repeat;}
.mform fieldset.collapsed legend a.fheader {background: url([[pix:t/collapsed]]) 2px center no-repeat;}
-.mform fieldset.collapsed.jsprocessed {border-width: 1px 0 0 0; padding: 0;}
-.mform fieldset.collapsed.jsprocessed div.fcontainer {display: none;}
+.jsenabled .mform fieldset.collapsed {border-width: 1px 0 0 0; padding: 0;}
+.jsenabled .mform fieldset.collapsed div.fcontainer {display: none;}
.mform .fitem {width:100%;overflow:hidden;margin-top:5px;margin-bottom:1px;clear:right;}
.mform .fitem .fitemtitle {width:15%;text-align:right;float:left;}
.mform .fitem .fitemtitle div {display: inline;}

0 comments on commit 0b8bb3f

Please sign in to comment.