Split the 'mediawiki.htmlform' module code into multiple files
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 30 Jul 2016 23:15:07 +0000 (01:15 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 19 Aug 2016 01:25:46 +0000 (01:25 +0000)
commite1959b29741761edf413256becd63fe692351f6c
tree3f7816993340f692e1103ba46685649491979f8e
parentec41a9c55962c1f831332b61966076e87a581d3e
Split the 'mediawiki.htmlform' module code into multiple files

This module implements several related, but separate enhancements to
HTMLForm. While it makes sense to use a single ResourceLoader module
to serve this code, it doesn't make sense to keep all of it in a
single file. It was approaching 500 lines of code, and pieces of the
separate features were mixed together.

This commit mostly shuffles code around, only tweaking some
indentation, 'var' statements and function wrappers.

There is one small functional change: the enhancements now use the
'htmlform.enhance' mw.hook, which is fired on document-ready and when
new fields are added dynamically. Previously it was only used to allow
extensions to define their own HTMLForm enhancements.

(Also moved HTMLForm styles into the same directory as the newly-split
scripts.)

Change-Id: I22054b39868239ddb59317dadfaaa067653f8804
18 files changed:
resources/Resources.php
resources/src/mediawiki/htmlform/autocomplete.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/checkmatrix.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/cloner.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/hide-if.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/htmlform.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/images/question.png [new file with mode: 0644]
resources/src/mediawiki/htmlform/images/question.svg [new file with mode: 0644]
resources/src/mediawiki/htmlform/multiselect.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/ooui.styles.css [new file with mode: 0644]
resources/src/mediawiki/htmlform/selectandother.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/selectorother.js [new file with mode: 0644]
resources/src/mediawiki/htmlform/styles.css [new file with mode: 0644]
resources/src/mediawiki/images/question.png [deleted file]
resources/src/mediawiki/images/question.svg [deleted file]
resources/src/mediawiki/mediawiki.htmlform.css [deleted file]
resources/src/mediawiki/mediawiki.htmlform.js [deleted file]
resources/src/mediawiki/mediawiki.htmlform.ooui.css [deleted file]