Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
1e519b00
Commit
1e519b00
authored
Nov 05, 2015
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
]
parent
322bb883
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
NGrams_dyna_chart_and_table.js
static/js/NGrams_dyna_chart_and_table.js
+36
-0
terms.html
templates/corpus/terms.html
+1
-4
No files found.
static/js/NGrams_dyna_chart_and_table.js
View file @
1e519b00
...
...
@@ -211,6 +211,21 @@ function getRecords() {
// new
function
group_mode
(
elem
)
{
if
(
$
(
"#group_box"
).
length
==
0
)
{
var
div_name
=
"#my-ajax-table > thead > tr > th:nth-child(1)"
var
prctg
=
$
(
div_name
).
width
()
/
$
(
div_name
).
parent
().
width
()
*
100
;
var
group_html
=
' <div class="group_box" id="group_box">'
+
'
\
n'
;
group_html
+=
' <span class="group_box header" id="group_box_header"></span>'
+
'
\
n'
;
group_html
+=
' <span class="group_box content" id="group_box_content"></span>'
+
'
\
n'
;
group_html
+=
' </div>'
+
'
\
n'
;
$
(
"#my-ajax-table > thead"
).
append
(
group_html
)
}
// <div class="group_box" id="group_box">
// <span class="group_box header" id="group_box_header"></span>
// <span class="group_box content" id="group_box_content"></span>
// </div>
// $("#my-ajax-table > thead").append('<div id="group_div"><p>hola mundou</p></div>')
GState
=
1
var
elem_id
=
$
(
elem
).
data
(
"stuff"
)
...
...
@@ -290,6 +305,7 @@ function add2group ( elem ) {
}
// new
// click red, click keep, click normal...
function
clickngram_action
(
elem
)
{
var
elem_id
=
$
(
elem
).
data
(
"stuff"
)
AjaxRecords
[
elem_id
].
state
=
(
AjaxRecords
[
elem_id
].
state
==
(
System
[
0
][
"states"
].
length
-
2
))?
0
:(
AjaxRecords
[
elem_id
].
state
+
1
);
...
...
@@ -775,6 +791,25 @@ $.when(
}
})
).
then
(
function
()
{
// Deleting sinonims from the ngrams-table, clean start baby!
if
(
Object
.
keys
(
ngrams_groups
.
links
).
length
>
0
)
{
var
i
=
ngrams_data
.
ngrams
.
length
while
(
i
--
)
{
var
ng_id
=
ngrams_data
.
ngrams
[
i
].
id
if
(
ngrams_groups
.
links
[
ng_id
]
)
{
ngrams_data
.
ngrams
[
i
].
name
=
"*"
+
ngrams_data
.
ngrams
[
i
].
name
// to comment apres
for
(
var
j
in
ngrams_groups
.
links
[
ng_id
])
{
var
id_2del
=
ngrams_groups
.
links
[
ng_id
][
j
]
if
(
ngrams_data
.
ngrams
[
id_2del
]
)
{
ngrams_data
.
ngrams
.
splice
(
id_2del
,
1
);
}
}
}
}
}
// Building the Score-Selector
var
FirstScore
=
ngrams_data
.
scores
.
initial
var
possible_scores
=
Object
.
keys
(
ngrams_data
.
ngrams
[
0
].
scores
);
...
...
@@ -798,4 +833,5 @@ $.when(
console
.
log
(
result
)
});
});
\ No newline at end of file
templates/corpus/terms.html
View file @
1e519b00
...
...
@@ -162,10 +162,7 @@ input[type=radio]:checked + label {
</h4>
</div>
<div
id=
"collapseOne"
class=
"panel-collapse collapse no-transition"
role=
"tabpanel"
>
<div
class=
"group_box"
id=
"group_box"
>
<span
class=
"group_box header"
id=
"group_box_header"
></span>
<span
class=
"group_box content"
id=
"group_box_content"
></span>
</div>
<div
class=
"panel-body"
>
<div
id=
"div-table"
></div>
<!-- <p align="right">
...
...
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