g+, facebook like, etc

This commit is contained in:
Sanj 2012-05-28 20:14:01 +05:30
parent 58b8b5ef10
commit 523ffa1ca7
4 changed files with 54 additions and 50 deletions

View File

@ -5,7 +5,7 @@ from os.path import join
# import markdown # import markdown
SITENAME = "India Theatre Forum" SITENAME = "India Theatre Forum"
DEBUG = False DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
JSON_DEBUG = DEBUG JSON_DEBUG = DEBUG
@ -115,6 +115,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.debug", "django.core.context_processors.debug",
"django.core.context_processors.i18n", "django.core.context_processors.i18n",
"django.core.context_processors.media", "django.core.context_processors.media",
"django.core.context_processors.request",
# "multilingual.context_processors.multilingual", # "multilingual.context_processors.multilingual",
"frontpage.context_processors.menus" "frontpage.context_processors.menus"
) )

View File

@ -287,6 +287,7 @@ $(function() {
*/ */
$('#listForm').submit(function(e) { $('#listForm').submit(function(e) {
return true;
e.preventDefault(); e.preventDefault();
doListLoading(); doListLoading();
// var urlString = "?tab_id=" + $('.innerSelected').attr("data-id") + "&sort=" + sortString + "&search=" + searchTerm; // var urlString = "?tab_id=" + $('.innerSelected').attr("data-id") + "&sort=" + sortString + "&search=" + searchTerm;

View File

@ -218,10 +218,7 @@
<script type="text/javascript"> <script type="text/javascript">
//When page loads... $(function() {
$(".tab_content").hide(); //Hide all content
// $("ul.tabsInnerRight li:first").addClass("active").show(); //Activate first tab
//On Click Event //On Click Event
$("ul.tabsInnerRight li").click(function() { $("ul.tabsInnerRight li").click(function() {
$(".active").removeClass("active"); //Remove any "active" class $(".active").removeClass("active"); //Remove any "active" class
@ -230,8 +227,9 @@
var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content $(activeTab).fadeIn(); //Fade in the active ID content
return false; return false;
});
// var queryData = {}; // var queryData = {};
});
/*
if (queryData.hasOwnProperty("innertab")) { if (queryData.hasOwnProperty("innertab")) {
if ($('#' + queryData.innertab).length > 0) { if ($('#' + queryData.innertab).length > 0) {
@ -242,7 +240,12 @@
} else { } else {
$('ul.tabsInnerRight li:first').click(); //Show first tab content $('ul.tabsInnerRight li:first').click(); //Show first tab content
} }
*/
//When page loads...
$(".tab_content").hide(); //Hide all content
$("ul.tabsInnerRight li:first").click() //addClass("active").show(); //Activate first tab
});
</script> </script>

View File

@ -19,7 +19,7 @@
{% block content %} {% block content %}
<!--
<div id="fb-root"></div> <div id="fb-root"></div>
<script>(function(d, s, id) { <script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0]; var js, fjs = d.getElementsByTagName(s)[0];
@ -28,7 +28,7 @@
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script> }(document, 'script', 'facebook-jssdk'));</script>
-->
<div id="lightboxPanel"> <div id="lightboxPanel">
<div id="lightboxContent"> <div id="lightboxContent">
@ -103,19 +103,19 @@
<img src="/static/images/noel/search-inner.png" width="22" height="18" alt="search" class="searchInner"> <img src="/static/images/noel/search-inner.png" width="22" height="18" alt="search" class="searchInner">
--> -->
</div> </div>
<!--
<form action="" method="get"> <form action="" method="get">
<input type="text" placeholder="search" name="field" class="searchInnerField"/> <input type="text" placeholder="search" name="field" class="searchInnerField"/>
</form> </form>
-->
<div id="tabsInner"> <div id="tabsInner">
<ul id="selection"> <ul id="selection">
<li class="tabCategory defaultTab" data-id="{{ default_tab.id }}" id="tab_{{default_tab.slug}}" data-slug="{{ default_tab.slug }}">{{ tab.title }}</li> <!-- <li class="tabCategory defaultTab" data-id="{{ default_tab.id }}" id="tab_{{default_tab.slug}}" data-slug="{{ default_tab.slug }}">{{ tab.title }}</li> -->
{% for t in tabs %} {% for t in tabs %}
{% ifnotequal t.id tab.id %}
<li class="tabCategory" data-id="{{ t.id }}" id="tab_{{ t.slug }}" data-slug="{{ t.slug }}"><a href="{{ t.get_absolute_url }}">{{ t.title }}</a></li> <li class="tabCategory {% ifequal t.id tab.id %} innerSelected {% endifequal %}" data-id="{{ t.id }}" id="tab_{{ t.slug }}" data-slug="{{ t.slug }}"><a href="{{ t.get_absolute_url }}">{{ t.title }}</a></li>
{% endifnotequal %}
{% endfor %} {% endfor %}
</ul> </ul>
@ -123,17 +123,10 @@
<div id="tabText_{{default_tab.id}}" class="tabText displayedTab"> <div id="tabText_{{default_tab.id}}" class="tabText displayedTab">
{{ tab.text }} {{ tab.text }}
</div> </div>
{% for t in tabs %} <form class="selectMenu" id="listForm" method="GET" action=".">
<div id="tabText_{{t.id}}" class="tabText">
{% ifnotequal t.id tab.id %}
{{ t.text }}
{% endifnotequal %}
</div>
{% endfor %}
<form class="selectMenu" id="listForm" method="post" action="">
<span>Sort:</span><!--Can i avoid a p tag here to keep it inline --> <span>Sort:</span><!--Can i avoid a p tag here to keep it inline -->
<select id="orderBySelect">Select <select id="orderBySelect" name="sort">Select
{% for s in tab.get_dict.sorts %} {% for s in tab.get_dict.sorts %}
<option value="{{s.operator}}{{s.field_name}}">{{s.friendly_name}}</option> <option value="{{s.operator}}{{s.field_name}}">{{s.friendly_name}}</option>
{% endfor %} {% endfor %}
@ -144,10 +137,10 @@
<option value="mostpopular">Most popular</option> <option value="mostpopular">Most popular</option>
--> -->
</select> </select>
<input name="tab" type="hidden" value="{{ tab.slug }}" />
<input id="page_no" name="page_no" type="hidden" value="1" /> <input id="page" name="page" type="hidden" value="{{ request.GET.page|default:'1' }}" />
<input id="object_id" name="object_id" type="hidden" value="" /> <!-- <input id="object_id" name="object_id" type="hidden" value="{{ item.id }}" /> -->
<input type="text" placeholder="Filter by keyword" id="searchList" name="field" class="searchListField"/> <input type="text" placeholder="Filter by keyword" id="searchList" name="search" class="searchListField" value="{{ request.GET.search }}" />
<!--<img src="/static/images/noel/search-icon.png" width="18" height="14" alt="search-icon" id="searchListIcon">--> <!--<img src="/static/images/noel/search-icon.png" width="18" height="14" alt="search-icon" id="searchListIcon">-->
<span id="pageDisplay" style="display:none;">Page <span id="currPageNo">1</span> of <span id="totalPages">10</span></span> <span id="pageDisplay" style="display:none;">Page <span id="currPageNo">1</span> of <span id="totalPages">10</span></span>
@ -168,17 +161,13 @@
<li id="loadingList" style="display:none;">Loading...</li> <li id="loadingList" style="display:none;">Loading...</li>
{% for l in object_list.items %} {% for l in object_list.items %}
<li class="tabListItem"><a href="{{ l.url }}" data-id="{{ l.id }}""><span>{{ l.title }}</span></a></li> <li class="tabListItem"><a href="{{ l.url }}" {% ifequal l.id item.id %} class="listLeftSelected" {% endifequal %} data-id="{{ l.id }}""><span>{{ l.title }}</span></a></li>
{% endfor %} {% endfor %}
<!-- <li><a href=""><span>The Mystery of vanishing rights<span></a></li> --> <!-- <li><a href=""><span>The Mystery of vanishing rights<span></a></li> -->
</ul> </ul>
</div> </div>
<div id="pagination" style="display:none;"> <!-- Please, please let me display pagination info -->
<span id="currPageNo">1</span>
<span id="totalPages"></span>
</div>
</div> </div>
@ -201,6 +190,16 @@
<a href="" target="_blank" id="twitterBtn" title="Tweet this!"><img src="/static/images/noel/tweet.png" width="18" height="18" alt="twitter" class="iconImages"> </a> <a href="" target="_blank" id="twitterBtn" title="Tweet this!"><img src="/static/images/noel/tweet.png" width="18" height="18" alt="twitter" class="iconImages"> </a>
<!--<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="http://twitter.com/#!/indtheatreforum">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>--> <!--<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-via="http://twitter.com/#!/indtheatreforum">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>-->
<div class="g-plusone" data-size="small" data-annotation="none"></div>
<!-- Place this render call where appropriate -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<div id="fb_like" class="fb-like" data-href="{{ item.get_absolute_url }}" data-send="false" data-width="90" data-show-faces="false" data-layout="button_count"></div> <div id="fb_like" class="fb-like" data-href="{{ item.get_absolute_url }}" data-send="false" data-width="90" data-show-faces="false" data-layout="button_count"></div>
<!-- <img src="/static/images/noel/facebook.png" width="18" height="18" alt="facebook" class="iconImages"> --> <!-- <img src="/static/images/noel/facebook.png" width="18" height="18" alt="facebook" class="iconImages"> -->