Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | |
59 | 59 | // Core functionality of extension scripts |
60 | 60 | array( 'src' => 'js/plugins/jquery.async.js', 'version' => 3 ), |
61 | | - array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 13 ), |
| 61 | + array( 'src' => 'js/plugins/jquery.autoEllipsis.js', 'version' => 14 ), |
62 | 62 | array( 'src' => 'js/plugins/jquery.browser.js', 'version' => 8 ), |
63 | 63 | array( 'src' => 'js/plugins/jquery.collapsibleTabs.js', 'version' => 6 ), |
64 | 64 | array( 'src' => 'js/plugins/jquery.color.js', 'version' => 1 ), |
— | — | @@ -80,10 +80,10 @@ |
81 | 81 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
82 | 82 | ), |
83 | 83 | 'combined' => array( |
84 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 439 ), |
| 84 | + array( 'src' => 'js/plugins.combined.js', 'version' => 440 ), |
85 | 85 | ), |
86 | 86 | 'minified' => array( |
87 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 443 ), |
| 87 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 444 ), |
88 | 88 | ), |
89 | 89 | ), |
90 | 90 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipsis.js |
— | — | @@ -69,6 +69,9 @@ |
70 | 70 | if ( !( text in cache ) ) { |
71 | 71 | cache[text] = {}; |
72 | 72 | } |
| 73 | + if ( !( text in matchTextCache ) ) { |
| 74 | + matchTextCache[text] = {}; |
| 75 | + } |
73 | 76 | if ( options.matchText && !( options.matchText in matchTextCache[text] ) ) { |
74 | 77 | matchTextCache[text][options.matchText] = {}; |
75 | 78 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -277,6 +277,9 @@ |
278 | 278 | if ( !( text in cache ) ) { |
279 | 279 | cache[text] = {}; |
280 | 280 | } |
| 281 | + if ( !( text in matchTextCache ) ) { |
| 282 | + matchTextCache[text] = {}; |
| 283 | + } |
281 | 284 | if ( options.matchText && !( options.matchText in matchTextCache[text] ) ) { |
282 | 285 | matchTextCache[text][options.matchText] = {}; |
283 | 286 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -21,6 +21,7 @@ |
22 | 22 | {$.eachAsync(this,opts);return this;}})(jQuery);(function($){var cache={};var matchTextCache={};$.fn.autoEllipsis=function(options){options=$.extend({'position':'center','tooltip':false,'restoreText':false,'hasSpan':false,'matchText':null},options);$(this).each(function(){var $this=$(this);if(options.restoreText){if(!$this.data('autoEllipsis.originalText')){$this.data('autoEllipsis.originalText',$this.text());}else{$this.text($this.data('autoEllipsis.originalText'));}} |
23 | 23 | var $container=$this;var $trimmableText=null;var $protectedText=null;if(options.matchText){var text=$this.text();var matchedText=options.matchText;$trimmableText=$('<span />').css('whiteSpace','nowrap').addClass('autoellipsis-trimmed').text($this.text().substr(matchedText.length,$this.text().length));$protectedText=$('<span />').addClass('autoellipsis-matched').css('whiteSpace','nowrap').text(options.matchText);$container.empty().append($protectedText).append($trimmableText);}else{if(options.hasSpan){$trimmableText=$this.children(options.selector);}else{$trimmableText=$('<span />').css('whiteSpace','nowrap').text($this.text());$this.empty().append($trimmableText);}} |
24 | 24 | var text=$container.text();var trimmableText=$trimmableText.text();var w=$container.width();var pw=$protectedText?$protectedText.width():0;if(!(text in cache)){cache[text]={};} |
| 25 | +if(!(text in matchTextCache)){matchTextCache[text]={};} |
25 | 26 | if(options.matchText&&!(options.matchText in matchTextCache[text])){matchTextCache[text][options.matchText]={};} |
26 | 27 | if(!options.matchText&&w in cache[text]){$container.html(cache[text][w]);if(options.tooltip) |
27 | 28 | $container.attr('title',text);return;} |