more ui improvements

This commit is contained in:
Christoph Haas 2016-06-14 01:09:52 +02:00
parent 1d4605b23a
commit 5bd9a496df
3 changed files with 7 additions and 42 deletions

View File

@ -48,38 +48,10 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
/* directly import received vcfs */ /* directly import received vcfs */
this.registerInsertionPoint('common.contextmenu.attachment.actions', this.createAttachmentImportButton, this); this.registerInsertionPoint('common.contextmenu.attachment.actions', this.createAttachmentImportButton, this);
/* add import button to south navigation */
this.registerInsertionPoint("navigation.south", this.createImportButton, this);
/* export a contact via rightclick */ /* export a contact via rightclick */
this.registerInsertionPoint('context.contact.contextmenu.actions', this.createItemExportInsertionPoint, this); this.registerInsertionPoint('context.contact.contextmenu.actions', this.createItemExportInsertionPoint, this);
}, },
/**
* Creates the button
*
* @return {Object} Configuration object for a {@link Ext.Button button}
*
*/
createImportButton: function () {
var button = {
xtype: 'panel',
cls: 'zarafa-ciplg-container',
layout: 'fit',
navigationContext: container.getContextByName('contact'),
items: [{
xtype : 'button',
text : _('Import Contacts'),
iconCls : 'icon_contactimporter_button',
cls: 'zarafa-ciplg-button',
handler : this.onImportButtonClick,
scope : this
}]
};
return button;
},
/** /**
* This method hooks to the contact context menu and allows users to export users to vcf. * This method hooks to the contact context menu and allows users to export users to vcf.
* *
@ -89,7 +61,7 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*/ */
createItemExportInsertionPoint: function (include, btn) { createItemExportInsertionPoint: function (include, btn) {
return { return {
text : dgettext('plugin_files', 'Export VCF'), text : dgettext('plugin_files', 'Export vCard'),
handler: this.exportToVCF.createDelegate(this, [btn]), handler: this.exportToVCF.createDelegate(this, [btn]),
scope : this, scope : this,
iconCls: 'icon_contactimporter_export' iconCls: 'icon_contactimporter_export'
@ -156,7 +128,7 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
*/ */
createAttachmentImportButton: function (include, btn) { createAttachmentImportButton: function (include, btn) {
return { return {
text : _('Import Contacts'), text : _('Import to Contacts'),
handler : this.getAttachmentFileName.createDelegate(this, [btn]), handler : this.getAttachmentFileName.createDelegate(this, [btn]),
scope : this, scope : this,
iconCls : 'icon_contactimporter_button', iconCls : 'icon_contactimporter_button',
@ -251,13 +223,6 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
); );
}, },
/**
* Clickhandler for the button
*/
onImportButtonClick: function () {
this.openImportDialog();
},
/** /**
* Open the import dialog. * Open the import dialog.
* *

View File

@ -2,7 +2,6 @@
background: url(../images/import_icon.png) no-repeat !important; background: url(../images/import_icon.png) no-repeat !important;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 18px !important;
} }
.icon_contactimporter_export { .icon_contactimporter_export {
@ -19,12 +18,13 @@
.zarafa-ciplg-container { .zarafa-ciplg-container {
width: 100%; width: 100%;
height: 30px; height: 50px;
} }
.zarafa-ciplg-button .x-btn-small { .zarafa-ciplg-button .x-btn-small {
width: 80%; width: 80%;
height: 25px; height: 30px;
margin-left: auto; margin-left: 10%;
margin-right: auto; margin-right: 10%;
margin-top: 10px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 407 B