diff --git a/dev/App/Admin.js b/dev/App/Admin.js index 872b165af..cd4a42a9f 100644 --- a/dev/App/Admin.js +++ b/dev/App/Admin.js @@ -206,7 +206,9 @@ LicenseStore.licenseError(''); Remote.licensing(function (sResult, oData) { + LicenseStore.licensingProcess(false); + if (Enums.StorageResultType.Success === sResult && oData && oData.Result && Utils.isNormal(oData.Result['Expired'])) { LicenseStore.licenseValid(true); diff --git a/dev/Common/Utils.js b/dev/Common/Utils.js index fd3621467..df713d14c 100644 --- a/dev/Common/Utils.js +++ b/dev/Common/Utils.js @@ -1548,36 +1548,6 @@ } }; - /** - * @param {string} sStr - * @return {string} - */ - Utils.FullHtmlEncode = function (sStr) - { - var - iIndex = 0, - sChr = '', - iChrCode = 0, - sResult = ''; - ; - - for (iIndex = 0; iIndex < sStr.length; iIndex++) - { - sChr = sStr[iIndex]; - if (-1 < Utils.inArray(sChr, ['&', '<', '>', '"', '`', '\''])) - { - sResult += _.escape(sChr); - } - else - { - iChrCode = sChr.charCodeAt(0); - sResult += (iChrCode > 128) ? '&#' + iChrCode + ';' : sChr; - } - } - - return sResult; - }; - /** * @param {Object|Array} mObjectOrObjects */ diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index 5cb13da4d..f2edb937c 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -1170,6 +1170,8 @@ { self.setSignatureFromIdentity(oIdentity); } + + self.setFocusInPopup(); }); } else if (Enums.ComposeType.Empty === sComposeType) @@ -1192,6 +1194,8 @@ { self.setSignatureFromIdentity(oIdentity); } + + self.setFocusInPopup(); }); } else if (Utils.isNonEmptyArray(oMessageOrArray)) @@ -1214,6 +1218,8 @@ { self.setSignatureFromIdentity(oIdentity); } + + self.setFocusInPopup(); }); } @@ -1261,12 +1267,13 @@ this.resizerTrigger(); }; - ComposePopupView.prototype.onShowWithDelay = function () + ComposePopupView.prototype.setFocusInPopup = function () { if (!Globals.bMobileDevice) { if ('' === this.to()) { + this.to.focused(false); this.to.focused(true); } else if (this.oEditor) @@ -1274,7 +1281,11 @@ this.oEditor.focus(); } } + }; + ComposePopupView.prototype.onShowWithDelay = function () + { + this.setFocusInPopup(); this.resizerTrigger(); }; diff --git a/package.json b/package.json index 9787cf277..384e4d661 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "RainLoop", "title": "RainLoop Webmail", "version": "1.8.1", - "release": "274", + "release": "276", "description": "Simple, modern & fast web-based email client", "homepage": "http://rainloop.net", "main": "gulpfile.js", diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index ecacf8f1c..418d86f61 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -3339,27 +3339,27 @@ class Actions * * @return string */ - public function domainPathHelper($sDomain) - { - $sDomain = \strtolower(\trim($sDomain)); - - $sTempDomain = \preg_replace('/^(webmail|email|mail)\./', '', $sDomain); - if (false === \strpos($sTempDomain, '.')) - { - $sTempDomain = $sDomain; - } - - $sDomainPrefix = $sTempDomain; - if (false === \strpos($sDomainPrefix, '.')) - { - $sDomainPrefix = $sTempDomain; - } - - $sDomainPrefix = \substr(\preg_replace('/[^a-z0-9]+/', '', $sDomainPrefix), 0, 2); - $sDomainPrefix = \str_pad($sDomainPrefix, 2, '_'); - - return 'd/'.\substr($sDomainPrefix, 0, 1).'/'.$sDomainPrefix.'/'.\urlencode($sTempDomain); - } +// public function domainPathHelper($sDomain) +// { +// $sDomain = \strtolower(\trim($sDomain)); +// +// $sTempDomain = \preg_replace('/^(webmail|email|mail)\./', '', $sDomain); +// if (false === \strpos($sTempDomain, '.')) +// { +// $sTempDomain = $sDomain; +// } +// +// $sDomainPrefix = $sTempDomain; +// if (false === \strpos($sDomainPrefix, '.')) +// { +// $sDomainPrefix = $sTempDomain; +// } +// +// $sDomainPrefix = \substr(\preg_replace('/[^a-z0-9]+/', '', $sDomainPrefix), 0, 2); +// $sDomainPrefix = \str_pad($sDomainPrefix, 2, '_'); +// +// return 'd/'.\substr($sDomainPrefix, 0, 1).'/'.$sDomainPrefix.'/'.\urlencode($sTempDomain); +// } /** * @return string @@ -3417,23 +3417,25 @@ class Actions $iCode = 0; $sContentType = ''; - $sValue = $oHttp->GetUrlAsString(APP_STATUS_PATH.$this->domainPathHelper($sDomain), - 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 10, - $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''), - array(), false - ); - -// $sValue = $oHttp->GetUrlAsString(APP_API_PATH.'status/'.\urlencode($sDomain), -// 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 10, +// $sValue = $oHttp->GetUrlAsString(APP_STATUS_PATH.$this->domainPathHelper($sDomain), +// 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 5, // $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''), // array(), false // ); - if (404 === $iCode) + $sValue = $oHttp->GetUrlAsString(APP_API_PATH.'status/'.\urlencode($sDomain), + 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 5, + $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''), + array(), false + ); + + $this->Logger()->Write($sValue); + + /*if (404 === $iCode) { $sValue = 'NO'; } - else if (200 !== $iCode) + else */if (200 !== $iCode) { $sValue = ''; } @@ -3545,7 +3547,7 @@ class Actions \sleep(1); $sValue = $oHttp->GetUrlAsString(APP_API_PATH.'activate/'.\urlencode($sDomain).'/'.\urlencode($sKey), - 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 10, + 'RainLoop/'.APP_VERSION, $sContentType, $iCode, $this->Logger(), 10, $this->Config()->Get('labs', 'curl_proxy', ''), $this->Config()->Get('labs', 'curl_proxy_auth', ''), array(), false );