From 7340a69fe6da9acd34d97bfb584f442777149c4e Mon Sep 17 00:00:00 2001 From: Richard Harding Date: Thu, 29 Mar 2012 19:08:10 -0400 Subject: [PATCH] Add icons to the nav and for invite notification, fix the events in invite view --- bookie/static/css/base.scss | 13 ++++++++++ bookie/static/js/bookie/view.js | 10 ++++---- bookie/templates/accounts/index.mako | 3 +-- bookie/templates/bmark/func.mako | 2 -- bookie/templates/jstpl.mako | 6 ++++- bookie/templates/main_wrap.mako | 36 ++++++++++++++++++++++++---- combo.py | 5 ++-- 7 files changed, 58 insertions(+), 17 deletions(-) diff --git a/bookie/static/css/base.scss b/bookie/static/css/base.scss index 50af0b8a..10e93887 100644 --- a/bookie/static/css/base.scss +++ b/bookie/static/css/base.scss @@ -35,6 +35,10 @@ em.icon { position: absolute; } +.navigation .icon { + padding: 0; +} + @mixin cabin() { font-family: 'Cabin', sans-serif; } @@ -132,6 +136,10 @@ a { display: inline; float: right; + span { + margin: 0 .3em; + } + a { text-decoration: none; } @@ -310,6 +318,11 @@ form { margin-bottom: .3em; color: black; + .icon { + color: black; + font-size: 16px; + } + &:hover { cursor: hand; } diff --git a/bookie/static/js/bookie/view.js b/bookie/static/js/bookie/view.js index 0be27a43..224b20d0 100644 --- a/bookie/static/js/bookie/view.js +++ b/bookie/static/js/bookie/view.js @@ -1012,10 +1012,10 @@ YUI.add('bookie-view', function (Y) { 'input#send_invite': { click: 'invite' }, - '.invite_container form': { + 'form': { submit: 'kill' }, - '#invite_heading': { + '.heading': { click: '_toggle_container' } }, @@ -1102,7 +1102,7 @@ YUI.add('bookie-view', function (Y) { }, render: function () { - return this.ctpl(this.get('user')); + this.get('container').setContent(this.ctpl(this.get('user'))); }, /** @@ -1139,9 +1139,7 @@ YUI.add('bookie-view', function (Y) { }, container: { - valueFn: function () { - return Y.one('#invite_container'); - } + value: '#invite_container' }, /** diff --git a/bookie/templates/accounts/index.mako b/bookie/templates/accounts/index.mako index 8aa08888..7d63d574 100644 --- a/bookie/templates/accounts/index.mako +++ b/bookie/templates/accounts/index.mako @@ -118,8 +118,7 @@ ${password_reset(user, reset=False)} invite_ct: ${user.invite_ct} } }); - - Y.one('#invite_container').setContent(invite_view.render()); + invite_view.render(); % endif }); }); diff --git a/bookie/templates/bmark/func.mako b/bookie/templates/bmark/func.mako index bfae4abc..8c07566a 100644 --- a/bookie/templates/bmark/func.mako +++ b/bookie/templates/bmark/func.mako @@ -46,5 +46,3 @@ pager.set('page', ${page}); % endif - - diff --git a/bookie/templates/jstpl.mako b/bookie/templates/jstpl.mako index de2f8413..825e1c09 100644 --- a/bookie/templates/jstpl.mako +++ b/bookie/templates/jstpl.mako @@ -112,7 +112,11 @@