Merge branch '2015.11' into 2015.11-develop
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 11 Jan 2016 16:25:47 +0000 (17:25 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 11 Jan 2016 16:25:47 +0000 (17:25 +0100)
Conflicts:
tine20/Tinebase/js/widgets/dialog/EditDialog.js

Change-Id: I5db8316d45ec94a8021760cf008132923bd0e29c

1  2 
tine20/Tinebase/js/widgets/dialog/EditDialog.js

@@@ -873,33 -855,42 +873,43 @@@ Tine.widgets.dialog.EditDialog = Ext.ex
                              // NOTE: We update the form also when window should be closed,
                              //       cause sometimes security restrictions might prevent
                              //       closing of native windows
 -                            this.onRecordLoad();
 +                            me.onRecordLoad();
                          }
 -                        var ticketFn = this.onAfterApplyChanges.deferByTickets(this, [closeWindow]),
 +                        var ticketFn = me.onAfterApplyChanges.deferByTickets(me, [closeWindow]),
                              wrapTicket = ticketFn();
 -                            
 -                        this.fireEvent('update', Ext.util.JSON.encode(this.record.data), this.mode, this, ticketFn);
 +
 +                        me.fireEvent('update', Ext.util.JSON.encode(me.record.data), me.mode, me, ticketFn);
                          wrapTicket();
                      },
 -                    failure: this.onRequestFailed,
 +                    failure: me.onRequestFailed,
                      timeout: 300000 // 5 minutes
-                 }, {
-                     duplicateCheck: me.doDuplicateCheck
-                 });
 -                }, this.getAdditionalSaveParams());
++                }, this.getAdditionalSaveParams(me));
              } else {
 -                this.onRecordLoad();
 -                var ticketFn = this.onAfterApplyChanges.deferByTickets(this, [closeWindow]),
 +                me.onRecordLoad();
 +                var ticketFn = me.onAfterApplyChanges.deferByTickets(me, [closeWindow]),
                      wrapTicket = ticketFn();
 -                    
 -                this.fireEvent('update', Ext.util.JSON.encode(this.record.data), this.mode, this, ticketFn);
 +
 +                me.fireEvent('update', Ext.util.JSON.encode(me.record.data), me.mode, me, ticketFn);
                  wrapTicket();
              }
 -        } else {
 -            this.saving = false;
 -            this.loadMask.hide();
 -            Ext.MessageBox.alert(_('Errors'), this.getValidationErrorMessage());
 -        }
 +        }, function (message) {
 +            me.saving = false;
 +            me.loadMask.hide();
 +            Ext.MessageBox.alert(_('Errors'), message);
 +        });
      },
 -    getAdditionalSaveParams: function() {
+     /**
+      * returns additional save params
+      *
++     * @param {EditDialog} me
+      * @returns {{duplicateCheck: boolean}}
+      */
 -            duplicateCheck: this.doDuplicateCheck
++    getAdditionalSaveParams: function(me) {
+         return {
++            duplicateCheck: me.doDuplicateCheck
+         };
+     },
      
      onAfterApplyChanges: function(closeWindow) {
          this.window.rename(this.windowNamePrefix + this.record.id);