This commit is contained in:
Alessandro Cosentino 2012-07-29 18:07:05 -04:00
Родитель 1c006551e8 e983a37533
Коммит 269700f78a
2 изменённых файлов: 11 добавлений и 6 удалений

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

@ -17,7 +17,7 @@
#addfeed { background: url('%appswebroot%/apps/news/img/rss.svg') no-repeat left center; padding-left: 20px !important; }
#unreaditemcounter.nonzero { position: relative; background: #5E5E5E; border-radius: 5px; padding: 0 5px; color: white; text-align: center; margin: 0 0.3em 0 0.3em;}
#unreaditemcounter.zero { position: relative; margin: 0 0.3em 0 0;}
#unreaditemcounter.zero { position: relative; margin: 0 0.3em 0 0; }
ul.controls li { float: left; }

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

@ -28,10 +28,15 @@ News={
$('#dialog_holder').load(OC.filePath('news', 'ajax', dialogfile), function(jsondata){
if(jsondata.status != 'error'){
if(dialogtype == '#import_dialog') {
<<<<<<< HEAD
//TODO: group all the following calls in a method
$('#browsebtn, #cloudbtn, #importbtn').hide();
$('#cloudbtn, #cloudlink').click(function() {
/*
=======
$('#cloudbtn').click(function() {
/*
>>>>>>> 5992965d402f487f484e700ecf2cc31a3821dfdb
* it needs to be filtered by MIME type, but there are too many MIME types corresponding to opml
* and filepicker doesn't support multiple MIME types filter.
*/
@ -228,11 +233,11 @@ News={
var counterplace = $('.feeds_list[data-id="'+feedid+'"]').find('#unreaditemcounter');
var oldcount = counterplace.html();
counterplace.removeClass('nonzero').addClass('zero');
counterplace.html('<img src="' + OC.imagePath('core','loader.gif') + '" alt="refresh" />');
counterplace.html('<img style="vertical-align: middle;" src="' + OC.imagePath('core','loader.gif') + '" alt="refresh" />');
$.post(OC.filePath('news', 'ajax', 'updatefeed.php'),{'feedid':feedid, 'feedurl':feedurl, 'folderid':folderid},function(jsondata){
if(jsondata.status == 'success'){
var newcount = jsondata.data.unreadcount;
if (newcount > 0) {
if (newcount > 0) {
counterplace.addClass('nonzero');
counterplace.html(newcount);
}
@ -241,12 +246,12 @@ News={
}
}
else{
if (oldcount > 0) {
if (oldcount > 0) {
counterplace.addClass('nonzero');
counterplace.html(oldcount);
}
}
});
}
}
@ -301,7 +306,7 @@ $(document).ready(function(){
});
setupFeedList();
News.Feed.updateAll();
var updateInterval = 200000; //how often the feeds should update (in msec)
setInterval('News.Feed.updateAll()', updateInterval);