1(function () { 2 var window = this, 3 $ = window.jQuery, 4 DDC = (window.DDC = (window.DDC || {})); 5 6 DDC.modules.accordionForm.refresh = function () { 7 $(DDC.modules.accordionForm.selector).each(function () { 8 var nextFocus; 9 10 if (!$(this).data('accordion-form-initialized')) { 11 $(this).data('accordion-form-initialized', true) 12 .bind('onFail', function (e, errors) { 13 var index; 14 15 if (errors && errors.length) { 16 nextFocus = errors[0].input; 17 index = 18 $(errors[0].input) 19 .parents('.ui-accordion') 20 .find('.ui-accordion-content') 21 .index($(errors[0].input) 22 .parents('.ui-accordion-content')); 23 $(errors[0].input) 24 .parents('.ui-accordion') 25 .accordion('activate', index); 26 setTimeout(function () { 27 nextFocus = errors[0].input; 28 $(errors[0].input) 29 .parents('.ui-accordion') 30 .trigger('accordionchange'); 31 }, 750); 32 } 33 }).bind('accordionchange', function () { 34 35 if (!nextFocus) { 36 $(this).find(':input, select') 37 .filter(':visible:enabled:eq(0)') 38 .focus(); 39 } else { 40 $(nextFocus).focus(); 41 } 42 43 nextFocus = false; 44 }); 45 } 46 }); 47 }; 48}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.