[IMP] disable RTE on t-record results (data-oe-type)

bzr revid: xmo@openerp.com-20130726134459-8mb3p4eh2ob8rxyq
This commit is contained in:
Xavier Morel
2013-07-26 15:44:59 +02:00
parent 5176607c2a
commit 7294033e1f
+5 -2
View File
@@ -142,8 +142,9 @@ instance.website.RTE = instance.web.Widget.extend({
},
start_edition: function ($elements) {
var self = this;
CKEDITOR.on('currentInstance', this.proxy('_change_focused_editor'));
$elements
.not('span')
.not('span, [data-oe-type]')
.each(function () {
var $this = $(this);
CKEDITOR.inline(this, self._config()).on('change', function () {
@@ -151,7 +152,6 @@ instance.website.RTE = instance.web.Widget.extend({
self.trigger('change', this, null);
});
});
this.$el.show();
},
button_for: function (command) {
@@ -173,6 +173,9 @@ instance.website.RTE = instance.web.Widget.extend({
_current_editor: function () {
return CKEDITOR.currentInstance;
},
_change_focused_editor: function () {
this.$el.toggle(!!CKEDITOR.currentInstance);
},
_config: function () {
return {
// Don't load ckeditor's style rules