6 |
6 |
7 IriSP.TagCloudWidget.prototype.draw = function() { |
7 IriSP.TagCloudWidget.prototype.draw = function() { |
8 |
8 |
9 var _urlRegExp = /https?:\/\/[0-9a-zA-Z\.%\/-_]+/g, |
9 var _urlRegExp = /https?:\/\/[0-9a-zA-Z\.%\/-_]+/g, |
10 _stopWords = [ |
10 _stopWords = [ |
11 'aussi', 'and', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'encore', 'est', |
11 'aussi', 'and', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'encore', 'entre', 'est', |
12 'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre', |
12 'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre', |
13 'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'que', 'qui', 'ses' ,'son', 'sont', 'sur', |
13 'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'que', 'qui', 'sans', 'ses' ,'son', 'sont', 'sur', |
14 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous' ], |
14 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous' ], |
15 _regexpword = /[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g, |
15 _regexpword = /[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g, |
16 _words = {}, |
16 _words = {}, |
17 _showTitle = !this._config.excludeTitle, |
17 _showTitle = !this._config.excludeTitle, |
18 _showDescription = !this._config.excludeDescription, |
18 _showDescription = !this._config.excludeDescription, |
79 }); |
79 }); |
80 this._Popcorn.listen("IriSP.search", IriSP.wrap(this, function(searchString) { |
80 this._Popcorn.listen("IriSP.search", IriSP.wrap(this, function(searchString) { |
81 var _rgxp = new RegExp("(" + searchString.replace(/(\W)/g,'\\$1') + ")","gi"); |
81 var _rgxp = new RegExp("(" + searchString.replace(/(\W)/g,'\\$1') + ")","gi"); |
82 this.selector.find("li").each(function(_i, _e) { |
82 this.selector.find("li").each(function(_i, _e) { |
83 _e.innerHTML = searchString.length ? |
83 _e.innerHTML = searchString.length ? |
84 _e.textContent.replace(_rgxp,'<span class="Ldt-TagCloud-actif">$1</span>') |
84 _e.textContent.replace(_rgxp,'<span class="Ldt-TagCloud-actif Ldt-TraceMe">$1</span>') |
85 : _e.textContent; |
85 : _e.textContent; |
86 }); |
86 }); |
87 })); |
87 })); |
88 this._Popcorn.listen("IriSP.search.closed", IriSP.wrap(this, this.endsearch)); |
88 this._Popcorn.listen("IriSP.search.closed", IriSP.wrap(this, this.endsearch)); |
89 this._Popcorn.listen("IriSP.search.cleared", IriSP.wrap(this, this.endsearch)); |
89 this._Popcorn.listen("IriSP.search.cleared", IriSP.wrap(this, this.endsearch)); |