summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-05-01 17:03:51 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-05-01 17:03:51 +0000
commitc8fd3c57655fd409312b9b959c284448f5aa41ae (patch)
tree7e4f97afe270bd44debb5760b101602f3f3b8a56 /js
parent10d42ce3920596ec6f36179e597dd3db257b8def (diff)
parentdeb07487bd0802fa6a89cfc8ddd56af93945eb4c (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'js')
-rw-r--r--js/identica-badge.js2
-rw-r--r--js/util.js13
2 files changed, 10 insertions, 5 deletions
diff --git a/js/identica-badge.js b/js/identica-badge.js
index 869230b7a..ffa55ae93 100644
--- a/js/identica-badge.js
+++ b/js/identica-badge.js
@@ -128,7 +128,7 @@
var a = document.createElement('A');
a.innerHTML = 'get this';
a.target = '_blank';
- a.href = 'http://identica/doc/badge';
+ a.href = 'http://identi.ca/doc/badge';
$.s.f.appendChild(a);
$.s.appendChild($.s.f);
$.f.getUser();
diff --git a/js/util.js b/js/util.js
index f15c4f2bb..3f14bc61c 100644
--- a/js/util.js
+++ b/js/util.js
@@ -166,14 +166,20 @@ $(document).ready(function(){
$("#notice_action-submit").addClass("disabled");
return true;
},
+ timeout: '60000',
error: function (xhr, textStatus, errorThrown) { $("#form_notice").removeClass("processing");
$("#notice_action-submit").removeAttr("disabled");
$("#notice_action-submit").removeClass("disabled");
- if ($(".error", xhr.responseXML).length > 0) {
- $('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true));
+ if (textStatus == "timeout") {
+ alert ("Sorry! We had trouble sending your notice. The servers are overloaded. Please try again, and contact the site administrator if this problem persists");
}
else {
- alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
+ if ($(".error", xhr.responseXML).length > 0) {
+ $('#form_notice').append(document._importNode($(".error", xhr.responseXML).get(0), true));
+ }
+ else {
+ alert("Sorry! We had trouble sending your notice ("+xhr.status+" "+xhr.statusText+"). Please report the problem to the site administrator if this happens again.");
+ }
}
},
success: function(xml) { if ($("#error", xml).length > 0) {
@@ -189,7 +195,6 @@ $(document).ready(function(){
}
else {
li = $("li", xml).get(0);
- id = li.id;
if ($("#"+li.id).length == 0) {
$("#notices_primary .notices").prepend(document._importNode(li, true));
$("#notices_primary .notice:first").css({display:"none"});