From 00d43cd601beb1927c421fca7c65df02002689ec Mon Sep 17 00:00:00 2001 From: jke-openerp Date: Tue, 17 Dec 2013 15:07:19 +0100 Subject: [PATCH] [TYPO] Typo and go in edit mode by default and not view mode when editing an event bzr revid: jke@openerp.com-20131217140719-3nh6pmwmg716d9jh --- addons/web_calendar/static/src/js/fullcalendar.js | 15 ++++++++++++--- .../static/src/xml/web_fullcalendar.xml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/addons/web_calendar/static/src/js/fullcalendar.js b/addons/web_calendar/static/src/js/fullcalendar.js index 207452e2a3a..ce03c8c63b1 100644 --- a/addons/web_calendar/static/src/js/fullcalendar.js +++ b/addons/web_calendar/static/src/js/fullcalendar.js @@ -802,10 +802,11 @@ openerp.web_calendar = function(instance) { return false; }, open_event: function(id,title) { + var self = this; if (! this.open_popup_action) { var index = this.dataset.get_id_index(id); this.dataset.index = index; - this.do_switch_view('form'); + this.do_switch_view('form', null, { mode: "edit" }); } else { @@ -823,7 +824,7 @@ openerp.web_calendar = function(instance) { var form_controller = pop.view_form; form_controller.on("load_record", self, function(){ button_delete = _.str.sprintf("",_t("Delete")); - button_edit = _.str.sprintf("",_t("Edit event >>")); + button_edit = _.str.sprintf("",_t("Edit Event")); pop.$el.closest(".ui-dialog").find(".ui-dialog-buttonpane").prepend(button_delete) @@ -837,6 +838,7 @@ openerp.web_calendar = function(instance) { ); $('.editme').click( function() { + /* var action = { type: 'ir.actions.act_window', res_model: 'crm.meeting', @@ -845,9 +847,16 @@ openerp.web_calendar = function(instance) { views: [[false, 'form']], res_id: id, context: {}, + mode:"edit", }; - $('.oe_form_button_cancel').trigger('click'); self.do_action(action); + */ + $('.oe_form_button_cancel').trigger('click'); + + var index = self.dataset.get_id_index(id); + self.dataset.index = index; + self.do_switch_view('form', null, { mode: "edit" }); + } ); diff --git a/addons/web_calendar/static/src/xml/web_fullcalendar.xml b/addons/web_calendar/static/src/xml/web_fullcalendar.xml index df838460452..d0c156b0133 100644 --- a/addons/web_calendar/static/src/xml/web_fullcalendar.xml +++ b/addons/web_calendar/static/src/xml/web_fullcalendar.xml @@ -63,7 +63,7 @@
- +