make XHRs non-blocking again; change sharing dialog so sharing is done without closing the dialog (still lacks any feedback though)

This commit is contained in:
Dan Mills 2008-03-26 23:22:35 -07:00
Родитель 595423713c
Коммит 255bfe18ef
2 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -1,3 +1,7 @@
<!ENTITY dialog.title "Weave Sharing">
<!ENTITY dialog.label "Enter a Weave ID to share bookmarks with:">
<!ENTITY username.label "Email:">
<!ENTITY dialog.title "Weave Sharing">
<!ENTITY close.button.label "Close">
<!ENTITY share.button.label "Share">
<!ENTITY description.top "Enter a the ID of the user you wish to share your bookmarks with:">
<!ENTITY description.ok "Weave sharing complete!">
<!ENTITY description.error "Error. Please check the Weave ID and try again.">
<!ENTITY username.label "Weave ID (Email):">

Просмотреть файл

@ -108,11 +108,10 @@ DAVCollection.prototype = {
let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
request = request.QueryInterface(Ci.nsIDOMEventTarget);
// request.addEventListener("load", new Utils.EventListener(self.cb, "load"), false);
// request.addEventListener("error", new Utils.EventListener(self.cb, "error"), false);
request.addEventListener("load", new Utils.EventListener(self.cb, "load"), false);
request.addEventListener("error", new Utils.EventListener(self.cb, "error"), false);
request = request.QueryInterface(Ci.nsIXMLHttpRequest);
// request.open(op, this._baseURL + path, true);
request.open(op, this._baseURL + path, false); // FIXME: blocking
request.open(op, this._baseURL + path, true);
// Force cache validation
@ -135,9 +134,8 @@ DAVCollection.prototype = {
request.channel.notificationCallbacks = this._authProvider;
request.send(data);
ret = request;
// let event = yield;
// ret = event.target;
let event = yield;
ret = event.target;
if (this._authProvider._authFailed)
this._log.warn("_makeRequest: authentication failed");