some ui improvements
This commit is contained in:
parent
0256973507
commit
1d4605b23a
@ -53,7 +53,8 @@ Zarafa.plugins.contactimporter.dialogs.ImportContentPanel = Ext.extend(Zarafa.co
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
xtype : 'contactimporter.importcontactpanel',
|
xtype : 'contactimporter.importcontactpanel',
|
||||||
filename: config.filename
|
filename: config.filename,
|
||||||
|
folder: config.folder
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -39,6 +39,9 @@ Zarafa.plugins.contactimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
/* The store for the selection grid */
|
/* The store for the selection grid */
|
||||||
store : null,
|
store : null,
|
||||||
|
|
||||||
|
/* selected folder */
|
||||||
|
folder : null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {object} config
|
* @param {object} config
|
||||||
@ -51,6 +54,10 @@ Zarafa.plugins.contactimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
this.vcffile = config.filename;
|
this.vcffile = config.filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Ext.isEmpty(config.folder)) {
|
||||||
|
this.folder = config.folder;
|
||||||
|
}
|
||||||
|
|
||||||
// create the data store
|
// create the data store
|
||||||
// we only display the firstname, lastname, homephone and primary email address in our grid
|
// we only display the firstname, lastname, homephone and primary email address in our grid
|
||||||
this.store = new Ext.data.ArrayStore({
|
this.store = new Ext.data.ArrayStore({
|
||||||
@ -224,7 +231,7 @@ Zarafa.plugins.contactimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
name : "choosen_addressbook",
|
name : "choosen_addressbook",
|
||||||
value : container.getSettingsModel().get("zarafa/v1/plugins/contactimporter/default_addressbook"),
|
value : container.getSettingsModel().get("zarafa/v1/plugins/contactimporter/default_addressbook"),
|
||||||
width : 100,
|
width : 100,
|
||||||
fieldLabel : "Select an addressbook",
|
fieldLabel : "Select folder",
|
||||||
store : myStore,
|
store : myStore,
|
||||||
mode : 'local',
|
mode : 'local',
|
||||||
labelSeperator: ":",
|
labelSeperator: ":",
|
||||||
@ -245,6 +252,7 @@ Zarafa.plugins.contactimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
emptyText : 'Select an .vcf addressbook',
|
emptyText : 'Select an .vcf addressbook',
|
||||||
border : false,
|
border : false,
|
||||||
anchor : "100%",
|
anchor : "100%",
|
||||||
|
height : "30",
|
||||||
scope : this,
|
scope : this,
|
||||||
allowBlank : false,
|
allowBlank : false,
|
||||||
listeners : {
|
listeners : {
|
||||||
|
@ -266,7 +266,8 @@ Zarafa.plugins.contactimporter.ImportPlugin = Ext.extend(Zarafa.core.Plugin, {
|
|||||||
openImportDialog: function (filename) {
|
openImportDialog: function (filename) {
|
||||||
var componentType = Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts'];
|
var componentType = Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts'];
|
||||||
var config = {
|
var config = {
|
||||||
filename: filename
|
filename: filename,
|
||||||
|
modal: true
|
||||||
};
|
};
|
||||||
|
|
||||||
Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
|
Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
|
||||||
|
@ -43,7 +43,19 @@ Zarafa.plugins.contactimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.C
|
|||||||
return [{
|
return [{
|
||||||
xtype: 'menuseparator'
|
xtype: 'menuseparator'
|
||||||
}, {
|
}, {
|
||||||
text : _('Export VCF'),
|
text : _('Import vCard'),
|
||||||
|
iconCls : 'icon_contactimporter_import',
|
||||||
|
handler : this.onContextItemImport,
|
||||||
|
beforeShow : function(item, record) {
|
||||||
|
var access = record.get('access') & Zarafa.core.mapi.Access.ACCESS_MODIFY;
|
||||||
|
if (!access || (record.isIPMSubTree() && !record.getMAPIStore().isDefaultStore())) {
|
||||||
|
item.setDisabled(true);
|
||||||
|
} else {
|
||||||
|
item.setDisabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text : _('Export vCard'),
|
||||||
iconCls : 'icon_contactimporter_export',
|
iconCls : 'icon_contactimporter_export',
|
||||||
handler : this.onContextItemExport,
|
handler : this.onContextItemExport,
|
||||||
beforeShow : function(item, record) {
|
beforeShow : function(item, record) {
|
||||||
@ -58,7 +70,7 @@ Zarafa.plugins.contactimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.C
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires on selecting 'Open' menu option from {@link Zarafa.hierarchy.ui.ContextMenu ContextMenu}
|
* Fires on selecting 'Open' menu option from {@link Zarafa.plugins.contactimporter.ui.ContextMenu ContextMenu}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onContextItemExport: function () {
|
onContextItemExport: function () {
|
||||||
@ -79,6 +91,20 @@ Zarafa.plugins.contactimporter.ui.ContextMenu = Ext.extend(Zarafa.hierarchy.ui.C
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires on selecting 'Open' menu option from {@link Zarafa.plugins.contactimporter.ui.ContextMenu ContextMenu}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
onContextItemImport: function () {
|
||||||
|
var componentType = Zarafa.core.data.SharedComponentType['plugins.contactimporter.dialogs.importcontacts'];
|
||||||
|
var config = {
|
||||||
|
modal: true,
|
||||||
|
folder: this.records.get("entryid")
|
||||||
|
};
|
||||||
|
|
||||||
|
Zarafa.core.data.UIFactory.openLayerComponent(componentType, undefined, config);
|
||||||
|
},
|
||||||
|
|
||||||
downloadVCF: function (response) {
|
downloadVCF: function (response) {
|
||||||
if(response.status == false) {
|
if(response.status == false) {
|
||||||
Zarafa.common.dialogs.MessageBox.show({
|
Zarafa.common.dialogs.MessageBox.show({
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
background-position: center;
|
background-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon_contactimporter_import {
|
||||||
|
background: url(../images/upload.png) no-repeat;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
.zarafa-ciplg-container {
|
.zarafa-ciplg-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
BIN
resources/images/upload.png
Normal file
BIN
resources/images/upload.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 213 B |
BIN
resources/images/upload.xcf
Executable file
BIN
resources/images/upload.xcf
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user