summaryrefslogtreecommitdiffstats
path: root/js/news.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/news.js')
-rw-r--r--js/news.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/news.js b/js/news.js
index 0ed437ca7..77ee6d1fc 100644
--- a/js/news.js
+++ b/js/news.js
@@ -149,6 +149,24 @@ News={
OC.dialogs.alert(jsondata.data.message, t('news', 'Error'));
}
});
+ },
+ updateAll:function() {
+ $.post(OC.filePath('news', 'ajax', 'feedlist.php'),function(jsondata){
+ if(jsondata.status == 'success'){
+
+ }
+ else{
+ OC.dialogs.alert(jsondata.data.message, t('news', 'Error'));
+ }
+ });
+ },
+ updateFeed:function(feedid) {
+ $.post(OC.filePath('news', 'ajax', 'updatefeed.php'),{'feedid':feedid},function(jsondata){
+ if(jsondata.status == 'success'){
+ }
+ else{
+ }
+ });
}
}
}
@@ -193,6 +211,9 @@ $(document).ready(function(){
event.stopPropagation();
});
+ var updateInterval = 20000; //how often the feeds should update (in msec)
+ setInterval('News.Feed.updateAll()', updateInterval);
+
});
$(document).click(function(event) {