src/widgets/Polemic.js
changeset 1068 7623f9af9272
parent 1021 7253d4d06f0d
child 1069 2409cb4cebaf
equal deleted inserted replaced
1067:539c9bee5372 1068:7623f9af9272
   142                 	title: _annotation.title,
   142                 	title: _annotation.title,
   143                 	description: _annotation.description,
   143                 	description: _annotation.description,
   144                 	image: _annotation.thumbnail,
   144                 	image: _annotation.thumbnail,
   145                 	uri: (typeof _annotation.url !== "undefined" 
   145                 	uri: (typeof _annotation.url !== "undefined" 
   146 		                ? _annotation.url
   146 		                ? _annotation.url
   147 		                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id))
   147 		                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
       
   148                 text: '[' + _annotation.begin.toString() + '] ' + _annotation.title
   148                 });
   149                 });
   149             	// test if annotation has several colors.
   150             	// test if annotation has several colors.
   150             	var colAr = [];
   151             	var colAr = [];
   151             	for (var _j = 0; _j < _this.polemics.length; _j++) {
   152             	for (var _j = 0; _j < _this.polemics.length; _j++) {
   152             		if( IriSP.Model.regexpFromTextOrArray( _this.polemics[_j].keywords ).test( _annotation.title ) ){
   153             		if( IriSP.Model.regexpFromTextOrArray( _this.polemics[_j].keywords ).test( _annotation.title ) ){