diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-01 09:48:41 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-01 09:48:41 -0400 |
commit | 703520c3b69cb641ea4db6ec1062abe9e8b86ee4 (patch) | |
tree | 97df983cfdcde167136fe4f505e4152276d55a9d /js | |
parent | eca49d72c47eb9b59cb3192f24a442d4d3303092 (diff) |
small fixes on the settings popup
Diffstat (limited to 'js')
-rw-r--r-- | js/news.js | 6 | ||||
-rw-r--r-- | js/settings.js | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/js/news.js b/js/news.js index 19adacb89..3bd51a375 100644 --- a/js/news.js +++ b/js/news.js @@ -247,7 +247,11 @@ $(document).ready(function(){ }); $('#settingsbtn').on('click keydown', function() { - OC.appSettings({appid:'news', loadJS:true}); + try { + OC.appSettings({appid:'news', loadJS:true}); + } catch(e) { + alert(e); + } }); setupFeedList(); diff --git a/js/settings.js b/js/settings.js index b1f81410e..910eefdaa 100644 --- a/js/settings.js +++ b/js/settings.js @@ -47,6 +47,7 @@ News={ } $('#browsebtn, #cloudbtn, #importbtn').hide(); + $('#cloudbtn, #cloudlink').click(function() { /* * it needs to be filtered by MIME type, but there are too many MIME types corresponding to opml @@ -54,12 +55,15 @@ $('#cloudbtn, #cloudlink').click(function() { */ OC.dialogs.filepicker(t('news', 'Select file'), News.Settings.cloudFileSelected, false, '', true); }); + $('#browsebtn, #browselink').click(function() { $('#file_upload_start').trigger('click'); }); + $('#file_upload_start').change(function() { News.Settings.browseFile(this.files); }); + $('#importbtn').click(function() { News.Settings.import(this); }); |