handle message navigation
authorCornelius Weiß <mail@corneliusweiss.de>
Wed, 14 Dec 2011 14:20:03 +0000 (15:20 +0100)
committerCornelius Weiß <mail@corneliusweiss.de>
Wed, 14 Dec 2011 14:21:20 +0000 (15:21 +0100)
tine20/Calendar/js/iMIPDetailsPanel.js

index 65fb9f1..fe595a5 100644 (file)
@@ -50,9 +50,11 @@ Tine.Calendar.iMIPDetailsPanel = Ext.extend(Tine.Calendar.EventDetailsPanel, {
         
         
         this.iMIPrecord = new Tine.Calendar.Model.iMIP(this.preparedPart.preparedData);
-        this.iMIPrecord.set('event', Tine.Calendar.backend.recordReader({
-            responseText: Ext.util.JSON.encode(this.preparedPart.preparedData.event)
-        }));
+        if (! Ext.isFunction(this.iMIPrecord.get('event').beginEdit)) {
+            this.iMIPrecord.set('event', Tine.Calendar.backend.recordReader({
+                responseText: Ext.util.JSON.encode(this.preparedPart.preparedData.event)
+            }));
+        }
         
         this.initIMIPToolbar();
         
@@ -68,6 +70,7 @@ Tine.Calendar.iMIPDetailsPanel = Ext.extend(Tine.Calendar.EventDetailsPanel, {
         this.iMIPclause.setText(this.app.i18n._('Checking Calendar Data...'));
         
         Tine.Calendar.iMIPPrepare(this.iMIPrecord.data, function(result, response) {
+            this.preparedPart.preparedData = result;
             if (response.error) {
                 // give up!
                 this.iMIPrecord.set('preconditions', {'GENERIC': 'generic problem'});
@@ -92,6 +95,7 @@ Tine.Calendar.iMIPDetailsPanel = Ext.extend(Tine.Calendar.EventDetailsPanel, {
         this.getLoadMask().show();
         
         Tine.Calendar.iMIPProcess(this.iMIPrecord.data, status, function(result, response) {
+            this.preparedPart.preparedData = result;
             if (response.error) {
                 // precondition changed?  
                 return this.prepareIMIP();