diff options
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | js/news.js | 8 | ||||
-rw-r--r-- | js/settings.js | 26 | ||||
-rw-r--r-- | lib/utils.php | 2 | ||||
-rw-r--r-- | settings.php | 2 | ||||
-rw-r--r-- | templates/settings.php | 4 |
6 files changed, 28 insertions, 16 deletions
@@ -17,7 +17,7 @@ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('news'); OCP\App::setActiveNavigationEntry('news'); -OCP\Util::addscript('news','news'); +OCP\Util::addScript('news','news'); OCP\Util::addStyle('news','news'); $l = OC_L10N::get('news'); diff --git a/js/news.js b/js/news.js index 35650fb7f..0ed437ca7 100644 --- a/js/news.js +++ b/js/news.js @@ -189,13 +189,13 @@ $(document).ready(function(){ list.find('#feeds_delete').hide(); list.find('#feeds_edit').hide(); - $('#addfeedfolder').click(function(e) { - e.stopPropagation(); + $('#addfeedfolder').click(function(event) { + event.stopPropagation(); }); - + }); -$(document).click(function(e) { +$(document).click(function(event) { $('#feedfoldermenu').hide(); }); diff --git a/js/settings.js b/js/settings.js index 4c645d241..265f12d6b 100644 --- a/js/settings.js +++ b/js/settings.js @@ -1,13 +1,25 @@ +News={ + Settings:{ + cloudFileSelected:function(path){ +// $.getJSON(OC.filePath('contacts', 'ajax', 'oc_photo.php'),{'path':path,'id':Contacts.UI.Card.id},function(jsondata){ +// if(jsondata.status == 'success'){ +// //alert(jsondata.data.page); +// Contacts.UI.Card.editPhoto(jsondata.data.id, jsondata.data.tmp) +// $('#edit_photo_dialog_img').html(jsondata.data.page); +// } +// else{ +// OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); +// } +// }); + } + } +} $(document).ready(function(){ - - - $('#somesetting').blur(function(event){ - event.preventDefault(); - var post = $( "#somesetting" ).serialize(); - $.post( OC.filePath('apptemplate','ajax','seturl.php') , post, function(data){ OC.msg.finishedSaving('#somesetting .msg', data); }); + $('#opml_file').click(function() { + OC.dialogs.filepicker(t('news', 'Select file'), News.Settings.cloudFileSelected, false, '', true); }); - + }); diff --git a/lib/utils.php b/lib/utils.php index e42e304bb..0964df48b 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -12,7 +12,7 @@ // load SimplePie library //TODO: is this file a suitable place for the following require? -require_once(OC::$APPSROOT . '/apps/news/3rdparty/SimplePie/SimplePieAutoloader.php'); + require_once('news/3rdparty/SimplePie/SimplePieAutoloader.php'); class OC_News_Utils { diff --git a/settings.php b/settings.php index 94d057358..55ce4ff6f 100644 --- a/settings.php +++ b/settings.php @@ -1,6 +1,6 @@ <?php -//OCP\Util::addscript( "news", "admin" ); +OCP\Util::addScript( 'news', 'settings'); $tmpl = new OCP\Template( 'news', 'settings'); diff --git a/templates/settings.php b/templates/settings.php index ccbb004f0..bb82c9754 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -2,7 +2,7 @@ <fieldset class="personalblock"> <strong>News</strong><br /> <input type="text" name="opml_file" id="opml_file" placeholder="<?php echo $l->t('.opml file');?>" /> - <br /> - + <input type="submit" value="<?php echo $l->t('Import feeds');?>" /> + <br /> </fieldset> </form> |