Commit 29112794 authored by Thierry BUGEAT's avatar Thierry BUGEAT

#62 Tiny Tiny RSS : No login error message

parent 923096fb
---------------------------------------------------------
# myFeeds 1.5.0 (2016-09-09)
# myFeeds 1.5.0 (2016-09-12)
### New feature(s)
......@@ -26,6 +26,7 @@
- #56 Can't mark as read last news
- #57 Strange behavior "back" and "next" buttons
- #58 Prevents access to small news in offline mode
- #62 TTRSS no login error message
### Misc
......
# myFeeds 1.5.0 (2016-09-03): RSS reader for Firefox OS
# myFeeds 1.5.0 (2016-09-12): RSS reader for Firefox OS
This project is now hosted by Framasoft.
The main GIT repository URL is now :
https://git.framasoft.org/thierry-bugeat/myFeeds
......
......@@ -68,7 +68,6 @@ TinyTinyRss.prototype.setToken = function(token) {
return 1;
} else {
document.body.dispatchEvent(new CustomEvent('TinyTinyRss.setToken.error', {"detail": token}));
window.alert("Tiny Tiny Rss Error : \n" + JSON.stringify(token));
return 0;
}
}
......@@ -106,7 +105,7 @@ TinyTinyRss.prototype.updateToken = function() {
TinyTinyRss.prototype.login = function(url, user, password) {
_MyFeeds.log('TinyTinyRss.prototype.login()', arguments);
_TinyTinyRss.tinytinyrss.url = url;
_TinyTinyRss.tinytinyrss.url = (url.match(/^http/gi)) ? url : 'http://' + url;
_TinyTinyRss.tinytinyrss.user = user;
_TinyTinyRss.tinytinyrss.password = password;
......@@ -126,6 +125,7 @@ TinyTinyRss.prototype.login = function(url, user, password) {
_MyFeeds.log('CustomEvent : TinyTinyRss.login.error');
}
}).catch(function(error) {
document.body.dispatchEvent(new CustomEvent('TinyTinyRss.login.error', {"detail": error}));
_MyFeeds.log('CustomEvent : TinyTinyRss.login.error');
});
......@@ -299,7 +299,7 @@ TinyTinyRss.prototype.post = function (_url, _params) {
resolve(_response);
} else {
reject(Error(xhr.statusText));
reject(Error(xhr.status + ' ' + xhr.statusText));
}
};
......
......@@ -34,8 +34,9 @@ var MyListeners_TinyTinyRss = function() {
});
document.body.addEventListener('TinyTinyRss.login.error', function(response){
var _error = response.detail.message || "";
my.log('CustomEvent : TinyTinyRss.login.error', arguments);
my.message('Tiny Tiny Rss login error');
my.message("Tiny Tiny Rss login error\n" + _error);
});
document.body.addEventListener('TinyTinyRss.getSubscriptions.done', function(response){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment