summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-07-14 20:51:54 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-07-14 20:51:54 -0400
commitc53efe6fa7e08863c010a51b85854b3194a764fe (patch)
treef5c7ad0463ee858d306f600d80f9e93a63b2aea6
parent5129c0018774a4d705074ee50bdefd1cc261664c (diff)
begins opml importer
-rw-r--r--index.php2
-rw-r--r--js/news.js8
-rw-r--r--js/settings.js26
-rw-r--r--lib/utils.php2
-rw-r--r--settings.php2
-rw-r--r--templates/settings.php4
6 files changed, 28 insertions, 16 deletions
diff --git a/index.php b/index.php
index e75ec19d6..917f8f13b 100644
--- a/index.php
+++ b/index.php
@@ -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>