Permalink
Browse files

BUG FIXES

  • Loading branch information...
1 parent f3ef620 commit aa6cef3939442d31661082e25f782cdfd9c572b5 George Eracleous committed Apr 3, 2012
Showing with 41 additions and 35 deletions.
  1. +2 −1 app/handlers/user.py
  2. +2 −4 static/js/home.js
  3. +14 −4 static/js/home.js~
  4. +23 −26 templates/base.html
View
@@ -49,7 +49,8 @@ def on_get(self):
def _on_auth(self, user):
if not user:
- raise tornado.web.HTTPError(500, "Google auth failed")
+ self.redirect('/')
+
self.base_render("register.html", first=user['first_name'], last=user['last_name'], email=user['email'], msg="")
def on_post(self):
View
@@ -27,10 +27,8 @@
console.log("new videos");
});
});
+
+
- $("#selected-genre").live("click", function() {
- genre = $(this).attr("value");
- //TODO pick one genre
- });
View
@@ -9,7 +9,7 @@
$("a.btn-success").live("click", function() {
sid = $(this).attr("sid");
- if (! $(this).hasAttr("disabled")) {
+ if (! $(this).attr("disabled")) {
CYP.post("/vote",
{sid : sid},
true,
@@ -28,9 +28,19 @@
});
});
- $("#selected-genre").live("click", function() {
- genre = $(this).attr("value");
- //TODO pick one genre
+ $("#home-btn").live("click", function() {
+ console.log("sadasd")
+ $(this).addClass("active");
});
+ $("#rankings-btn").live("click", function() {
+ $(this).addClass("active");
+ });
+
+ $("#submit-btn").live("click", function() {
+ $(this).addClass("active");
+ });
+
+
+
View
@@ -22,11 +22,7 @@
{% end %}
</title>
</head>
-<style>
-.navbar-inner {
- background-color: red;
-}
-</style>
+
<body >
{% block header %}
@@ -41,9 +37,9 @@
<a class="brand" href="/"><img src="static/imgs/logo_navbar.png" style="height:20px"></a>
<div class="nav-collapse">
<ul class="nav">
- <li class="active"><a href="/">Home</a></li>
- <li><a href="/rankings">Top Covers</a></li>
- <li><a href="/submit">Submit Cover</a></li>
+ <li id="home-btn" class="active"><a href="/">Home</a></li>
+ <li><a id="rankings-btn" href="/rankings">Top Covers</a></li>
+ <li><a id="submit-btn" href="/submit">Submit Cover</a></li>
{%if current_user%}
<li><a href="/logout">Log out</a></li>
{%end%}
@@ -56,23 +52,33 @@
</div>
{% end %}
{% block content %}
-{% end %}
<div class="container">
- <hr>
- <footer style="position: relative; float:right">
- <p style="display:inline; padding:5px;" >&copy; YouCover.Me 2012</p>&middot;
- <a style="display:inline; padding:5px;" href="/terms">Terms</a>&middot;
- <a style="display:inline; padding:5px;" href="/privacy">Privacy Policy</a>&middot;
- <a style="display:inline; padding:5px;" href="/about">About Us</a>
- </footer>
+ <hr>
+ <footer style="position: relative; float:right">
+ <p style="display:inline; padding:5px;" >&copy; YouCover.Me 2012</p>&middot;
+ <a style="display:inline; padding:5px;" href="/terms">Terms</a>&middot;
+ <a style="display:inline; padding:5px;" href="/privacy">Privacy Policy</a>&middot;
+ <a style="display:inline; padding:5px;" href="/about">About Us</a>
+ </footer>
</div>
{% raw xsrf_form_html() %}
+{% end %}
{% block scripts %}
{% for css in kwargs['css_deps'] %}
<link rel="stylesheet" href="{{static_url(css)}}" type="text/css" />
{% end %}
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
+ <script>!window.jQuery && document.write(unescape('%3Cscript src="{{static_url("js/libs/jquery-1.5.1.min.js")}}"%3E%3C/script%3E'))</script>
+ <script src="{{static_url('js/libs/jquery.i18n.js')}}"></script>
+ <script src="{{static_url('js/libs/blurb.min.js')}}"></script>
+ <script src="{{static_url('js/CYP.js')}}"></script>
+ {% for js in kwargs['js_deps'] %}
+ <script src="{{static_url(js)}}"></script>
+ {% end %}
+
<script type="text/javascript">
var _gaq = _gaq || [];
@@ -85,18 +91,9 @@
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
-
</script>
{% end %}
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
- <script>!window.jQuery && document.write(unescape('%3Cscript src="{{static_url("js/libs/jquery-1.5.1.min.js")}}"%3E%3C/script%3E'))</script>
- <script src="{{static_url('js/libs/jquery.i18n.js')}}"></script>
- <script src="{{static_url('js/libs/blurb.min.js')}}"></script>
- <script src="{{static_url('js/CYP.js')}}"></script>
- {% for js in kwargs['js_deps'] %}
- <script src="{{static_url(js)}}"></script>
- {% end %}
+
</body>

0 comments on commit aa6cef3

Please sign in to comment.