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
dd049cd0
Commit
dd049cd0
authored
Apr 08, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX bug with time period reset on titles.html volume chart
parent
90bb3688
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
Docs_dyna_chart_and_table.js
static/js/gargantext/Docs_dyna_chart_and_table.js
+7
-13
titles.html
templates/pages/corpora/titles.html
+1
-1
No files found.
static/js/gargantext/Docs_dyna_chart_and_table.js
View file @
dd049cd0
...
...
@@ -33,15 +33,9 @@ var latest,oldest;
var
TheBuffer
=
false
function
Push2Buffer
(
NewVal
)
{
console
.
log
(
" = = = = = = = = "
)
console
.
log
(
"Push2Buffer()"
)
console
.
log
(
"
\
t"
+
NewVal
)
if
(
TheBuffer
==
false
)
{
if
(
!
NewVal
)
{
// var limits = [ new Date( oldest[0],oldest[1],oldest[2] ) , new Date( latest[0],latest[1],latest[2] ) ];
var
limits
=
[
new
Date
(
oldest
[
0
],
oldest
[
1
]
-
1
,
oldest
[
2
]),
new
Date
(
latest
[
0
],
latest
[
1
]
-
1
,
latest
[
2
]
)
];
limits
[
0
]
=
new
Date
(
limits
[
0
].
setDate
(
limits
[
0
].
getDate
()
-
1
)
);
limits
[
1
]
=
new
Date
(
limits
[
1
].
setDate
(
limits
[
1
].
getDate
()
+
1
)
);
var
limits
=
[
oldest
,
latest
];
NewVal
=
limits
;
}
console
.
log
(
" - - - - - - "
)
...
...
@@ -57,9 +51,7 @@ function Push2Buffer( NewVal ) {
var
past
=
TheBuffer
[
0
]
+
"_"
+
TheBuffer
[
1
]
if
(
!
NewVal
)
{
var
limits
=
[
new
Date
(
oldest
[
0
],
oldest
[
1
]
-
1
,
oldest
[
2
]),
new
Date
(
latest
[
0
],
latest
[
1
]
-
1
,
latest
[
2
]
)
];
limits
[
0
]
=
new
Date
(
limits
[
0
].
setDate
(
limits
[
0
].
getDate
()
-
1
)
);
limits
[
1
]
=
new
Date
(
limits
[
1
].
setDate
(
limits
[
1
].
getDate
()
+
1
)
);
var
limits
=
[
oldest
,
latest
];
NewVal
=
limits
;
}
var
now
=
NewVal
[
0
]
+
"_"
+
NewVal
[
1
]
...
...
@@ -101,18 +93,19 @@ function Final_UpdateTable( action ) {
var
dataini
=
TheBuffer
[
0
];
var
datafin
=
TheBuffer
[
1
];
pr
(
"show me the pubs of the selected period"
)
console
.
log
(
TheBuffer
)
//
console.log( TheBuffer )
pr
(
"
\
tfrom ["
+
dataini
+
"] to ["
+
datafin
+
"]"
)
TimeRange
=
[]
console
.
log
(
dataini
,
datafin
)
// console.log("dataini, datafin")
// console.log(dataini, datafin)
$
.
each
(
AjaxRecords
,
function
(
i
,
node
)
{
if
(
node
.
date
>=
dataini
&&
node
.
date
>=
dataini
)
{
// pr( AjaxRecords[i].date+" : "+AjaxRecords[i].id )
TimeRange
.
push
(
node
);
}
});
console
.
log
(
TimeRange
)
//
console.log(TimeRange)
MyTable
=
$
(
'#my-ajax-table'
).
dynatable
({
dataset
:
{
...
...
@@ -307,6 +300,7 @@ function Main_test( Data , SearchFilter ) {
var
t1
=
get_node_date
(
AjaxRecords
.
slice
(
-
1
)[
0
]);
oldest
=
t0
;
latest
=
t1
;
console
.
log
(
't0, t1'
)
console
.
log
(
t0
,
t1
)
TheBuffer
=
[
t0
,
t1
];
...
...
templates/pages/corpora/titles.html
View file @
dd049cd0
...
...
@@ -32,7 +32,7 @@
</center>
</div>
</div>
<div
class=
"row"
>
<div
id=
"monthly-volume-chart"
></div>
</div>
...
...
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