From b12946909ff323ea2f7e7af04e4435d2dd503023 Mon Sep 17 00:00:00 2001 From: diosmosis Date: Fri, 26 Jun 2020 02:33:41 -0700 Subject: run npm update and include node_modules (#16079) * update npm packages to latest * fix javascript path location * update screenshots * Add node_modules for users that do not have npm insalled but use git to deploy. * fix release checklist test * Add old chroma-js + some files missing from node_module. * remove npm install * fix .travis.yml * update expected screenshots * update submodule Co-authored-by: sgiehl --- node_modules/jquery.dotdotdot/.npmignore | 9 + node_modules/jquery.dotdotdot/CONTRIBUTING.md | 47 ++ node_modules/jquery.dotdotdot/LICENSE.txt | 2 + node_modules/jquery.dotdotdot/README.md | 25 + node_modules/jquery.dotdotdot/bower.json | 22 + node_modules/jquery.dotdotdot/composer.json | 18 + .../jquery.dotdotdot/dist/jquery.dotdotdot.js | 24 + .../jquery.dotdotdot/dotdotdot.jquery.json | 18 + node_modules/jquery.dotdotdot/gulpfile.js | 51 ++ node_modules/jquery.dotdotdot/index.html | 249 ++++++++ node_modules/jquery.dotdotdot/package.json | 66 +++ .../jquery.dotdotdot/src/jquery.dotdotdot.js | 653 +++++++++++++++++++++ .../jquery.dotdotdot/src/jquery.dotdotdot.min.js | 13 + .../src/jquery.dotdotdot.min.umd.js | 24 + 14 files changed, 1221 insertions(+) create mode 100755 node_modules/jquery.dotdotdot/.npmignore create mode 100644 node_modules/jquery.dotdotdot/CONTRIBUTING.md create mode 100644 node_modules/jquery.dotdotdot/LICENSE.txt create mode 100644 node_modules/jquery.dotdotdot/README.md create mode 100644 node_modules/jquery.dotdotdot/bower.json create mode 100644 node_modules/jquery.dotdotdot/composer.json create mode 100644 node_modules/jquery.dotdotdot/dist/jquery.dotdotdot.js create mode 100755 node_modules/jquery.dotdotdot/dotdotdot.jquery.json create mode 100644 node_modules/jquery.dotdotdot/gulpfile.js create mode 100644 node_modules/jquery.dotdotdot/index.html create mode 100644 node_modules/jquery.dotdotdot/package.json create mode 100644 node_modules/jquery.dotdotdot/src/jquery.dotdotdot.js create mode 100755 node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.js create mode 100755 node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.umd.js (limited to 'node_modules/jquery.dotdotdot') diff --git a/node_modules/jquery.dotdotdot/.npmignore b/node_modules/jquery.dotdotdot/.npmignore new file mode 100755 index 0000000000..6defad6e28 --- /dev/null +++ b/node_modules/jquery.dotdotdot/.npmignore @@ -0,0 +1,9 @@ +# Ignore Mac system files. +._* + +# Ignore sass-cache files. +*.sass-cache* +*.scssc + +# Ignore Gulp modules +node_modules \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/CONTRIBUTING.md b/node_modules/jquery.dotdotdot/CONTRIBUTING.md new file mode 100644 index 0000000000..dfeec2cfa9 --- /dev/null +++ b/node_modules/jquery.dotdotdot/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing to this project + +Please take a moment to review this document in order to make the contribution +process easy and effective for everyone involved. + + +## Using the issue tracker + +The issue tracker is the preferred channel for [bug reports](#bugs) and +[features requests](#features), but please respect the following restrictions: + +* Please **do not** use the issue tracker for personal support requests. + +* Please keep the discussion **on topic** and respect the opinions of others. + + + +## Bug reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful - thank you! + +Guidelines for bug reports: + +1. **Use the GitHub issue search** — check if the issue has already been + reported. + +2. **Check if the issue has been fixed** — try to reproduce it using the + latest branch in the repository. + +3. **Isolate the problem** — create a [reduced test + case](http://css-tricks.com/reduced-test-cases/) and a live example. + +A good bug report shouldn't leave others needing to chase you up for more +information. Please try to be as detailed as possible in your report. What is +your environment? What steps will reproduce the issue? What browser(s) and OS +experience the problem? What would you expect to be the outcome? All these +details will help people to fix any potential bugs. + + + +## Feature requests + +Feature requests are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to *you* to make a strong +case to convince the project's developers of the merits of this feature. Please +provide as much detail and context as possible. \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/LICENSE.txt b/node_modules/jquery.dotdotdot/LICENSE.txt new file mode 100644 index 0000000000..973ccc8c1b --- /dev/null +++ b/node_modules/jquery.dotdotdot/LICENSE.txt @@ -0,0 +1,2 @@ +This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. +To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/README.md b/node_modules/jquery.dotdotdot/README.md new file mode 100644 index 0000000000..c2e561fb80 --- /dev/null +++ b/node_modules/jquery.dotdotdot/README.md @@ -0,0 +1,25 @@ +jQuery.dotdotdot +================ + +Dotdotdot is a jQuery plugin for truncating multiple line content on a webpage. +It uses an ellipsis to indicate that there is more text than currently visible. +Optionally, the plugin can keep a "read more" anchor visible at the end of the content, after the ellipsis. + +When using the jQuery.dotdotdot plugin, you don't need to worry about your HTML markup, the plugin knows its way around most elements. +It's responsive, so when resizing the browser, the ellipsis will update on the fly. + +Need help? Have a look at [the documentation](http://dotdotdot.frebsite.nl). + + + +### Licence +The jQuery.dotdotdot plugin is licensed under the [CC-BY-NC-4.0 license](http://creativecommons.org/licenses/by-nc/4.0/).
+You can [purchase a license](http://dotdotdot.frebsite.nl#download) if you want to use it in a commercial project. + +### Dependencies ++ jQuery 1.7 or higher + +### Development +This project uses [Gulp](http://gulpjs.com/) to minify the JS file. +If you are unfamiliar with Gulp, check [this tutorial](https://travismaynard.com/writing/getting-started-with-gulp) on how to get started.
+Run `gulp watch` in the command-line to put a watch on the files and run all scripts immediately after saving your changes. diff --git a/node_modules/jquery.dotdotdot/bower.json b/node_modules/jquery.dotdotdot/bower.json new file mode 100644 index 0000000000..4c20af9606 --- /dev/null +++ b/node_modules/jquery.dotdotdot/bower.json @@ -0,0 +1,22 @@ +{ + "name" : "jQuery.dotdotdot", + "version" : "3.2.3", + "main" : "dist/jquery.dotdotdot.js", + "authors" : "Fred Heusschen ", + "license" : "CC-BY-NC-4.0", + "description" : "Dotdotdot is an advanced jQuery plugin for truncating multiple line content with an ellipsis.", + "keywords" : [ + "truncate", + "truncating", + "ellipsis", + "dotdotdot", + "multiline", + "text", + "text-overflow", + "overflow", + "dots" + ], + "dependencies" : { + "jquery": ">= 1.7.0" + } +} \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/composer.json b/node_modules/jquery.dotdotdot/composer.json new file mode 100644 index 0000000000..0a2e944e46 --- /dev/null +++ b/node_modules/jquery.dotdotdot/composer.json @@ -0,0 +1,18 @@ +{ + "name" : "jQuery.dotdotdot", + "version" : "3.2.3", + "authors" : "Fred Heusschen ", + "license" : "CC-BY-NC-4.0", + "description" : "Dotdotdot is an advanced jQuery plugin for truncating multiple line content with an ellipsis.", + "keywords" : [ + "truncate", + "truncating", + "ellipsis", + "dotdotdot", + "multiline", + "text", + "text-overflow", + "overflow", + "dots" + ] +} \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/dist/jquery.dotdotdot.js b/node_modules/jquery.dotdotdot/dist/jquery.dotdotdot.js new file mode 100644 index 0000000000..5c5b2961bc --- /dev/null +++ b/node_modules/jquery.dotdotdot/dist/jquery.dotdotdot.js @@ -0,0 +1,24 @@ +;(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('jquery')); + } else { + root.jquery_dotdotdot_js = factory(root.jQuery); + } +}(this, function(jQuery) { +/* + * jQuery dotdotdot 3.2.3 + * @requires jQuery 1.7.0 or later + * + * dotdotdot.frebsite.nl + * + * Copyright (c) Fred Heusschen + * www.frebsite.nl + * + * License: CC-BY-NC-4.0 + * http://creativecommons.org/licenses/by-nc/4.0/ + */ +!function(a){"use strict";var d,t,n,s,o="dotdotdot",e="3.2.3";a[o]&&a[o].version>e||(a[o]=function(t,e){this.$dot=t,this.api=["getInstance","truncate","restore","destroy","watch","unwatch"],this.opts=e;var i=this.$dot.data(o);return i&&i.destroy(),this.init(),this.truncate(),this.opts.watch&&this.watch(),this},a[o].version=e,a[o].uniqueId=0,a[o].defaults={ellipsis:"… ",callback:function(t){},truncate:"word",tolerance:0,keep:null,watch:"window",height:null},a[o].prototype={init:function(){this.watchTimeout=null,this.watchInterval=null,this.uniqueId=a[o].uniqueId++,this.originalStyle=this.$dot.attr("style")||"",this.originalContent=this._getOriginalContent(),"break-word"!==this.$dot.css("word-wrap")&&this.$dot.css("word-wrap","break-word"),"nowrap"===this.$dot.css("white-space")&&this.$dot.css("white-space","normal"),null===this.opts.height&&(this.opts.height=this._getMaxHeight()),"string"==typeof this.opts.ellipsis&&(this.opts.ellipsis=document.createTextNode(this.opts.ellipsis))},getInstance:function(){return this},truncate:function(){this.$inner=this.$dot.wrapInner("
").children().css({display:"block",height:"auto",width:"auto",border:"none",padding:0,margin:0}),this.$inner.empty().append(this.originalContent.clone(!0)),this.maxHeight=this._getMaxHeight();var t=!1;return this._fits()||(t=!0,this._truncateToNode(this.$inner[0])),this.$dot[t?"addClass":"removeClass"](d.truncated),this.$inner.replaceWith(this.$inner.contents()),this.$inner=null,this.opts.callback.call(this.$dot[0],t),t},restore:function(){this.unwatch(),this.$dot.empty().append(this.originalContent).attr("style",this.originalStyle).removeClass(d.truncated)},destroy:function(){this.restore(),this.$dot.data(o,null)},watch:function(){var e=this;this.unwatch();var i={};"window"==this.opts.watch?s.on(n.resize+e.uniqueId,function(t){e.watchTimeout&&clearTimeout(e.watchTimeout),e.watchTimeout=setTimeout(function(){i=e._watchSizes(i,s,"width","height")},100)}):this.watchInterval=setInterval(function(){i=e._watchSizes(i,e.$dot,"innerWidth","innerHeight")},500)},unwatch:function(){s.off(n.resize+this.uniqueId),this.watchInterval&&clearInterval(this.watchInterval),this.watchTimeout&&clearTimeout(this.watchTimeout)},_api:function(){var i=this,n={};return a.each(this.api,function(t){var e=this;n[e]=function(){var t=i[e].apply(i,arguments);return void 0===t?n:t}}),n},_truncateToNode:function(t){var i=[],n=[];if(a(t).contents().each(function(){var t=a(this);if(!t.hasClass(d.keep)){var e=document.createComment("");t.replaceWith(e),n.push(this),i.push(e)}}),n.length){for(var e=0;e");h.append(this.opts.ellipsis),a(r).replaceWith(h),this._fits()?h.replaceWith(r):(h.remove(),r=n[Math.max(0,e-1)])}1==r.nodeType?this._truncateToNode(r):this._truncateToWord(r)}},_truncateToWord:function(t){for(var e=t,i=this,n=this.__getTextContent(e),s=-1!==n.indexOf(" ")?" ":" ",o=n.split(s),r="",h=o.length;0<=h;h--)if(r=o.slice(0,h).join(s),i.__setTextContent(e,i._addEllipsis(r)),i._fits()){"letter"==i.opts.truncate&&(i.__setTextContent(e,o.slice(0,h+1).join(s)),i._truncateToLetter(e));break}},_truncateToLetter:function(t){for(var e=this,i=this.__getTextContent(t).split(""),n="",s=i.length;0<=s&&(!(n=i.slice(0,s).join("")).length||(e.__setTextContent(t,e._addEllipsis(n)),!e._fits()));s--);},_fits:function(){return this.$inner.innerHeight()<=this.maxHeight+this.opts.tolerance},_addEllipsis:function(t){for(var e=[" "," ",",",";",".","!","?"];-1= 1.4.3" + } +} diff --git a/node_modules/jquery.dotdotdot/gulpfile.js b/node_modules/jquery.dotdotdot/gulpfile.js new file mode 100644 index 0000000000..5e784f0438 --- /dev/null +++ b/node_modules/jquery.dotdotdot/gulpfile.js @@ -0,0 +1,51 @@ +// npm install + +var gulp = require( 'gulp' ), + uglify = require( 'gulp-uglify' ), + umd = require( 'gulp-umd' ); + + + +// Default task 'gulp': Runs JS tasks +gulp.task( 'default', function(){ + return runJSTasks(); +}); + + + +// Watch task 'gulp watch': Starts a watch on JS tasks +gulp.task( 'watch', function() { + gulp.watch( 'src/*.js', [ 'js' ] ); +}); + + + +// JS task 'gulp js': Runs all JS tasks +gulp.task( 'js', function() { + return runJSTasks(); +}); + +function runJSTasks(){ + return gulp.src( 'src/jquery.dotdotdot.js' ) + .pipe( uglify({ output : { + comments: '/License/' + } + }) ) + .pipe( umd({ + dependencies: function() { return [ { + name : 'jquery', + global : 'jQuery', + param : 'jQuery' + } ]; }, + exports: function() { return true; }, + namespace: sanitizeNamespaceForUmd + })) + .pipe( gulp.dest( 'dist' ) ); +} + +function sanitizeNamespaceForUmd( file ) { + path = file.path.split( '\\' ).join( '/' ).split( '/' ); + path = path[ path.length - 1 ]; + return path.split( '.' ).join( '_' ); +} + diff --git a/node_modules/jquery.dotdotdot/index.html b/node_modules/jquery.dotdotdot/index.html new file mode 100644 index 0000000000..65665f49f9 --- /dev/null +++ b/node_modules/jquery.dotdotdot/index.html @@ -0,0 +1,249 @@ + + + + + + + + dotdotdot, jQuery plugin for multiple line content ellipsis. + + + + +
+
+
+
+

jQuery.dotdotdot

+

jQuery plugin for truncating multiple line content on a webpage.
+ Resize your browser to see the examples below in action.

+

Documentation: dotdotdot.frebsite.nl

+
+ +
+
+

Truncate multiple line content

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + It has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + Lorem Ipsum has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. + Read more »

+
+
+ +
+
+

Truncate to readable pathnames

+
    +
  1. file:///users/your-name/desktop/project/website/htdocs/index.html
  2. +
  3. file:///users/your-name/desktop/project/website/htdocs/css/style.css
  4. +
  5. file:///users/your-name/desktop/project/website/htdocs/css/layout.css
  6. +
+
+
+ +
+
+

Toggle full story

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. + It has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. + Lorem Ipsum has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

+ +
+
+ +
+ + + + + + + + diff --git a/node_modules/jquery.dotdotdot/package.json b/node_modules/jquery.dotdotdot/package.json new file mode 100644 index 0000000000..858ae7087d --- /dev/null +++ b/node_modules/jquery.dotdotdot/package.json @@ -0,0 +1,66 @@ +{ + "_args": [ + [ + "jquery.dotdotdot@3.2.3", + "/Users/benakamoorthi/Projects/matomo" + ] + ], + "_from": "jquery.dotdotdot@3.2.3", + "_id": "jquery.dotdotdot@3.2.3", + "_inBundle": false, + "_integrity": "sha512-VjsZftD2iyEErvkXMfkj3elPv1rAwFioUK/mHiur8zZTRr8dMv2eDluQjFmk+qOHVDLaqgeSHQR7ipq74f4MeA==", + "_location": "/jquery.dotdotdot", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "jquery.dotdotdot@3.2.3", + "name": "jquery.dotdotdot", + "escapedName": "jquery.dotdotdot", + "rawSpec": "3.2.3", + "saveSpec": null, + "fetchSpec": "3.2.3" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/jquery.dotdotdot/-/jquery.dotdotdot-3.2.3.tgz", + "_spec": "3.2.3", + "_where": "/Users/benakamoorthi/Projects/matomo", + "author": { + "name": "Fred Heusschen", + "email": "info@frebsite.nl" + }, + "bugs": { + "url": "https://github.com/FrDH/jQuery.dotdotdot/issues" + }, + "description": "Dotdotdot is an advanced jQuery plugin for truncating multiple line content with an ellipsis.", + "devDependencies": { + "gulp": "^4.0.0", + "gulp-uglify": "^3.0.1", + "gulp-umd": "^2.0.0" + }, + "homepage": "https://github.com/FrDH/jQuery.dotdotdot#readme", + "keywords": [ + "truncate", + "truncating", + "ellipsis", + "dotdotdot", + "multiline", + "text", + "text-overflow", + "overflow", + "dots" + ], + "license": "CC-BY-NC-4.0", + "main": "dist/jquery.dotdotdot.js", + "name": "jquery.dotdotdot", + "repository": { + "type": "git", + "url": "git+https://github.com/FrDH/jQuery.dotdotdot.git" + }, + "scripts": { + "build": "gulp default" + }, + "version": "3.2.3" +} diff --git a/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.js b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.js new file mode 100644 index 0000000000..86eb5e4946 --- /dev/null +++ b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.js @@ -0,0 +1,653 @@ +/* + * jQuery dotdotdot 3.2.3 + * @requires jQuery 1.7.0 or later + * + * dotdotdot.frebsite.nl + * + * Copyright (c) Fred Heusschen + * www.frebsite.nl + * + * License: CC-BY-NC-4.0 + * http://creativecommons.org/licenses/by-nc/4.0/ + */ + +(function( $ ) { + 'use strict'; + + var _PLUGIN_ = 'dotdotdot'; + var _VERSION_ = '3.2.3'; + + if ( $[ _PLUGIN_ ] && $[ _PLUGIN_ ].version > _VERSION_ ) + { + return; + } + + + + /* + The class + */ + $[ _PLUGIN_ ] = function( $container, opts ) + { + this.$dot = $container; + this.api = [ 'getInstance', 'truncate', 'restore', 'destroy', 'watch', 'unwatch' ]; + this.opts = opts; + + var oldAPI = this.$dot.data( _PLUGIN_ ); + if ( oldAPI ) + { + oldAPI.destroy(); + } + + this.init(); + this.truncate(); + + if ( this.opts.watch ) + { + this.watch(); + } + + return this; + }; + + $[ _PLUGIN_ ].version = _VERSION_; + $[ _PLUGIN_ ].uniqueId = 0; + + $[ _PLUGIN_ ].defaults = { + ellipsis : '\u2026 ', + callback : function( isTruncated ) {}, + truncate : 'word', + tolerance : 0, + keep : null, + watch : 'window', + height : null + }; + + + $[ _PLUGIN_ ].prototype = { + + init: function() + { + this.watchTimeout = null; + this.watchInterval = null; + this.uniqueId = $[ _PLUGIN_ ].uniqueId++; + this.originalStyle = this.$dot.attr( 'style' ) || ''; + this.originalContent = this._getOriginalContent(); + + if ( this.$dot.css( 'word-wrap' ) !== 'break-word' ) + { + this.$dot.css( 'word-wrap', 'break-word' ); + } + if ( this.$dot.css( 'white-space' ) === 'nowrap' ) + { + this.$dot.css( 'white-space', 'normal' ); + } + + if ( this.opts.height === null ) + { + this.opts.height = this._getMaxHeight(); + } + + if ( typeof this.opts.ellipsis == 'string' ) + { + this.opts.ellipsis = document.createTextNode( this.opts.ellipsis ); + } + }, + + getInstance: function() + { + return this; + }, + + truncate: function() + { + var that = this; + + + // Add inner node for measuring the height + this.$inner = this.$dot + .wrapInner( '
' ) + .children() + .css({ + 'display' : 'block', + 'height' : 'auto', + 'width' : 'auto', + 'border' : 'none', + 'padding' : 0, + 'margin' : 0 + }); + + + // Set original content + this.$inner + .empty() + .append( this.originalContent.clone( true ) ); + + + // Get max height + this.maxHeight = this._getMaxHeight(); + + + // Truncate the text + var isTruncated = false; + if ( !this._fits() ) + { + isTruncated = true; + this._truncateToNode( this.$inner[ 0 ] ); + } + + this.$dot[ isTruncated ? 'addClass' : 'removeClass' ]( _c.truncated ); + + + // Remove inner node + this.$inner.replaceWith( this.$inner.contents() ); + this.$inner = null; + + + // Callback + this.opts.callback.call( this.$dot[ 0 ], isTruncated ); + + return isTruncated; + }, + + restore: function() + { + this.unwatch(); + + this.$dot + .empty() + .append( this.originalContent ) + .attr( 'style', this.originalStyle ) + .removeClass( _c.truncated ); + }, + + destroy: function() + { + this.restore(); + this.$dot.data( _PLUGIN_, null ); + }, + + watch: function() + { + var that = this; + + this.unwatch(); + + var oldSizes = {}; + + if ( this.opts.watch == 'window' ) + { + $wndw.on( + _e.resize + that.uniqueId, + function( e ) + { + if ( that.watchTimeout ) + { + clearTimeout( that.watchTimeout ); + } + that.watchTimeout = setTimeout( + function() { + + oldSizes = that._watchSizes( oldSizes, $wndw, 'width', 'height' ); + + }, 100 + ); + } + ); + + } + else + { + this.watchInterval = setInterval( + function() + { + oldSizes = that._watchSizes( oldSizes, that.$dot, 'innerWidth', 'innerHeight' ); + + }, 500 + ); + } + }, + + unwatch: function() + { + $wndw.off( _e.resize + this.uniqueId ); + + if ( this.watchInterval ) + { + clearInterval( this.watchInterval ); + } + + if ( this.watchTimeout ) + { + clearTimeout( this.watchTimeout ); + } + }, + + _api: function() + { + var that = this, + api = {}; + + $.each( this.api, + function( i ) + { + var fn = this; + api[ fn ] = function() + { + var re = that[ fn ].apply( that, arguments ); + return ( typeof re == 'undefined' ) ? api : re; + }; + } + ); + return api; + }, + + _truncateToNode: function( _elem ) + { + + var that = this; + + var _coms = [], + _elms = []; + + // Empty the node + // -> replace all contents with comments + $(_elem) + .contents() + .each( + function() + { + var $e = $(this); + if ( !$e.hasClass( _c.keep ) ) + { + var c = document.createComment( '' ); + $e.replaceWith( c ); + + _elms.push( this ); + _coms.push( c ); + } + } + ); + + if ( !_elms.length ) + { + return; + } + + // Re-fill the node + // -> replace comments with contents until it doesn't fit anymore + for ( var e = 0; e < _elms.length; e++ ) + { + + $(_coms[ e ]).replaceWith( _elms[ e ] ); + + $(_elms[ e ]).append( this.opts.ellipsis ); + var fits = this._fits(); + $(this.opts.ellipsis, _elms[ e ]).remove(); + + if ( !fits ) + { + if ( this.opts.truncate == 'node' && e > 1 ) + { + $(_elms[ e - 2 ]).remove(); + return; + } + break; + } + } + + // Remove left over comments + for ( var c = e; c < _coms.length; c++ ) + { + $(_coms[ c ]).remove(); + } + + // Get last node + // -> the node that overflows + + var _last = _elms[ Math.max( 0, Math.min( e, _elms.length - 1 ) ) ]; + + // Border case + // -> the last node with only an ellipsis in it... + if ( _last.nodeType == 1 ) + { + + var $e = $('<' + _last.nodeName + ' />'); + $e.append( this.opts.ellipsis ); + + $(_last).replaceWith( $e ); + + // ... fits + // -> Restore the full last node + if ( this._fits() ) + { + $e.replaceWith( _last ); + } + + // ... doesn't fit + // -> remove it and go back one node + else + { + $e.remove(); + _last = _elms[ Math.max( 0, e - 1 ) ]; + } + } + + // Proceed inside last node + if ( _last.nodeType == 1 ) + { + this._truncateToNode( _last ); + } + else + { + this._truncateToWord( _last ); + } + }, + + _truncateToWord: function( _elem ) + { + + var e = _elem; + + var that = this; + + var txt = this.__getTextContent( e ), + sep = ( txt.indexOf( ' ' ) !== -1 ) ? ' ' : '\u3000', + arr = txt.split( sep ), + str = ''; + + for ( var a = arr.length; a >= 0; a-- ) + { + str = arr.slice( 0, a ).join( sep ); + + that.__setTextContent( e, that._addEllipsis( str ) ); + + if ( that._fits() ) + { + if ( that.opts.truncate == 'letter' ) + { + that.__setTextContent( e, arr.slice( 0, a + 1 ).join( sep ) ); + that._truncateToLetter( e ); + } + break; + } + } + }, + + _truncateToLetter: function( e ) + { + var that = this; + + var txt = this.__getTextContent( e ), + arr = txt.split( '' ), + str = ''; + + for ( var a = arr.length; a >= 0; a-- ) + { + str = arr.slice( 0, a ).join( '' ); + + if ( !str.length ) + { + continue; + } + + that.__setTextContent( e, that._addEllipsis( str ) ); + + if ( that._fits() ) + { + break; + } + } + }, + + _fits: function() + { + return ( this.$inner.innerHeight() <= this.maxHeight + this.opts.tolerance ); + }, + + _addEllipsis: function( txt ) + { + var remove = [' ', '\u3000', ',', ';', '.', '!', '?']; + + while ( $.inArray( txt.slice( -1 ), remove ) > -1 ) + { + txt = txt.slice( 0, -1 ); + } + txt += this.__getTextContent( this.opts.ellipsis ); + + return txt; + }, + + _getOriginalContent: function() + { + var that = this; + + // Add "keep" class to nodes to keep + this.$dot + .find( 'script, style' ) + .addClass( _c.keep ); + + if ( this.opts.keep ) + { + this.$dot + .find( this.opts.keep ) + .addClass( _c.keep ); + } + + // Filter out unneeded whitespace + this.$dot + .find( '*' ) + .not( '.' + _c.keep ) + .add( this.$dot ) + .contents() + .each( + function() + { + + var e = this, + $e = $(this); + + // Text nodes + if ( e.nodeType == 3 ) + { + + // Remove whitespace where it does not take up space in the DOM + if ( $.trim( that.__getTextContent( e ) ) == '' ) + { + if ( $e.parent().is( 'table, thead, tbody, tfoot, tr, dl, ul, ol, video' ) ) + { + $e.remove(); + return; + } + if ( $e.prev().is( 'div, p, table, td, td, dt, dd, li' ) ) + { + $e.remove(); + return; + } + if ( $e.next().is( 'div, p, table, td, td, dt, dd, li' ) ) + { + $e.remove(); + return; + } + if ( !$e.prev().length ) + { + $e.remove(); + return; + } + if ( !$e.next().length ) + { + $e.remove(); + return; + } + } + } + + // Comment nodes + else if ( e.nodeType == 8 ) + { + $e.remove(); + } + + } + ); + + return this.$dot.contents(); + }, + + _getMaxHeight: function() + { + if ( typeof this.opts.height == 'number' ) + { + return this.opts.height; + } + + // Find smallest CSS height + var arr = [ 'maxHeight', 'height' ], + hgh = 0; + + for ( var a = 0; a < arr.length; a++ ) + { + hgh = window.getComputedStyle( this.$dot[ 0 ] )[ arr[ a ] ]; + if ( hgh.slice( -2 ) == 'px' ) + { + hgh = parseFloat( hgh ); + break; + } + } + + // Remove padding-top/bottom when needed. + var arr = []; + switch ( this.$dot.css( 'boxSizing' ) ) + { + case 'border-box': + arr.push( 'borderTopWidth' ); + arr.push( 'borderBottomWidth' ); + // no break -> padding needs to be added too + + case 'padding-box': + arr.push( 'paddingTop' ); + arr.push( 'paddingBottom' ); + break; + } + for ( var a = 0; a < arr.length; a++ ) + { + var p = window.getComputedStyle( this.$dot[ 0 ] )[ arr[ a ] ]; + if ( p.slice( -2 ) == 'px' ) + { + hgh -= parseFloat( p ); + } + } + + // Sanitize + return Math.max( hgh, 0 ); + }, + + _watchSizes: function( oldSizes, $elem, width, height ) + { + if ( this.$dot.is( ':visible' ) ) + { + var newSizes = { + 'width' : $elem[ width ](), + 'height' : $elem[ height ]() + }; + + if ( oldSizes.width != newSizes.width || oldSizes.height != newSizes.height ) + { + this.truncate(); + } + + return newSizes; + } + return oldSizes; + }, + + __getTextContent: function( elem ) + { + var arr = [ 'nodeValue', 'textContent', 'innerText' ]; + for ( var a = 0; a < arr.length; a++ ) + { + if ( typeof elem[ arr[ a ] ] == 'string' ) + { + return elem[ arr[ a ] ]; + } + } + return ''; + }, + __setTextContent: function( elem, content ) + { + var arr = [ 'nodeValue', 'textContent', 'innerText' ]; + for ( var a = 0; a < arr.length; a++ ) + { + elem[ arr[ a ] ] = content; + } + } + }; + + + + /* + The jQuery plugin + */ + $.fn[ _PLUGIN_ ] = function( opts ) + { + initPlugin(); + + opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults, opts ); + + return this.each( + function() + { + $(this).data( _PLUGIN_, new $[ _PLUGIN_ ]( $(this), opts )._api() ); + } + ); + }; + + + + /* + Global variables + */ + var _c, _d, _e, $wndw; + + function initPlugin() + { + $wndw = $(window); + + // Classnames, Datanames, Eventnames + _c = {}; + _d = {}; + _e = {}; + + $.each( [ _c, _d, _e ], + function( i, o ) + { + o.add = function( a ) + { + a = a.split( ' ' ); + for ( var b = 0, l = a.length; b < l; b++ ) + { + o[ a[ b ] ] = o.ddd( a[ b ] ); + } + }; + } + ); + + // Classnames + _c.ddd = function( c ) { return 'ddd-' + c; }; + _c.add( 'truncated keep' ); + + // Datanames + _d.ddd = function( d ) { return 'ddd-' + d; }; + + // Eventnames + _e.ddd = function( e ) { return e + '.ddd'; }; + _e.add( 'resize' ); + + + // Only once + initPlugin = function() {}; + + } + + +})( jQuery ); diff --git a/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.js b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.js new file mode 100755 index 0000000000..69f4838622 --- /dev/null +++ b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.js @@ -0,0 +1,13 @@ +/* + * jQuery dotdotdot 1.8.3 + * + * Copyright (c) Fred Heusschen + * www.frebsite.nl + * + * Plugin website: + * dotdotdot.frebsite.nl + * + * Licensed under the MIT license. + * http://en.wikipedia.org/wiki/MIT_License + */ +!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h)return!0;if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),!l||f.is(d.after)||f.find(d.after).length||e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodeType?o(f,n,i,d,l):r(f,n,i,d,l)),s||l&&l.detach()}}),n.addClass("is-truncated"),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,m=g.length-1;for(o.fallbackToLetter&&0==b&&0==m&&(p="",g=h.split(p),m=g.length-1);m>=b&&(0!=b||0!=m);){var y=Math.floor((b+m)/2);if(y==w)break;w=y,l(c,g.slice(0,w+1).join(p)+o.ellipsis),r.children().each(function(){t(this).toggle().toggle()}),a(r,o)?(m=w,o.fallbackToLetter&&0==b&&0==m&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,m=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var C=d&&d.closest(x).length?d.length:0;if(x.contents().length>C?c=u(x.contents().eq(-1-C),n):(c=u(x,n,!0),C||x.detach()),c&&(h=i(s(c),o),l(c,h),C&&d)){var T=d.parent();t(c).parent().append(d),t.trim(T.html())||T.remove()}}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this,i=o.contents();o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){switch(o.removeClass("is-truncated"),e.preventDefault(),e.stopPropagation(),typeof l.height){case"number":l.maxHeight=l.height;break;case"function":l.maxHeight=l.height.call(o[0]);break;default:l.maxHeight=f(o)}l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||"nodeType"in d&&1===d.nodeType)&&(d=t("
").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('
').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith("
").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);c.width==t.width&&c.height==t.height||(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=h(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(t){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("
").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery),jQuery(document).ready(function(t){t(".dot-ellipsis").each(function(){var e=t(this).hasClass("dot-resize-update"),n=t(this).hasClass("dot-timer-update"),r=0,o=t(this).attr("class").split(/\s+/);t.each(o,function(t,e){var n=e.match(/^dot-height-(\d+)$/);null!==n&&(r=Number(n[1]))});var a=new Object;n&&(a.watch=!0),e&&(a.watch="window"),r>0&&(a.height=r),t(this).dotdotdot(a)})}),jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")}); \ No newline at end of file diff --git a/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.umd.js b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.umd.js new file mode 100755 index 0000000000..83b6ba3583 --- /dev/null +++ b/node_modules/jquery.dotdotdot/src/jquery.dotdotdot.min.umd.js @@ -0,0 +1,24 @@ +;(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jQuery'], factory); + } else if (typeof exports === 'object') { + module.exports = factory(require('jQuery')); + } else { + root.jquery_dotdotdot_min_js = factory(root.jQuery); + } +}(this, function(jQuery) { +/* + * jQuery dotdotdot 1.8.3 + * + * Copyright (c) Fred Heusschen + * www.frebsite.nl + * + * Plugin website: + * dotdotdot.frebsite.nl + * + * Licensed under the MIT license. + * http://en.wikipedia.org/wiki/MIT_License + */ +!function(t,e){function n(t,e,n){var r=t.children(),o=!1;t.empty();for(var i=0,d=r.length;d>i;i++){var l=r.eq(i);if(t.append(l),n&&t.append(n),a(t,e)){l.remove(),o=!0;break}n&&n.detach()}return o}function r(e,n,i,d,l){var s=!1,c="a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style",u="script, .dotdotdot-keep";return e.contents().detach().each(function(){var h=this,f=t(h);if("undefined"==typeof h)return!0;if(f.is(u))e.append(f);else{if(s)return!0;e.append(f),!l||f.is(d.after)||f.find(d.after).length||e[e.is(c)?"after":"append"](l),a(i,d)&&(s=3==h.nodeType?o(f,n,i,d,l):r(f,n,i,d,l)),s||l&&l.detach()}}),n.addClass("is-truncated"),s}function o(e,n,r,o,d){var c=e[0];if(!c)return!1;var h=s(c),f=-1!==h.indexOf(" ")?" ":" ",p="letter"==o.wrap?"":f,g=h.split(p),v=-1,w=-1,b=0,m=g.length-1;for(o.fallbackToLetter&&0==b&&0==m&&(p="",g=h.split(p),m=g.length-1);m>=b&&(0!=b||0!=m);){var y=Math.floor((b+m)/2);if(y==w)break;w=y,l(c,g.slice(0,w+1).join(p)+o.ellipsis),r.children().each(function(){t(this).toggle().toggle()}),a(r,o)?(m=w,o.fallbackToLetter&&0==b&&0==m&&(p="",g=g[0].split(p),v=-1,w=-1,b=0,m=g.length-1)):(v=w,b=w)}if(-1==v||1==g.length&&0==g[0].length){var x=e.parent();e.detach();var C=d&&d.closest(x).length?d.length:0;if(x.contents().length>C?c=u(x.contents().eq(-1-C),n):(c=u(x,n,!0),C||x.detach()),c&&(h=i(s(c),o),l(c,h),C&&d)){var T=d.parent();t(c).parent().append(d),t.trim(T.html())||T.remove()}}else h=i(g.slice(0,v+1).join(p),o),l(c,h);return!0}function a(t,e){return t.innerHeight()>e.maxHeight}function i(e,n){for(;t.inArray(e.slice(-1),n.lastCharacter.remove)>-1;)e=e.slice(0,-1);return t.inArray(e.slice(-1),n.lastCharacter.noEllipsis)<0&&(e+=n.ellipsis),e}function d(t){return{width:t.innerWidth(),height:t.innerHeight()}}function l(t,e){t.innerText?t.innerText=e:t.nodeValue?t.nodeValue=e:t.textContent&&(t.textContent=e)}function s(t){return t.innerText?t.innerText:t.nodeValue?t.nodeValue:t.textContent?t.textContent:""}function c(t){do t=t.previousSibling;while(t&&1!==t.nodeType&&3!==t.nodeType);return t}function u(e,n,r){var o,a=e&&e[0];if(a){if(!r){if(3===a.nodeType)return a;if(t.trim(e.text()))return u(e.contents().last(),n)}for(o=c(a);!o;){if(e=e.parent(),e.is(n)||!e.length)return!1;o=c(e[0])}if(o)return u(t(o),n)}return!1}function h(e,n){return e?"string"==typeof e?(e=t(e,n),e.length?e:!1):e.jquery?e:!1:!1}function f(t){for(var e=t.innerHeight(),n=["paddingTop","paddingBottom"],r=0,o=n.length;o>r;r++){var a=parseInt(t.css(n[r]),10);isNaN(a)&&(a=0),e-=a}return e}if(!t.fn.dotdotdot){t.fn.dotdotdot=function(e){if(0==this.length)return t.fn.dotdotdot.debug('No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){t(this).dotdotdot(e)});var o=this,i=o.contents();o.data("dotdotdot")&&o.trigger("destroy.dot"),o.data("dotdotdot-style",o.attr("style")||""),o.css("word-wrap","break-word"),"nowrap"===o.css("white-space")&&o.css("white-space","normal"),o.bind_events=function(){return o.bind("update.dot",function(e,d){switch(o.removeClass("is-truncated"),e.preventDefault(),e.stopPropagation(),typeof l.height){case"number":l.maxHeight=l.height;break;case"function":l.maxHeight=l.height.call(o[0]);break;default:l.maxHeight=f(o)}l.maxHeight+=l.tolerance,"undefined"!=typeof d&&(("string"==typeof d||"nodeType"in d&&1===d.nodeType)&&(d=t("
").append(d).contents()),d instanceof t&&(i=d)),g=o.wrapInner('
').children(),g.contents().detach().end().append(i.clone(!0)).find("br").replaceWith("
").end().css({height:"auto",width:"auto",border:"none",padding:0,margin:0});var c=!1,u=!1;return s.afterElement&&(c=s.afterElement.clone(!0),c.show(),s.afterElement.detach()),a(g,l)&&(u="children"==l.wrap?n(g,l,c):r(g,o,g,l,c)),g.replaceWith(g.contents()),g=null,t.isFunction(l.callback)&&l.callback.call(o[0],u,i),s.isTruncated=u,u}).bind("isTruncated.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],s.isTruncated),s.isTruncated}).bind("originalContent.dot",function(t,e){return t.preventDefault(),t.stopPropagation(),"function"==typeof e&&e.call(o[0],i),i}).bind("destroy.dot",function(t){t.preventDefault(),t.stopPropagation(),o.unwatch().unbind_events().contents().detach().end().append(i).attr("style",o.data("dotdotdot-style")||"").removeClass("is-truncated").data("dotdotdot",!1)}),o},o.unbind_events=function(){return o.unbind(".dot"),o},o.watch=function(){if(o.unwatch(),"window"==l.watch){var e=t(window),n=e.width(),r=e.height();e.bind("resize.dot"+s.dotId,function(){n==e.width()&&r==e.height()&&l.windowResizeFix||(n=e.width(),r=e.height(),u&&clearInterval(u),u=setTimeout(function(){o.trigger("update.dot")},100))})}else c=d(o),u=setInterval(function(){if(o.is(":visible")){var t=d(o);c.width==t.width&&c.height==t.height||(o.trigger("update.dot"),c=t)}},500);return o},o.unwatch=function(){return t(window).unbind("resize.dot"+s.dotId),u&&clearInterval(u),o};var l=t.extend(!0,{},t.fn.dotdotdot.defaults,e),s={},c={},u=null,g=null;return l.lastCharacter.remove instanceof Array||(l.lastCharacter.remove=t.fn.dotdotdot.defaultArrays.lastCharacter.remove),l.lastCharacter.noEllipsis instanceof Array||(l.lastCharacter.noEllipsis=t.fn.dotdotdot.defaultArrays.lastCharacter.noEllipsis),s.afterElement=h(l.after,o),s.isTruncated=!1,s.dotId=p++,o.data("dotdotdot",!0).bind_events().trigger("update.dot"),l.watch&&o.watch(),o},t.fn.dotdotdot.defaults={ellipsis:"... ",wrap:"word",fallbackToLetter:!0,lastCharacter:{},tolerance:0,callback:null,after:null,height:null,watch:!1,windowResizeFix:!0},t.fn.dotdotdot.defaultArrays={lastCharacter:{remove:[" "," ",",",";",".","!","?"],noEllipsis:[]}},t.fn.dotdotdot.debug=function(t){};var p=1,g=t.fn.html;t.fn.html=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?this.trigger("update",[n]):g.apply(this,arguments)};var v=t.fn.text;t.fn.text=function(n){return n!=e&&!t.isFunction(n)&&this.data("dotdotdot")?(n=t("
").text(n).html(),this.trigger("update",[n])):v.apply(this,arguments)}}}(jQuery),jQuery(document).ready(function(t){t(".dot-ellipsis").each(function(){var e=t(this).hasClass("dot-resize-update"),n=t(this).hasClass("dot-timer-update"),r=0,o=t(this).attr("class").split(/\s+/);t.each(o,function(t,e){var n=e.match(/^dot-height-(\d+)$/);null!==n&&(r=Number(n[1]))});var a=new Object;n&&(a.watch=!0),e&&(a.watch="window"),r>0&&(a.height=r),t(this).dotdotdot(a)})}),jQuery(window).on("load",function(){jQuery(".dot-ellipsis.dot-load-update").trigger("update.dot")}); +return true; +})); -- cgit v1.2.3