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
59e64601
Commit
59e64601
authored
Aug 11, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Unkludge the kludgy kludge
parent
791c196e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
http.py
gargantext/util/http.py
+2
-1
project.html
templates/pages/projects/project.html
+24
-25
No files found.
gargantext/util/http.py
View file @
59e64601
...
@@ -73,7 +73,8 @@ from rest_framework.views import APIView
...
@@ -73,7 +73,8 @@ from rest_framework.views import APIView
from
gargantext.util.json
import
json_encoder
from
gargantext.util.json
import
json_encoder
def
JsonHttpResponse
(
data
,
status
=
200
):
def
JsonHttpResponse
(
data
,
status
=
200
):
return
HttpResponse
(
return
HttpResponse
(
content
=
json_encoder
.
encode
(
data
),
content
=
data
.
encode
(
'utf-8'
)
if
isinstance
(
data
,
str
)
else
\
json_encoder
.
encode
(
data
),
content_type
=
'application/json; charset=utf-8'
,
content_type
=
'application/json; charset=utf-8'
,
status
=
status
status
=
status
)
)
...
...
templates/pages/projects/project.html
View file @
59e64601
...
@@ -532,7 +532,7 @@
...
@@ -532,7 +532,7 @@
$
(
"#submit_thing"
).
html
(
"Process a {{ query_size }} sample!"
)
$
(
"#submit_thing"
).
html
(
"Process a {{ query_size }} sample!"
)
thequeries
=
data
thequeries
=
data
var
N
=
0
,
k
=
0
;
var
N
=
0
;
for
(
var
i
in
thequeries
)
N
+=
thequeries
[
i
].
count
for
(
var
i
in
thequeries
)
N
+=
thequeries
[
i
].
count
if
(
N
>
0
)
{
if
(
N
>
0
)
{
...
@@ -571,12 +571,11 @@
...
@@ -571,12 +571,11 @@
$
(
"#submit_thing"
).
html
(
"Process a {{ query_size }} sample!"
)
$
(
"#submit_thing"
).
html
(
"Process a {{ query_size }} sample!"
)
thequeries
=
data
thequeries
=
data
var
N
=
data
.
length
,
k
=
0
;
var
N
=
data
.
total
;
// for(var i in thequeries) N += thequeries[i].count
if
(
N
>
1
)
{
if
(
N
>
0
)
{
var
total
=
JSON
.
parse
(
data
).
total
console
.
log
(
"N: "
+
N
)
console
.
log
(
"N: "
+
total
)
$
(
"#theresults"
).
html
(
"<i> <b>"
+
pubmedquery
+
"</b>: "
+
N
+
" publications.</i><br>"
)
$
(
"#theresults"
).
html
(
"<i> <b>"
+
pubmedquery
+
"</b>: "
+
total
+
" publications.</i><br>"
)
$
(
'#submit_thing'
).
prop
(
'disabled'
,
false
);
$
(
'#submit_thing'
).
prop
(
'disabled'
,
false
);
}
else
{
}
else
{
$
(
"#theresults"
).
html
(
"<i> <b>"
+
data
[
0
]
+
"</b></i><br>"
)
$
(
"#theresults"
).
html
(
"<i> <b>"
+
data
[
0
]
+
"</b></i><br>"
)
...
...
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