[Pkg-mozext-commits] [sage-extension] 33/39: content update
David Prévot
taffit at moszumanska.debian.org
Fri May 1 03:10:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag sage_1_1
in repository sage-extension.
commit a5614652f244472a0f2401541ce1506c0e00f686
Author: Peter Andrews <petea at jhu.edu>
Date: Wed Jun 2 01:19:30 2004 +0000
content update
---
src/sage/content/sage.js | 13 +++++++++----
src/sage/content/updatechecker.js | 7 ++++++-
src/sage/locale/en-US/sage.properties | 2 +-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/sage/content/sage.js b/src/sage/content/sage.js
index 9e615d4..b29ec8a 100755
--- a/src/sage/content/sage.js
+++ b/src/sage/content/sage.js
@@ -110,7 +110,7 @@ function openSettingDialog() {
function openSageProjectFeed() {
lastResource = null;
var feedURL = "http://sage.mozdev.org/rss.xml";
- setStatusLoading();
+ setStatusLoading("Sage Project News");
httpGet(feedURL);
}
@@ -254,9 +254,13 @@ function rssTitleLabelClick(aNode, aEvent){
}
-function setStatusLoading(){
+function setStatusLoading(label){
rssStatusImage.setAttribute("loading", "true");
- rssStatusLabel.value = "Loading: " + lastResource.name;
+ if(label) {
+ rssStatusLabel.value = "Loading: " + label;
+ } else {
+ rssStatusLabel.value = "Loading: " + lastResource.name;
+ }
}
function setStatusDone(){
@@ -478,7 +482,7 @@ function httpGetResult(aResultCode) {
if(aResultCode == RESULT_OK) {
currentFeed = new Feed(responseXML);
- if(lastResource.res) {
+ if(lastResource) {
if(CommonFunc.getPrefValue(CommonFunc.AUTO_FEED_TITLE, "bool", true)) {
if(CommonFunc.getBMDSProperty(lastResource.res, CommonFunc.BM_NAME) != currentFeed.getTitle()) {
CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_NAME, currentFeed.getTitle());
@@ -488,6 +492,7 @@ function httpGetResult(aResultCode) {
BMSVC.updateLastVisitedDate(lastResource.url, responseXML.characterSet);
CommonFunc.setBMDSProperty(lastResource.res, CommonFunc.BM_DESCRIPTION, CommonFunc.STATUS_NO_UPDATE);
}
+
setStatusDone();
setRssItemListBox();
diff --git a/src/sage/content/updatechecker.js b/src/sage/content/updatechecker.js
index c515e81..ca78724 100755
--- a/src/sage/content/updatechecker.js
+++ b/src/sage/content/updatechecker.js
@@ -75,7 +75,12 @@ var UpdateChecker = {
var lastModified = 0;
var gettingLastModified = false;
- var feed = new Feed(UpdateChecker.httpReq.responseXML);
+ try {
+ var feed = new Feed(UpdateChecker.httpReq.responseXML);
+ } catch(e) {
+ UpdateChecker.checkResult(false, 0);
+ return;
+ }
if(feed.hasLastPubDate()) {
lastModified = feed.getLastPubDate().getTime();
diff --git a/src/sage/locale/en-US/sage.properties b/src/sage/locale/en-US/sage.properties
index 9991618..aca7285 100755
--- a/src/sage/locale/en-US/sage.properties
+++ b/src/sage/locale/en-US/sage.properties
@@ -2,7 +2,7 @@ RESULT_OK_STR = OK
RESULT_PARSE_ERROR_STR = XML Parse Error
RESULT_NOT_RSS_STR = Feed Parse Error
RESULT_NOT_FOUND_STR = File Not Found
-RESULT_NOT_AVAILABLE_STR = Not Available URL
+RESULT_NOT_AVAILABLE_STR = URL Not Available
RESULT_ERROR_FAILURE_STR = Load Failure
CHECK_UPDATE = Check Feeds
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/sage-extension.git
More information about the Pkg-mozext-commits
mailing list