Ignore:
Timestamp:
02/25/15 14:54:04 (9 years ago)
Author:
emanuel.dima@uni-tuebingen.de
Message:
  1. alpha 24: exporting to weblicht works, UI is not final
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SRUAggregator/trunk/src/main/resources/assets/js/search.jsx

    r6049 r6057  
    270270        },
    271271
     272        getToWeblichtLink: function(format) {
     273                return 'rest/search/'+this.state.searchId+'/toWeblicht?format='+format;
     274        },
     275
    272276        setLanguageAndFilter: function(languageObj, languageFilter) {
    273277                this.state.corpora.setVisibility(this.state.searchLayerId,
     
    427431                                                 results={this.filterResults()}
    428432                                                 getDownloadLink={this.getDownloadLink}
     433                                                 getToWeblichtLink={this.getToWeblichtLink}
    429434                                                 searchedLanguage={this.state.language}/>
    430435                                </div>
     
    527532                searchedLanguage: PT.array.isRequired,
    528533                getDownloadLink: PT.func.isRequired,
     534                getToWeblichtLink: PT.func.isRequired,
    529535        },
    530536
     
    537543        toggleKwic: function() {
    538544                this.setState({displayKwic:!this.state.displayKwic});
     545        },
     546
     547        zoom: function(e) {
     548                e.stopPropagation();
    539549        },
    540550
     
    603613
    604614        renderDiagnostic: function(d) {
    605                 return  <div className="alert alert-warning">
     615                return  <div className="alert alert-warning" key={d.uri}>
    606616                                        <div>Diagnostic: {d.message}</div>
    607617                                </div>;
     
    654664                                return false;
    655665                }
    656                 return  <Panel key={corpusHit.corpus.title}
     666                return  <Panel key={corpusHit.corpus.id}
    657667                                                title={this.renderPanelTitle(corpusHit.corpus)}
    658668                                                info={this.renderPanelInfo(corpusHit.corpus)}>
     
    709719        },
    710720
     721        renderToWeblichtLinks: function() {
     722                return (
     723                        <div className="dropdown">
     724                                <button className="btn btn-default" aria-expanded="false" data-toggle="dropdown" >
     725                                        <span className="glyphicon glyphicon-download-alt" aria-hidden="true"/>
     726                                        {" "} Use Weblicht {" "}
     727                                        <span className="caret"/>
     728                                </button>
     729                                <ul className="dropdown-menu">
     730                                        <li> <a href={this.props.getToWeblichtLink("text")}>
     731                                                        {" "} As Plain Text file</a></li>
     732                                </ul>
     733                        </div>
     734                );
     735        },
     736
    711737        renderToolbox: function(hits) {
    712738                if (hits <= 0) {
     
    716742                                        <div className="toolbox float-left inline">
    717743                                                {this.renderDownloadLinks()}
     744                                        </div>
     745                                        <div className="toolbox float-left inline">
     746                                                {this.renderToWeblichtLinks()}
    718747                                        </div>
    719748                                        <div className="float-right inline" style={{marginTop:15}}>
Note: See TracChangeset for help on using the changeset viewer.