Add jquery.autoEllipsis to jsduck
authorMark Holmquist <mtraceur@member.fsf.org>
Wed, 26 Mar 2014 20:59:08 +0000 (13:59 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 27 Mar 2014 22:07:38 +0000 (15:07 -0700)
Change-Id: I2c1c1eb3e0f92a78e50f8fe89f47d10e3a732325

maintenance/jsduck/config.json
resources/jquery/jquery.arrowSteps.js
resources/jquery/jquery.autoEllipsis.js
resources/jquery/jquery.localize.js
resources/mediawiki/mediawiki.htmlform.js

index 2059148..c9736df 100644 (file)
@@ -18,6 +18,7 @@
                "../../resources/mediawiki.api",
                "../../resources/mediawiki.language",
                "../../resources/jquery/jquery.arrowSteps.js",
+               "../../resources/jquery/jquery.autoEllipsis.js",
                "../../resources/jquery/jquery.badge.js",
                "../../resources/jquery/jquery.byteLimit.js",
                "../../resources/jquery/jquery.localize.js",
index daa2fd7..c44e7c5 100644 (file)
@@ -31,6 +31,7 @@
         *       $( '#robin-hood-daffy' ).arrowSteps();
         *     </script>
         *
+        * @return {jQuery}
         * @chainable
         */
        $.fn.arrowSteps = function () {
index a473f61..57d8f94 100644 (file)
@@ -1,6 +1,5 @@
 /**
- * Plugin that automatically truncates the plain text contents of an element
- * and adds an ellipsis.
+ * @class jQuery.plugin.autoEllipsis
  */
 ( function ( $ ) {
 
@@ -11,6 +10,21 @@ var
        // Use a separate cache when match highlighting is enabled
        matchTextCache = {};
 
+/**
+ * Automatically truncate the plain text contents of an element and add an ellipsis
+ *
+ * @param {Object} options
+ * @param {'center'|'left'|'right'} [options.position='center'] Where to remove text.
+ * @param {boolean} [options.tooltip=false] Whether to show a tooltip with the remainder
+ * of the text.
+ * @param {boolean} [options.restoreText=false] Whether to save the text for restoring
+ * later.
+ * @param {boolean} [options.hasSpan=false] Whether the element is already a container,
+ * or if the library should create a new container for it.
+ * @param {string|null} [options.matchText=null] Text to highlight, e.g. search terms.
+ * @return {jQuery}
+ * @chainable
+ */
 $.fn.autoEllipsis = function ( options ) {
        options = $.extend( {
                position: 'center',
@@ -146,4 +160,9 @@ $.fn.autoEllipsis = function ( options ) {
        } );
 };
 
+/**
+ * @class jQuery
+ * @mixins jQuery.plugin.autoEllipsis
+ */
+
 }( jQuery ) );
index 8c8fb56..f499e10 100644 (file)
@@ -99,12 +99,12 @@ function msg( options, key ) {
  * Appends something like this to the body...
  *     <p>You may not get there all in one piece.</p>
  *
- * @method
  * @param {Object} options Map of options to be used while localizing
  * @param {string} options.prefix String to prepend to all message keys
  * @param {Object} options.keys Message key aliases, used for remapping keys to a template
  * @param {Object} options.params Lists of parameters to use with certain message keys
  * @return {jQuery}
+ * @chainable
  */
 $.fn.localize = function ( options ) {
        var $target = this,
index 0284e68..5ba1a54 100644 (file)
@@ -10,6 +10,7 @@
         *
         * @param {boolean} [instantToggle=false]
         * @return {jQuery}
+        * @chainable
         */
        $.fn.goIn = function ( instantToggle ) {
                if ( instantToggle === true ) {
@@ -23,6 +24,7 @@
         *
         * @param {boolean} [instantToggle=false]
         * @return jQuery
+        * @chainable
         */
        $.fn.goOut = function ( instantToggle ) {
                if ( instantToggle === true ) {