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
2e4d3972
Commit
2e4d3972
authored
9 years ago
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for minor reload problems
parent
08999931
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
http.py
gargantext/util/http.py
+15
-2
NGrams_dyna_chart_and_table.js
static/lib/gargantext/NGrams_dyna_chart_and_table.js
+0
-11
project.html
templates/pages/projects/project.html
+4
-4
No files found.
gargantext/util/http.py
View file @
2e4d3972
...
...
@@ -7,7 +7,7 @@ from django import forms
from
urllib.parse
import
quote_plus
as
urlencode
from
gargantext
import
settings
from
sqlalchemy.orm.exc
import
DetachedInstanceError
# authentication
...
...
@@ -19,7 +19,20 @@ def requires_auth(func):
if
not
request
.
user
.
is_authenticated
():
url
=
'/auth/login/?next=
%
s'
%
urlencode
(
request
.
path
)
return
redirect
(
url
)
return
func
(
request
,
*
args
,
**
kwargs
)
try
:
# normal return the subfunction when user ok
return
func
(
request
,
*
args
,
**
kwargs
)
except
DetachedInstanceError
as
die
:
print
(
"===
\n
"
*
10
)
print
(
die
)
print
(
"===
\n
"
*
10
)
# user was authenticated but something made it expire (session.commit ?)
session
.
rollback
()
# and relogin for safety
url
=
'/auth/login/?next=
%
s'
%
urlencode
(
request
.
path
)
return
redirect
(
url
)
return
_requires_auth
...
...
This diff is collapsed.
Click to expand it.
static/lib/gargantext/NGrams_dyna_chart_and_table.js
View file @
2e4d3972
...
...
@@ -2243,15 +2243,4 @@ function AfterAjax(sourceUrl) {
$
(
"#content_loader"
).
remove
()
$
(
".nav-tabs a"
).
click
(
function
(
e
){
e
.
preventDefault
();
$
(
this
).
tab
(
'show'
);
});
$
(
'.nav-tabs a'
).
on
(
'shown.bs.tab'
,
function
(
event
){
var
x
=
$
(
event
.
target
).
text
();
// active tab
var
y
=
$
(
event
.
relatedTarget
).
text
();
// previous tab
$
(
".act span"
).
text
(
x
);
$
(
".prev span"
).
text
(
y
);
});
}
This diff is collapsed.
Click to expand it.
templates/pages/projects/project.html
View file @
2e4d3972
...
...
@@ -117,7 +117,7 @@
{% endif %}
{% endifequal %}
{% endfor %}
<button
type=
"button"
class=
"btn btn-default"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-content=
"
<ul>
...
...
@@ -307,7 +307,7 @@
},
success
:
function
(
data
)
{
console
.
log
(
"in doTheQuery() Ajax.Success:"
)
console
.
log
(
data
)
//
console.log(data)
setTimeout
(
function
()
{
location
.
reload
();
...
...
@@ -380,7 +380,7 @@
success
:
function
(
data
)
{
console
.
log
(
"SUCCESS"
)
console
.
log
(
"in getGlobalResults"
)
console
.
log
(
data
)
//
console.log(data)
console
.
log
(
"enabling "
+
"#"
+
value
.
id
)
$
(
"#"
+
value
.
id
).
attr
(
'onclick'
,
'getGlobalResults(this);'
);
// $("#submit_thing").prop('disabled' , false)
...
...
@@ -551,7 +551,7 @@
},
success
:
function
(
data
)
{
console
.
log
(
"ajax_success: in testISTEX()"
)
console
.
log
(
data
)
//
console.log(data)
setTimeout
(
function
()
{
location
.
reload
();
...
...
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