1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-01-02 02:42:45 +01:00

begins opml importer

This commit is contained in:
Alessandro Cosentino 2012-07-14 20:51:54 -04:00
parent 5129c00187
commit c53efe6fa7
6 changed files with 28 additions and 16 deletions

View File

@ -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');

View File

@ -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();
});

View File

@ -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);
});
});

View File

@ -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 {

View File

@ -1,6 +1,6 @@
<?php
//OCP\Util::addscript( "news", "admin" );
OCP\Util::addScript( 'news', 'settings');
$tmpl = new OCP\Template( 'news', 'settings');

View File

@ -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>