[IMP] : at the creation background-image should take full screen

bzr revid: aja@tinyerp.com-20140320070047-8zsu7d2j913q6ljl
This commit is contained in:
ajay javiya (OpenERP) 2014-03-20 12:30:47 +05:30
parent fd05ea1f7a
commit 48db08b6ee
2 changed files with 3 additions and 3 deletions

View File

@ -45,13 +45,13 @@
return this._super();
},
clean_bg : function(vHeight) {
$('.cover_header').css({"background-image":"", 'min-height': vHeight});
$('.cover_header').css({"background-image":'none', 'min-height': vHeight});
},
change_bg : function(vHeight) {
var self = this;
var editor = new website.editor.ImageDialog();
editor.on('start', self, function (o) {
o.url = $('.cover_header')[0].style.background.replace('url(','').replace(')','');
o.url = $('.cover_header')[0] ? $('.cover_header')[0].style.background.replace('url(','').replace(')','') : '';
});
editor.on('save', self, function (o) {
$('.cover_header').css({"background-image": o.url && o.url !== "" ? 'url(' + o.url + ')' : "", 'min-height': vHeight})

View File

@ -163,7 +163,7 @@
<template id="blog_post_complete" name="Blog Post">
<t t-call="website_blog.index">
<div t-attf-class="cover #{blog_post.content_image and 'cover_header' or ''} text-center" id="title" t-attf-style="background-image : url(#{blog_post.content_image})" t-ignore="True">
<div t-attf-class="cover cover_header text-center" id="title" t-attf-style="background-image : url(#{blog_post.content_image})" t-ignore="True">
<div class="container">
<div class="container text-right mt16">
<div class="btn-group css_non_editable_mode_hidden">