From 9c5109381d1296707c2921fa6f05ce6690372f0c Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Mon, 9 Jan 2012 19:02:08 +0000 Subject: [PATCH] [graph][s]: flot graph editor help show/hide functional again. --- css/graph-flot.css | 13 +++++-------- src/view.js | 8 ++++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/css/graph-flot.css b/css/graph-flot.css index 6833dbfb..44f6fa7f 100644 --- a/css/graph-flot.css +++ b/css/graph-flot.css @@ -20,10 +20,14 @@ border-top: solid 2px #000; } -.data-graph-container .editor .editor-info { +.data-graph-container .editor-info { padding-left: 4px; } +.data-graph-container .editor-info { + cursor: pointer; +} + .data-graph-container .editor form { padding-left: 4px; } @@ -37,14 +41,7 @@ margin-bottom: 10px; } -.data-graph-container .editor-hide-info h1 span { - background-position: -36px -18px; -} - .data-graph-container .editor-hide-info p { display: none; } -.dataexplorer-tableview-hide-editor .data-graph-container .editor { - display: none; -} diff --git a/src/view.js b/src/view.js index df7b16d4..c5f3764d 100644 --- a/src/view.js +++ b/src/view.js @@ -583,12 +583,11 @@ my.FlotGraph = Backbone.View.extend({ template: ' \
\
\ -

Help

\ +

Help »

\

To create a chart select a column (group) to use as the x-axis \ then another column (Series A) to plot against it.

\

You can add add \ additional series by clicking the "Add series" button

\ -

Please note you must be logged in to save charts.

\
\
\
\ @@ -636,6 +635,7 @@ my.FlotGraph = Backbone.View.extend({ 'change form select': 'onEditorSubmit' , 'click .editor-add': 'addSeries' , 'click .action-remove-series': 'removeSeries' + , 'click .action-toggle-help': 'toggleHelp' }, initialize: function(options, chart) { @@ -752,6 +752,10 @@ my.FlotGraph = Backbone.View.extend({ this.onEditorSubmit(); }, + toggleHelp: function() { + this.el.find('.editor-info').toggleClass('editor-hide-info'); + }, + // Private: Resets the series property to reference the select elements. // // Returns itself.