summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-09-02 03:20:01 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-09-02 03:20:01 +0200
commit8e13a082bd4542dc5abf51b27f9b75bb8ccabb75 (patch)
treee8b4f092c6d46aa068181e0289535807faa14075 /js
parent7251854ff2c9393f3b46ea4a5be96c8345ba40bd (diff)
improved icons in settings by exporting pngs, made show all more responsive
Diffstat (limited to 'js')
-rw-r--r--js/main.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/js/main.js b/js/main.js
index 8032987ae..d52aa1c66 100644
--- a/js/main.js
+++ b/js/main.js
@@ -97,23 +97,21 @@ $(document).ready(function(){
$('#view').click(function(){
var data = {};
+ var showAll;
if($(this).hasClass('show_all')){
data.show = 'unread';
+ showAll = true;
$(this).addClass('show_unread').removeClass('show_all');
} else {
data.show = 'all';
+ showAll = false;
$(this).addClass('show_all').removeClass('show_unread');
}
+ News.Objects.Menu.setShowAll(showAll);
$.post(OC.filePath('news', 'ajax', 'usersettings.php'), data, function(jsondata){
if(jsondata.status == 'success'){
- var showAll;
- if(data.show === 'all'){
- showAll = true;
- } else {
- showAll = false;
- }
- News.Objects.Menu.setShowAll(showAll);
+
} else {
OC.dialogs.alert(jsonData.data.message, t('news', 'Error'));
}