implement feed deletion
parent
647d913dba
commit
564c0f52b5
|
@ -22,7 +22,11 @@ sub fill_content {
|
|||
|
||||
my @param_feeds;
|
||||
my $count = 0;
|
||||
foreach my $feed (@feeds){
|
||||
FEED: foreach my $feed (@feeds){
|
||||
if ($main::FORM{delete} and "x".$main::FORM{delete} eq "x".$feed->{data}->{ID}){
|
||||
$feed->delete();
|
||||
next FEED;
|
||||
}
|
||||
my %r;
|
||||
$count++;
|
||||
$r{"count"} = $count;
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
function TweetodonOnReady(){
|
||||
$("a.deleteFeed").on("click", function(){
|
||||
var btn = $(this);
|
||||
if (confirm("Really delete this feed?")){
|
||||
var l = "index.pl?mode=Dashboard&delete="+btn.data("id");
|
||||
document.location.href=l;
|
||||
}
|
||||
});
|
||||
}
|
|
@ -49,11 +49,12 @@
|
|||
<td><TMPL_VAR NAME="count"></td>
|
||||
<td><TMPL_VAR NAME="url"></td>
|
||||
<td><a class="btn btn-default" href="index.pl?mode=EditFeed&id=<TMPL_VAR NAME="ID">">Edit</a></td>
|
||||
<td><a class="btn btn-danger">Delete</a></td>
|
||||
<td><a class="btn btn-danger deleteFeed" href="#" data-id="<TMPL_VAR NAME="ID">">Delete</a></td>
|
||||
</tr>
|
||||
</TMPL_LOOP>
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary">Add new feed</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue