From 0466d14a0d286e2bd9150c7c772da1c3f8e25c6c Mon Sep 17 00:00:00 2001 From: dsc Date: Thu, 29 Mar 2012 14:11:46 -0700 Subject: [PATCH] Fixes buttons. --- 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 +- 5 files changed, 34 insertions(+), 15 deletions(-) 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