added hover to message icon, moved css and js to files
parent
a56222426e
commit
2153a6c589
|
@ -11,42 +11,7 @@
|
|||
|
||||
{% block extra_css %}
|
||||
<link type="text/css" rel="stylesheet" href="/static/css/campaign.css" />
|
||||
<style>
|
||||
.show_supporter_contact_form
|
||||
{
|
||||
display:block;
|
||||
margin-left: 5px;
|
||||
float: right;
|
||||
}
|
||||
.supporter_contact_form
|
||||
{
|
||||
display:none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.contact_form_result
|
||||
{
|
||||
display:block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.work_supporter_wide
|
||||
{
|
||||
display: block;
|
||||
height: 65px;
|
||||
margin-top: 5px;
|
||||
float: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.info_for_managers
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.contact_supporter
|
||||
{
|
||||
background:url("/static/images/icons/email.png") 10px center no-repeat;
|
||||
cursor:pointer
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
|
@ -56,63 +21,6 @@
|
|||
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
|
||||
<script type="text/javascript" src="/static/js/counter.js"></script>
|
||||
<script type="text/javascript" src="/static/js/embed.js"></script>
|
||||
|
||||
<script>
|
||||
var $j = jQuery.noConflict();
|
||||
$j(document).ready(function(){
|
||||
$j('.show_supporter_contact_form').click(function(){
|
||||
if ($j(this).parents(".work_supporter_wide").next().html() == ''){
|
||||
$j('div.supporter_contact_form').html('').hide();
|
||||
$j('input.supporter_contact_form').hide();
|
||||
$j(this).parents(".work_supporter_wide").next().html('<br /><textarea name="msg" rows="4" cols="60" \>');
|
||||
$j(this).parent().nextUntil('.work_supporter_wide').show();
|
||||
} else {
|
||||
$j('div.supporter_contact_form').html('');
|
||||
$j('input.supporter_contact_form').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
$j(document).ready(function(){
|
||||
$j('#contact_form').submit(function(){
|
||||
var theTextarea = $j(this).find("textarea")
|
||||
var theInput = theTextarea.parent().next();
|
||||
var supporter_id = theInput.attr("name").substring(4);
|
||||
var msgReq = jQuery.post('/msg/', $j(this).serialize()+'&supporter='+supporter_id)
|
||||
.done(function() {
|
||||
theTextarea.parent().prev().find(".info_for_managers").append("<div class='contact_form_result'>Message Sent<br /></div>");
|
||||
theInput.hide();
|
||||
theTextarea.hide();
|
||||
})
|
||||
.fail(function() {
|
||||
theTextarea.parent().prev().find(".info_for_managers").append("<div class='contact_form_result'>Couldn't Send Message<br /></div>");
|
||||
theInput.hide();
|
||||
theTextarea.hide();
|
||||
});
|
||||
|
||||
return false;
|
||||
})
|
||||
});
|
||||
$j(document).ready(function(){
|
||||
$j('.show_more_edition').click(function(){
|
||||
if ($j(this).html() == 'less...') {
|
||||
$j(this).html('more...')
|
||||
} else {
|
||||
$j(this).html('less...')
|
||||
}
|
||||
$j(this).next().toggle();
|
||||
});
|
||||
});
|
||||
$j(document).ready(function(){
|
||||
var img = $j('#book-detail-img');
|
||||
var googimg = $j('#find-google img');
|
||||
img.mouseover(function(){
|
||||
googimg.css({"background": "#8dc63f"}).animate(
|
||||
{backgroundColor: "white"}, 1500
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block topsection %}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,61 +1,104 @@
|
|||
var $j = jQuery.noConflict();
|
||||
$j(document).ready(function(){
|
||||
// caching the selections to speed up response
|
||||
var tabs = $j('#tabs');
|
||||
var tabs1 = $j('li.tabs1');
|
||||
var tabs2 = $j('li.tabs2');
|
||||
var tabs3 = $j('li.tabs3');
|
||||
var tabs4 = $j('li.tabs4');
|
||||
var tabId1 = $j('#tabs-1');
|
||||
var tabId2 = $j('#tabs-2');
|
||||
var tabId3 = $j('#tabs-3');
|
||||
var tabId4 = $j('#tabs-4');
|
||||
var contentBlockContent = $j('#content-block-content');
|
||||
|
||||
var $j = jQuery.noConflict();
|
||||
$j(document).ready(function(){
|
||||
// caching the selections to speed up response
|
||||
var tabs = $j('#tabs');
|
||||
var tabs1 = $j('li.tabs1');
|
||||
var tabs2 = $j('li.tabs2');
|
||||
var tabs3 = $j('li.tabs3');
|
||||
var tabs4 = $j('li.tabs4');
|
||||
var tabId1 = $j('#tabs-1');
|
||||
var tabId2 = $j('#tabs-2');
|
||||
var tabId3 = $j('#tabs-3');
|
||||
var tabId4 = $j('#tabs-4');
|
||||
var contentBlockContent = $j('#content-block-content');
|
||||
|
||||
tabs1.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId1.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId3.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs2.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId2.addClass('active').show(300);
|
||||
tabId1.hide(200);
|
||||
tabId3.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs3.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId3.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs4.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId4.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId3.hide(200);
|
||||
});
|
||||
$j('.findtheungluers').click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j('#supporters').addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId3.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
});
|
||||
tabs1.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId1.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId3.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs2.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId2.addClass('active').show(300);
|
||||
tabId1.hide(200);
|
||||
tabId3.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs3.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId3.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
tabs4.click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j(this).addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId4.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId3.hide(200);
|
||||
});
|
||||
$j('.findtheungluers').click(function(){
|
||||
tabs.find('.active').removeClass('active');
|
||||
$j('#supporters').addClass('active');
|
||||
contentBlockContent.find('div.active').removeClass('active');
|
||||
tabId3.addClass('active').show(300);
|
||||
tabId2.hide(200);
|
||||
tabId1.hide(200);
|
||||
tabId4.hide(200);
|
||||
});
|
||||
$j('.show_supporter_contact_form').click(function(){
|
||||
if ($j(this).parents(".work_supporter_wide").next().html() == ''){
|
||||
$j('div.supporter_contact_form').html('').hide();
|
||||
$j('input.supporter_contact_form').hide();
|
||||
$j(this).parents(".work_supporter_wide").next().html('<br /><textarea name="msg" rows="4" cols="60" \>');
|
||||
$j(this).parent().nextUntil('.work_supporter_wide').show();
|
||||
} else {
|
||||
$j('div.supporter_contact_form').html('');
|
||||
$j('input.supporter_contact_form').hide();
|
||||
}
|
||||
});
|
||||
$j('#contact_form').submit(function(){
|
||||
var theTextarea = $j(this).find("textarea")
|
||||
var theInput = theTextarea.parent().next();
|
||||
var supporter_id = theInput.attr("name").substring(4);
|
||||
var msgReq = jQuery.post('/msg/', $j(this).serialize()+'&supporter='+supporter_id)
|
||||
.done(function() {
|
||||
theTextarea.parent().prev().find(".info_for_managers").append("<div class='contact_form_result'>Message Sent<br /></div>");
|
||||
theInput.hide();
|
||||
theTextarea.hide();
|
||||
})
|
||||
.fail(function() {
|
||||
theTextarea.parent().prev().find(".info_for_managers").append("<div class='contact_form_result'>Couldn't Send Message<br /></div>");
|
||||
theInput.hide();
|
||||
theTextarea.hide();
|
||||
});
|
||||
|
||||
return false;
|
||||
})
|
||||
$j('.show_more_edition').click(function(){
|
||||
if ($j(this).html() == 'less...') {
|
||||
$j(this).html('more...')
|
||||
} else {
|
||||
$j(this).html('less...')
|
||||
}
|
||||
$j(this).next().toggle();
|
||||
});
|
||||
var img = $j('#book-detail-img');
|
||||
var googimg = $j('#find-google img');
|
||||
img.mouseover(function(){
|
||||
googimg.css({"background": "#8dc63f"}).animate(
|
||||
{backgroundColor: "white"}, 1500
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -201,7 +201,46 @@ div#content-block-content {
|
|||
min-width: 235px;
|
||||
float: left;
|
||||
}
|
||||
.show_supporter_contact_form
|
||||
{
|
||||
display:block;
|
||||
margin-left: 5px;
|
||||
float: right;
|
||||
}
|
||||
.supporter_contact_form
|
||||
{
|
||||
display:none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.contact_form_result
|
||||
{
|
||||
display:block;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.work_supporter_wide
|
||||
{
|
||||
display: block;
|
||||
height: 65px;
|
||||
margin-top: 5px;
|
||||
float: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.info_for_managers
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.show_supporter_contact_form
|
||||
{
|
||||
cursor:pointer;
|
||||
opacity:0.5
|
||||
|
||||
}
|
||||
.show_supporter_contact_form:hover
|
||||
{
|
||||
cursor:pointer;
|
||||
opacity:1
|
||||
}
|
||||
.official {
|
||||
border: 3px @bright-blue solid;
|
||||
padding: 3px;
|
||||
|
|
Loading…
Reference in New Issue