mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
parent
9cc791caba
commit
8c0276631b
36 changed files with 628 additions and 66 deletions
|
|
@ -3022,6 +3022,14 @@ LinkBuilder.prototype.upload = function ()
|
|||
return this.sServer + '/Upload/' + this.sSpecSuffix + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.uploadContacts = function ()
|
||||
{
|
||||
return this.sServer + '/UploadContacts/' + this.sSpecSuffix + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
|
|||
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
4
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3022,6 +3022,14 @@ LinkBuilder.prototype.upload = function ()
|
|||
return this.sServer + '/Upload/' + this.sSpecSuffix + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.uploadContacts = function ()
|
||||
{
|
||||
return this.sServer + '/UploadContacts/' + this.sSpecSuffix + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
@ -4376,9 +4384,16 @@ Selector.prototype.init = function (oContentVisible, oContentScrollable)
|
|||
;
|
||||
|
||||
$(this.oContentVisible)
|
||||
.on('selectstart', function (oEvent) {
|
||||
if (oEvent && oEvent.preventDefault)
|
||||
{
|
||||
oEvent.preventDefault();
|
||||
}
|
||||
})
|
||||
.on('click', this.sItemSelector, function (oEvent) {
|
||||
self.actionClick(ko.dataFor(this), oEvent);
|
||||
}).on('click', this.sItemCheckedSelector, function (oEvent) {
|
||||
})
|
||||
.on('click', this.sItemCheckedSelector, function (oEvent) {
|
||||
var oItem = ko.dataFor(this);
|
||||
if (oItem)
|
||||
{
|
||||
|
|
@ -9429,8 +9444,11 @@ function PopupsContactsViewModel()
|
|||
this.contactsCount = ko.observable(0);
|
||||
this.contacts = ko.observableArray([]);
|
||||
this.contacts.loading = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.importing = ko.observable(false).extend({'throttle': 200});
|
||||
this.currentContact = ko.observable(null);
|
||||
|
||||
this.importUploaderButton = ko.observable(null);
|
||||
|
||||
this.contactsSharingIsAllowed = !!RL.settingsGet('ContactsSharingIsAllowed');
|
||||
|
||||
this.contactsPage = ko.observable(1);
|
||||
|
|
@ -9733,6 +9751,46 @@ PopupsContactsViewModel.prototype.addNewPhone = function ()
|
|||
this.addNewProperty(Enums.ContactPropertyType.MobilePersonal);
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.initUploader = function ()
|
||||
{
|
||||
if (this.importUploaderButton())
|
||||
{
|
||||
var
|
||||
oJua = new Jua({
|
||||
'action': RL.link().uploadContacts(),
|
||||
'name': 'uploader',
|
||||
'queueSize': 1,
|
||||
'multipleSizeLimit': 1,
|
||||
'disableFolderDragAndDrop': true,
|
||||
'disableDragAndDrop': true,
|
||||
'disableMultiple': true,
|
||||
'disableDocumentDropPrevent': true,
|
||||
'clickElement': this.importUploaderButton()
|
||||
})
|
||||
;
|
||||
|
||||
if (oJua)
|
||||
{
|
||||
oJua
|
||||
.on('onStart', _.bind(function () {
|
||||
this.contacts.importing(true);
|
||||
}, this))
|
||||
.on('onComplete', _.bind(function (sId, bResult, oData) {
|
||||
|
||||
this.contacts.importing(false);
|
||||
this.reloadContactList();
|
||||
|
||||
if (!sId || !bResult || !oData || !oData.Result)
|
||||
{
|
||||
window.alert(Utils.i18n('CONTACTS/ERROR_IMPORT_FILE'));
|
||||
}
|
||||
|
||||
}, this))
|
||||
;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.removeCheckedOrSelectedContactsFromList = function ()
|
||||
{
|
||||
var
|
||||
|
|
@ -9972,6 +10030,8 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
|
|||
|
||||
return bResult;
|
||||
});
|
||||
|
||||
this.initUploader();
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.onShow = function ()
|
||||
|
|
|
|||
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue