summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-11 01:19:18 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-11 01:19:18 +0200
commitc37d6ea2225e6b7ee93d2a294c33d81681fa843e (patch)
treeb0ea98e934158e89f14b6c6843a701934e1455ee
parent729b72aa4b48514b99da14335f005eecb15a879a (diff)
reload page when the current feed is being deleted
-rw-r--r--css/news.css4
-rw-r--r--js/news.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/css/news.css b/css/news.css
index a4077a755..ae3e9ab3d 100644
--- a/css/news.css
+++ b/css/news.css
@@ -49,11 +49,11 @@ ul.controls li { float: left; }
#rightcontent div.feed_controls { box-sizing: border-box; -moz-box-sizing: border-box; background: none repeat scroll 0 0 #FFFFFF; border-bottom: 1px solid #ccc; box-shadow: 0 3px 3px -3px #000000; text-align: right; overflow: hidden; position: fixed; left: 32.5em; right: 0; top: 3.5em; }
#rightcontent div.feed_controls div.feed_title { float: left; padding-left: 10px; }
-#rightcontent div.feed_controls div.feed_title h1 { font-size: 16pt; color: #444; padding-top: .5em; }
+#rightcontent div.feed_controls div.feed_title h1 { font-size: 16pt; color: #444; padding-top: .4em; }
#rightcontent ul { box-sizing: border-box; -moz-box-sizing: border-box; overflow: auto; height: 100%; }
-#rightcontent div.body { padding: 10px 25px; }
+#rightcontent div.body { padding: 15px 25px 10px 25px; }
#rightcontent div.body p { line-height: 1.5; margin: 10px 0; }
#rightcontent div.body a { color: #0000ff; text-decoration: underline; }
#rightcontent div.body ul { padding-left: 15px; list-style-type: disc; }
diff --git a/js/news.js b/js/news.js
index ebbf126a1..94503ed58 100644
--- a/js/news.js
+++ b/js/news.js
@@ -157,11 +157,14 @@ News={
$.post(OC.filePath('news', 'ajax', 'deletefeed.php'),{'feedid':feedid},function(jsondata){
if(jsondata.status == 'success'){
$('li.feed[data-id="'+jsondata.data.feedid+'"]').remove();
+
var rightcontent = $('div.rightcontent');
if(rightcontent.attr('data-id') == feedid) {
rightcontent.find('div#feedadded').remove();
rightcontent.find('ul.accordion').before(jsondata.data.part_items);
transformCollapsableTrigger();
+ // if the deleted feed is the current feed, reload the page
+ window.location.reload();
}
}
else{