[FIX] website snippet: background of quotes slider
authorChristophe Matthieu <chm@openerp.com>
Wed, 27 Nov 2013 16:59:14 +0000 (17:59 +0100)
committerChristophe Matthieu <chm@openerp.com>
Wed, 27 Nov 2013 16:59:14 +0000 (17:59 +0100)
bzr revid: chm@openerp.com-20131127165914-i4tgbj1fi1q2dqin

addons/website/static/src/css/website.css
addons/website/static/src/css/website.sass
addons/website/static/src/js/website.snippets.editor.js
addons/website/views/snippets.xml

index f10cb6f..b5c176e 100644 (file)
@@ -407,7 +407,7 @@ ul.nav-stacked > li > a {
 
 /* Parallax Theme */
 .parallax_quote {
-  background: url("/website/static/src/img/parallax/quote.png") center center no-repeat fixed;
+  background: center center no-repeat fixed;
   background-size: contain;
 }
 .parallax_quote .carousel-indicators li {
index 932f46a..fc309da 100644 (file)
@@ -305,7 +305,7 @@ ul.nav-stacked > li > a
 /* Parallax Theme */
 
 .parallax_quote
-    background: url('/website/static/src/img/parallax/quote.png') center center no-repeat fixed
+    background: center center no-repeat fixed
     background-size: contain
     .carousel-indicators
         li
index ac3c38a..e296850 100644 (file)
             if (np.$next) {
                 if (np.$next.hasClass("oe_custom_bg")) {
                     var editor = new website.editor.ImageDialog();
-                    editor.on('start', self, function (o) {o.url = np.$prev && np.$prev.data("src") || "";});
+                    editor.on('start', self, function (o) {o.url = np.$prev && np.$prev.data("src") || np.$next && np.$next.data("src") || "";});
                     editor.on('save', self, function (o) {
                         self._set_bg(o.url);
                         np.$next.data("src", o.url);
                     });
                     editor.on('cancel', self, function () {
                         if (!np.$prev || np.$prev.data("src") === "") {
-                            np.$next.removeClass('active');
                             self.$target.removeClass(np.$next.data("class"));
                             self.$target.trigger("snippet-style-change", [self, np]);
                         }
                 }
             } else {
                 this._set_bg(false);
+                this.$target.removeClass(np.$prev.data("class"));
             }
         },
         preview: function (event, np) {
index 97b770c..23c87af 100644 (file)
             <img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_quotes_slider.png"/>
             <span class="oe_snippet_thumbnail_title">Quotes Slider</span>        
         </div>
-        <section class="oe_snippet_body parallax_quote oe_structure">
+        <section class="oe_snippet_body parallax_quote oe_structure" style="background-image: url('/website/static/src/img/parallax/quote.png')">
             <div id="myQuoteCarousel" class="carousel slide oe_medium mb32" data-snippet-id="carousel">
                 <!-- Indicators -->
                 <ol class="carousel-indicators mb0">
                         <li data-class="oe_img_bg" data-src="/website/static/src/img/banner/yellow_green.jpg"><a>Yellow Green</a></li>
                     </ul>
                 </li>
-                <li class="oe_snippet_options divider"></li>
+                <li><a style="background: none; padding: 5px; border-top: 1px solid #ddd;"></a></li>
                 <li class="oe_custom_bg" data-class="oe_img_bg"><a><b>Choose a photo...</b></a></li>
             </ul>
         </li>