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
847577ee
Commit
847577ee
authored
Jun 14, 2015
by
Elias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CSRF cookie for post and delete to work
parent
b76b6db5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
http.js
annotations/static/annotations/http.js
+6
-1
keyword_tpl.html
annotations/static/annotations/keyword_tpl.html
+2
-2
angular-cookies.min.js
...c/bower_components/angular-cookies/angular-cookies.min.js
+8
-0
No files found.
annotations/static/annotations/http.js
View file @
847577ee
(
function
()
{
(
function
()
{
'use strict'
;
'use strict'
;
var
http
=
angular
.
module
(
'annotationsAppHttp'
,
[
'ngResource'
]);
var
http
=
angular
.
module
(
'annotationsAppHttp'
,
[
'ngResource'
,
'ngCookies'
]);
http
.
config
([
'$httpProvider'
,
function
(
$httpProvider
){
$httpProvider
.
defaults
.
xsrfHeaderName
=
'X-CSRFToken'
;
$httpProvider
.
defaults
.
xsrfCookieName
=
'csrftoken'
;
}]);
/*
/*
* Read Document
* Read Document
*/
*/
...
...
annotations/static/annotations/keyword_tpl.html
View file @
847577ee
<span
ng-if=
"keyword.category == 'miamlist'"
ng-click=
'onDeleteClick()'
class=
"delete-keyword"
data-keyword-id=
"{[{keyword.uuid}]}"
data-keyword-text=
"{[{keyword.text}]}"
data-keyword-category=
"miamlist"
>
×
</span>
<span
ng-if=
"keyword.category == 'miamlist'"
ng-click=
'onDeleteClick()'
class=
"delete-keyword"
data-keyword-id=
"{[{keyword.uuid}]}"
data-keyword-text=
"{[{keyword.text}]}"
data-keyword-category=
"miamlist"
>
×
</span>
<
a
ng-if=
"keyword.category == 'miamlist'"
href=
"#"
data-toggle=
"tooltip"
class=
"keyword miamword"
>
{[{keyword.text}]}
</a
>
<
span
ng-if=
"keyword.category == 'miamlist'"
data-toggle=
"tooltip"
class=
"keyword miamword"
>
{[{keyword.text}]}
</span
>
<span
ng-if=
"keyword.category == 'stoplist'"
ng-click=
'onDeleteClick()'
class=
"delete-keyword"
data-keyword-id=
"{[{keyword.uuid}]}"
data-keyword-text=
"{[{keyword.text}]}"
data-keyword-category=
"stoplist"
>
×
</span>
<span
ng-if=
"keyword.category == 'stoplist'"
ng-click=
'onDeleteClick()'
class=
"delete-keyword"
data-keyword-id=
"{[{keyword.uuid}]}"
data-keyword-text=
"{[{keyword.text}]}"
data-keyword-category=
"stoplist"
>
×
</span>
<
a
ng-if=
"keyword.category == 'stoplist'"
href=
"#"
data-toggle=
"tooltip"
class=
"keyword stopword"
>
{[{keyword.text}]}
</a
>
<
span
ng-if=
"keyword.category == 'stoplist'"
data-toggle=
"tooltip"
class=
"keyword stopword"
>
{[{keyword.text}]}
</span
>
<span
class=
"occurrences"
data-keyword-id=
"{[{keyword.uuid}]}"
>
{[{keyword.occurrences}]}
</span>
<span
class=
"occurrences"
data-keyword-id=
"{[{keyword.uuid}]}"
>
{[{keyword.occurrences}]}
</span>
annotations/static/bower_components/angular-cookies/angular-cookies.min.js
0 → 100644
View file @
847577ee
/*
AngularJS v1.2.28
(c) 2010-2014 Google, Inc. http://angularjs.org
License: MIT
*/
(
function
(
p
,
f
,
n
){
'use strict'
;
f
.
module
(
"ngCookies"
,[
"ng"
]).
factory
(
"$cookies"
,[
"$rootScope"
,
"$browser"
,
function
(
e
,
b
){
var
c
=
{},
g
=
{},
h
,
k
=!
1
,
l
=
f
.
copy
,
m
=
f
.
isUndefined
;
b
.
addPollFn
(
function
(){
var
a
=
b
.
cookies
();
h
!=
a
&&
(
h
=
a
,
l
(
a
,
g
),
l
(
a
,
c
),
k
&&
e
.
$apply
())})();
k
=!
0
;
e
.
$watch
(
function
(){
var
a
,
d
,
e
;
for
(
a
in
g
)
m
(
c
[
a
])
&&
b
.
cookies
(
a
,
n
);
for
(
a
in
c
)
d
=
c
[
a
],
f
.
isString
(
d
)
||
(
d
=
""
+
d
,
c
[
a
]
=
d
),
d
!==
g
[
a
]
&&
(
b
.
cookies
(
a
,
d
),
e
=!
0
);
if
(
e
)
for
(
a
in
d
=
b
.
cookies
(),
c
)
c
[
a
]
!==
d
[
a
]
&&
(
m
(
d
[
a
])?
delete
c
[
a
]:
c
[
a
]
=
d
[
a
])});
return
c
}]).
factory
(
"$cookieStore"
,
[
"$cookies"
,
function
(
e
){
return
{
get
:
function
(
b
){
return
(
b
=
e
[
b
])?
f
.
fromJson
(
b
):
b
},
put
:
function
(
b
,
c
){
e
[
b
]
=
f
.
toJson
(
c
)},
remove
:
function
(
b
){
delete
e
[
b
]}}}])})(
window
,
window
.
angular
);
//# sourceMappingURL=angular-cookies.min.js.map
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