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
9c0a6c7e
Commit
9c0a6c7e
authored
9 years ago
by
Elias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotations Fix : ngramlist pagination buttons
parent
a3f4ab2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
ngramlist.js
annotations/static/annotations/ngramlist.js
+1
-1
main.html
annotations/templates/annotations/main.html
+2
-2
views.py
annotations/views.py
+2
-2
No files found.
annotations/static/annotations/ngramlist.js
View file @
9c0a6c7e
...
...
@@ -55,7 +55,7 @@
$scope
.
currentListPage
=
$scope
.
currentListPage
-
1
;
};
$scope
.
totalListPages
=
function
(
listId
)
{
$scope
.
totalListPages
=
function
(
listId
)
{
if
(
$rootScope
.
extraNgramList
[
listId
]
===
undefined
)
return
0
;
return
Math
.
ceil
(
$rootScope
.
extraNgramList
[
listId
].
length
/
$scope
.
pageSize
);
};
...
...
This diff is collapsed.
Click to expand it.
annotations/templates/annotations/main.html
View file @
9c0a6c7e
...
...
@@ -42,10 +42,10 @@
</li>
</ul>
<nav
ng-class=
"{invisible: totalListPages - 1 == 0}"
class=
"clearfix"
>
<nav
ng-class=
"{invisible: totalListPages
(listId)
- 1 == 0}"
class=
"clearfix"
>
<ul
class=
"pagination pagination-s pull-right words-pagination"
>
<li
ng-class=
"{'disabled': currentListPage == 0}"
><a
ng-click=
"previousListPage()"
class=
"glyphicon glyphicon-backward"
></a></li>
<li
ng-class=
"{'disabled': currentListPage >= totalListPages - 1}"
><a
ng-click=
"nextListPage()"
class=
"glyphicon glyphicon-forward"
></a></li>
<li
ng-class=
"{'disabled': currentListPage >= totalListPages
(listId)
- 1}"
><a
ng-click=
"nextListPage()"
class=
"glyphicon glyphicon-forward"
></a></li>
</ul>
</nav>
...
...
This diff is collapsed.
Click to expand it.
annotations/views.py
View file @
9c0a6c7e
...
...
@@ -79,7 +79,7 @@ class NgramEdit(APIView):
node_ngram
=
Node_Ngram
(
node_id
=
list_id
,
ngram_id
=
ngram_id
,
weight
=
1.0
)
session
.
add
(
node_ngram
)
session
.
commit
()
# return the response
return
Response
({
'uuid'
:
ngram_id
,
...
...
@@ -127,7 +127,7 @@ class NgramCreate(APIView):
session
.
commit
()
ngram_id
=
ngram
.
id
# create the new node_ngram relation
# TODO check existing ?
# TODO check existing
Node_Ngram
?
node_ngram
=
Node_Ngram
(
node_id
=
list_id
,
ngram_id
=
ngram_id
,
weight
=
1.0
)
session
.
add
(
node_ngram
)
session
.
commit
()
...
...
This diff is collapsed.
Click to expand it.
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