Commit c71984ec authored by delanoe's avatar delanoe

Merge remote-tracking branch 'origin/romain-testing' into testing-merge

parents e42e2b8d 5a20429b
...@@ -2,7 +2,7 @@ from gargantext.util.http import requires_auth, render, settings ...@@ -2,7 +2,7 @@ from gargantext.util.http import requires_auth, render, settings
from gargantext.util.db import session from gargantext.util.db import session
from gargantext.util.db_cache import cache from gargantext.util.db_cache import cache
from gargantext.models import Node from gargantext.models import Node
from gargantext.constants import get_resource_by_name from gargantext.constants import get_resource
from datetime import datetime from datetime import datetime
@requires_auth @requires_auth
...@@ -31,6 +31,7 @@ def ngramtable(request, project_id, corpus_id): ...@@ -31,6 +31,7 @@ def ngramtable(request, project_id, corpus_id):
# .filter(Node.id != corpus_id) # .filter(Node.id != corpus_id)
corpora_infos = corpora_infos_q.all() corpora_infos = corpora_infos_q.all()
source_type = corpus.resources()[0]['type']
# rendered page : terms.html # rendered page : terms.html
return render( return render(
...@@ -42,7 +43,7 @@ def ngramtable(request, project_id, corpus_id): ...@@ -42,7 +43,7 @@ def ngramtable(request, project_id, corpus_id):
'date': datetime.now(), 'date': datetime.now(),
'project': project, 'project': project,
'corpus' : corpus, 'corpus' : corpus,
'resourcename' : get_resource_by_name(corpus), 'resourcename' : get_resource(source_type)['name'],
'view': 'terms', 'view': 'terms',
# for the CSV import modal # for the CSV import modal
......
...@@ -418,15 +418,14 @@ function Main_test( data , initial) { ...@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -524,16 +524,16 @@ function Main_test(Data) { ...@@ -524,16 +524,16 @@ function Main_test(Data) {
.xUnits(d3.time.months) .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
moveChart.filter(chart.filter());
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
console.log("chart.filter()") console.log("chart.filter()")
console.log(chart.filter()) console.log(chartfilt)
Push2Buffer ( chart.filter() ) Push2Buffer (chartfilt)
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -2187,15 +2187,14 @@ function MainTableAndCharts( ngdata , initial , search_filter) { ...@@ -2187,15 +2187,14 @@ function MainTableAndCharts( ngdata , initial , search_filter) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
// console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
...@@ -418,15 +418,14 @@ function Main_test( data , initial) { ...@@ -418,15 +418,14 @@ function Main_test( data , initial) {
// // .xUnits(d3.time.months) // // .xUnits(d3.time.months)
.renderlet(function (chart) { .renderlet(function (chart) {
chart.select("g.y").style("display", "none"); chart.select("g.y").style("display", "none");
LineChart.filter(chart.filter());
console.log("lalaal moveChart.focus(chartfilt);")
}) })
.on("filtered", function (chart) { .on("filtered", function (chart) {
dc.events.trigger(function () { dc.events.trigger(function () {
var chartfilt = chart.filter() var chartfilt = chart.filter()
console.log("lalaal move chart", chartfilt)
// tricky part: identifying when the moveChart changes. // tricky part: identifying when the moveChart changes.
if(chartfilt) { if(chartfilt) {
Push2Buffer ( chart.filter() ) Push2Buffer ( chartfilt )
} else { } else {
if(TheBuffer) { if(TheBuffer) {
Push2Buffer ( false ) Push2Buffer ( false )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment