0010140: add loadmask to all edit dialogs if its missing
authorAlexander Stintzing <a.stintzing@metaways.de>
Thu, 7 Aug 2014 12:16:32 +0000 (14:16 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 13 Aug 2014 14:55:17 +0000 (16:55 +0200)
add loadmask to all edit dialogs - eg: timesheet edit dialog

https://forge.tine20.org/mantisbt/view.php?id=10140

Change-Id: I6c9c2be808feb452e8b632af3998257cfdfc8055
Reviewed-on: http://gerrit.tine20.com/customers/946
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Courses/js/CourseEditDialog.js
tine20/Felamimail/js/MessageEditDialog.js
tine20/HumanResources/js/ExtraFreeTimeEditDialog.js
tine20/HumanResources/js/FreeTimeEditDialog.js
tine20/SimpleFAQ/js/FaqEditDialog.js
tine20/Timetracker/js/TimeaccountEditDialog.js
tine20/Timetracker/js/TimesheetEditDialog.js
tine20/Tinebase/js/widgets/dialog/EditDialog.js

index 0353a56..cdd92bb 100644 (file)
@@ -18,7 +18,6 @@ Tine.Courses.CourseEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
     appName: 'Courses',
     recordClass: Tine.Courses.Model.Course,
     recordProxy: Tine.Courses.coursesBackend,
-    loadRecord: false,
     evalGrants: false,
     
     /**
index 515c1b9..2c829f8 100644 (file)
@@ -744,11 +744,8 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
         if (this.record.get('note') && this.record.get('note') == '1') {
             this.button_saveEmailNote.toggle();
         }
-        var ticketFn = this.onAfterRecordLoad.deferByTickets(this),
-            wrapTicket = ticketFn();
         
-        this.fireEvent('load', this, this.record, ticketFn);
-        wrapTicket();
+        this.onAfterRecordLoad();
     },
 
     /**
index 5423a94..d40d284 100644 (file)
@@ -32,7 +32,6 @@ Tine.HumanResources.ExtraFreeTimeEditDialog = Ext.extend(Tine.widgets.dialog.Edi
     evalGrants: false,
     showContainerSelector: false,
     mode: 'local',
-    loadRecord: false,
     windowWidth: 400,
     windowHeight: 350,
     /**
index bbe149a..966bdda 100644 (file)
@@ -25,7 +25,6 @@ Tine.HumanResources.FreeTimeEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
      * @private
      */
     mode: 'local',
-    loadRecord: false,
     
     /**
      * show private Information (autoset due to rights)
index f6600d2..88f2972 100644 (file)
@@ -17,7 +17,6 @@ Tine.SimpleFAQ.FaqEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
     appName: 'SimpleFAQ',
     recordClass: Tine.SimpleFAQ.Model.Faq,
     recordProxy: Tine.SimpleFAQ.faqBackend,
-    loadRecord: false,
     showContainerSelector: true,
 
     /**
index 4ec0323..5ee17d5 100644 (file)
@@ -19,7 +19,6 @@ Tine.Timetracker.TimeaccountEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
     appName: 'Timetracker',
     recordClass: Tine.Timetracker.Model.Timeaccount,
     recordProxy: Tine.Timetracker.timeaccountBackend,
-    loadRecord: false,
     tbarItems: [{xtype: 'widget-activitiesaddbutton'}],
     
     /**
index 9947dde..b77e581 100644 (file)
@@ -22,7 +22,6 @@ Tine.Timetracker.TimesheetEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog
     appName: 'Timetracker',
     recordClass: Tine.Timetracker.Model.Timesheet,
     recordProxy: Tine.Timetracker.timesheetBackend,
-    loadRecord: false,
     tbarItems: null,
     evalGrants: false,
     
@@ -97,7 +96,8 @@ Tine.Timetracker.TimesheetEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog
     initComponent: function() {
         var addNoteButton = new Tine.widgets.activities.ActivitiesAddButton({});
         this.tbarItems = [addNoteButton];
-        this.supr().initComponent.apply(this, arguments);
+        
+        Tine.Timetracker.TimesheetEditDialog.superclass.initComponent.apply(this, arguments);
     },
     
     /**
index f6e650d..466fd07 100644 (file)
@@ -647,7 +647,7 @@ Tine.widgets.dialog.EditDialog = Ext.extend(Ext.FormPanel, {
             this.record.set('id', (new Date()).getTime());
         }
         
-        if(this.loadMask) {
+        if (this.loadMask) {
             this.loadMask.hide();
         }
     },
@@ -689,9 +689,7 @@ Tine.widgets.dialog.EditDialog = Ext.extend(Ext.FormPanel, {
         ]);
         
         this.loadMask = new Ext.LoadMask(ct, {msg: String.format(_('Transferring {0}...'), this.i18nRecordName)});
-        if (this.loadRecord !== false) {
-            this.loadMask.show();
-        }
+        this.loadMask.show();
     },
     
     /**