From 4914570c6d1a1492ad1330df80116c2ad5ad93a1 Mon Sep 17 00:00:00 2001 From: dsc Date: Thu, 29 Mar 2012 14:11:46 -0700 Subject: [PATCH] Fixes buttons. --- docs/todo.md | 9 ++++----- lib/graph/graph-edit-view.co | 2 +- lib/template/graph-edit.jade | 20 ++++++++++++++++---- www/css/graph.styl | 11 +++++++++-- www/css/text.styl | 14 +++++++------- www/graph/edit.jade | 2 +- 6 files changed, 38 insertions(+), 20 deletions(-) diff --git a/docs/todo.md b/docs/todo.md index 08d4758..754b112 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -13,9 +13,9 @@ - (Date range selector & scrubber?) - Metric Presentation: color, label, formatting, and transform (low-pri -- can hardcode for now) - [Graph Edit UI] - - Redraw button - - Tabbed main container - - Add new tags + tag for "common"/"important" options + - Add option for a "Benchmark Value" on the graph + - Annotations + - Tag options with "advanced", make modal UI - List tags to toggle all matching options - (work beyond here is low-pri) - non-lib option: redraw graph on page resize @@ -25,11 +25,9 @@ - Reset all options to defaults - Outline modified options - Save to server - - Add option for a "Benchmark Value" on the graph ### later -- Add cascade (presets) to graph options - [Graph Edit UI] - Filter/Sort attributes, datasets, etc - Outline all changed options @@ -41,6 +39,7 @@ ## features +- Graphs should have tags - Ability to merge & filter datasets - Discoverable & Self-Describing Data Sources - ToC endpoint diff --git a/lib/graph/graph-edit-view.co b/lib/graph/graph-edit-view.co index 7957699..dfcbbe0 100644 --- a/lib/graph/graph-edit-view.co +++ b/lib/graph/graph-edit-view.co @@ -236,7 +236,7 @@ GraphEditView = exports.GraphEditView = BaseView.extend do # {{{ */ updateURL: -> data = @toJSON() - title = @model.get('name', root.document?.title or '') + title = "#{@model.get('name') or 'New Graph'} | Edit Graph | GraphKit" url = @toURL() # console.log 'History.pushState', JSON.stringify(data), title, url History.pushState data, title, url diff --git a/lib/template/graph-edit.jade b/lib/template/graph-edit.jade index 7601f63..77fb81b 100644 --- a/lib/template/graph-edit.jade +++ b/lib/template/graph-edit.jade @@ -15,15 +15,27 @@ section.graph.graph-edit(id=graph_id) .graph-settings.tabbable //- nav.navbar: div.navbar-inner: div.container nav + .graph-controls.pull-right + .btn-group + a.redraw-button.btn(href="#") + i.icon-refresh + | Redraw + .btn-group + a.load-button.btn(href="#") + i.icon-download + | Revert + a.save-button.btn(href="#") + i.icon-upload + | Save + a.done-button.btn-primary.btn(href="#") + i.icon-ok-sign.icon-white + | Done ul.nav.subnav.nav-pills li: h3 Graph li.active: a(href="#graph-#{graph_id}-info", data-toggle="tab") Info li: a(href="#graph-#{graph_id}-data", data-toggle="tab") Data li: a.graph-options-tab(href="#graph-#{graph_id}-options", data-toggle="tab") Options - li.graph-controls - input.redraw-button.btn(type="button", value="Redraw") - input.load-button.btn(type="button", value="Load") - input.save-button.btn-success(type="button", value="Save") + .tab-content .graph-info-pane.tab-pane.active(id="graph-#{graph_id}-info") diff --git a/www/css/graph.styl b/www/css/graph.styl index 5df372f..194e754 100644 --- a/www/css/graph.styl +++ b/www/css/graph.styl @@ -62,12 +62,19 @@ section.graph padding 0.5em .graph-controls - float right + z-index 100 + margin-top 2px + + & > .btn, & > .btn-group + margin 0 0.5em + + .btn-group + display inline-block input[type="button"] min-width 5em - margin 0 0.5em text-align center + /* * * * Graph Details * * * {{{ */ diff --git a/www/css/text.styl b/www/css/text.styl index 3bcf9d7..65f5829 100644 --- a/www/css/text.styl +++ b/www/css/text.styl @@ -12,18 +12,18 @@ html, body color $body_text background-color $foot_bgcolor -a, a:link, a:visited, a:active - color $body_link - text-decoration underline - &:hover - text-decoration none +// a:not(.btn) +// color $body_link +// text-decoration underline +// &:hover +// text-decoration none h1, h2, h3 font-family $fonts_headers color $body_text font-weight 300 - a, a:link, a:visited, a:active + a:not(.btn) color $body_text text-decoration none &:hover @@ -32,7 +32,7 @@ h1, h2, h3 footer color $foot_text - a, a:link, a:visited, a:active + a:not(.btn) color $foot_link diff --git a/www/graph/edit.jade b/www/graph/edit.jade index 73b1bf2..7179a65 100644 --- a/www/graph/edit.jade +++ b/www/graph/edit.jade @@ -1,7 +1,7 @@ extends ../layout block title - title Kraken: Graph Test Page + title Edit Graph | GraphKit append styles mixin css('graph.css') -- 1.7.0.4