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
90bbffd7
Commit
90bbffd7
authored
Dec 14, 2015
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] indicateur d'attente dataLoading dans la vue document
parent
b0c572d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
document.js
annotations/static/annotations/document.js
+6
-1
main.html
annotations/templates/annotations/main.html
+10
-0
No files found.
annotations/static/annotations/document.js
View file @
90bbffd7
...
@@ -2,10 +2,13 @@
...
@@ -2,10 +2,13 @@
'use strict'
;
'use strict'
;
var
annotationsAppDocument
=
angular
.
module
(
'annotationsAppDocument'
,
[
'annotationsAppHttp'
]);
var
annotationsAppDocument
=
angular
.
module
(
'annotationsAppDocument'
,
[
'annotationsAppHttp'
]);
annotationsAppDocument
.
controller
(
'DocController'
,
annotationsAppDocument
.
controller
(
'DocController'
,
[
'$scope'
,
'$rootScope'
,
'$timeout'
,
'NgramListHttpService'
,
'DocumentHttpService'
,
[
'$scope'
,
'$rootScope'
,
'$timeout'
,
'NgramListHttpService'
,
'DocumentHttpService'
,
function
(
$scope
,
$rootScope
,
$timeout
,
NgramListHttpService
,
DocumentHttpService
)
{
function
(
$scope
,
$rootScope
,
$timeout
,
NgramListHttpService
,
DocumentHttpService
)
{
// dataLoading = signal pour afficher wait
$scope
.
dataLoading
=
true
;
$rootScope
.
documentResource
=
DocumentHttpService
.
get
(
$rootScope
.
documentResource
=
DocumentHttpService
.
get
(
{
'docId'
:
$rootScope
.
docId
},
{
'docId'
:
$rootScope
.
docId
},
function
(
data
,
responseHeaders
)
{
function
(
data
,
responseHeaders
)
{
...
@@ -27,6 +30,7 @@
...
@@ -27,6 +30,7 @@
function
(
data
)
{
function
(
data
)
{
$rootScope
.
annotations
=
data
[
$rootScope
.
corpusId
.
toString
()][
$rootScope
.
docId
.
toString
()];
$rootScope
.
annotations
=
data
[
$rootScope
.
corpusId
.
toString
()][
$rootScope
.
docId
.
toString
()];
$rootScope
.
lists
=
data
[
$rootScope
.
corpusId
.
toString
()].
lists
;
$rootScope
.
lists
=
data
[
$rootScope
.
corpusId
.
toString
()].
lists
;
$scope
.
dataLoading
=
false
;
},
},
function
(
data
)
{
function
(
data
)
{
console
.
error
(
"unable to get the list of ngrams"
);
console
.
error
(
"unable to get the list of ngrams"
);
...
@@ -34,6 +38,7 @@
...
@@ -34,6 +38,7 @@
);
);
});
});
// TODO setup article pagination
// TODO setup article pagination
$scope
.
onPreviousClick
=
function
()
{
$scope
.
onPreviousClick
=
function
()
{
DocumentHttpService
.
get
(
$scope
.
docId
-
1
);
DocumentHttpService
.
get
(
$scope
.
docId
-
1
);
...
...
annotations/templates/annotations/main.html
View file @
90bbffd7
...
@@ -86,6 +86,16 @@
...
@@ -86,6 +86,16 @@
<li
class=
"list-group-item small"
><span
class=
"badge"
>
date
</span>
{[{publication_date}]}
</li>
<li
class=
"list-group-item small"
><span
class=
"badge"
>
date
</span>
{[{publication_date}]}
</li>
</ul>
</ul>
</div>
</div>
<div
ng-if=
"dataLoading"
>
Loading text...
<br>
<center>
<img
width=
"10%"
src=
"{% static 'img/ajax-loader.gif'%}"
></img>
</center>
<br>
</div>
<div
ng-if=
"abstract_text != null"
>
<div
ng-if=
"abstract_text != null"
>
<span
class=
"badge"
>
abstract
</span>
<span
class=
"badge"
>
abstract
</span>
</div>
</div>
...
...
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