[IMP] :When creating a new blog, there is a zone to edit the content
bzr revid: aja@tinyerp.com-20140327133407-kj5geztq3t551lk1
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
},
|
||||
do_render: function(data) {
|
||||
var self = this;
|
||||
if ($('#discussions_wrapper').length === 0) {
|
||||
if ($('#discussions_wrapper').length === 0 && self.settings.content.length > 0) {
|
||||
$('<div id="discussions_wrapper"></div>').appendTo($('#blog_content'));
|
||||
}
|
||||
// Attach a discussion to each paragraph.
|
||||
@@ -36,8 +36,8 @@
|
||||
}
|
||||
if(!$(event.target).hasClass('discussion-link') && !$(event.target).parents('.popover').length){
|
||||
if($('.move_discuss').length){
|
||||
$('.js_discuss').removeClass('move_discuss');
|
||||
$('.js_discuss').animate({
|
||||
$('.js_discuss').next().removeClass('move_discuss');
|
||||
$('.js_discuss').next().animate({
|
||||
'marginLeft': "+=40%"
|
||||
});
|
||||
$('#discussions_wrapper').animate({
|
||||
@@ -96,8 +96,8 @@
|
||||
a.delegate('a.discussion-link', "click", function(e) {
|
||||
e.preventDefault();
|
||||
if(!$('.move_discuss').length){
|
||||
$('.js_discuss').addClass('move_discuss');
|
||||
$('.js_discuss').animate({
|
||||
$('.js_discuss').next().addClass('move_discuss');
|
||||
$('.js_discuss').next().animate({
|
||||
'marginLeft': "-=40%"
|
||||
});
|
||||
$('#discussions_wrapper').animate({
|
||||
|
||||
@@ -23,7 +23,7 @@ $(document).ready(function() {
|
||||
});
|
||||
}
|
||||
|
||||
var content = $(".js_discuss #blog_content p");
|
||||
var content = $(".js_discuss").next().find('p');
|
||||
if(content){
|
||||
openerp.jsonRpc("/blog/get_user/", 'call', {}).then(function(data){
|
||||
$('#discussions_wrapper').empty();
|
||||
|
||||
@@ -194,9 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="blog_content_container" class="mt32">
|
||||
<div id="blog_content" t-field="blog_post.content"/>
|
||||
</div>
|
||||
<div id="blog_content" t-field="blog_post.content" class="mt32"/>
|
||||
|
||||
<section id="comments" class="read_width" t-if="blog_post.website_message_ids">
|
||||
<hr/>
|
||||
@@ -280,7 +278,7 @@
|
||||
<template id="opt_blog_post_select_to_tweet" name="Select to Tweet"
|
||||
inherit_option_id="website_blog.blog_post_complete">
|
||||
<xpath expr="//div[@id='blog_content']" position="attributes">
|
||||
<attribute name="class">js_tweet</attribute>
|
||||
<attribute name="class">js_tweet mt32</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='title']//div[@class='blog_title']" position="attributes">
|
||||
<attribute name="class">blog_title js_tweet</attribute>
|
||||
@@ -290,8 +288,8 @@
|
||||
<!-- Options: Blog Post: user can add Inline Discussion -->
|
||||
<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 mt32</attribute>
|
||||
<xpath expr="//div[@id='blog_content']" position="before">
|
||||
<div class="js_discuss"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user