[IMP] js fixes

bzr revid: fp@tinyerp.com-20140323190533-7lp6ayiyh7v03agv
This commit is contained in:
Fabien Pinckaers 2014-03-23 20:05:33 +01:00
parent 20856cbfab
commit eeca54b04c
3 changed files with 7 additions and 7 deletions

View File

@ -14,14 +14,14 @@ $(document).ready(function() {
});
}
function animate() {
function animate(event) {
event.stopImmediatePropagation();
var target = $(this.hash);
$('html, body').stop().animate({
'scrollTop': target.offset().top - 32
}, 500, 'swing', function () {
window.location.hash = 'blog_content';
});
return false;
}
var content = $(".js_discuss #blog_content p");
@ -31,7 +31,7 @@ $(document).ready(function() {
}
$('.js_header').css('min-height', $(window).height());
$(".js_tweet").find("h1, h2, h3, h4, li, p").share({'author_name':$('#blog_author').text()});
$(".js_tweet").share({'author_name':$('#blog_author').text()});
$('.cover_footer').on('click',page_transist);
$('a[href^="#blog_content"]').on('click', animate);

View File

@ -6,8 +6,8 @@
<img class="media-object img-circle" t-att-src="res.author_image" style="width: 30px;"/>
</div>
<div class="media-body">
<small t-field='res.author_name'/>
<div t-field='res.body'/>
<small t-esc='res.author_name'/>
<div t-esc='res.body'/>
</div>
</li>
</t>
@ -16,7 +16,7 @@
<input name="discussion" t-att-value="identifier" type="hidden"/>
<input name="blog_post_id" t-att-value="options.post_id" type="hidden"/>
<textarea class="mb8 form-control" rows="2" id="comment" placeholder="Write a comment..."/>
<button id='comment_post' class="btn btn-primary btn-xs mb8 mt4">Post</button>
<button id='comment_post' class="btn btn-primary btn-xs mb4">Post</button>
<div class="discussion_history"/>
</div>
</t>

View File

@ -288,7 +288,7 @@
<template id="opt_blog_post_inline_discussion" name="Allow comment in text"
inherit_option_id="website_blog.blog_post_complete">
<xpath expr="//div[@id='blog_content_container']" position="attributes">
<attribute name="class">js_discuss</attribute>
<attribute name="class">js_discuss mt32</attribute>
</xpath>
</template>