[IMP]reload bg color if image not present
authorMahendra Barad (OpenERP) <mba@tinyerp.com>
Fri, 31 Jan 2014 09:41:57 +0000 (15:11 +0530)
committerMahendra Barad (OpenERP) <mba@tinyerp.com>
Fri, 31 Jan 2014 09:41:57 +0000 (15:11 +0530)
bzr revid: mba@tinyerp.com-20140131094157-gny5h8ngn8jbo8xy

addons/website_blog/controllers/main.py
addons/website_blog/static/lib/page-transitions/css/styles.css
addons/website_blog/static/lib/page-transitions/js/app.js
addons/website_blog/views/website_blog_templates.xml

index 93390f4..8873887 100644 (file)
@@ -270,7 +270,7 @@ class WebsiteBlog(http.Controller):
     def getPost(self, blog=None, **post):
         blog = request.registry.get('blog.post').browse(request.cr, SUPERUSER_ID, int(blog))
         values = {
-              "image": "data:image/png;base64,%s" % blog.content_image,
+              "image": blog.content_image,
               "date": blog.create_date ,
               "author": blog.create_uid.name,
               "author_image": "data:image/png;base64,%s" % blog.create_uid.image,
index e1a5b03..1ccf0e9 100644 (file)
@@ -86,9 +86,6 @@ body article.page.current .big-image .inner .fader .text .goto-next, body articl
   opacity: 0;
 }
 
-body article.page.current .big-image, body article.page.current .big-image {
-  background: #B2B2B2;
-}
 
 /* line 47, ../scss/styles.scss */
 body article.page.content-hidden .content {
index 1fc9103..5d4653b 100644 (file)
@@ -93,7 +93,7 @@ ArticleAnimator.createPost = function(opts, callback){
 }
 
 ArticleAnimator.contentizeElement = function($el, d){
-  $el.find('.big-image').css({ backgroundImage: "url(" + d.image + ")" });
+  $el.find('.big-image').css({ backgroundImage: (d.image)?"url(data:image/png;base64," + d.image + ")":""});
   $el.find('h1.title').html(d.title);
   $el.find('h2.description').html(d.title_secondary);
   $el.find('.content .text').html(d.content);
index 449d4b5..a90c06e 100644 (file)
                   </div>
                 </div>
             </div>
-            <div class='content text-center'>
+            <div class='content'>
               <div class='text'></div>
             </div>
       </article>