r88657 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88656‎ | r88657 | r88658 >
Date:17:48, 23 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r88017 - added JS check for another showOnSelect code section
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -386,10 +386,12 @@
387387 var showOnSelectVals = sfgShowOnSelect[this.attr("id")];
388388 var instanceWrapperDiv = null;
389389 }
390 - for ( var i = 0; i < showOnSelectVals.length; i++ ) {
391 - var options = showOnSelectVals[i][0];
392 - var div_id = showOnSelectVals[i][1];
393 - this.showDivIfChecked(options, div_id, instanceWrapperDiv);
 390+ if ( showOnSelectVals !== undefined ) {
 391+ for ( var i = 0; i < showOnSelectVals.length; i++ ) {
 392+ var options = showOnSelectVals[i][0];
 393+ var div_id = showOnSelectVals[i][1];
 394+ this.showDivIfChecked(options, div_id, instanceWrapperDiv);
 395+ }
394396 }
395397 }
396398

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88017bugfixes: headitems were missing in forms, SF JS crashed when no showOnSelect...foxtrott20:14, 13 May 2011