r77622 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77621‎ | r77622 | r77623 >
Date:00:19, 3 December 2010
Author:yaron
Status:deferred
Tags:
Comment:
Moved FancyBox JS handling into this file; fixed handling for forms that contain more than one combobox and/or autogrow textarea
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SemanticForms.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SemanticForms.js
@@ -602,23 +602,32 @@
603603 }
604604 }
605605
606 -for (var i = 0; i < sfgComboBoxInputs.length; i++ ) {
607 - var input_num = sfgComboBoxInputs[i];
608 - jQuery(document).ready(function() {
609 - jQuery("#input_" + input_num).combobox();
610 - });
611 -}
 606+jQuery(document).ready(function() {
 607+ for (var i = 0; i < sfgComboBoxInputs.length; i++ ) {
 608+ jQuery("#input_" + sfgComboBoxInputs[i]).combobox();
 609+ }
612610
 611+ for (var i = 0; i < sfgAutogrowInputs.length; i++ ) {
 612+ jQuery("#" + sfgAutogrowInputs[i]).autoGrow();
 613+ }
 614+
 615+ for (var i = 0; i < sfgFancyBoxInputs.length; i++ ) {
 616+ jQuery("#fancybox_" + sfgFancyBoxInputs[i]).fancybox({
 617+ 'width' : '75%',
 618+ 'height' : '75%',
 619+ 'autoScale' : false,
 620+ 'transitionIn' : 'none',
 621+ 'transitionOut' : 'none',
 622+ 'type' : 'iframe',
 623+ 'overlayColor' : '#222',
 624+ 'overlayOpacity' : '0.8'
 625+ });
 626+ }
 627+});
 628+
613629 jQuery.event.add(window, "load", attachAutocompleteToAllDocumentFields);
614630
615 -for (var i = 0; i < sfgAutogrowInputs.length; i++ ) {
616 - var input_num = sfgAutogrowInputs[i];
617 - jQuery(document).ready(function() {
618 - jQuery("#" + input_num).autoGrow();
619 - });
620 -}
621631
622 -
623632 /* extending jquery functions */
624633
625634 (function(jQuery) {

Status & tagging log