[ADD] placeholder support on t-field

A placeholder is looked up:

1. in the field's options ("placeholder")
2. on the t-field node itself (@placeholder)
3. on the field's column (.placeholder)

The first one found is used as the @placeholder of the resulting node
(in-HTML), and displayed when the field is empty and unfocused.

If no placeholder is found, an empty field just gets a small padding
in order to be easier to see & focus.

bzr revid: xmo@openerp.com-20131218114901-xi3ye11x5pysq2a2
This commit is contained in:
Xavier Morel
2013-12-18 12:49:01 +01:00
parent 128f1e1281
commit 90a9e522f3
3 changed files with 29 additions and 5 deletions
+7 -1
View File
@@ -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;