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 @@
+
+
+
@@ -103,41 +70,7 @@
{% endfor %}
-
+
© 2011 India Theatre Forum. All Rights Reserved.
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 @@