Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js')
-rw-r--r--libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js35
1 files changed, 27 insertions, 8 deletions
diff --git a/libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js b/libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js
index 50fda104f8..7a0be4cdd3 100644
--- a/libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js
+++ b/libs/bower_components/jQuery.dotdotdot/src/js/jquery.dotdotdot.js
@@ -1,5 +1,5 @@
/*
- * jQuery dotdotdot 1.7.2
+ * jQuery dotdotdot 1.7.4
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
@@ -56,18 +56,30 @@
'update.dot',
function( e, c )
{
+ $dot.removeClass("is-truncated");
e.preventDefault();
e.stopPropagation();
- opts.maxHeight = ( typeof opts.height == 'number' )
- ? opts.height
- : getTrueInnerHeight( $dot );
+ switch( typeof opts.height )
+ {
+ case 'number':
+ opts.maxHeight = opts.height;
+ break;
+
+ case 'function':
+ opts.maxHeight = opts.height.call( $dot[ 0 ] );
+ break;
+
+ default:
+ opts.maxHeight = getTrueInnerHeight( $dot );
+ break;
+ }
opts.maxHeight += opts.tolerance;
if ( typeof c != 'undefined' )
{
- if ( typeof c == 'string' || c instanceof HTMLElement )
+ if ( typeof c == 'string' || ('nodeType' in c && c.nodeType === 1) )
{
c = $('<div />').append( c ).contents();
}
@@ -340,7 +352,7 @@
var isTruncated = false;
// Don't put the ellipsis directly inside these elements
- var notx = 'a table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style';
+ var notx = 'a, table, thead, tbody, tfoot, tr, col, colgroup, object, embed, param, ol, ul, dl, blockquote, select, optgroup, option, textarea, script, style';
// Don't remove these elements even if they are after the ellipsis
var noty = 'script, .dotdotdot-keep';
@@ -355,7 +367,7 @@
var e = this,
$e = $(e);
- if ( typeof e == 'undefined' || ( e.nodeType == 3 && $.trim( e.data ).length == 0 ) )
+ if ( typeof e == 'undefined' )
{
return true;
}
@@ -402,7 +414,7 @@
}
}
);
-
+ $d.addClass("is-truncated");
return isTruncated;
}
function ellipsisElement( $e, $d, $i, o, after )
@@ -442,6 +454,13 @@
midPos = m;
setTextContent( e, textArr.slice( 0, midPos + 1 ).join( separator ) + o.ellipsis );
+ $i.children()
+ .each(
+ function()
+ {
+ $(this).toggle().toggle();
+ }
+ );
if ( !test( $i, o ) )
{