0013134: Remove button order preference
authorMichael Spahn <m.spahn@metaways.de>
Tue, 23 May 2017 14:14:44 +0000 (16:14 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Thu, 1 Jun 2017 11:50:22 +0000 (13:50 +0200)
https://forge.tine20.org/view.php?id=13134

Change-Id: I9e43eb0a3d34735a9bcd549f3d25262807771679
Reviewed-on: http://gerrit.tine20.com/customers/4743
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Tinebase/Preference.php
tine20/Tinebase/js/ExceptionDialog.js
tine20/Tinebase/js/widgets/EditRecord.js
tine20/Tinebase/js/widgets/dialog/AddToRecordPanel.js
tine20/Tinebase/js/widgets/dialog/EditDialog.js
tine20/Tinebase/js/widgets/dialog/FileListDialog.js
tine20/Tinebase/js/widgets/dialog/PreferencesDialog.js
tine20/Tinebase/js/widgets/persistentfilter/EditPersistentFilterPanel.js

index 72eef86..6627e5b 100644 (file)
@@ -38,13 +38,7 @@ class Tinebase_Preference extends Tinebase_Preference_Abstract
      * 
      */
     const GRID_LOAD_MASK = 'gridLoadMask';
-    
-    /**
-     * order of buttons in dialogs
-     * 
-     */
-    const DIALOG_BUTTONS_ORDER_STYLE = 'dialogButtonsOrderStyle';
-    
+
     /**
      * auto search on filter change
      * 
@@ -105,7 +99,6 @@ class Tinebase_Preference extends Tinebase_Preference_Abstract
                 self::PAGE_SIZE,
                 self::GRID_STRIPE_ROWS,
                 self::GRID_LOAD_MASK,
-                self::DIALOG_BUTTONS_ORDER_STYLE,
                 self::FILTER_CHANGE_AUTO_SEARCH,
                 self::ADVANCED_SEARCH
             )
@@ -136,10 +129,6 @@ class Tinebase_Preference extends Tinebase_Preference_Abstract
                 'label'         => $translate->_('Grid load mask'),
                 'description'   => $translate->_('Show load mask in grids'),
             ),
-            self::DIALOG_BUTTONS_ORDER_STYLE  => array(
-                'label'         => $translate->_('Dialog buttons order style'),
-                'description'   => $translate->_('Dialog buttons order style (Windows / Mac)'),
-            ),
             self::FILTER_CHANGE_AUTO_SEARCH  => array(
                 'label'         => $translate->_('Auto search on filter change'),
                 'description'   => $translate->_('Perform auto search when filter is changed'),
@@ -224,22 +213,6 @@ class Tinebase_Preference extends Tinebase_Preference_Abstract
                     </options>';
                   $preference->personal_only = FALSE;
                 break;
-
-            case self::DIALOG_BUTTONS_ORDER_STYLE:
-                $preference->value  = 'Macintosh'; 
-                $preference->options    = '<?xml version="1.0" encoding="UTF-8"?>
-                    <options>
-                        <option>
-                            <label>Windows</label>
-                            <value>Windows</value>
-                        </option>
-                        <option>
-                            <label>Macintosh</label>
-                            <value>Macintosh</value>
-                        </option>
-                    </options>';
-                $preference->personal_only = FALSE;
-                break;
             case self::FILTER_CHANGE_AUTO_SEARCH:
                 $preference->value      = 1;
                 $preference->options    = '<?xml version="1.0" encoding="UTF-8"?>
index 7bf1750..2194566 100644 (file)
@@ -98,39 +98,21 @@ Tine.Tinebase.ExceptionDialog = Ext.extend(Ext.Window, {
      * @return {Array}
      */
     initButtons: function () {
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.reportButtons = [{
-                text: i18n._('Send Report'),
-                iconCls: 'action_saveAndClose',
-                enabled: Tine.Tinebase.common.hasRight('report_bugs', 'Tinebase'),
-                scope: this,
-                handler: this.onSendReport
-            }, {
-                text: i18n._('Cancel'),
-                iconCls: 'action_cancel',
-                scope: this,
-                handler: function() {
-                    this.close();
-                }
-            }];
-        }
-        else {
-            this.reportButtons = [{
-                text: i18n._('Cancel'),
-                iconCls: 'action_cancel',
-                scope: this,
-                handler: function() {
-                    this.close();
-                }
-            }, {
-                text: i18n._('Send Report'),
-                iconCls: 'action_saveAndClose',
-                enabled: Tine.Tinebase.common.hasRight('report_bugs', 'Tinebase'),
-                scope: this,
-                handler: this.onSendReport
-            }];
-        }
-        
+        this.reportButtons = [{
+            text: i18n._('Cancel'),
+            iconCls: 'action_cancel',
+            scope: this,
+            handler: function () {
+                this.close();
+            }
+        }, {
+            text: i18n._('Send Report'),
+            iconCls: 'action_saveAndClose',
+            enabled: Tine.Tinebase.common.hasRight('report_bugs', 'Tinebase'),
+            scope: this,
+            handler: this.onSendReport
+        }];
+
         return this.reportButtons;
     },
     
