[IMP] make spans editable (though not RTE, not supported) & use t-record for company name
bzr revid: xmo@openerp.com-20130726113742-ix2f4tyy0xvoy9lq
This commit is contained in:
parent
7d59a7355f
commit
5176607c2a
|
@ -38,7 +38,12 @@ instance.website.EditorBar = instance.web.Widget.extend({
|
|||
edit: function () {
|
||||
this.$buttons.edit.prop('disabled', true);
|
||||
this.$buttons.cancel.prop('disabled', false);
|
||||
this.rte.start_edition($('[data-oe-model]').addClass('oe_editable'));
|
||||
// TODO: span edition changing edition state (save button)
|
||||
this.rte.start_edition(
|
||||
$('[data-oe-model]')
|
||||
.not('link, script')
|
||||
.prop('contentEditable', true)
|
||||
.addClass('oe_editable'));
|
||||
},
|
||||
rte_changed: function () {
|
||||
this.$buttons.save.prop('disabled', false);
|
||||
|
@ -138,8 +143,7 @@ instance.website.RTE = instance.web.Widget.extend({
|
|||
start_edition: function ($elements) {
|
||||
var self = this;
|
||||
$elements
|
||||
.not('link, script, span')
|
||||
.prop('contentEditable', true)
|
||||
.not('span')
|
||||
.each(function () {
|
||||
var $this = $(this);
|
||||
CKEDITOR.inline(this, self._config()).on('change', function () {
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="span4" name="about_us">
|
||||
<h5 t-esc="res_company.name">Company name</h5>
|
||||
<h5 t-record="res_company" t-field="name">Company name</h5>
|
||||
<ul>
|
||||
<li><a href="/page/website.contactus">Contact us</a></li>
|
||||
<li><a href="/page/website.news">News</a></li>
|
||||
|
|
Loading…
Reference in New Issue