Synchronizing with a remote CardDAV server (#42, #138, #139)

+ Updated contacts sql shema (breaking changes)
+ Fixes
- Removed SabreDAV Server
- Removed Contacts Sharing (awhile, code refactoring)
This commit is contained in:
RainLoop Team 2014-04-26 01:50:17 +04:00
parent 54a4c2657a
commit d29f20789f
78 changed files with 2024 additions and 2317 deletions

View file

@ -16,7 +16,7 @@ function PopupsAdvancedSearchViewModel()
this.text = ko.observable('');
this.selectedDateValue = ko.observable(-1);
this.hasAttachments = ko.observable(false);
this.hasAttachment = ko.observable(false);
this.starred = ko.observable(false);
this.unseen = ko.observable(false);
@ -54,6 +54,7 @@ PopupsAdvancedSearchViewModel.prototype.buildSearchString = function ()
sTo = Utils.trim(this.to()),
sSubject = Utils.trim(this.subject()),
sText = Utils.trim(this.text()),
aIs = [],
aHas = []
;
@ -72,19 +73,19 @@ PopupsAdvancedSearchViewModel.prototype.buildSearchString = function ()
aResult.push('subject:' + this.buildSearchStringValue(sSubject));
}
if (this.hasAttachments())
if (this.hasAttachment())
{
aHas.push('attachments');
aHas.push('attachment');
}
if (this.unseen())
{
aHas.push('unseen');
aIs.push('unseen');
}
if (this.starred())
{
aHas.push('flag');
aIs.push('flagged');
}
if (0 < aHas.length)
@ -92,6 +93,11 @@ PopupsAdvancedSearchViewModel.prototype.buildSearchString = function ()
aResult.push('has:' + aHas.join(','));
}
if (0 < aIs.length)
{
aResult.push('is:' + aIs.join(','));
}
if (-1 < this.selectedDateValue())
{
aResult.push('date:' + moment().subtract('days', this.selectedDateValue()).format('YYYY.MM.DD') + '/');
@ -113,7 +119,7 @@ PopupsAdvancedSearchViewModel.prototype.clearPopup = function ()
this.text('');
this.selectedDateValue(-1);
this.hasAttachments(false);
this.hasAttachment(false);
this.starred(false);
this.unseen(false);