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
6e3e1498
Commit
6e3e1498
authored
Sep 19, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project view: add a ajax_loader gif to the recalculate GUI
parent
c65f2aa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
project.html
templates/pages/projects/project.html
+30
-6
No files found.
templates/pages/projects/project.html
View file @
6e3e1498
...
...
@@ -18,6 +18,11 @@
.ui-autocomplete
.ui-menu-item
{
font-size
:
x-small
;
}
.statusinfo
{
margin-top
:
.3em
;
color
:
grey
;
}
</style>
{% endblock %}
...
...
@@ -93,7 +98,7 @@
{{corpus.name}}, {{ corpus.count }} documents {{ corpus.status_message }}
</a>
</div>
<div
class=
"col-md-3 content"
>
<div
class=
"col-md-3 content"
id=
"corpus_{{corpus.id}}_tools"
>
{% for state in corpus.hyperdata.statuses %}
{% ifequal state.action "Workflow" %}
{% if state.complete %}
...
...
@@ -104,13 +109,11 @@
</button>
</a>
<button
type=
"button"
class=
"btn btn-default
yopla
"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-trigger=
"focus"
<button
type=
"button"
class=
"btn btn-default"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-trigger=
"focus"
data-content=
"
<ul>
<li
onclick="
garganrest.metrics.update({{corpus.id}}, function(){alert('The corpus ({{corpus.name|escapejs}}) was updated')});
">
onclick="updateCorpus({{corpus.id}})">
<a href='#'>Recalculate ngram metrics</a> <br/> (can take a little while)
</li>
</ul>
...
...
@@ -139,7 +142,7 @@
{% endifequal %}
{% endfor %}
</div>
<div
class=
"col-md-3 content"
>
<div
class=
"col-md-3 content"
id=
"corpus_{{corpus.id}}_status"
>
{% for state in corpus.hyperdata.statuses %}
{% ifequal state.action "Workflow" %}
{% if state.complete %}
...
...
@@ -752,6 +755,26 @@
}
});
}
function
updateCorpus
(
corpusId
)
{
// show 'waiting'
var
statusDiv
=
document
.
getElementById
(
"corpus_"
+
corpusId
+
"_status"
)
var
previousStatus
=
statusDiv
.
innerHTML
statusDiv
.
innerHTML
=
'<img width="10%" src="{% static "img/ajax-loader.gif"%}"></img>'
// REST and callback
garganrest
.
metrics
.
update
(
corpusId
,
function
(){
statusDiv
.
innerHTML
=
'<div class="statusinfo">Corpus updated</div>'
// revert visual
setTimeout
(
function
(){
statusDiv
.
innerHTML
=
previousStatus
},
2000
);
})
}
{
%
if
donut
%
}
// Morris Donut Chart
Morris
.
Donut
({
...
...
@@ -769,6 +792,7 @@
formatter
:
function
(
y
)
{
return
y
+
"%"
}
});
{
%
endif
%
}
$
(
'#wait'
).
on
(
'hidden.bs.modal'
,
function
(
e
)
{
// reload page when dismiss the info box
window
.
location
.
reload
()
...
...
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