Skip to content

Commit

Permalink
Add icons to the nav and for invite notification, fix the events in i…
Browse files Browse the repository at this point in the history
…nvite view
  • Loading branch information
mitechie committed Mar 29, 2012
1 parent cbc682a commit 7340a69
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 17 deletions.
13 changes: 13 additions & 0 deletions bookie/static/css/base.scss
Expand Up @@ -35,6 +35,10 @@ em.icon {
position: absolute; position: absolute;
} }


.navigation .icon {
padding: 0;
}

@mixin cabin() { @mixin cabin() {
font-family: 'Cabin', sans-serif; font-family: 'Cabin', sans-serif;
} }
Expand Down Expand Up @@ -132,6 +136,10 @@ a {
display: inline; display: inline;
float: right; float: right;


span {
margin: 0 .3em;
}

a { a {
text-decoration: none; text-decoration: none;
} }
Expand Down Expand Up @@ -310,6 +318,11 @@ form {
margin-bottom: .3em; margin-bottom: .3em;
color: black; color: black;


.icon {
color: black;
font-size: 16px;
}

&:hover { &:hover {
cursor: hand; cursor: hand;
} }
Expand Down
10 changes: 4 additions & 6 deletions bookie/static/js/bookie/view.js
Expand Up @@ -1012,10 +1012,10 @@ YUI.add('bookie-view', function (Y) {
'input#send_invite': { 'input#send_invite': {
click: 'invite' click: 'invite'
}, },
'.invite_container form': { 'form': {
submit: 'kill' submit: 'kill'
}, },
'#invite_heading': { '.heading': {
click: '_toggle_container' click: '_toggle_container'
} }
}, },
Expand Down Expand Up @@ -1102,7 +1102,7 @@ YUI.add('bookie-view', function (Y) {
}, },


render: function () { render: function () {
return this.ctpl(this.get('user')); this.get('container').setContent(this.ctpl(this.get('user')));
}, },


/** /**
Expand Down Expand Up @@ -1139,9 +1139,7 @@ YUI.add('bookie-view', function (Y) {
}, },


container: { container: {
valueFn: function () { value: '#invite_container'
return Y.one('#invite_container');
}
}, },


/** /**
Expand Down
3 changes: 1 addition & 2 deletions bookie/templates/accounts/index.mako
Expand Up @@ -118,8 +118,7 @@ ${password_reset(user, reset=False)}
invite_ct: ${user.invite_ct} invite_ct: ${user.invite_ct}
} }
}); });
invite_view.render();
Y.one('#invite_container').setContent(invite_view.render());
% endif % endif
}); });
}); });
Expand Down
2 changes: 0 additions & 2 deletions bookie/templates/bmark/func.mako
Expand Up @@ -46,5 +46,3 @@
pager.set('page', ${page}); pager.set('page', ${page});
% endif % endif
</%def> </%def>


6 changes: 5 additions & 1 deletion bookie/templates/jstpl.mako
Expand Up @@ -112,7 +112,11 @@


<script type="text/template" id="account_invites"> <script type="text/template" id="account_invites">
<div class="form"> <div class="form">
<a href="" id="invite_heading" class="heading">You have invites!</a> <a href="" id="invite_heading" class="heading">
<span aria-hidden="true" class="icon icon-envelope" title="You have invites!"></span>
<em class="icon">Invite</em>
You have invites!
</a>
<div id="invite_body" style="display: none; opacty: 0;"> <div id="invite_body" style="display: none; opacty: 0;">
<p>Please, invite others to join Bookie and Bmark.us.</p> <p>Please, invite others to join Bookie and Bmark.us.</p>
<form id="#invite_form"> <form id="#invite_form">
Expand Down
36 changes: 32 additions & 4 deletions bookie/templates/main_wrap.mako
Expand Up @@ -57,17 +57,45 @@
<span class="alt_logo">&nbsp;&#45; bookmark your web</span> <span class="alt_logo">&nbsp;&#45; bookmark your web</span>
</div> </div>
<div class="navigation"> <div class="navigation">
<span class="item"><a href="/recent" class="button nav_button">All</a></span> <span class="item">
<a href="/recent" class="button nav_button">
<span aria-hidden="true" class="icon icon-tags" title="All Bookmarks"></span>
<em class="icon">All Bookmarks</em>
All
</a>
</span>


% if request.user: % if request.user:
<span class="item"><a href="/${request.user.username}/recent" class="button nav_button">Mine</a></span> <span class="item">
<a href="/${request.user.username}/recent" class="button nav_button">
<span aria-hidden="true" class="icon icon-tag"
title="My Bookmarks"></span>
<em class="icon">My Bookmarks</em>
Mine
</a>
</span>
% endif % endif


<span class="item"><a href="/search" class="button nav_button">Search</a></span> <span class="item">
<a href="/search" class="button nav_button">
<span aria-hidden="true" class="icon icon-search" title="Search"></span>
<em class="icon">Search</em>
Search
</a>
</span>


% if request.user and request.user.username: % if request.user and request.user.username:
<span class="item"> <span class="item">
<a href="${request.route_url('user_account', username=request.user.username)}" class="button nav_button">Account <a href="${request.route_url('user_account', username=request.user.username)}" class="button nav_button">
% if request.user.has_invites():
<span aria-hidden="true" class="icon icon-envelope" title="You have invites!"></span>
<em class="icon">Invite</em>
% else:
<span aria-hidden="true" class="icon icon-user" title="Account Details"></span>
<em class="icon">Account Details</em>

% endif
Account
</a></span> </a></span>
% else: % else:
<span class="item"><a href="/login" class="button nav_button">Login</a></span> <span class="item"><a href="/login" class="button nav_button">Login</a></span>
Expand Down
5 changes: 3 additions & 2 deletions combo.py
@@ -1,6 +1,7 @@
"""WSGI file to serve the combo JS out of convoy""" """WSGI file to serve the combo JS out of convoy"""
import os
from convoy.combo import combo_app from convoy.combo import combo_app


JS_FILES = '/home/bmark.us/prod/bookie/bookie/static/js/build' root_dir = os.path.dirname(__file__)

JS_FILES = root_dir + '/bookie/static/js/build'
application = combo_app(JS_FILES) application = combo_app(JS_FILES)

0 comments on commit 7340a69

Please sign in to comment.