index 7357820..2825041 100644 (file)
@@ -204,13 +204,9 @@ Tine.widgets.dialog.EditRecord = Ext.extend(Ext.FormPanel, {
         ];
         
         this.buttons = [];
-        
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.buttons.push(this.action_saveAndClose, this.action_cancel);
-        }
-        else {
-            this.buttons.push(this.action_cancel, this.action_saveAndClose);
-        }
+
+        this.buttons.push(this.action_cancel, this.action_saveAndClose);
+
        
         if (this.tbarItems) {
             this.tbar = new Ext.Toolbar({
index f4c3527..617b980 100644 (file)
@@ -123,12 +123,7 @@ Tine.widgets.dialog.AddToRecordPanel = Ext.extend(Ext.FormPanel, {
     initButtons : function() {
         this.fbar = ['->'];
         
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.fbar.push(this.action_update, this.action_cancel);
-        }
-        else {
-            this.fbar.push(this.action_cancel, this.action_update);
-        }
+        this.fbar.push(this.action_cancel, this.action_update);
     },    
     
     /**
index 1c3ac8c..39f119d 100644 (file)
@@ -646,19 +646,15 @@ Tine.widgets.dialog.EditDialog = Ext.extend(Ext.FormPanel, {
 
     /**
      * init buttons
-     * 
+     *
      * use button order from preference
      */
     initButtons: function () {
         this.fbar = [
             '->'
         ];
-        
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.fbar.push(this.action_saveAndClose, this.action_cancel);
-        } else {
-            this.fbar.push(this.action_cancel, this.action_saveAndClose);
-        }
+
+        this.fbar.push(this.action_cancel, this.action_saveAndClose);
 
         if (this.action_export) {
             this.actionUpdater.addAction(this.action_export);
index c487431..7efb3db 100644 (file)
@@ -106,12 +106,7 @@ Ext.extend(Tine.widgets.dialog.FileListDialog, Ext.FormPanel, {
             iconCls: 'action_applyChanges'
         }; 
         
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.fbar.push(yesBtn, noBtn);
-        }
-        else {
-            this.fbar.push(noBtn, yesBtn);
-        }
+        this.fbar.push(noBtn, yesBtn);
     },
     
     onOk: function() {
index ae5923e..1186fa3 100644 (file)
@@ -138,13 +138,8 @@ Tine.widgets.dialog.Preferences = Ext.extend(Ext.FormPanel, {
     initButtons: function () {
         this.buttons = [];
         
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.buttons.push(this.action_saveAndClose, this.action_cancel);
-        }
-        else {
-            this.buttons.push(this.action_cancel, this.action_saveAndClose);
-        }
-       
+        this.buttons.push(this.action_cancel, this.action_saveAndClose);
+
         this.tbar = new Ext.Toolbar({
             items: [ this.action_switchAdminMode ]
         });
index e9f7710..40db985 100644 (file)
@@ -86,15 +86,9 @@ Tine.widgets.persistentfilter.EditPersistentFilterPanel = Ext.extend(Ext.FormPan
      * use preference settings for order of save and close buttons
      */
     initButtons : function() {
-
         this.fbar = ['->'];
         
-        if (Tine.Tinebase.registry && Tine.Tinebase.registry.get('preferences') && Tine.Tinebase.registry.get('preferences').get('dialogButtonsOrderStyle') === 'Windows') {
-            this.fbar.push(this.action_save, this.action_cancel);
-        }
-        else {
-            this.fbar.push(this.action_cancel, this.action_save);
-        }
+        this.fbar.push(this.action_cancel, this.action_save);
     },
 
     /**