[FIX] :Animation and transitions does not seems to work in anonymous mode

[IMP] : css

bzr revid: aja@tinyerp.com-20140212161959-llncljb06gj0od0b
This commit is contained in:
ajay javiya (OpenERP) 2014-02-12 21:49:59 +05:30
parent f2f7e75137
commit f5d51081ce
4 changed files with 19 additions and 18 deletions

View File

@ -10,7 +10,7 @@
text-align: center;
z-index: 7;
}
.disqussion a {
.disqussion>a {
opacity: 0;
display: block;
overflow: hidden;
@ -30,13 +30,13 @@
-o-transition: all 0.5s;
transition: all 0.5s;
}
.disqussion a.has-comments {
.disqussion>a.has-comments {
opacity: .6;
}
.disqussion-contain:hover .disqussion a {
.disqussion-contain:hover .disqussion>a {
opacity: 1;
}
.disqussion a:after {
.disqussion>a:after {
border-left: 7px solid transparent;
border-top: 7px solid #bbbbbb;
left: 19px;
@ -51,11 +51,11 @@
-o-transition: all 0.5s;
transition: all 0.5s;
}
.disqussion:hover a, .disqussion.hovered a {
.disqussion:hover>a, .disqussion.hovered>a {
opacity: 1;
background: #57AD68;
}
.disqussion:hover a:after, .disqussion.hovered a:after {
.disqussion:hover>a:after, .disqussion.hovered>a:after {
border-top-color: #57AD68;
}

View File

@ -10,6 +10,7 @@ var disqus_identifier;
identifier: 'name',
position: 'right',
post_id: $('#blog_post_name').attr('data-oe-id'),
document_user : false,
};
// Overwrite default options with user provided ones.
@ -121,13 +122,16 @@ var disqus_identifier;
$('a[data-disqus-identifier="'+disqus_identifier+'"]').popover('destroy')
disqus_identifier = identifier;
var elt = $('a[data-disqus-identifier="'+identifier+'"]');
var cls = settings.document_user ? '' : 'hidden';
var login_cls = settings.document_user ? 'hidden' : '';
elt.append('\
<div class="mycontent hidden">\
<input name="discussion" value="'+ identifier +'" type="hidden"/>\
<input name="blog_post_id" value="'+ settings.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>\
<textarea class="mb8 form-control '+ cls +'" rows="2" id="comment" placeholder="Write a comment..."/>\
<button id="comment_post" class="btn btn-primary btn-xs mb8 mt4 '+cls+'">Post</button>\
<div class="discussion_history"/>\
<a class="btn btn-block btn-success '+login_cls+'" href="/web/login">Sign In</a>\
</div>')
var comment = '';
_.each(data, function(res){
@ -149,9 +153,7 @@ var disqus_identifier;
html:true, content:function(){
return $($(this).data('contentwrapper')).html();
}
}).parent().delegate('button#comment_post', 'click', function() {
disqussionPostHandler();
});;
}).parent().delegate('button#comment_post').on('click',disqussionPostHandler);
};
var hideDisqussion = function() {

View File

@ -1,9 +1,7 @@
$(document).ready(function() {
$("#blog_content p").inlineDisqussions(); //Allow inline comments on blog post
$("#blog_content p").inlineDisqussions({'document_user': $('#is_document_user').length}); //Allow inline comments on blog post
$('.cover_footer').on('click',page_transist);
$('a[href^="#"]').on('click', animate);
$('a[href^="#blog_content"]').on('click', animate);
function page_transist(event) {
event.preventDefault();
var translationValue = $('.cover_footer').get(0).getBoundingClientRect().top;
@ -34,7 +32,7 @@ $(document).ready(function() {
}
//bind again it takes control from now on, until page relaod.
$(document).find('.cover_footer').on('click',page_transist);
$(document).find('a[href^="#"]').on('click', animate);
$(document).find('a[href^="#blog_content"]').on('click', animate);
$(document).find("#blog_content p").inlineDisqussions();
});
}

View File

@ -7,8 +7,6 @@
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.editor.js"></script>
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js"></script>
<script type="text/javascript" src="/website_blog/static/lib/contentshare.js"></script>
<script type="text/javascript" src="/website_blog/static/lib/inlineDisqussions/inlineDisqussions.js"></script>
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.js"/>
</xpath>
</template>
@ -259,6 +257,7 @@
</xpath>
<xpath expr="//h1[@id='blog_post_name']" position="replace">
<h1 class="text-center"><strong t-field="blog_post.name" id="blog_post_name"/></h1>
<p id="is_document_user" groups="base.group_document_user"/>
</xpath>
<xpath expr="//span[@name='blog_post_date']" position="replace">
</xpath>
@ -381,6 +380,8 @@
<t t-set="head">
<link rel='stylesheet' href='/website_blog/static/src/css/website_blog.css'/>
<link rel='stylesheet' href='/website_blog/static/lib/inlineDisqussions/inlineDisqussions.css'/>
<script type="text/javascript" src="/website_blog/static/lib/inlineDisqussions/inlineDisqussions.js"></script>
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.js"/>
</t>
<div id="wrap" class="js_blog">
<t t-raw="0"/>