summaryrefslogtreecommitdiff
path: root/www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js')
-rw-r--r--www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js b/www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js
new file mode 100644
index 00000000..b825f12b
--- /dev/null
+++ b/www/wiki/resources/src/mediawiki/htmlform/checkmatrix.js
@@ -0,0 +1,16 @@
+/*
+ * HTMLForm enhancements:
+ * Show fancy tooltips for checkmatrix fields.
+ */
+( function ( mw ) {
+
+ mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
+ var $matrixTooltips = $root.find( '.mw-htmlform-matrix .mw-htmlform-tooltip' );
+ if ( $matrixTooltips.length ) {
+ mw.loader.using( 'jquery.tipsy', function () {
+ $matrixTooltips.tipsy( { gravity: 's' } );
+ } );
+ }
+ } );
+
+}( mediaWiki ) );