delettion
This commit is contained in:
@@ -48,6 +48,11 @@ def tags_w_lists():
|
||||
if a == "dump":
|
||||
if sel.commit_from_selection():
|
||||
return "done"
|
||||
if a == "delete":
|
||||
if sel.delete_url(data.get('tag'), data.get('url')):
|
||||
return "ok"
|
||||
return "-"
|
||||
|
||||
|
||||
@app.route('/report')
|
||||
def report():
|
||||
|
||||
@@ -36,3 +36,7 @@ bb {
|
||||
width: 100%;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
li button {
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,15 @@ $(document).ready(function(){
|
||||
});
|
||||
});
|
||||
|
||||
$('.del').click(function(e) {
|
||||
var li = $(this).parent("li");
|
||||
$.post('/tags_w_lists', {'action': 'delete', 'tag': li.data("tag"), 'url': li.data("url")}, function(d) {
|
||||
if(d === 'ok') {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#new').click(function(e) {
|
||||
var v = $(this).text();
|
||||
console.log(v)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<lists>
|
||||
<ul>
|
||||
{% for h in v.lists %}
|
||||
<li><a href="{{h.url}}" target="_blank">{{h.subject}}</a> -- <i>{{h.author_name}}</i></li>
|
||||
<li data-tag="{{v.tag}}" data-url="{{h.url}}"><a href="{{h.url}}" target="_blank">{{h.subject}}</a> -- <i>{{h.author_name}}</i> <button class="del">del</button></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</lists>
|
||||
|
||||
Reference in New Issue
Block a user