[graph][s]: flot graph editor help show/hide functional again.

This commit is contained in:
Rufus Pollock 2012-01-09 19:02:08 +00:00
parent 07a324cc2d
commit 9c5109381d
2 changed files with 11 additions and 10 deletions

View File

@ -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;
}

View File

@ -583,12 +583,11 @@ my.FlotGraph = Backbone.View.extend({
template: ' \
<div class="editor"> \
<div class="editor-info editor-hide-info"> \
<h3>Help</h3> \
<h3 class="action-toggle-help">Help &raquo;</h3> \
<p>To create a chart select a column (group) to use as the x-axis \
then another column (Series A) to plot against it.</p> \
<p>You can add add \
additional series by clicking the "Add series" button</p> \
<p>Please note you must be logged in to save charts.</p> \
</div> \
<form class="form-stacked"> \
<div class="clearfix"> \
@ -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.