- Timestamp:
- 12/10/14 14:33:08 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUAggregator/trunk/src/main/resources/assets/js/search.js
r5897 r5900 90 90 var inline = {display:"inline-block"}; 91 91 return React.createElement("div", {style: inline}, 92 React.createElement("span", {className: "corpusName"}, " ", corpus. displayName),92 React.createElement("span", {className: "corpusName"}, " ", corpus.title ? corpus.title : corpus.displayName), 93 93 React.createElement("span", {className: "institutionName"}, " â ", corpus.institution.name) 94 94 ); … … 98 98 var inline = {display:"inline-block"}; 99 99 return React.createElement("div", null, 100 React.createElement(InfoPopover, {placement: "left", title: corpus.displayName}, 100 React.createElement(InfoPopover, {placement: "left", 101 title: corpus.title ? corpus.title : corpus.displayName}, 101 102 React.createElement("dl", {className: "dl-horizontal"}, 102 103 React.createElement("dt", null, "Institution"), … … 165 166 }, 166 167 167 renderFoundMessage: function( ) {168 renderFoundMessage: function(hits) { 168 169 if (this.props.results.length === 0) 169 170 return false; 170 var hits = this.props.results.filter(function(corpusHit) { return corpusHit.kwics.length > 0; }).length;171 171 var total = this.props.results.length; 172 172 return hits + " collections with results found in " + total + " searched collections"; … … 191 191 192 192 render: function() { 193 var hits = this.props.results.filter(function(corpusHit) { return corpusHit.kwics.length > 0; }).length; 193 194 var margintop = {marginTop:"10px"}; 194 195 var margin = {marginTop:"0", padding:"20px"}; … … 198 199 React.createElement(ReactCSSTransitionGroup, {transitionName: "fade"}, 199 200 React.createElement("div", {key: "-searching-message-", style: margintop}, this.renderSearchingMessage(), " "), 200 React.createElement("div", {key: "-found-message-", style: margintop}, this.renderFoundMessage( ), " "),201 React.createElement("div", {key: "-found-message-", style: margintop}, this.renderFoundMessage(hits), " "), 201 202 React.createElement("div", {key: "-progress-", style: margintop}, this.renderProgressBar()), 202 this.props.results.length> 0 ? this.renderKwicCheckbox() : false,203 hits > 0 ? this.renderKwicCheckbox() : false, 203 204 this.props.results.map(this.renderResultPanels) 204 205 )
Note: See TracChangeset
for help on using the changeset viewer.