diff options
Diffstat (limited to 'www/wiki/extensions/Translate/resources/js/ext.translate.special.importtranslations.js')
-rw-r--r-- | www/wiki/extensions/Translate/resources/js/ext.translate.special.importtranslations.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/www/wiki/extensions/Translate/resources/js/ext.translate.special.importtranslations.js b/www/wiki/extensions/Translate/resources/js/ext.translate.special.importtranslations.js new file mode 100644 index 00000000..1ba24709 --- /dev/null +++ b/www/wiki/extensions/Translate/resources/js/ext.translate.special.importtranslations.js @@ -0,0 +1,20 @@ +( function () { + 'use strict'; + + function buttoner( $input ) { + if ( $input.val ) { + $( 'input[type=submit]' ).prop( 'disabled', false ); + } else { + $( 'input[type=submit]' ).prop( 'disabled', true ); + } + } + + $( function () { + var $input = $( '#mw-translate-up-local-input' ); + $input.on( 'change', function () { + buttoner( $input ); + } ); + + buttoner( $input ); + } ); +}() ); |