[MERGE] Sync with website-al
bzr revid: tde@openerp.com-20131218132218-y5gn6noemlhmtuth
This commit is contained in:
@@ -73,12 +73,21 @@ class Field(orm.AbstractModel):
|
||||
|
||||
def attributes(self, cr, uid, field_name, record, options,
|
||||
source_element, g_att, t_att, qweb_context, context=None):
|
||||
if options is None: options = {}
|
||||
column = record._model._all_columns[field_name].column
|
||||
attrs = [('data-oe-translate', 1 if column.translate else 0)]
|
||||
|
||||
placeholder = options.get('placeholder') \
|
||||
or source_element.getAttribute('placeholder') \
|
||||
or getattr(column, 'placeholder', None)
|
||||
if placeholder:
|
||||
attrs.append(('placeholder', placeholder))
|
||||
|
||||
return itertools.chain(
|
||||
super(Field, self).attributes(cr, uid, field_name, record, options,
|
||||
source_element, g_att, t_att,
|
||||
qweb_context, context=context),
|
||||
[('data-oe-translate', 1 if column.translate else 0)]
|
||||
attrs
|
||||
)
|
||||
|
||||
def value_from_string(self, value):
|
||||
|
||||
@@ -211,9 +211,15 @@ ul.oe_menu_editor .disclose {
|
||||
}
|
||||
|
||||
.cke_widget_editable:empty:after {
|
||||
content: " ";
|
||||
opacity: 0.3;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.cke_widget_editable:not([placeholder]):empty::after {
|
||||
content: " ";
|
||||
}
|
||||
.cke_widget_editable[placeholder]:not(:focus):empty::after {
|
||||
content: attr(placeholder);
|
||||
}
|
||||
|
||||
.oe_carlos_danger {
|
||||
outline: 1px solid red !important;
|
||||
|
||||
@@ -171,11 +171,20 @@ ul.oe_menu_editor
|
||||
// Breaks completely horribly crazy products listing page, so take it out.
|
||||
.cke_widget_wrapper
|
||||
position: static !important
|
||||
|
||||
// prevent inline widgets from entirely disappearing when their (textual)
|
||||
// content is removed
|
||||
.cke_widget_editable:empty:after
|
||||
content: " "
|
||||
white-space: pre-wrap
|
||||
.cke_widget_editable
|
||||
// basic config
|
||||
&:empty:after
|
||||
opacity: 0.3
|
||||
white-space: pre-wrap
|
||||
// no @placeholder -> just add some padding
|
||||
&:not([placeholder]):empty::after
|
||||
content: " "
|
||||
// with placeholder and when not (yet) focused -> display placeholder
|
||||
&[placeholder]:not(:focus):empty::after
|
||||
content: attr(placeholder)
|
||||
|
||||
.oe_carlos_danger
|
||||
outline: 1px solid red !important
|
||||
|
||||
@@ -859,7 +859,7 @@
|
||||
var plugins = [
|
||||
'a11yhelp', 'basicstyles', 'blockquote',
|
||||
'clipboard', 'colorbutton', 'colordialog', 'dialogadvtab',
|
||||
'elementspath', 'enterkey', 'entities', 'filebrowser',
|
||||
'elementspath', /*'enterkey',*/ 'entities', 'filebrowser',
|
||||
'find', 'floatingspace','format', 'htmlwriter', 'iframe',
|
||||
'indentblock', 'indentlist', 'justify',
|
||||
'list', 'pastefromword', 'pastetext', 'preview',
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<template id="website.submenu" name="Submenu">
|
||||
<li t-if="not submenu.child_id">
|
||||
<a t-att-href="url_for(submenu.url)" t-ignore="true">
|
||||
<a t-att-href="url_for(submenu.url)" t-ignore="true" t-att-target="'blank' if submenu.new_window else None">
|
||||
<span t-field="submenu.name"/>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user