diff options
| author | Géry Debongnie <ged@odoo.com> | 2014-10-07 16:38:25 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2014-10-21 09:33:51 +0200 |
| commit | 16aff1132baa2e3c32b05d8f4aad6e0cf11aeb2f (patch) | |
| tree | 8337b20e13ee4be17c546151b179a628e393a111 /addons/web_view_editor/static/src | |
| parent | 8f08d74660ce71792f7d4294648c8753f1428a5d (diff) | |
[FIX] make the view editor work
with the recent changes in view manager, it was kind of broken.
Diffstat (limited to 'addons/web_view_editor/static/src')
| -rw-r--r-- | addons/web_view_editor/static/src/js/view_editor.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js index ad5e991ae66..98a135a4472 100644 --- a/addons/web_view_editor/static/src/js/view_editor.js +++ b/addons/web_view_editor/static/src/js/view_editor.js @@ -3,8 +3,8 @@ var _t = instance.web._t; var QWeb = instance.web.qweb; instance.web.ViewManagerAction.include({ on_debug_changed:function(evt){ - var val = $(evt.currentTarget).find('option:selected').val(), - current_view = this.views[this.active_view].controller; + var val = $(evt.target).data().action, + current_view = this.active_view.controller; if(val === "manage_views"){ if (current_view.fields_view && current_view.fields_view.arch) { var view_editor = new instance.web_view_editor.ViewEditor(current_view, current_view.$el, this.dataset, current_view.fields_view.arch); @@ -13,7 +13,6 @@ instance.web.ViewManagerAction.include({ this.do_warn(_t("Manage Views"), _t("Could not find current view declaration")); } - evt.currentTarget.selectedIndex = 0; }else{ return this._super.apply(this,arguments); } @@ -51,6 +50,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ views_switcher: false, action_buttons: false, search_view: false, + headless: true, pager: false, radio: true, select_view_id: self.parent.fields_view.view_id @@ -71,7 +71,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ this.action_manager.appendTo(this.view_edit_dialog.$el); $.when(this.action_manager.do_action(action)).done(function() { var viewmanager = self.action_manager.inner_widget; - var controller = viewmanager.views[viewmanager.active_view].controller; + var controller = viewmanager.active_view.controller; $(controller.groups).bind({ 'selected': function (e, ids, records, deselected) { self.main_view_id = ids[0]; @@ -408,7 +408,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ action_manager.do_action(action); }}, {text: _t("Close"), click: function(){ - self.action_manager.inner_widget.views[self.action_manager.inner_widget.active_view].controller.reload_content(); + self.action_manager.inner_widget.active_view.controller.reload_content(); self.edit_xml_dialog.close(); }} ] |
