From 220de9368c78a1288266a6e4e003bd7fd0d98ac6 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 31 Dec 2011 20:28:06 +0530 Subject: [PATCH] fixed twitter button; added metatags to new base; moved url to / --- itf/static/js/insidepage.js | 7 ++- itf/templates/noel/base.html | 77 ++---------------------------- itf/templates/noel/insidepage.html | 2 +- itf/urls.py | 4 +- 4 files changed, 14 insertions(+), 76 deletions(-) diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index e846e17..30132c6 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -18,9 +18,14 @@ $('#listLeft ul li a').live("click", function() { }, function(data) { $('#imageInside').css({'backgroundImage': 'url(' + data.main_image.thumb + ')'}); $('#textRight').text(data.title).formatTitle(); - var url = location.protocol + "//" + location.hostname + location.pathname + "?tab=" + $('.innerSelected').attr("data-slug") + "&object_id=" + objId; + var urlComponent = "?tab=" + $('.innerSelected').attr("data-slug") + "&object_id=" + objId; + var baseUrl = location.protocol + "//" + location.hostname + location.pathname; + var url = baseUrl + urlComponent; + // var fb_url = url.replace("&", "&"); // $('#fb_like').attr("data-href", fb_url); + var twitter_url = "https://twitter.com/share?url=" + encodeURIComponent(url) + "&title=" + encodeURIComponent(data.title); + $('#twitterBtn').attr("href", twitter_url); $('#permalinkBtn').attr("href", url); var searchTerm = $('.searchListField').val(); var html = data.html; diff --git a/itf/templates/noel/base.html b/itf/templates/noel/base.html index 25a0996..8967feb 100755 --- a/itf/templates/noel/base.html +++ b/itf/templates/noel/base.html @@ -2,6 +2,9 @@ + + + {% block title %} {% endblock %} @@ -28,7 +31,7 @@ {% endfor %} - + diff --git a/itf/templates/noel/insidepage.html b/itf/templates/noel/insidepage.html index 375f7a5..0eff988 100755 --- a/itf/templates/noel/insidepage.html +++ b/itf/templates/noel/insidepage.html @@ -191,7 +191,7 @@
- twitter + twitter diff --git a/itf/urls.py b/itf/urls.py index a8c17b1..b8e2d50 100755 --- a/itf/urls.py +++ b/itf/urls.py @@ -16,7 +16,7 @@ urlpatterns = patterns('', # Example: # (r'^bhangar/', include('bhangar.foo.urls')), #(r'^search/', include('solango.urls')), - (r'^t/$', "frontpage.views.index"), + (r'^$', "frontpage.views.index"), (r'm/', include('insidepages.urls')), (r'^page/(?P[a-zA-Z].*?)/', 'pages.views.render_page'), (r'^contact/$', 'frontpage.views.contact'), @@ -58,7 +58,7 @@ urlpatterns = patterns('', # (r'^ajax_filtered_fields/', include('ajax_filtered_fields.urls')), # Uncomment the next line to enable the admin: (r'^test$', 'app.views.index'), - (r'^$', 'festival.views.home') +# (r'^$', 'festival.views.home') ) if settings.LOCAL_DEVELOPMENT: