зеркало из https://github.com/nextcloud/news.git
basically reversing commit 18176083
This commit is contained in:
Родитель
5fccf54f9f
Коммит
f3f251acec
|
@ -23,9 +23,9 @@ $feeds = $feedmapper->findAll($userid);
|
|||
$l = OC_L10N::get('news');
|
||||
|
||||
if($feeds == null) {
|
||||
OCP\JSON::error(array('data' => array('message' => $l->t('Error adding folder.'))));
|
||||
// FIXME undefinded index feedurl
|
||||
OCP\Util::writeLog('news','ajax/feedlist.php: Error updating feeds: '.$_POST['feedurl'], OCP\Util::ERROR);
|
||||
//TODO: handle error better here
|
||||
OCP\JSON::error(array('data' => array('message' => $l->t('Error updating feeds.'))));
|
||||
OCP\Util::writeLog('news','ajax/feedlist.php: Error updating feeds', OCP\Util::ERROR);
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.collapsable { background: url('%webroot%/core/img/places/folder.svg') no-repeat left center; padding: 0.3em 0.8em 0.3em 19px; }
|
||||
.collapsable { background: url('%webroot%/core/img/places/folder.svg') no-repeat left center; padding: 0.3em 0.8em 0.3em 20px; }
|
||||
.news_input { float:left; font-size:12px; padding:4px 2px; border:solid 1px #aacfe4; width:200px; }
|
||||
.svg { border: inherit; background: inherit; }
|
||||
|
||||
|
@ -44,8 +44,8 @@ ul#feedfoldermenu { position:fixed; margin-left: 0; bottom: 2.8em; border-left:1
|
|||
|
||||
li { padding: 0px !important; }
|
||||
li.menuItem { margin-left:0.7em; margin-right:0.7em; float: none !important; text-align: left; }
|
||||
li.feeds_list { text-align: right; padding-left: 19px; }
|
||||
li.feeds_list a { margin-left: 19px !important; overflow: hidden; text-overflow: ellipsis; width: 13em; text-align: left; }
|
||||
li.feeds_list { margin-left: 10px !important; text-align: right; }
|
||||
li.feeds_list a { margin-left: 20px !important; overflow: hidden; text-overflow: ellipsis; width: 13em; text-align: left; }
|
||||
|
||||
li.folder_list:hover { color: rgb(0, 0, 0) !important; background: none !important; }
|
||||
li.feeds_list:hover { background: none repeat scroll 0% 0% rgb(221, 221, 221) !important; }
|
||||
|
|
14
js/news.js
14
js/news.js
|
@ -105,10 +105,7 @@ News={
|
|||
|
||||
var folderid = $('#inputfolderid:input[name="folderid"]').val();
|
||||
|
||||
var url;
|
||||
url = OC.filePath('news', 'ajax', 'createfeed.php');
|
||||
|
||||
$.post(url, { feedurl: feedurl, folderid: folderid },
|
||||
$.post(OC.filePath('news', 'ajax', 'createfeed.php'), { feedurl: feedurl, folderid: folderid },
|
||||
function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
OC.dialogs.alert(jsondata.data.message, t('news', 'Success!'));
|
||||
|
@ -119,14 +116,7 @@ News={
|
|||
$(button).attr("disabled", false);
|
||||
$(button).prop('value', t('news', 'Add feed'));
|
||||
});
|
||||
$('#feeds > ul').remove();
|
||||
|
||||
$.post(OC.filePath('news', 'templates', 'part.feeds.php'),
|
||||
function(data) {
|
||||
$('#feeds').append(data);
|
||||
setupFeedList();
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
'delete':function(feedid) {
|
||||
$('#feeds_delete').tipsy('hide');
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
echo '</ul></li></ul>';
|
||||
}
|
||||
include("populateroot.php");
|
||||
|
||||
include("part.itemcounter.php");
|
||||
print_folder($allfeeds, 0);
|
||||
print_folder($_['allfeeds'], 0);
|
||||
?>
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('news');
|
||||
|
||||
$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser());
|
||||
|
||||
$allfeeds = $foldermapper->populate('Everything', 0);
|
||||
|
||||
if ($allfeeds) {
|
||||
$feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null;
|
||||
if ($feedid == null) {
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
$feedid = 0;
|
||||
}
|
Загрузка…
Ссылка в новой задаче