From: Christophe Simonis Date: Thu, 16 Oct 2014 14:04:39 +0000 (+0200) Subject: [MERGE] forward port of branch 8.0 up to 2b192be X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=52fee2811d658031a34257b911b1d2b40bfa0c04;p=odoo%2Fodoo.git [MERGE] forward port of branch 8.0 up to 2b192be --- 52fee2811d658031a34257b911b1d2b40bfa0c04 diff --cc addons/event/event.py index 454454b,9aab9b8..5fded7e --- a/addons/event/event.py +++ b/addons/event/event.py @@@ -154,18 -139,21 +154,23 @@@ class event_event(models.Model) else: self.date_end_located = False + @api.one + @api.depends('address_id') + def _compute_country(self): + self.country_id = self.address_id.country_id + - date_begin_located = fields.Datetime(string='Start Date Located', compute='_compute_date_begin_tz') - date_end_located = fields.Datetime(string='End Date Located', compute='_compute_date_end_tz') - state = fields.Selection([ - ('draft', 'Unconfirmed'), - ('cancel', 'Cancelled'), - ('confirm', 'Confirmed'), - ('done', 'Done') - ], string='Status', default='draft', readonly=True, required=True, copy=False, + ('draft', 'Unconfirmed'), ('cancel', 'Cancelled'), + ('confirm', 'Confirmed'), ('done', 'Done')], + string='Status', default='draft', readonly=True, required=True, copy=False, help="If event is created, the status is 'Draft'. If event is confirmed for the particular dates the status is set to 'Confirmed'. If the event is over, the status is set to 'Done'. If event is cancelled the status is set to 'Cancelled'.") + auto_confirm = fields.Boolean(string='Auto Confirmation Activated', compute='_compute_auto_confirm') + + @api.one + def _compute_auto_confirm(self): + self.auto_confirm = self.env['ir.values'].get_default('marketing.config.settings', 'auto_confirmation') + + # Mailing email_registration_id = fields.Many2one( 'email.template', string='Registration Confirmation Email', domain=[('model', '=', 'event.registration')], @@@ -174,18 -162,39 +179,17 @@@ 'email.template', string='Event Confirmation Email', domain=[('model', '=', 'event.registration')], help="If you set an email template, each participant will receive this email announcing the confirmation of the event.") - reply_to = fields.Char(string='Reply-To Email', - readonly=False, states={'done': [('readonly', True)]}, + reply_to = fields.Char( + string='Reply-To Email', readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one.") - address_id = fields.Many2one('res.partner', string='Location', - default=lambda self: self.env.user.company_id.partner_id, + address_id = fields.Many2one( + 'res.partner', string='Location', default=lambda self: self.env.user.company_id.partner_id, readonly=False, states={'done': [('readonly', True)]}) - country_id = fields.Many2one( - 'res.country', string='Country', related='address_id.country_id', - store=True, readonly=False, states={'done': [('readonly', True)]}) + country_id = fields.Many2one('res.country', string='Country', + store=True, compute='_compute_country') - description = fields.Html(string='Description', oldname='note', translate=True, + description = fields.Html( + string='Description', oldname='note', translate=True, readonly=False, states={'done': [('readonly', True)]}) - company_id = fields.Many2one('res.company', string='Company', change_default=True, - default=lambda self: self.env['res.company']._company_default_get('event.event'), - required=False, readonly=False, states={'done': [('readonly', True)]}) - organizer_id = fields.Many2one('res.partner', string='Organizer', - default=lambda self: self.env.user.company_id.partner_id) - - is_subscribed = fields.Boolean(string='Subscribed', - compute='_compute_subscribe') - - @api.one - @api.depends('registration_ids') - def _count_registrations(self): - self.count_registrations = len(self.registration_ids) - - @api.one - @api.depends('registration_ids.user_id', 'registration_ids.state') - def _compute_subscribe(self): - """ Determine whether the current user is already subscribed to any event in `self` """ - user = self.env.user - self.is_subscribed = any( - reg.user_id == user and reg.state in ('open', 'done') - for reg in self.registration_ids - ) @api.multi @api.depends('name', 'date_begin', 'date_end') diff --cc addons/point_of_sale/static/src/js/screens.js index 6572071,63caa5f..c38a719 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@@ -1080,158 -1105,155 +1080,166 @@@ function openerp_pos_screens(instance, } } }, - back: function() { - this.remove_empty_lines(); - this.pos_widget.screen_selector.set_current_screen(this.back_screen); + click_numpad: function(button) { + this.payment_input(button.data('action')); }, - bind_events: function() { - if(this.old_order){ - this.old_order.unbind(null,null,this); - } - var order = this.pos.get('selectedOrder'); - order.bind('change:selected_paymentline',this.focus_selected_line,this); - - this.old_order = order; - - if(this.old_paymentlines){ - this.old_paymentlines.unbind(null,null,this); - } - var paymentlines = order.get('paymentLines'); - paymentlines.bind('add', this.add_paymentline, this); - paymentlines.bind('change:selected', this.rerender_paymentline, this); - paymentlines.bind('change:amount', function(line){ - if(!line.selected && line.node){ - line.node.value = line.amount.toFixed(2); - } - this.update_payment_summary(); - },this); - paymentlines.bind('remove', this.remove_paymentline, this); - paymentlines.bind('all', this.update_payment_summary, this); - - this.old_paymentlines = paymentlines; - - if(this.old_orderlines){ - this.old_orderlines.unbind(null,null,this); + render_numpad: function() { + var self = this; + var numpad = $(QWeb.render('PaymentScreen-Numpad', { widget:this })); + numpad.on('click','button',function(){ + self.click_numpad($(this)); + }); + return numpad; + }, + click_delete_paymentline: function(cid){ + var lines = this.pos.get_order().get('paymentLines').models; + for ( var i = 0; i < lines.length; i++ ) { + if (lines[i].cid === cid) { + this.pos.get_order().removePaymentline(lines[i]); + this.reset_input(); + this.render_paymentlines(); + return; + } } - var orderlines = order.get('orderLines'); - orderlines.bind('all', this.update_payment_summary, this); - - this.old_orderlines = orderlines; }, - focus_selected_line: function(){ - var line = this.pos.get('selectedOrder').selected_paymentline; - if(line){ - var input = line.node.querySelector('input'); - if(!input){ + click_paymentline: function(cid){ + var lines = this.pos.get_order().get('paymentLines').models; + for ( var i = 0; i < lines.length; i++ ) { + if (lines[i].cid === cid) { + this.pos.get_order().selectPaymentline(lines[i]); + this.reset_input(); + this.render_paymentlines(); return; } - var value = input.value; - input.focus(); + } + }, + render_paymentlines: function() { + var self = this; + var order = this.pos.get_order(); + var lines = order.get('paymentLines').models; - if(this.numpad_state){ - this.numpad_state.reset(); - } + this.$('.paymentlines-container').empty(); + var lines = $(QWeb.render('PaymentScreen-Paymentlines', { + widget: this, + order: order, + paymentlines: lines, + })); - if(Number(value) === 0){ - input.value = ''; - }else{ - input.value = value; - input.select(); + lines.on('click','.delete-button',function(){ + self.click_delete_paymentline($(this).data('cid')); + }); + + lines.on('click','.paymentline',function(){ + self.click_paymentline($(this).data('cid')); + }); + + lines.appendTo(this.$('.paymentlines-container')); + }, + click_paymentmethods: function(id) { + var cashregister = null; + for ( var i = 0; i < this.pos.cashregisters.length; i++ ) { + if ( this.pos.cashregisters[i].journal_id[0] === id ){ + cashregister = this.pos.cashregisters[i]; + break; } } + this.pos.get_order().addPaymentline( cashregister ); + this.reset_input(); + this.render_paymentlines(); }, - add_paymentline: function(line) { - var list_container = this.el.querySelector('.payment-lines'); - list_container.appendChild(this.render_paymentline(line)); - - if(this.numpad_state){ - this.numpad_state.reset(); + render_paymentmethods: function() { + var self = this; + var methods = $(QWeb.render('PaymentScreen-Paymentmethods', { widget:this })); + methods.on('click','.paymentmethod',function(){ + self.click_paymentmethods($(this).data('id')); + }); + return methods; + }, + click_invoice: function(){ + var order = this.pos.get_order(); + order.set_to_invoice(!order.is_to_invoice()); + if (order.is_to_invoice()) { + this.$('.js_invoice').addClass('highlight'); + } else { + this.$('.js_invoice').removeClass('highlight'); } }, - render_paymentline: function(line){ - var el_html = openerp.qweb.render('Paymentline',{widget: this, line: line}); - el_html = _.str.trim(el_html); + renderElement: function() { + var self = this; + this._super(); - var el_node = document.createElement('tbody'); - el_node.innerHTML = el_html; - el_node = el_node.childNodes[0]; - el_node.line = line; - el_node.querySelector('.paymentline-delete') - .addEventListener('click', this.line_delete_handler); - el_node.addEventListener('click', this.line_click_handler); - el_node.querySelector('input') - .addEventListener('keyup', this.line_change_handler); + var numpad = this.render_numpad(); + numpad.appendTo(this.$('.payment-numpad')); - line.node = el_node; + var methods = this.render_paymentmethods(); + methods.appendTo(this.$('.paymentmethods-container')); + + this.render_paymentlines(); + + this.$('.back').click(function(){ + self.pos_widget.screen_selector.back(); + }); + + this.$('.next').click(function(){ + self.validate_order(); + }); + + this.$('.js_invoice').click(function(){ + self.click_invoice(); + }); - return el_node; - }, - rerender_paymentline: function(line){ - var old_node = line.node; - var new_node = this.render_paymentline(line); - - old_node.parentNode.replaceChild(new_node,old_node); }, - remove_paymentline: function(line){ - line.node.parentNode.removeChild(line.node); - line.node = undefined; + show: function(){ + this.pos.get_order().clean_empty_paymentlines(); + this.reset_input(); + this.render_paymentlines(); + this.order_changes(); + window.document.body.addEventListener('keydown',this.keyboard_handler); + this._super(); }, - renderElement: function(){ + hide: function(){ + window.document.body.removeEventListener('keydown',this.keyboard_handler); this._super(); - - var paymentlines = this.pos.get('selectedOrder').get('paymentLines').models; - var list_container = this.el.querySelector('.payment-lines'); - - for(var i = 0; i < paymentlines.length; i++){ - list_container.appendChild(this.render_paymentline(paymentlines[i])); - } - - this.update_payment_summary(); - }, - update_payment_summary: function() { - var currentOrder = this.pos.get('selectedOrder'); - var paidTotal = currentOrder.getPaidTotal(); - var dueTotal = currentOrder.getTotalTaxIncluded(); - var remaining = dueTotal > paidTotal ? dueTotal - paidTotal : 0; - var change = paidTotal > dueTotal ? paidTotal - dueTotal : 0; - - this.$('.payment-due-total').html(this.format_currency(dueTotal)); - this.$('.payment-paid-total').html(this.format_currency(paidTotal)); - this.$('.payment-remaining').html(this.format_currency(remaining)); - this.$('.payment-change').html(this.format_currency(change)); - if(currentOrder.selected_orderline === undefined){ - remaining = 1; // What is this ? - } - - if(this.pos_widget.action_bar){ - this.pos_widget.action_bar.set_button_disabled('validation', !this.is_paid()); - this.pos_widget.action_bar.set_button_disabled('invoice', !this.is_paid()); + }, + // sets up listeners to watch for order changes + watch_order_changes: function() { + var self = this; + var order = this.pos.get_order(); + if(this.old_order){ + this.old_order.unbind(null,null,this); } + order.bind('all',function(){ + self.order_changes(); + }); + this.old_order = order; }, - is_paid: function(){ - var currentOrder = this.pos.get('selectedOrder'); - return (currentOrder.getTotalTaxIncluded() < 0.000001 - || currentOrder.getPaidTotal() + 0.000001 >= currentOrder.getTotalTaxIncluded()); - + // called when the order is changed, used to show if + // the order is paid or not + order_changes: function(){ + var self = this; + var order = this.pos.get_order(); + if (order.isPaid()) { + self.$('.next').addClass('highlight'); + }else{ + self.$('.next').removeClass('highlight'); + } }, - validate_order: function(options) { + // Check if the order is paid, then sends it to the backend, + // and complete the sale process + validate_order: function() { var self = this; - options = options || {}; - var currentOrder = this.pos.get('selectedOrder'); + var order = this.pos.get_order(); - if(currentOrder.get('orderLines').models.length === 0){ ++ if(order.get('orderLines').models.length === 0){ + this.pos_widget.screen_selector.show_popup('error',{ + 'message': _t('Empty Order'), + 'comment': _t('There must be at least one product in your order before it can be validated'), + }); + return; + } + - if(!this.is_paid()){ + if (!order.isPaid() || this.invoicing) { return; } diff --cc addons/point_of_sale/static/src/js/widget_base.js index f27bbec,1b6daaa..8820cb8 --- a/addons/point_of_sale/static/src/js/widget_base.js +++ b/addons/point_of_sale/static/src/js/widget_base.js @@@ -41,11 -33,11 +41,11 @@@ function openerp_pos_basewidget(instanc amount = amount.toFixed(decimals); } if(this.currency.position === 'after'){ - return amount + ' ' + this.currency.symbol; + return amount + ' ' + (this.currency.symbol || ''); }else{ - return this.currency.symbol + ' ' + amount; + return (this.currency.symbol || '') + ' ' + amount; } - } + }; }, show: function(){ diff --cc addons/website/static/src/css/website.css index 09d00d6,2d43b9e..589faf1 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@@ -1,4 -1,4 +1,4 @@@ --@charset "utf-8"; ++@charset "UTF-8"; /* THIS CSS FILE IS FOR WEBSITE THEMING CUSTOMIZATION ONLY * * css for editor buttons, openerp widget included in the website and other @@@ -81,13 -81,13 +81,11 @@@ /* Extra Styles */ img.shadow { -- -webkit-border-radius: 3px; -moz-border-radius: 3px; -- -ms-border-radius: 3px; -- -o-border-radius: 3px; ++ -webkit-border-radius: 3px; border-radius: 3px; -- -webkit-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2); ++ -webkit-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2); box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2); margin: 0 auto; } @@@ -104,7 -104,7 +102,7 @@@ header a.navbar-brand img } #wrapwrap p:empty:after { -- content: "\2060"; ++ content: "⁠"; } /* ----- Snippets Styles ----- */ @@@ -123,10 -123,10 +121,8 @@@ #oe_main_menu_navbar { min-height: 34px; z-index: 1001; -- -webkit-border-radius: 0px; -moz-border-radius: 0px; -- -ms-border-radius: 0px; -- -o-border-radius: 0px; ++ -webkit-border-radius: 0px; border-radius: 0px; margin-bottom: 0px; } @@@ -162,8 -162,8 +158,8 @@@ /* ----- BOOTSTRAP HACK FOR STICKY FOOTER ----- */ html, body, #wrapwrap { -- -webkit-box-sizing: border-box; -moz-box-sizing: border-box; ++ -webkit-box-sizing: border-box; box-sizing: border-box; height: 100%; } @@@ -356,114 -360,63 +352,171 @@@ ul.nav-stacked > li > a padding: 4px 0; } + .o_image_floating { + width: 40%; + margin: 4px; + } + .o_image_floating div.o_container { + position: relative; + } + .o_image_floating div.o_container mark { + display: block; + position: absolute; + bottom: 0; + width: 100%; + background-color: rgba(86, 61, 124, 0.25); + } + .o_image_floating div.o_container mark a { + color: white; + } + .o_image_floating.o_hide_link div.o_container mark { + display: none; + } + .o_image_floating.o_margin_s { + margin-bottom: 4px; + } + .o_image_floating.o_margin_s.pull-right { + margin-left: 8px; + } + .o_image_floating.o_margin_s.pull-left { + margin-right: 8px; + } + .o_image_floating.o_margin_m { + margin-bottom: 8px; + } + .o_image_floating.o_margin_m.pull-right { + margin-left: 12px; + } + .o_image_floating.o_margin_m.pull-left { + margin-right: 12px; + } + .o_image_floating.o_margin_l { + margin-bottom: 12px; + } + .o_image_floating.o_margin_l.pull-right { + margin-left: 16px; + } + .o_image_floating.o_margin_l.pull-left { + margin-right: 16px; + } + .o_image_floating.o_margin_xl { + margin-bottom: 24px; + } + .o_image_floating.o_margin_xl.pull-right { + margin-left: 32px; + } + .o_image_floating.o_margin_xl.pull-left { + margin-right: 32px; + } + +/* gallery */ +.o_gallery.o_grid.o_spc-none div.row, .o_gallery.o_masonry.o_spc-none div.row { + margin: 0; +} +.o_gallery.o_grid.o_spc-none div.row > *, .o_gallery.o_masonry.o_spc-none div.row > * { + padding: 0; +} +.o_gallery.o_grid.o_spc-small div.row, .o_gallery.o_masonry.o_spc-small div.row { + margin: 5px 0; +} +.o_gallery.o_grid.o_spc-small div.row > *, .o_gallery.o_masonry.o_spc-small div.row > * { + padding: 0 5px; +} +.o_gallery.o_grid.o_spc-medium div.row, .o_gallery.o_masonry.o_spc-medium div.row { + margin: 10px 0; +} +.o_gallery.o_grid.o_spc-medium div.row > *, .o_gallery.o_masonry.o_spc-medium div.row > * { + padding: 0 10px; +} +.o_gallery.o_grid.o_spc-big div.row, .o_gallery.o_masonry.o_spc-big div.row { + margin: 15px 0; +} +.o_gallery.o_grid.o_spc-big div.row > *, .o_gallery.o_masonry.o_spc-big div.row > * { + padding: 0 15px; +} +.o_gallery.o_grid .img, .o_gallery.o_masonry .img { + width: 100%; +} +.o_gallery.o_grid.size-auto .row { + height: auto; +} +.o_gallery.o_grid.size-small .row { + height: 100px; +} +.o_gallery.o_grid.size-medium .row { + height: 250px; +} +.o_gallery.o_grid.size-big .row { + height: 400px; +} +.o_gallery.o_grid.size-small .img, .o_gallery.o_grid.size-medium .img, .o_gallery.o_grid.size-big .img { + height: 100%; +} +.o_gallery.o_nomode.o_spc-none .img { + padding: 0; +} +.o_gallery.o_nomode.o_spc-small .img { + padding: 5px; +} +.o_gallery.o_nomode.o_spc-medium .img { + padding: 10px; +} +.o_gallery.o_nomode.o_spc-big .img { + padding: 15px; +} +.o_gallery.o_slideshow .carousel ul.carousel-indicators li { - border: 1px solid #aaaaaa; ++ border: 1px solid #aaa; +} +.o_gallery .carousel-inner .item img { + max-width: none; +} + +.o_gallery.o_slideshow > .container { + height: 100%; +} + +.o_gallery.o_slideshow .carousel, .modal-body.o_slideshow .carousel { + height: 100%; +} +.o_gallery.o_slideshow .carousel img, .modal-body.o_slideshow .carousel img { + max-height: 100%; + max-width: 100%; + margin: auto; + position: relative; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +} +.o_gallery.o_slideshow .carousel ul.carousel-indicators, .modal-body.o_slideshow .carousel ul.carousel-indicators { + display: block; + height: auto; + padding: 0; + border-width: 0; + position: absolute; + bottom: 0; +} +.o_gallery.o_slideshow .carousel ul.carousel-indicators li, .modal-body.o_slideshow .carousel ul.carousel-indicators li { + list-style-image: none; + display: inline-block; + width: 35px; + height: 35px; + margin: 0 0px 5px 5px; + padding: 0; - border: 1px solid #aaaaaa; ++ border: 1px solid #aaa; + text-indent: initial; + background-size: cover; + opacity: 0.5; - background-color: black; ++ background-color: #000; +} +.o_gallery.o_slideshow .carousel ul.carousel-indicators li.active, .modal-body.o_slideshow .carousel ul.carousel-indicators li.active { + opacity: 1; +} +.o_gallery.o_slideshow .carousel .carousel-control.left, .o_gallery.o_slideshow .carousel .carousel-control.right, .modal-body.o_slideshow .carousel .carousel-control.left, .modal-body.o_slideshow .carousel .carousel-control.right { + background-image: none; + background-color: transparent; +} + /* Parallax Theme */ div.carousel .carousel-indicators li { border: 1px solid grey; @@@ -497,6 -450,62 +550,62 @@@ div.carousel div.carousel-content padding: 32px 0; } -/* Background */ ++/* Background (kept for 8.0 compatibility) */ + .oe_dark { + background: #eff8f8; + background: rgba(200, 200, 200, 0.14); + } + + .oe_black { + background-color: rgba(0, 0, 0, 0.9); + color: white; + } + + .oe_green { - background-color: #169c78; ++ background-color: #169C78; + color: white; + } + .oe_green .text-muted { - color: #dddddd; ++ color: #ddd; + } + + .oe_blue_light { + background-color: #41b6ab; + color: white; + } + .oe_blue_light .text-muted { - color: #dddddd; ++ color: #ddd; + } + + .oe_blue { + background-color: #34495e; + color: white; + } + + .oe_orange { + background-color: #f05442; + color: white; + } + .oe_orange .text-muted { - color: #dddddd; ++ color: #ddd; + } + + .oe_purple { + background-color: #b163a3; + color: white; + } + .oe_purple .text-muted { - color: #dddddd; ++ color: #ddd; + } + + .oe_red { - background-color: #9c1b31; ++ background-color: #9C1b31; + color: white; + } + .oe_red .text-muted { - color: #dddddd; ++ color: #ddd; + } + /* Misc */ .texttop { vertical-align: top; @@@ -547,10 -556,10 +656,8 @@@ span[data-oe-type="monetary"] } .oe_template_fallback { -- -webkit-column-count: 3; -moz-column-count: 3; -- -ms-column-count: 3; -- -o-column-count: 3; ++ -webkit-column-count: 3; column-count: 3; } diff --cc addons/website/static/src/css/website.sass index b9d7dc1,f08e25a..ac13973 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@@ -285,102 -288,48 +285,144 @@@ ul.nav-stacked > li > .hr padding: 4px 0 + + .o_image_floating + width: 40% + margin: 4px + div.o_container + position: relative + mark + display: block + position: absolute + bottom: 0 + width: 100% + background-color: rgba(86,61,124,.25) + a + color: white + &.o_hide_link div.o_container mark + display: none + &.o_margin_s + margin-bottom: 4px + &.pull-right + margin-left: 8px + &.pull-left + margin-right: 8px + &.o_margin_m + margin-bottom: 8px + &.pull-right + margin-left: 12px + &.pull-left + margin-right: 12px + &.o_margin_l + margin-bottom: 12px + &.pull-right + margin-left: 16px + &.pull-left + margin-right: 16px + &.o_margin_xl + margin-bottom: 24px + &.pull-right + margin-left: 32px + &.pull-left + margin-right: 32px + + +/* gallery */ + +.o_gallery + &.o_grid, &.o_masonry + &.o_spc-none + div.row + margin: 0 + div.row > * + padding: 0 + &.o_spc-small + div.row + margin: 5px 0 + div.row > * + padding: 0 5px + &.o_spc-medium + div.row + margin: 10px 0 + div.row > * + padding: 0 10px + &.o_spc-big + div.row + margin: 15px 0 + div.row > * + padding: 0 15px + .img + width: 100% + &.o_grid + &.size-auto .row + height: auto + &.size-small .row + height: 100px + &.size-medium .row + height: 250px + &.size-big .row + height: 400px + &.size-small, &.size-medium, &.size-big + .img + height: 100% + &.o_nomode + &.o_spc-none + .img + padding: 0 + &.o_spc-small + .img + padding: 5px + &.o_spc-medium + .img + padding: 10px + &.o_spc-big + .img + padding: 15px + + &.o_slideshow .carousel ul.carousel-indicators li + border: 1px solid #aaa + .carousel-inner .item img + max-width: none + +.o_gallery.o_slideshow > .container + height: 100% + +.o_gallery.o_slideshow .carousel, .modal-body.o_slideshow .carousel + height: 100% + img + max-height: 100% + max-width: 100% + margin: auto + position: relative + top: 50% + -webkit-transform: translateY(-50%) + -ms-transform: translateY(-50%) + transform: translateY(-50%) + ul.carousel-indicators + display: block + height: auto + padding: 0 + border-width: 0 + position: absolute + bottom: 0 + li + list-style-image: none + display: inline-block + width: 35px + height: 35px + margin: 0 0px 5px 5px + padding: 0 + border: 1px solid #aaa + text-indent: initial + background-size: cover + opacity: 0.5 + background-color: #000 + li.active + opacity: 1 + .carousel-control.left, .carousel-control.right + background-image: none + background-color: transparent + /* Parallax Theme */ div.carousel @@@ -410,6 -359,50 +452,50 @@@ vertical-align: middle padding: 32px 0 -/* Background */ ++/* Background (kept for 8.0 compatibility) */ + + .oe_dark + background: #eff8f8 + background: rgba(200, 200, 200, 0.14) + + .oe_black + background-color: rgba(0, 0, 0, 0.9) + color: white + + .oe_green + background-color: #169C78 + color: white + .text-muted + color: #ddd + + .oe_blue_light + background-color: #41b6ab + color: white + .text-muted + color: #ddd + + .oe_blue + background-color: #34495e + color: white + + .oe_orange + background-color: #f05442 + color: white + .text-muted + color: #ddd + + .oe_purple + background-color: #b163a3 + color: white + .text-muted + color: #ddd + + .oe_red + background-color: #9C1b31 + color: white + .text-muted + color: #ddd + /* Misc */ .texttop diff --cc addons/website/static/src/js/website.snippets.editor.js index eeb8261,480dc7a..6147ada --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@@ -1112,12 -1127,13 +1124,12 @@@ var self = this; this.$target.find('.carousel-control').off('click').on('click', function () { self.$target.carousel( $(this).data('slide')); }); - - this.$target.find('.carousel-image, .carousel-inner .content > div').attr('contentEditable', 'true'); - this.$target.find('.carousel-image').attr('attributeEditable', 'true'); this._super(); + + /* Fix: backward compatibility saas-3 */ + this.$target.find('.item.text_image, .item.image_text, .item.text_only').find('.container > .carousel-caption > div, .container > img.carousel-image').attr('contentEditable', 'true'); }, }); - website.snippet.options.marginAndResize = website.snippet.Option.extend({ start: function () { var self = this; diff --cc addons/website/views/snippets.xml index 4f0b5b7,cee7868..20db73d --- a/addons/website/views/snippets.xml +++ b/addons/website/views/snippets.xml @@@ -89,9 -101,59 +89,55 @@@ +
+
+ + Image-Floating +
+
+
+
+
+
+
+ + Click Here +
+ +
+

