161 lines
5.5 KiB
Diff
161 lines
5.5 KiB
Diff
diff -ruN ../webapp-1.5.svn43477_original/client/zarafa/contact/dialogs/ContactGeneralTab.js ./client/zarafa/contact/dialogs/ContactGeneralTab.js
|
|
--- ../webapp-1.5.svn43477_original/client/zarafa/contact/dialogs/ContactGeneralTab.js 2014-01-23 22:25:47.511133259 +0100
|
|
+++ ./client/zarafa/contact/dialogs/ContactGeneralTab.js 2014-01-23 22:27:23.853489217 +0100
|
|
@@ -324,6 +324,9 @@
|
|
*/
|
|
createAddressFieldset : function(config)
|
|
{
|
|
+ var type = container.getSettingsModel().get('zarafa/v1/main/default_addr_type');
|
|
+ var name = container.getSettingsModel().get('zarafa/v1/main/default_addr_type_name');
|
|
+
|
|
return {
|
|
title : _('Addresses'),
|
|
defaultType : 'zarafa.compositefield',
|
|
@@ -335,15 +338,15 @@
|
|
items : [{
|
|
xtype : 'splitbutton',
|
|
width : config.labelWidth,
|
|
- text : _('Business') + ':',
|
|
+ text : _(name) + ':',
|
|
handler : this.handleAddressButtonClick,
|
|
scope : this,
|
|
- menu : this.initAddressButtonMenu('business_address', 'business_address')
|
|
+ menu : this.initAddressButtonMenu(type, type)
|
|
// @TODO add checkbox for email address selection
|
|
}, {
|
|
xtype : 'textarea',
|
|
flex : 1,
|
|
- name : 'business_address',
|
|
+ name : type,
|
|
height : 128,
|
|
listeners : {
|
|
scope : this,
|
|
diff -ruN ../webapp-1.5.svn43477_original/client/zarafa/settings/data/SettingsDefaultValues.js ./client/zarafa/settings/data/SettingsDefaultValues.js
|
|
--- ../webapp-1.5.svn43477_original/client/zarafa/settings/data/SettingsDefaultValues.js 2014-01-23 22:25:47.498133076 +0100
|
|
+++ ./client/zarafa/settings/data/SettingsDefaultValues.js 2014-01-23 22:27:44.224775933 +0100
|
|
@@ -24,6 +24,18 @@
|
|
*/
|
|
'default_context' : 'mail',
|
|
/**
|
|
+ * zarafa/v1/main/default_addr_type
|
|
+ * @property
|
|
+ * @type String
|
|
+ */
|
|
+ 'default_addr_type' : 'business_address',
|
|
+ /**
|
|
+ * zarafa/v1/main/default_addr_type_name
|
|
+ * @property
|
|
+ * @type String
|
|
+ */
|
|
+ 'default_addr_type_name' : 'Business',
|
|
+ /**
|
|
* zarafa/v1/main/use_canvas_rendering
|
|
* @property
|
|
* @type Boolean
|
|
diff -ruN ../webapp-1.5.svn43477_original/client/zarafa/settings/ui/SettingsAccountWidget.js ./client/zarafa/settings/ui/SettingsAccountWidget.js
|
|
--- ../webapp-1.5.svn43477_original/client/zarafa/settings/ui/SettingsAccountWidget.js 2014-01-23 22:25:47.497133061 +0100
|
|
+++ ./client/zarafa/settings/ui/SettingsAccountWidget.js 2014-01-23 22:28:06.200085227 +0100
|
|
@@ -41,6 +41,23 @@
|
|
fields : ['context', 'text'],
|
|
data : items
|
|
};
|
|
+
|
|
+ // default addressbook selector
|
|
+ var addrStore = {
|
|
+ xtype : 'jsonstore',
|
|
+ autoDestroy : true,
|
|
+ fields : ['type', 'text'],
|
|
+ data : [{
|
|
+ text : _('Home'),
|
|
+ type : 'home_address'
|
|
+ }, {
|
|
+ text : _('Business'),
|
|
+ type : 'business_address'
|
|
+ }, {
|
|
+ text : _('Other'),
|
|
+ type : 'other_address'
|
|
+ }]
|
|
+ };
|
|
|
|
Ext.applyIf(config, {
|
|
title : String.format(_('Account information - {0}'), user.getDisplayName()),
|
|
@@ -100,11 +117,48 @@
|
|
select : this.onStartupSelect,
|
|
scope : this
|
|
}
|
|
+ },{
|
|
+ xtype : 'combo',
|
|
+ fieldLabel : _('Default Address Type'),
|
|
+ name : 'zarafa/v1/main/default_addr_type',
|
|
+ ref : 'addrCombo',
|
|
+ width : 200,
|
|
+ store : addrStore,
|
|
+ mode: 'local',
|
|
+ triggerAction: 'all',
|
|
+ displayField: 'text',
|
|
+ valueField: 'type',
|
|
+ lazyInit: false,
|
|
+ forceSelection: true,
|
|
+ editable: false,
|
|
+ autoSelect: true,
|
|
+ listeners : {
|
|
+ select : this.onAddrSelect,
|
|
+ scope : this
|
|
+ }
|
|
}]
|
|
});
|
|
|
|
Zarafa.settings.ui.SettingsAccountWidget.superclass.constructor.call(this, config);
|
|
},
|
|
+
|
|
+ /**
|
|
+ * Event handler which is fired when a Addressbook Type in the {@link Ext.form.ComboBox combobox}
|
|
+ * has been selected.
|
|
+ * @param {Ext.form.ComboBox} combo The combobox which fired the event
|
|
+ * @param {Ext.data.Record} record The selected record in the combobox
|
|
+ * @param {Number} index The selected index in the store
|
|
+ * @private
|
|
+ */
|
|
+ onAddrSelect : function(combo, record, index)
|
|
+ {
|
|
+ var value = record.get(combo.valueField);
|
|
+ var text = record.get(combo.displayField);
|
|
+ if (this.model) {
|
|
+ this.model.set(combo.name, value);
|
|
+ this.model.set(combo.name + "_name", text);
|
|
+ }
|
|
+ },
|
|
|
|
/**
|
|
* Event handler which is fired when a language in the {@link Ext.form.ComboBox combobox}
|
|
@@ -165,6 +219,7 @@
|
|
this.languageWarning.reset();
|
|
|
|
this.startupCombo.setValue(settingsModel.get(this.startupCombo.name));
|
|
+ this.addrCombo.setValue(settingsModel.get(this.addrCombo.name));
|
|
},
|
|
|
|
/**
|
|
@@ -179,6 +234,8 @@
|
|
settingsModel.beginEdit()
|
|
settingsModel.set(this.languageCombo.name, this.languageCombo.getValue());
|
|
settingsModel.set(this.startupCombo.name, this.startupCombo.getValue());
|
|
+ settingsModel.set(this.addrCombo.name, this.addrCombo.getValue());
|
|
+ settingsModel.set(this.addrCombo.name + "_name", this.addrCombo.getRawValue());
|
|
settingsModel.endEdit();
|
|
}
|
|
});
|
|
diff -ruN ../webapp-1.5.svn43477_original/server/language/de_DE.UTF-8/LC_MESSAGES/zarafa_webapp.po ./server/language/de_DE.UTF-8/LC_MESSAGES/zarafa_webapp.po
|
|
--- ../webapp-1.5.svn43477_original/server/language/de_DE.UTF-8/LC_MESSAGES/zarafa_webapp.po 2014-01-23 22:25:47.377131373 +0100
|
|
+++ ./server/language/de_DE.UTF-8/LC_MESSAGES/zarafa_webapp.po 2014-01-23 22:28:39.442553104 +0100
|
|
@@ -646,6 +646,9 @@
|
|
msgid "Business"
|
|
msgstr "Geschäft"
|
|
|
|
+msgid "Default Address Type"
|
|
+msgstr "Standard Adress-Typ"
|
|
+
|
|
# 88%
|
|
#: client/zarafa/addressbook/dialogs/ABUserPhoneTab.js:73
|
|
msgid "Business2"
|