define('jira/jquery/plugins/shorten/shorten', [ 'jira/ajs/shorten/shortener', 'jquery' ], function( Shortener, jQuery ) { /** * * jQuery plugin to shorten long lists with an ellipsis. * * For full options see {@link Shortener} * * @note Delegates to {@link Shortener} * * @example * * // no options * jQuery("#my-container").shorten(); * * // options * jQuery("#my-container").shorten({ * numRows: 5 * }); * * @function external:"jQuery.fn".shorten * @param {Object} [options] * @param {HTMLElement | jQuery} options.element */ jQuery.fn.shorten = function (options) { var res = []; options = options || {}; this.each(function () { options.element = this; res.push(new Shortener(options)); }); return res; }; });