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
c021d53d
Commit
c021d53d
authored
Nov 17, 2015
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UPDATE] asterisk when you do new groups
parent
19046a07
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
49 deletions
+10
-49
NGrams_dyna_chart_and_table.js
static/js/NGrams_dyna_chart_and_table.js
+7
-49
terms.html
templates/corpus/terms.html
+3
-0
No files found.
static/js/NGrams_dyna_chart_and_table.js
View file @
c021d53d
...
@@ -211,6 +211,9 @@ function save_groups() {
...
@@ -211,6 +211,9 @@ function save_groups() {
FlagsBuffer
[
"group"
][
nid
]
=
[]
FlagsBuffer
[
"group"
][
nid
]
=
[]
mainform
=
nid
mainform
=
nid
AjaxRecords
[
RecDict
[
nid
]].
state
=
1
AjaxRecords
[
RecDict
[
nid
]].
state
=
1
var
asterisk
=
(
AjaxRecords
[
RecDict
[
nid
]].
name
[
0
]
==
"*"
)?
""
:
"*"
AjaxRecords
[
RecDict
[
nid
]].
name
=
asterisk
+
AjaxRecords
[
RecDict
[
nid
]].
name
}
else
{
}
else
{
AjaxRecords
[
RecDict
[
nid
]].
state
=
0
;
AjaxRecords
[
RecDict
[
nid
]].
state
=
0
;
}
}
...
@@ -223,6 +226,7 @@ function save_groups() {
...
@@ -223,6 +226,7 @@ function save_groups() {
count
++
count
++
});
});
$
(
"#group_box"
).
remove
()
$
(
"#group_box"
).
remove
()
$
(
"#group_flag"
).
remove
()
GState
=
0
GState
=
0
MyTable
.
data
(
'dynatable'
).
dom
.
update
();
MyTable
.
data
(
'dynatable'
).
dom
.
update
();
}
}
...
@@ -235,6 +239,7 @@ function cancel_groups() {
...
@@ -235,6 +239,7 @@ function cancel_groups() {
AjaxRecords
[
RecDict
[
nid
]].
state
=
0
AjaxRecords
[
RecDict
[
nid
]].
state
=
0
});
});
$
(
"#group_box"
).
remove
()
$
(
"#group_box"
).
remove
()
$
(
"#group_flag"
).
remove
()
GState
=
0
GState
=
0
MyTable
.
data
(
'dynatable'
).
dom
.
update
();
MyTable
.
data
(
'dynatable'
).
dom
.
update
();
}
}
...
@@ -272,11 +277,11 @@ function add2group ( elem ) {
...
@@ -272,11 +277,11 @@ function add2group ( elem ) {
var
div_name
=
"#my-ajax-table > thead > tr > th:nth-child(1)"
var
div_name
=
"#my-ajax-table > thead > tr > th:nth-child(1)"
var
prctg
=
$
(
div_name
).
width
()
// / $(div_name).parent().width() * 100;
var
prctg
=
$
(
div_name
).
width
()
// / $(div_name).parent().width() * 100;
var
group_html
=
' <span class="group_box" style="max-width:'
+
prctg
+
'px;" id="group_box">'
+
'
\
n'
;
var
group_html
=
' <span class="group_box" style="max-width:'
+
prctg
+
'px;" 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
+=
' <span class="group_box content" id="group_box_content"></span>'
+
'
\
n'
;
group_html
+=
' </span>'
+
'
\
n'
;
group_html
+=
' </span>'
+
'
\
n'
;
group_html
+=
' <span id="group_flag"></span>'
+
'
\
n'
;
$
(
group_html
).
insertAfter
(
"#my-ajax-table > thead"
)
$
(
group_html
).
insertAfter
(
"#my-ajax-table > thead"
)
$
(
"#group_
box
"
).
append
(
'<span onclick="save_groups()"> [ Ok</span> - <span onclick="cancel_groups()">No ] </span>'
)
$
(
"#group_
flag
"
).
append
(
'<span onclick="save_groups()"> [ Ok</span> - <span onclick="cancel_groups()">No ] </span>'
)
}
}
GState
=
1
GState
=
1
...
@@ -357,7 +362,6 @@ function overRide(elem) {
...
@@ -357,7 +362,6 @@ function overRide(elem) {
// FlagsBuffer[this_newflag][id] = true;
// FlagsBuffer[this_newflag][id] = true;
// else
// else
// delete FlagsBuffer[ AjaxRecords[id]["flag"] ][id];
// delete FlagsBuffer[ AjaxRecords[id]["flag"] ][id];
AjaxRecords
[
id
][
"flag"
]
=
Mark_NGram
(
id
,
AjaxRecords
[
id
][
"flag"
]
,
this_newflag
);
var
sum__selected_elems
=
0
;
var
sum__selected_elems
=
0
;
for
(
var
i
in
FlagsBuffer
)
for
(
var
i
in
FlagsBuffer
)
...
@@ -376,52 +380,6 @@ function overRide(elem) {
...
@@ -376,52 +380,6 @@ function overRide(elem) {
}
}
// Here you have to put the weird case of Change from Group-Mode
function
DeactivateSelectAll
()
{
if
(
$
(
"#multiple_selection"
).
length
>
0
)
$
(
"#multiple_selection"
)[
0
].
checked
=
false
;
if
(
Object
.
keys
(
FlagsBuffer
[
"to_group"
]).
length
){
$
(
"#savemodal"
).
modal
(
"show"
).
css
({
'margin-top'
:
function
()
{
//vertical centering
console
.
log
(
$
(
".modal-content"
).
height
())
return
(
$
(
this
).
height
()
/
2
);
}
});
console
.
log
(
"OH OH"
)
console
.
log
(
"There are some nodes in group array!:"
)
// $("#to_group").html( Object.keys(FlagsBuffer["to_group"]).join(" , ") );
var
labels
=
[]
for
(
var
i
in
FlagsBuffer
[
"to_group"
]){
var
fake_id
=
i
console
.
log
(
AjaxRecords
[
fake_id
]
)
labels
.
push
(
AjaxRecords
[
fake_id
].
name
)
// $("#to_group").htm
}
$
(
"#to_group"
).
html
(
'<font color="blue">'
+
labels
.
join
(
" , "
)
+
'</div>'
);
}
}
function
Mark_NGram
(
ngram_id
,
old_flag
,
new_flag
)
{
if
(
new_flag
){
for
(
var
f
in
FlagsBuffer
)
{
if
(
new_flag
==
f
)
FlagsBuffer
[
f
][
ngram_id
]
=
true
;
else
delete
FlagsBuffer
[
f
][
ngram_id
];
}
}
else
{
delete
FlagsBuffer
[
old_flag
][
ngram_id
];
}
return
new_flag
;
}
//generic enough
//generic enough
function
ulWriter
(
rowIndex
,
record
,
columns
,
cellWriter
)
{
function
ulWriter
(
rowIndex
,
record
,
columns
,
cellWriter
)
{
var
tr
=
''
;
var
tr
=
''
;
...
...
templates/corpus/terms.html
View file @
c021d53d
...
@@ -72,6 +72,9 @@ tr:hover {
...
@@ -72,6 +72,9 @@ tr:hover {
border
:
1px
solid
yellow
;
border
:
1px
solid
yellow
;
}
}
#group_flag
{
}
.dynatable-record-count
{
.dynatable-record-count
{
font-size
:
0.7em
;
font-size
:
0.7em
;
}
}
...
...
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