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
0ca4e2f3
Commit
0ca4e2f3
authored
Feb 22, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basic version of one search bar
parent
d3fcaa96
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
486 additions
and
281 deletions
+486
-281
crowdTerms.css
crowdsourcingTerms/crowdTerms.css
+15
-2
init.js
crowdsourcingTerms/init.js
+2
-1
modal.js
crowdsourcingTerms/modal.js
+115
-98
explorerjs.html
explorerjs.html
+113
-114
extras_explorerjs.js
extras_explorerjs.js
+1
-0
custom.css
libs/css2/custom.css
+10
-1
freshslider.css
libs/css2/freshslider.css
+2
-1
settings_explorerjs.js
settings_explorerjs.js
+2
-1
Tinaweb.js
tinawebJS/Tinaweb.js
+150
-44
enviroment.js
tinawebJS/enviroment.js
+2
-0
globalUtils.js
tinawebJS/globalUtils.js
+41
-1
main.js
tinawebJS/main.js
+4
-1
methods.js
tinawebJS/methods.js
+6
-1
sigmaUtils.js
tinawebJS/sigmaUtils.js
+23
-16
No files found.
crowdsourcingTerms/crowdTerms.css
View file @
0ca4e2f3
...
...
@@ -58,15 +58,28 @@
margin
:
0
;
padding
:
0
;
}
/* small messages */
p
.micromessage
{
font-size
:
85%
;
color
:
#707070
;
}
/* ------------- crowdsourcing proprement dit ----------------------- */
#crowdsourcing_intro
{
#crowdsourcing_answer
{
font-size
:
85%
;
color
:
#707070
;
padding
:
0
1em
;
text-align
:
center
;
}
#savesuggestion
.btn
{
#crowdsourcing_answer
p
{
margin
:
2px
0
;
}
#savesuggestion
.btn
{
}
#savesuggestion
.btn
[
disabled
],
#savesuggestion
.btn.disabled
{
background-color
:
#B0B0B0
;
...
...
crowdsourcingTerms/init.js
View file @
0ca4e2f3
...
...
@@ -14,8 +14,9 @@ loadCSS(module_name+"/crowdTerms.css")
loadJS
(
module_name
+
"/modal.js"
)
;
// histogram
loadJS
(
module_name
+
"/dygraph/dygraph.combined.js"
)
;
loadCSS
(
module_name
+
"/dygraph/gallery.css"
)
;
loadCSS
(
module_name
+
"/dygraph/textarea.css"
)
;
loadJS
(
module_name
+
"/dygraph/dygraph.combined.js"
)
;
console
.
log
(
"OK LOADED "
+
module_name
)
;
crowdsourcingTerms/modal.js
View file @
0ca4e2f3
This diff is collapsed.
Click to expand it.
explorerjs.html
View file @
0ca4e2f3
This diff is collapsed.
Click to expand it.
extras_explorerjs.js
View file @
0ca4e2f3
...
...
@@ -11,6 +11,7 @@ function newPopup(url) {
// Execution: ChangeGraphAppearanceByAtt( true )
// It scans the existing node-attributes and t keeps only those which are Numeric.
// then, add the button in the html with the sigmaUtils.clustersBy(x) listener.
// [TODO: fonction un peu lourde dans le profilage]
function
ChangeGraphAppearanceByAtt
(
manualflag
)
{
if
(
!
isUndef
(
manualflag
)
&&
!
TW
.
colorByAtt
)
TW
.
colorByAtt
=
manualflag
;
...
...
libs/css2/custom.css
View file @
0ca4e2f3
...
...
@@ -23,11 +23,16 @@
margin-bottom
:
1px
;
}
#defaultop
{
#defaultop
{
min-height
:
5%
;
max-height
:
10%
;
}
/* searchnav gets same padding as bootstrap's .navbar-nav > li > a */
#defaultop
div
#searchnav
{
padding-top
:
13px
;
padding-bottom
:
9px
;
}
#sigma-example
{
width
:
100%
;
height
:
300px
;
...
...
@@ -45,6 +50,10 @@
.my-legend
{
position
:
fixed
;
/* width: we set it smaller than #leftcolumn container's width */
width
:
16%
;
max-height
:
40%
;
overflow-y
:
scroll
;
bottom
:
5px
;
left
:
5px
;
...
...
libs/css2/freshslider.css
View file @
0ca4e2f3
.fsslider
{
position
:
relative
;
min-width
:
100px
;
/* min-width: 100px; */
min-width
:
75px
;
height
:
8px
;
display
:
inline-block
;
width
:
100%
;
...
...
settings_explorerjs.js
View file @
0ca4e2f3
...
...
@@ -51,6 +51,8 @@ var TW = {}
TW
.
SystemStates
.
opposites
=
[];
TW
.
catSoc
=
"Document"
;
TW
.
catSem
=
"NGram"
;
TW
.
strSearchBar
=
"Select or suggest topics"
;
var
ParseCustom
=
function
()
{};
var
SigmaUtils
=
function
()
{};
...
...
@@ -67,7 +69,6 @@ var inactiveColor = '#666';
var
startingNodeId
=
"1"
;
var
minLengthAutoComplete
=
1
;
var
maxSearchResults
=
10
;
var
strSearchBar
=
"Search"
;
var
cursor_size_min
=
0
;
var
cursor_size
=
0
;
...
...
tinawebJS/Tinaweb.js
View file @
0ca4e2f3
This diff is collapsed.
Click to expand it.
tinawebJS/enviroment.js
View file @
0ca4e2f3
...
...
@@ -833,6 +833,8 @@ function extractContext(string, context) {
return
begin_pts
+
str
+
end_pts
;
}
// TODO check duplicate function with sigmaUtils exactfind()
function
searchLabel
(
string
){
var
id_node
=
''
;
var
n
;
...
...
tinawebJS/globalUtils.js
View file @
0ca4e2f3
...
...
@@ -193,6 +193,46 @@ function rgbToHex(r, g, b) {
}
// lowercase etc query strings
normalizeString
=
function
(
string
)
{
if
(
!
typeof
string
==
"string"
)
{
return
""
;
}
else
{
return
$
.
trim
(
string
.
toLowerCase
()
)
}
}
// html-escape user input strings
// /!\ TODO check if safe enough?
saferString
=
function
(
string
)
{
// TODO table in an outer scope
conversions
=
{
'&'
:
'&'
,
'<'
:
'<'
,
'>'
:
'>'
,
'"'
:
'"'
,
"'"
:
'''
,
'%'
:
'%'
}
;
matchables
=
/
[
&<>"'%
]
/
;
if
(
!
typeof
string
==
"string"
)
{
return
""
;
}
else
{
return
string
.
replace
(
matchables
,
function
(
char
)
{
return
conversions
[
char
]
}
)
}
}
/**
* function to load a given css file
*/
...
...
@@ -207,4 +247,4 @@ function rgbToHex(r, g, b) {
loadJS
=
function
(
src
)
{
var
jsLink
=
$
(
"<script type='text/javascript' src='"
+
src
+
"'>"
);
$
(
"head"
).
append
(
jsLink
);
};
\ No newline at end of file
};
tinawebJS/main.js
View file @
0ca4e2f3
...
...
@@ -265,7 +265,7 @@ if(RES["OK"]) {
console
.
log
(
typestring
)
if
(
typestring
==
"0|1"
)
{
$
(
"#category0"
).
hide
();
set_ClustersLegend
$
(
"#category0"
).
hide
();
$
(
"#category1"
).
show
();
if
(
$
(
"#slidercat1nodesweight"
).
html
()
==
""
)
...
...
@@ -364,6 +364,9 @@ if(RES["OK"]) {
// load optional modules
ProcessDivsFlags
()
;
// grey message in the search bar from settings
$
(
"#searchinput"
).
attr
(
'placeholder'
,
TW
.
strSearchBar
)
;
console
.
log
(
"finish"
)
...
...
tinawebJS/methods.js
View file @
0ca4e2f3
...
...
@@ -37,7 +37,12 @@ function cancelSelection (fromTagCloud) {
$
(
"#searchinput"
).
val
(
""
);
$
(
"#unselectbutton"
).
hide
();
$
(
"#tips"
).
html
(
getTips
());
}
}
// we send our "eraseNodeSet" event
// (signal for plugins that any selection behavior is finished)
$
(
'#searchinput'
).
trigger
(
"tw:eraseNodeSet"
);
for
(
var
i
in
deselections
){
if
(
!
isUndef
(
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
i
])
)
{
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
i
].
forceLabel
=
false
;
...
...
tinawebJS/sigmaUtils.js
View file @
0ca4e2f3
...
...
@@ -27,6 +27,8 @@ SigmaUtils = function () {
if
(
Number
(
n
.
id
)
==
287
)
console
.
log
(
"coordinates of node 287: ( "
+
n
.
x
+
" , "
+
n
.
y
+
" ) "
)
graph
.
addNode
(
n
.
id
,
node
);
// fill the "labels" global variable
updateSearchLabels
(
n
.
id
,
n
.
label
,
n
.
type
);
}
}
...
...
@@ -148,17 +150,20 @@ function gete(id){
}
function
find
(
l
abel
){
function
find
(
l
query
){
var
results
=
[];
var
nds
=
getnodesIndex
();
label
=
label
.
toLowerCase
()
for
(
var
i
in
nds
){
var
n
=
nds
[
i
];
if
(
n
.
hidden
==
false
){
var
possiblematch
=
n
.
label
.
toLowerCase
()
if
(
possiblematch
.
indexOf
(
label
)
!==-
1
)
{
results
.
push
(
n
);
}
if
(
typeof
lquery
==
'string'
&&
lquery
.
length
>
0
)
{
lquery
=
lquery
.
toLowerCase
()
;
var
nds
=
getnodesIndex
();
for
(
var
i
in
nds
){
var
n
=
nds
[
i
];
if
(
n
.
hidden
==
false
){
var
possiblematch
=
n
.
label
.
toLowerCase
()
// string.indexOf(substring) faster than search/match
if
(
possiblematch
.
indexOf
(
lquery
)
!==-
1
)
{
results
.
push
(
n
);
}
}
}
}
return
results
;
...
...
@@ -166,11 +171,13 @@ function find(label){
function
exactfind
(
label
)
{
nds
=
getnodesIndex
();
for
(
var
i
in
nds
){
n
=
nds
[
i
];
if
(
!
n
.
hidden
){
if
(
n
.
label
==
label
)
{
return
n
;
if
(
typeof
lquery
==
'string'
&&
lquery
.
length
>
0
)
{
for
(
var
i
in
nds
){
n
=
nds
[
i
];
if
(
!
n
.
hidden
){
if
(
n
.
label
==
label
)
{
return
n
;
}
}
}
}
...
...
@@ -387,4 +394,4 @@ function makeEdgeWeightUndef() {
for
(
var
e
in
TW
.
partialGraph
.
_core
.
graph
.
edges
)
{
TW
.
partialGraph
.
_core
.
graph
.
edges
[
e
].
weight
=
1
;
}
}
\ No newline at end of file
}
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