What a day it was yesterday - such a big day for us!

+

+ In case you still feel a bit puzzled about all + of our yesterday's announcements, here is a little + summary for you.
+ We have decided to change the + name because "OpenERP" didn't reflect the offering + of the company anymore. With our newest apps, such + as Website Builder, PoS or eCommerce, we have + moved beyond the ERP territory.
+ But don't worry, Odoo is and always will be + fully open source. You can read more about the new name here. + We have also prepared a short FAQ to explain all these changes + to all of you.
+

+

Discover more about Odoo

+

+ With Odoo's fully integrated software, you can easily manage your + meetings, schedule business calls, create recurring meetings, + synchronize your agenda and easily keep in touch with your colleagues, + partners and other people involved in projects or business discussions. +

Check now and discover more today! +

+
+
+
+
+
-
-
- - Big Message -
-
+
+

Sell Online. Easily.

@@@ -281,9 -375,28 +327,24 @@@

+
+
+ + Image Floating +
+
+
+ + Click Here +
+ +
+
-
-
- - Separator -
-
+
+
@@@ -805,191 -962,74 +866,221 @@@
+ +
+ + + +
  • -
  • - Add Slide + +
  • + + +
    + +
    + -
  • - Remove Slide +
  • + +
    + + + + + + +
    + +
    + +
  • +
  • Add Slide
  • +
  • Remove Slide
  • -
    +
    -
    +
    -
    + data-drop-near=".row > [class*='col-md-']">
    -
    + data-drop-near="p, h1, h2, h3, blockquote, .well, .panel, .oe_share" + data-drop-in=".content">
    -
    + data-drop-in=".oe_structure, [data-oe-type=html]">
    +
    + +
    + +
    +
  • Hide link
  • +
    + +
    + +
    + -
    + ]]> + + diff --cc openerp/addons/base/ir/ir_qweb.py index bfdab95,6a54e6f..4622bb8 --- a/openerp/addons/base/ir/ir_qweb.py +++ b/openerp/addons/base/ir/ir_qweb.py @@@ -1440,15 -1461,14 +1485,15 @@@ class PreprocessedCSS(StylesheetAsset) if self.url: ira = self.registry['ir.attachment'] url = self.html_url % self.url - domain = [('type', '=', 'binary'), ('url', '=', self.url)] + domain = [('type', '=', 'binary'), ('url', '=', url)] - ira_id = ira.search(self.cr, self.uid, domain, context=self.context) + ira_id = ira.search(self.cr, openerp.SUPERUSER_ID, domain, context=self.context) + datas = self.content.encode('utf8').encode('base64') if ira_id: # TODO: update only if needed - ira.write(self.cr, openerp.SUPERUSER_ID, [ira_id], {'datas': self.content}, context=self.context) + ira.write(self.cr, openerp.SUPERUSER_ID, ira_id, {'datas': datas}, context=self.context) else: ira.create(self.cr, openerp.SUPERUSER_ID, dict( - datas=self.content.encode('utf8').encode('base64'), + datas=datas, mimetype='text/css', type='binary', name=url,