innertab for script; emailer changes;

This commit is contained in:
Sanj 2012-08-14 16:23:01 +05:30
parent f5a941c144
commit 8887848bb7
4 changed files with 56 additions and 31 deletions

View File

@ -0,0 +1,29 @@
$(function() {
//On Click Event
$("ul.tabsInnerRight li").click(function() {
$(".active").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all 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
return false;
// var queryData = {};
});
/*
if (queryData.hasOwnProperty("innertab")) {
if ($('#' + queryData.innertab).length > 0) {
$('a[href=#' + queryData.innertab + "]").click();
} else {
$('ul.tabsInnerRight li:first').click();
}
} else {
$('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
});

View File

@ -68,7 +68,7 @@
</tr>
</table>
<table>
<table style="margin-bottom:10px;">
<tr>
<td style="width:600px;">
{% if article.main_image %}
@ -78,7 +78,7 @@
{% endthumbnail %}
{% endif %}
<!-- <img src="/static/images/emailer/logo-erang.jpg" width="151" height="127" alt="theatre-image" style="display:block; border:1px solid #f7c00c; margin:0 auto;"> -->
<p style="text-align:center; margin-top:10px; margin-bottom:10px; color:#888; font-family:Arial, Helvetica, sans-serif; font-size:12px;">{{ article.subtitle|markdown }}</p>
<p style="text-align:center; margin-top:10px; margin-bottom:10px; color:#888; font-family:Arial, Helvetica, sans-serif; font-size:12px;">{{ article.subtitle|markdown|removetags:"p" }}</p>
</td>
</tr>
@ -92,8 +92,11 @@
{{ article.author_bio|markdown }}
</td>
</tr>
</table>
{% endfor %}
<table>
{% if weblinks %}
<tr>
<td style="width:580px; margin:10px 0 10px 0;">

View File

@ -216,38 +216,10 @@
</div>
<script type="text/javascript">
<script type="text/javascript" src="/static/js/innertabs.js"></script>
$(function() {
//On Click Event
$("ul.tabsInnerRight li").click(function() {
$(".active").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all 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
return false;
// var queryData = {};
});
/*
if (queryData.hasOwnProperty("innertab")) {
if ($('#' + queryData.innertab).length > 0) {
$('a[href=#' + queryData.innertab + "]").click();
} else {
$('ul.tabsInnerRight li:first').click();
}
} else {
$('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 type="text/javascript">
(function() {

View File

@ -1,3 +1,20 @@
<link rel="stylesheet" href="/static/css/modules/tabsinnerright.css" type="text/css" />
<ul class="tabsInnerRight">
<li><a href="#synopsis">About</a></li>
<li><a href="#director">Director</a></li>
</ul>
<div id="synopsis" class="tab_content">
{{ synopsis }}
</div>
<div id="director" class="tab_content">
Test tab, foo bar.
</div>
<!--
<div class="orange">{{ title }}</div>
{% if synopsis %}
@ -7,4 +24,8 @@
<a class="bpRelated" href="{{ script_file }}">Download</a> <br /><br />
<br />
-->
<a href="{{ edit_url }}">Edit</a>
<script type="text/javascript" src="/static/js/innertabs.js"></script>