CardDav categories support (tags)

This commit is contained in:
RainLoop Team 2014-05-15 00:45:52 +04:00
parent fe50a92f88
commit 74b09e93df
10 changed files with 28760 additions and 28760 deletions

View file

@ -9,7 +9,7 @@ ko.bindingHandlers.tooltip = {
sClass = $oEl.data('tooltip-class') || '',
sPlacement = $oEl.data('tooltip-placement') || 'top'
;
$oEl.tooltip({
'delay': {
'show': 500,
@ -621,8 +621,8 @@ ko.bindingHandlers.contactTags = {
'parseOnBlur': true,
'allowDragAndDrop': false,
'focusCallback': fFocusCallback,
'inputDelimiters': [';'],
'outputDelimiter': ';',
'inputDelimiters': [',', ';'],
'outputDelimiter': ',',
'autoCompleteSource': function (oData, fResponse) {
RL.getContactsTagsAutocomplete(oData.term, function (aData) {
fResponse(_.map(aData, function (oTagItem) {

View file

@ -73,7 +73,7 @@ ContactModel.prototype.parse = function (oItem)
if (Utils.isNonEmptyArray(oItem['Tags']))
{
this.tags = oItem['Tags'].join(';');
this.tags = oItem['Tags'].join(',');
}
bResult = true;

View file

@ -2,7 +2,7 @@
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.6.6",
"release": "922",
"release": "924",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -1070,7 +1070,7 @@ class Actions
$aResult['DevLogin'] = $oConfig->Get('labs', 'dev_login', '');
$aResult['DevPassword'] = $oConfig->Get('labs', 'dev_password', '');
}
$aResult['AllowGoogleSocial'] = (bool) $oConfig->Get('social', 'google_enable', false);
if ($aResult['AllowGoogleSocial'] && (
'' === \trim($oConfig->Get('social', 'google_client_id', '')) || '' === \trim($oConfig->Get('social', 'google_client_secret', ''))))
@ -1547,7 +1547,7 @@ class Actions
{
$aAccounts[$oAccount->Email()] = $oAccount->GetAuthToken();
}
return $aAccounts;
}
@ -5048,7 +5048,7 @@ class Actions
{
$sUid = \trim($this->GetActionParam('Uid', ''));
$sTags = \trim($this->GetActionParam('Tags', ''));
$aTags = \explode(';', $sTags);
$aTags = \explode(',', $sTags);
$aTags = \array_map('trim', $aTags);
$aTags = \array_unique($aTags);

View file

@ -211,7 +211,7 @@ class Contact
$oVCard->VERSION = '3.0';
$oVCard->PRODID = '-//RainLoop//'.APP_VERSION.'//EN';
unset($oVCard->FN, $oVCard->EMAIL, $oVCard->TEL, $oVCard->URL, $oVCard->{'X-RL-TAGS'});
unset($oVCard->FN, $oVCard->EMAIL, $oVCard->TEL, $oVCard->URL, $oVCard->NICKNAME, $oVCard->CATEGORIES, $oVCard->{'X-RL-TAGS'});
$sFirstName = $sLastName = $sMiddleName = $sSuffix = $sPrefix = '';
foreach ($this->Properties as /* @var $oProperty \RainLoop\Providers\AddressBook\Classes\Property */ &$oProperty)
@ -274,7 +274,7 @@ class Contact
if (0 < \count($this->Tags))
{
$oVCard->{'X-RL-TAGS'} = \implode(';', $this->Tags);
$oVCard->CATEGORIES = $this->Tags;
}
return (string) $oVCard->serialize();
@ -590,9 +590,10 @@ class Contact
$this->Properties = $aProperties;
if (isset($oVCard->{'X-RL-TAGS'}) && 0 < \strlen($oVCard->{'X-RL-TAGS'}))
if (isset($oVCard->CATEGORIES))
{
$this->Tags = \explode(';', $oVCard->{'X-RL-TAGS'});
$this->Tags = (array) $oVCard->CATEGORIES->getParts();
$this->Tags = \is_array($this->Tags) ? $this->Tags : array();
$this->Tags = \array_map('trim', $this->Tags);
}
}

View file

@ -615,7 +615,7 @@ class PdoAddressBook
$iUserID = $this->getUserId($sEmail);
$this->aTagsCache = array();
$mResult = false;
try
{
@ -743,14 +743,14 @@ class PdoAddressBook
{
$aContacts = is_array($mContactOrContacts) ? $mContactOrContacts : array(&$mContactOrContacts);
}
if (\is_array($aContacts) && 0 < \count($aContacts))
{
$aIdContacts = array();
$aIdTagsContacts = array();
$aTags = $this->GetContactTags($sEmail);
if (\is_array($aTags) && 0 < \count($aTags))
{
foreach ($aContacts as $oItem)
@ -1175,7 +1175,7 @@ class PdoAddressBook
}
}
}
if ($oContact)
{
$this->populateContactsByTags($sEmail, $oContact);

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long