Fix
bug 1080587 - Freeze current set of Hightail users. r=mkmelin
deleted file mode 100644
--- a/mail/components/cloudfile/content/Hightail/fileExceedsLimit.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-const Cr = Components.results;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-let fileExceedsLimit = {
- onOK: function AAD_onOK() {
- let href = "https://www.hightail.com/prosignup?p_code=pro&s=4001636&cid=pm-4001636";
- gProtocolService.loadUrl(Services.io.newURI(href, "UTF-8", null));
- },
-}
-
-XPCOMUtils.defineLazyServiceGetter(this, "gProtocolService",
- "@mozilla.org/uriloader/external-protocol-service;1",
- "nsIExternalProtocolService");
--- a/mail/components/cloudfile/content/Hightail/fileExceedsLimit.xul
+++ b/mail/components/cloudfile/content/Hightail/fileExceedsLimit.xul
@@ -10,30 +10,13 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/cloudfile/Hightail/fileExceedsLimit.css" type="text/css"?>
<dialog id="fileExceedsLimit"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- buttons="accept,cancel"
- buttonlabelaccept="&fileExceedsLimit.accept;"
- buttonlabelcancel="&fileExceedsLimit.cancel;"
- ondialogaccept="return fileExceedsLimit.onOK();"
+ buttons="accept"
title="&fileExceedsLimit.title;">
- <script type="text/javascript;version=1.8"
- src="chrome://messenger/content/cloudfile/Hightail/fileExceedsLimit.js"/>
-
- <description id="title">&fileExceedsLimit.thatsBigFile;</description>
- <description id="title2">&fileExceedsLimit.thatsBigFile2;</description>
- <description id="proIncludes">&fileExceedsLimit.proIncludes;</description>
- <description>
- <image src="chrome://messenger/skin/cloudfile/Hightail/check.png"/><label>&fileExceedsLimit.pros1;</label>
- </description>
- <description>
- <image src="chrome://messenger/skin/cloudfile/Hightail/check.png"/><label>&fileExceedsLimit.pros2;</label>
- </description>
- <description>
- <image src="chrome://messenger/skin/cloudfile/Hightail/check.png"/><label>&fileExceedsLimit.pros3;</label>
- </description>
+ <description>&fileExceedsLimit.thatsBigFile3;</description>
</dialog>
--- a/mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
+++ b/mail/components/cloudfile/content/Hightail/fileExceedsQuota.js
@@ -14,18 +14,8 @@ document.addEventListener("DOMContentLoa
if ("wrappedJSObject" in window.arguments[0]) {
let storage = parseInt(window.arguments[0].wrappedJSObject.storage);
storage = (storage / 1024 / 1024 / 1024).toFixed(2);
let currentStorage = document.getElementById('currentStorage');
currentStorage.textContent = currentStorage.textContent.replace('#XXX', storage);
}
});
-let fileExceedsQuota = {
- onOK: function AAD_onOK() {
- let href = "https://www.hightail.com/prosignup?p_code=pro&s=4001637&cid=pm-4001637";
- gProtocolService.loadUrl(Services.io.newURI(href, "UTF-8", null));
- },
-}
-
-XPCOMUtils.defineLazyServiceGetter(this, "gProtocolService",
- "@mozilla.org/uriloader/external-protocol-service;1",
- "nsIExternalProtocolService");
--- a/mail/components/cloudfile/content/Hightail/fileExceedsQuota.xul
+++ b/mail/components/cloudfile/content/Hightail/fileExceedsQuota.xul
@@ -10,22 +10,17 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/cloudfile/Hightail/fileExceedsLimit.css" type="text/css"?>
<dialog id="fileExceedsQuota"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- buttons="accept,cancel"
- buttonlabelaccept="&fileExceedsQuota.accept;"
- buttonlabelcancel="&fileExceedsQuota.cancel;"
- ondialogaccept="return fileExceedsQuota.onOK();"
+ buttons="accept"
title="&fileExceedsQuota.title;">
<script type="text/javascript;version=1.8"
src="chrome://messenger/content/cloudfile/Hightail/fileExceedsQuota.js"/>
<description id="title">&fileExceedsQuota.storageLimitReached;</description>
<description id="currentStorage">&fileExceedsQuota.description;</description>
- <description>&fileExceedsQuota.description2;</description>
- <description>&fileExceedsQuota.description3;</description>
</dialog>
--- a/mail/components/cloudfile/content/addAccountDialog.js
+++ b/mail/components/cloudfile/content/addAccountDialog.js
@@ -46,16 +46,20 @@ createAccountObserver.prototype = {
let addAccountDialog = {
_settings: null,
_settingsWrap: null,
_accountType: null,
_accept: null,
_strings: Services.strings
.createBundle("chrome://messenger/locale/cloudfile/addAccountDialog.properties"),
+ // This blacklist is for providers who no longer want to be offered
+ // as an option for a new Filelink provider, but still wants to
+ // exist as a Filelink provider for pre-existing users.
+ _blacklist: new Set(["YouSendIt"]),
onInit: function AAD_onInit() {
this._settings = document.getElementById("accountSettings");
this._accountType = document.getElementById("accountType");
this._noAccountText = document.getElementById("noAccountText");
this._accept = document.documentElement.getButton("accept");
this._cancel = document.documentElement.getButton("cancel");
this._messages = document.getElementById("messages");
@@ -132,16 +136,19 @@ let addAccountDialog = {
addAccountTypes: function AAD_addAccountTypes() {
for (let [key, provider] in cloudFileAccounts.enumerateProviders()) {
// If we already have an account for this type, don't add it to the list.
// This limitation will hopefully be removed in the future.
if (cloudFileAccounts.getAccountsForType(key).length > 0)
continue;
+ if (this._blacklist.has(key))
+ continue;
+
let menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", provider.displayName);
menuitem.setAttribute("value", key);
if (provider.iconClass) {
menuitem.setAttribute("class", "menuitem-iconic menuitem-with-favicon");
menuitem.setAttribute("image", provider.iconClass);
}
--- a/mail/components/cloudfile/jar.mn
+++ b/mail/components/cloudfile/jar.mn
@@ -10,12 +10,11 @@ messenger.jar:
content/messenger/cloudfile/Box/settings.xhtml (content/Box/settings.xhtml)
content/messenger/cloudfile/Box/management.xhtml (content/Box/management.xhtml)
content/messenger/cloudfile/Box/management.js (content/Box/management.js)
content/messenger/cloudfile/Hightail/management.xhtml (content/Hightail/management.xhtml)
content/messenger/cloudfile/Hightail/management.js (content/Hightail/management.js)
content/messenger/cloudfile/Hightail/settings.js (content/Hightail/settings.js)
content/messenger/cloudfile/Hightail/settings.xhtml (content/Hightail/settings.xhtml)
content/messenger/cloudfile/Hightail/fileExceedsLimit.xul (content/Hightail/fileExceedsLimit.xul)
- content/messenger/cloudfile/Hightail/fileExceedsLimit.js (content/Hightail/fileExceedsLimit.js)
content/messenger/cloudfile/Hightail/fileExceedsQuota.xul (content/Hightail/fileExceedsQuota.xul)
content/messenger/cloudfile/Hightail/fileExceedsQuota.js (content/Hightail/fileExceedsQuota.js)
content/messenger/cloudfile/Hightail/fileExceeds2GB.xul (content/Hightail/fileExceeds2GB.xul)
--- a/mail/components/cloudfile/nsHightail.js
+++ b/mail/components/cloudfile/nsHightail.js
@@ -334,17 +334,17 @@ nsHightail.prototype = {
this.log.info("request status = " + req.status +
" response = " + req.responseText);
let docResponse = JSON.parse(req.responseText);
this.log.info("user info response parsed = " + docResponse);
if (docResponse.errorStatus)
this.log.info("error status = " + docResponse.errorStatus.code);
if (docResponse.errorStatus && docResponse.errorStatus.code > 200) {
- if (docResponse.errorStatus.code > 400) {
+ if (docResponse.errorStatus.code >= 400) {
// Our token has gone stale
this.log.info("Our token has gone stale - requesting a new one.");
let retryGetUserInfo = function() {
this._getUserInfo(successCallback, failureCallback);
}.bind(this);
this._handleStaleToken(retryGetUserInfo, failureCallback);
@@ -361,16 +361,17 @@ nsHightail.prototype = {
this._fileSpaceUsed = parseInt(storage.currentUsage);
this._availableStorage = parseInt(storage.storageQuota) - this._fileSpaceUsed;
}
else
this._availableStorage = parseInt(account.availableStorage);
this._maxFileSize = docResponse.type == "BAS" ? 52428800 : (parseInt(account.maxFileSize));
this.log.info("available storage = " + this._availableStorage + " max file size = " + this._maxFileSize);
+
successCallback();
}
else
failureCallback();
}.bind(this);
req.onerror = function() {
this.log.info("getUserInfo failed - status = " + req.status);
--- a/mail/locales/en-US/chrome/messenger/cloudfile/Hightail/fileExceedsLimit.dtd
+++ b/mail/locales/en-US/chrome/messenger/cloudfile/Hightail/fileExceedsLimit.dtd
@@ -1,13 +1,6 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY fileExceedsLimit.title "Hightail">
-<!ENTITY fileExceedsLimit.thatsBigFile "Sending files larger than 50 MB">
-<!ENTITY fileExceedsLimit.thatsBigFile2 "is a premium feature.">
-<!ENTITY fileExceedsLimit.accept "Upgrade">
-<!ENTITY fileExceedsLimit.cancel "Cancel">
+<!ENTITY fileExceedsLimit.thatsBigFile3 "Sending files larger than 50 MB is not supported for non-premium accounts.">
<!ENTITY fileExceedsLimit.style "width: 40em; min-height: 20em;">
-<!ENTITY fileExceedsLimit.proIncludes "Upgrade now to send this file plus:">
-<!ENTITY fileExceedsLimit.pros1 "Send files and folders up to 2GB">
-<!ENTITY fileExceedsLimit.pros2 "Store unlimited files online">
-<!ENTITY fileExceedsLimit.pros3 "Access and share files from anywhere">
--- a/mail/locales/en-US/chrome/messenger/cloudfile/Hightail/fileExceedsQuota.dtd
+++ b/mail/locales/en-US/chrome/messenger/cloudfile/Hightail/fileExceedsQuota.dtd
@@ -1,11 +1,7 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this file,
- You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY fileExceedsQuota.title "Hightail">
<!ENTITY fileExceedsQuota.storageLimitReached "Storage limit reached">
-<!ENTITY fileExceedsQuota.accept "Upgrade">
-<!ENTITY fileExceedsQuota.cancel "Cancel">
<!ENTITY fileExceedsQuota.description "You have reached your account storage limit of 2GB.">
<!ENTITY fileExceedsQuota.description1 "Your current storage usage is #XXX GB.">
-<!ENTITY fileExceedsQuota.description2 "Upgrade today to Pro Plus account and get more storage.">
-<!ENTITY fileExceedsQuota.description3 "You can also choose to delete files in your account to create more space.">
--- a/mail/themes/linux/mail/cloudfile/Hightail/fileExceedsLimit.css
+++ b/mail/themes/linux/mail/cloudfile/Hightail/fileExceedsLimit.css
@@ -9,28 +9,11 @@ html, body {
#fileExceedsLimit {
padding-left: 15px;
padding-right: 13px;
padding-top: 15px;
padding-bottom: 15px;
}
-#proIncludes {
+#title {
font-weight: bold;
- margin-bottom: 10px;
-}
-
-#title {
- font-size: 20pt;
- color: rgb(141,198,63);
}
-
-#title2 {
- font-size: 20pt;
- color: rgb(141,198,63);
- margin-top: -10px;
- margin-bottom: 10px;
-}
-
-description {
- font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
-}
--- a/mail/themes/osx/mail/cloudfile/Hightail/fileExceedsLimit.css
+++ b/mail/themes/osx/mail/cloudfile/Hightail/fileExceedsLimit.css
@@ -9,28 +9,11 @@ html, body {
#fileExceedsLimit {
padding-left: 15px;
padding-right: 13px;
padding-top: 15px;
padding-bottom: 15px;
}
-#proIncludes {
+#title {
font-weight: bold;
- margin-bottom: 10px;
-}
-
-#title {
- font-size: 20pt;
- color: rgb(141,198,63);
}
-
-#title2 {
- font-size: 20pt;
- color: rgb(141,198,63);
- margin-top: -10px;
- margin-bottom: 10px;
-}
-
-description {
- font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
-}
--- a/mail/themes/windows/mail/cloudfile/Hightail/fileExceedsLimit.css
+++ b/mail/themes/windows/mail/cloudfile/Hightail/fileExceedsLimit.css
@@ -9,28 +9,11 @@ html, body {
#fileExceedsLimit {
padding-left: 15px;
padding-right: 13px;
padding-top: 15px;
padding-bottom: 15px;
}
-#proIncludes {
+#title {
font-weight: bold;
- margin-bottom: 10px;
-}
-
-#title {
- font-size: 20pt;
- color: rgb(141,198,63);
}
-
-#title2 {
- font-size: 20pt;
- color: rgb(141,198,63);
- margin-top: -10px;
- margin-bottom: 10px;
-}
-
-description {
- font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
-}