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
3fa796f5
Commit
3fa796f5
authored
Jul 26, 2015
by
Elias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotations : added a Favorite controller, no backend
parent
c2c84b8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
activelists.js
annotations/static/annotations/activelists.js
+0
-1
app.css
annotations/static/annotations/app.css
+5
-1
document.js
annotations/static/annotations/document.js
+12
-0
main.html
annotations/templates/annotations/main.html
+9
-6
No files found.
annotations/static/annotations/activelists.js
View file @
3fa796f5
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
$
(
'.selectpicker'
).
selectpicker
();
$
(
'.selectpicker'
).
selectpicker
();
$
(
'.selectpicker'
).
selectpicker
(
'val'
,
[
'MiamList'
]);
$
(
'.selectpicker'
).
selectpicker
(
'val'
,
[
'MiamList'
]);
});
});
console
.
log
(
$rootScope
.
allListsSelect
);
});
});
}]);
}]);
...
...
annotations/static/annotations/app.css
View file @
3fa796f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/*
/*
* Class names corresponding to server-side list names
* Class names corresponding to server-side list names
* To display another list name,
please
add a new class under this
* To display another list name, add a new class under this
*/
*/
...
@@ -148,3 +148,7 @@
...
@@ -148,3 +148,7 @@
border-right
:
solid
thin
#CCC
;
border-right
:
solid
thin
#CCC
;
margin-right
:
5px
;
margin-right
:
5px
;
}
}
.float-right
{
float
:
right
;
}
annotations/static/annotations/document.js
View file @
3fa796f5
...
@@ -28,8 +28,12 @@
...
@@ -28,8 +28,12 @@
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
;
},
function
(
data
)
{
console
.
error
(
"unable to get the list of ngrams"
);
}
}
);
);
});
});
// TODO setup article pagination
// TODO setup article pagination
$scope
.
onPreviousClick
=
function
()
{
$scope
.
onPreviousClick
=
function
()
{
...
@@ -40,5 +44,13 @@
...
@@ -40,5 +44,13 @@
};
};
}]);
}]);
annotationsAppDocument
.
controller
(
'DocFavoriteController'
,
[
'$scope'
,
'$rootScope'
,
'DocumentHttpService'
,
function
(
$scope
,
$rootScope
,
DocumentHttpService
)
{
$scope
.
onStarClick
=
function
(
$event
)
{
console
.
log
(
"TODO"
);
};
$scope
.
isFavorite
=
false
;
}]);
})(
window
);
})(
window
);
annotations/templates/annotations/main.html
View file @
3fa796f5
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</head>
</head>
<body>
<body>
<!-- TODO integrate this later into the any other django template -->
<!-- TODO integrate this later into the any other django template -->
<div
id=
"annotationsApp"
>
<div
id=
"annotationsApp"
ng-cloak
>
<div
class=
"container-fluid"
>
<div
class=
"container-fluid"
>
<div
class=
"row-fluid main-panel"
ng-controller=
"NGramHighlightController"
>
<div
class=
"row-fluid main-panel"
ng-controller=
"NGramHighlightController"
>
<div
class=
"col-md-4 col-xs-4 tabbable words-panel"
>
<div
class=
"col-md-4 col-xs-4 tabbable words-panel"
>
...
@@ -44,8 +44,8 @@
...
@@ -44,8 +44,8 @@
<nav
ng-class=
"{invisible: totalListPages - 1 == 0}"
class=
"clearfix"
>
<nav
ng-class=
"{invisible: totalListPages - 1 == 0}"
class=
"clearfix"
>
<ul
class=
"pagination pagination-s pull-right words-pagination"
>
<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 == 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 - 1}"
><a
ng-click=
"nextListPage()"
class=
"glyphicon glyphicon-forward"
></a></li>
</ul>
</ul>
</nav>
</nav>
...
@@ -67,13 +67,16 @@
...
@@ -67,13 +67,16 @@
<div
class=
"col-md-7 col-xs-7"
>
<div
class=
"col-md-7 col-xs-7"
>
<h3
class=
"text-container"
id=
"title"
>
{[{title}]}
</h3>
<h3
class=
"text-container"
id=
"title"
>
{[{title}]}
</h3>
</div>
</div>
<div
class=
"col-md-5 col-xs-5"
>
<div
class=
"col-md-5 col-xs-5 clearfix"
>
<nav>
<button
ng-controller=
"DocFavoriteController"
type=
"button"
class=
"btn btn-default float-right"
ng-click=
"onStarClick($event)"
>
<span
class=
"glyphicon"
ng-class=
"{'glyphicon-star-empty': isFavorite == false, 'glyphicon-star': isFavorite == true}"
></span>
</button>
<!--<nav>
<ul class="pager">
<ul class="pager">
<li ng-if="current_page_number > 1"><a ng-click="onPreviousClick()" href="#">Previous</a></li>
<li ng-if="current_page_number > 1"><a ng-click="onPreviousClick()" href="#">Previous</a></li>
<li ng-if="current_page_number < last_page_number"><a ng-click="onNextClick()" href="#">Next</a></li>
<li ng-if="current_page_number < last_page_number"><a ng-click="onNextClick()" href="#">Next</a></li>
</ul>
</ul>
</nav
>
</nav>--
>
</div>
</div>
</div>
</div>
<div
class=
"row-fluid cleafix"
>
<div
class=
"row-fluid cleafix"
>
...
...
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