Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
bf875665
Commit
bf875665
authored
Jun 24, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more options to switch the API + relDocs css stuff
parent
549fba2e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
9 deletions
+22
-9
explorerjs.html
explorerjs.html
+1
-1
extras_explorerjs.js
extras_explorerjs.js
+11
-5
tweet.light.ltr.css
libs/tweets/tweet.light.ltr.css
+1
-1
settings_explorerjs.js
settings_explorerjs.js
+9
-2
No files found.
explorerjs.html
View file @
bf875665
...
...
@@ -33,7 +33,7 @@
<!-- Crete Round
Original *and* informative :) -->
<
!-- <link href='https://fonts.googleapis.com/css?family=Crete+Round:400,400italic&subset=latin-ext' rel='stylesheet' type='text/css'> --
>
<
link
href=
'https://fonts.googleapis.com/css?family=Crete+Round:400,400italic&subset=latin-ext'
rel=
'stylesheet'
type=
'text/css'
>
<!-- Lora
"book" (roman style) + nice heading -->
...
...
extras_explorerjs.js
View file @
bf875665
...
...
@@ -428,11 +428,17 @@ function topPapersFetcher(swType, qWords, priorHtml, cbNext){
let
resHTML
=
''
let
apiurl
=
TW
.
conf
.
relatedDocsAPIS
[
TW
.
conf
.
relatedDocsType
]
if
(
!
apiurl
)
{
apiurl
=
TW
.
conf
.
relatedDocsAPI
}
if
(
TW
.
conf
.
relatedDocsType
==
"twitter"
)
{
let
joinedQ
=
qWords
.
map
(
function
(
w
){
return
'('
+
w
+
')'
}).
join
(
' AND '
)
$
.
ajax
({
type
:
'GET'
,
url
:
TW
.
conf
.
relatedDocsAPI
,
url
:
apiurl
,
data
:
{
'query'
:
joinedQ
},
contentType
:
"application/json"
,
success
:
function
(
data
){
...
...
@@ -450,7 +456,7 @@ function topPapersFetcher(swType, qWords, priorHtml, cbNext){
cbNext
(
priorHtml
+
resHTML
)
},
error
:
function
(){
console
.
log
(
`Not found: relatedDocs for
${
TW
.
conf
.
relatedDocsAPI
}
`
)
console
.
log
(
`Not found: relatedDocs for
${
apiurl
}
`
)
cbNext
(
priorHtml
+
stockErrMsg
)
}
});
...
...
@@ -497,15 +503,15 @@ function topPapersFetcher(swType, qWords, priorHtml, cbNext){
$
.
ajax
({
type
:
'GET'
,
url
:
TW
.
conf
.
relatedDocsAPI
+
'/info_div.php'
,
url
:
apiurl
+
'/info_div.php'
,
data
:
urlParams
,
success
:
function
(
data
){
console
.
log
(
`relatedDocs:
${
TW
.
conf
.
relatedDocsAPI
}
/info_div.php?
${
urlParams
}
`
);
console
.
log
(
`relatedDocs:
${
apiurl
}
/info_div.php?
${
urlParams
}
`
);
resHTML
=
data
cbNext
(
priorHtml
+
resHTML
)
},
error
:
function
(){
console
.
log
(
`Not found: relatedDocs for
${
TW
.
conf
.
relatedDocsAPI
}
`
)
console
.
log
(
`Not found: relatedDocs for
${
apiurl
}
`
)
cbNext
(
priorHtml
+
stockErrMsg
)
}
});
...
...
libs/tweets/tweet.light.ltr.css
View file @
bf875665
This diff is collapsed.
Click to expand it.
settings_explorerjs.js
View file @
bf875665
...
...
@@ -37,11 +37,18 @@ TW.conf = (function(TW){
TWConf
.
getRelatedDocs
=
true
TWConf
.
relatedDocsMax
=
10
TWConf
.
relatedDocsType
=
"
wosLocalDB
"
// accepted: "twitter" | "wosLocalDB"
TWConf
.
relatedDocsType
=
"
twitter
"
// accepted: "twitter" | "wosLocalDB"
// POSSible: "elastic"
// TWConf.relatedDocsAPI = "http://127.0.0.1:5000/twitter_search"
TWConf
.
relatedDocsAPIS
=
{
// routes by corresponding type
"wosLocalDB"
:
"LOCALDB"
,
"twitter"
:
"http://127.0.0.1:5000/twitter_search"
}
// fallback topPapers API if none found by type
TWConf
.
relatedDocsAPI
=
"LOCALDB"
// =======================
// DATA FACETS AND LEGENDS
// =======================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment