summaryrefslogtreecommitdiffstats
path: root/skins/common/htmlform.js
diff options
context:
space:
mode:
Diffstat (limited to 'skins/common/htmlform.js')
-rw-r--r--skins/common/htmlform.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/skins/common/htmlform.js b/skins/common/htmlform.js
deleted file mode 100644
index 2045ab4..0000000
--- a/skins/common/htmlform.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Find select-or-other fields.
-addOnloadHook( function() {
- var fields = getElementsByClassName( document, 'select', 'mw-htmlform-select-or-other' );
-
- for( var i = 0; i < fields.length; i++ ) {
- var select = fields[i];
-
- addHandler( select, 'change', htmlforms.selectOrOtherSelectChanged );
-
- // Use a fake 'e' to update it.
- htmlforms.selectOrOtherSelectChanged( { 'target': select } );
- }
-} );
-
-var htmlforms = {
- 'selectOrOtherSelectChanged' : function( e ) {
- var select;
- if ( !e ) {
- e = window.event;
- }
- if ( e.target ) {
- select = e.target;
- } else if ( e.srcElement ) {
- select = e.srcElement;
- }
- if ( select.nodeType == 3 ) { // defeat Safari bug
- select = select.parentNode;
- }
-
- var id = select.id;
- var textbox = document.getElementById( id + '-other' );
-
- if ( select.value == 'other' ) {
- textbox.disabled = false;
- } else {
- textbox.disabled = true;
- }
- }
-}
-