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
9e6a6545
Commit
9e6a6545
authored
Apr 03, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix find
parent
de49b2af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
wosHistogram.js
histogramModule/wosHistogram.js
+6
-4
sigmaUtils.js
tinawebJS/sigmaUtils.js
+2
-1
No files found.
histogramModule/wosHistogram.js
View file @
9e6a6545
...
...
@@ -41,6 +41,7 @@ var $search_histogram = $("#search_histogram")
//method for calling the ISC-API and get pubs-distribution of the suggested term
function
search_proposed_terms_and_draw
(
the_queries
)
{
// console.log("search_proposed_terms_and_draw:\n"
// +"i'm searching:\n"
// +JSON.stringify(the_queries)) ;
...
...
@@ -94,8 +95,8 @@ function search_proposed_terms_and_draw( the_queries ) {
},
error
:
function
(
exception
)
{
console
.
log
(
"search_proposed_terms_and_draw:exception"
+
JSON
.
stringify
(
exception
))
//
console.log("search_proposed_terms_and_draw:exception"
//
+ JSON.stringify(exception))
$search_histogram
.
html
(
'<p class="micromessage">'
+
'<b>No histogram</b>: too many nodes selected</b>'
...
...
@@ -106,7 +107,7 @@ function search_proposed_terms_and_draw( the_queries ) {
// gotNodeSet event when Tinawab did main search behavior (select nodes)
$
(
"#searchinput"
).
on
(
"tw:gotNodeSet"
,
function
(
e
)
{
// console.
log
("event 'nodes' --> the event's nodes: " + JSON.stringify(e.nodeIds)) ;
// console.
warn
("event 'nodes' --> the event's nodes: " + JSON.stringify(e.nodeIds)) ;
clean_histogram
()
;
// now we may want to do other things (draw histogram, suggest term)
...
...
@@ -116,13 +117,14 @@ $("#searchinput").on("tw:gotNodeSet", function(e) {
// eraseNodeSet event when Tinawab canceled the previous selections
$
(
"#searchinput"
).
on
(
"tw:eraseNodeSet"
,
function
(
e
)
{
// console.
log
("event 'erase'") ;
// console.
warn
("event 'erase'") ;
clean_histogram
()
;
$search_histogram
.
hide
()
;
});
// emptyNodeSet event when Tinaweb search found nothing
$
(
"#searchinput"
).
on
(
"tw:emptyNodeSet"
,
function
(
e
)
{
// console.warn("event 'not found'") ;
clean_histogram
()
;
$search_histogram
.
hide
()
;
});
...
...
tinawebJS/sigmaUtils.js
View file @
9e6a6545
...
...
@@ -270,9 +270,10 @@ function find(lquery){
if
(
typeof
lquery
==
'string'
&&
lquery
.
length
>
0
)
{
lquery
=
lquery
.
toLowerCase
()
;
var
nds
=
getnodes
()
// console.log("FIND: looking among nodes", nds)
for
(
var
i
in
nds
){
var
n
=
nds
[
i
];
if
(
n
.
hidden
==
false
){
if
(
!
n
.
hidden
){
var
possiblematch
=
n
.
label
.
toLowerCase
()
// string.indexOf(substring) faster than search/match
if
(
possiblematch
.
indexOf
(
lquery
)
!==-
1
)
{
...
...
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