From 8ffad333ddd8590290e36c9799003e96595c01f7 Mon Sep 17 00:00:00 2001 From: Hernan Badenes Date: Mon, 14 Sep 2015 19:23:12 -0300 Subject: [PATCH 1/3] passing context to api --- public/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 2121c65f..faadf4bb 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -296,8 +296,8 @@ $(document).ready(function() { data: { word: word, limit: SYNONYM_LIMITS, -// context: cntxt.context, -// index: cntxt.offset, + context: cntxt.context.join(' '), + index: cntxt.offset, hops: SYNONYM_HOPS }, url: 'synonyms', From 10bda70983f1e4dec61f08fd9dd5641715f79262 Mon Sep 17 00:00:00 2001 From: LIANG GOU Date: Tue, 15 Sep 2015 01:04:10 -0700 Subject: [PATCH 2/3] switch count and percentile tab --- public/js/index.js | 2 +- views/index.jade | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index faadf4bb..e6374590 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -37,7 +37,7 @@ var toneGenomeViz = new umviz.models.toneGenome() .width(880) .height(190) .margin({ top: -15, right: 50, bottom: 100, left: 45 }) - .layoutMetric('count') + .layoutMetric('percentile') .colorSchema(COLOR_SCHEMA); // Visualization container diff --git a/views/index.jade b/views/index.jade index f95bbcaa..dfa6932a 100755 --- a/views/index.jade +++ b/views/index.jade @@ -66,13 +66,13 @@ block row-content div.form-group.row div.col-lg-12.col-md-12.col-sm-12 div.tab-content - div.tab-pane.active(id="wordcount", role="tabpanel") - p Word Count returns the percentage of words per tone - | and the total number of words for each individual - | tone trait. div.tab-pane(id="percentile", role="tabpanel") p Percentile compares the raw output score to a preset scorecard. | For this demo the scorecard is Business Email. + div.tab-pane.active(id="wordcount", role="tabpanel") + p Word Count returns the percentage of words per tone + | and the total number of words for each individual + | tone trait. div.tab-pane(id="json", role="tabpanel") pre.json-div div#visualization From 164daaf9b78eeb48a073956afdfb1f23679ed0cc Mon Sep 17 00:00:00 2001 From: LIANG GOU Date: Tue, 15 Sep 2015 01:22:39 -0700 Subject: [PATCH 3/3] switch count and percentile tab --- views/index.jade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/index.jade b/views/index.jade index dfa6932a..bde254e0 100755 --- a/views/index.jade +++ b/views/index.jade @@ -53,11 +53,11 @@ block row-content div(role="tabpanel") ul.nav.nav-tabs(role="tablist") li.active(role="presentation") - a.metric-count(href="#wordcount", aria-controls="count", role="tab" data-toggle="tab") - | Word Count - li(role="presentation") a.metric-percentile(href="#percentile", aria-controls="percentile", role="tab", data-toggle="tab") | Percentile + li(role="presentation") + a.metric-count(href="#wordcount", aria-controls="count", role="tab" data-toggle="tab") + | Word Count li(role="presentation") a(href="#json", aria-controls="json", role="tab" data-toggle="tab") | JSON