1/** 2 * @file 3 * Extends core/misc/states.js. 4 */ 5(function($) { 6 7 // Unbind core state.js from document first so we can then override below. 8 $(document).unbind('state:disabled'); 9 10 /** 11 * Global state change handlers. These are bound to "document" to cover all 12 * elements whose state changes. Events sent to elements within the page 13 * bubble up to these handlers. We use this system so that themes and modules 14 * can override these state change handlers for particular parts of a page. 15 */ 16 $(document).bind('state:disabled', function(e) { 17 // Only act when this change was triggered by a dependency and not by the 18 // element monitoring itself. 19 if (e.trigger) { 20 $(e.target) 21 .attr('disabled', e.value) 22 .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value) 23 .find(':input').attr('disabled', e.value); 24 25 // Note: WebKit nightlies don't reflect that change correctly. 26 // See https://bugs.webkit.org/show_bug.cgi?id=23789 27 } 28 }); 29 30})(jQuery);
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.