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
013ac43e
Commit
013ac43e
authored
Jun 16, 2015
by
Mathieu Rodic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUG] miam- and stoplist management now work from the left panel
parent
addc6e19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
app.js
annotations/static/annotations/app.js
+18
-13
main.html
annotations/templates/annotations/main.html
+12
-10
No files found.
annotations/static/annotations/app.js
View file @
013ac43e
...
...
@@ -24,18 +24,18 @@
// TODO use the tooltip ?
$scope
.
onDeleteClick
=
function
()
{
NgramHttpService
.
delete
({
'listId'
:
$scope
.
keyword
.
list_id
,
'ngramId'
:
$scope
.
keyword
.
uuid
}).
$promise
.
then
(
function
(
data
)
{
NgramListHttpService
.
get
(
{
'corpusId'
:
$rootScope
.
corpusId
,
'docId'
:
$rootScope
.
docId
}
).
$promise
.
then
(
function
(
data
)
{
$rootScope
.
annotations
=
data
[
$rootScope
.
corpusId
.
toString
()][
$rootScope
.
docId
.
toString
()]
;
$rootScope
.
lists
=
data
[
$rootScope
.
corpusId
.
toString
()][
'lists'
];
});
'listId'
:
$scope
.
keyword
.
list_id
,
'ngramId'
:
$scope
.
keyword
.
uuid
}).
$promise
.
then
(
function
(
data
)
{
$
.
each
(
$rootScope
.
annotations
,
function
(
index
,
element
)
{
if
(
element
.
list_id
==
$scope
.
keyword
.
list_id
&&
element
.
uuid
==
$scope
.
keyword
.
uuid
)
{
$rootScope
.
annotations
.
splice
(
index
,
1
);
return
false
;
}
});
});
}
;
}]);
}
}]);
window
.
annotationsApp
.
controller
(
'AnnotationController'
,
[
'$scope'
,
'$rootScope'
,
'$element'
,
...
...
@@ -324,8 +324,13 @@
$rootScope
);
console
.
log
(
$rootScope
.
annotations
.
length
);
console
.
log
(
counter
);
$
.
each
(
$rootScope
.
annotations
,
function
(
index
,
element
)
{
if
(
element
.
list_id
==
$rootScope
.
stopListId
)
{
$scope
.
extra_stoplist
.
push
(
element
);
}
else
if
(
element
.
list_id
==
$rootScope
.
miamListId
)
{
$scope
.
extra_miamlist
.
push
(
element
);
}
});
angular
.
element
(
'#full-text'
).
html
(
result
.
fullTextHtml
);
angular
.
element
(
'#abstract-text'
).
html
(
result
.
abstractTextHtml
);
...
...
annotations/templates/annotations/main.html
View file @
013ac43e
...
...
@@ -24,13 +24,13 @@
<div
class=
"row-fluid main-panel"
ng-controller=
"IntraTextController"
>
<div
class=
"col-md-4 col-xs-4 tabbable words-panel"
>
<ul
class=
"nav nav-pills nav-justified"
>
<li
class=
"active"
><a
href=
"#tab1"
data-toggle=
"tab"
>
<span
class=
"glyphicon glyphicon-tags"
></span>
Miamwords
</a></li>
<
!--<li><a href="#tab2" data-toggle="tab">Local stopwords</a></li>--
>
<li
class=
"active"
><a
href=
"#tab1"
data-toggle=
"tab"
>
Miamwords
</a></li>
<
li><a
href=
"#tab2"
data-toggle=
"tab"
>
Stopwords
</a></li
>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-pane active"
id=
"tab1"
>
<div
ng-if=
"extra_miamlist.length == 0"
class=
"alert alert-info"
role=
"alert"
>
No extra text miam-word yet
</div>
<ul
class=
"list-group words-list"
>
<div
ng-if=
"extra_miamlist.length == 0"
class=
"alert alert-info"
role=
"alert"
>
No extra text miam-word yet
</div>
<li
ng-repeat=
"keyword in extra_miamlist | startFrom:currentMiamPage*pageSize | limitTo:pageSize"
class=
"list-group-item"
>
<div
ng-controller=
"ExtraAnnotationController"
keyword-template
class=
"keyword-container"
></div>
...
...
@@ -47,22 +47,24 @@
<button
type=
"submit"
class=
"btn btn-default btn-primary"
ng-click=
"onMiamlistSubmit($event)"
>
Add
</button>
</div>
</div>
<!--<div class="tab-pane" id="tab2">
<ul class="list-group words-list clearfix">
<div ng-if="extra_stoplist.length == 0" class="alert alert-info" role="alert">No extra-text stop-word yet</div>
<li ng-repeat="keyword in extra_stoplist | startFrom:currentStopPage*pageSize | limitTo:pageSize" class="list-group-item"><div ng-controller="ExtraAnnotationController" keyword-template></div></li>
<div
class=
"tab-pane"
id=
"tab2"
>
<div
ng-if=
"extra_stoplist.length == 0"
class=
"alert alert-info"
role=
"alert"
>
No extra text stop-word yet
</div>
<ul
class=
"list-group words-list"
>
<li
ng-repeat=
"keyword in extra_stoplist | startFrom:currentStopPage*pageSize | limitTo:pageSize"
class=
"list-group-item"
>
<div
ng-controller=
"ExtraAnnotationController"
keyword-template
class=
"keyword-container"
></div>
</li>
</ul>
<nav
ng-class=
"{invisible: numStopPages() - 1 == 0}"
class=
"clearfix"
>
<ul
class=
"pagination pagination-s pull-right words-pagination"
>
<li ng-class="{disabled: currentStopPage == 0}"><a ng-click="previous
Stop
Page()" class="glyphicon glyphicon-backward"></a></li>
<li
ng-class=
"{disabled: currentStopPage == 0}"
><a
ng-click=
"previous
Miam
Page()"
class=
"glyphicon glyphicon-backward"
></a></li>
<li
ng-class=
"{disabled: currentStopPage >= numStopPages()-1}"
><a
ng-click=
"nextStopPage()"
class=
"glyphicon glyphicon-forward"
></a></li>
</ul>
</nav>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
id=
"stoplist-input"
ng-keypress=
"onStoplistSubmit($event)"
>
<button type="submit" class="btn btn-default
" ng-click="onStoplistSubmit($event)">Exclude
</button>
<button
type=
"submit"
class=
"btn btn-default
btn-primary"
ng-click=
"onStoplistSubmit($event)"
>
Add
</button>
</div>
</div>--
>
</div
>
</div>
</div>
<div
class=
"col-md-8 col-xs-8 text-panel"
ng-controller=
"DocController"
id=
"document"
>
...
...
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