Skip to content

Commit

Permalink
Can now delete series from the series submenu in LFE.
Browse files Browse the repository at this point in the history
  • Loading branch information
lethain committed Jun 10, 2008
1 parent 46846c7 commit c867ab0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion templates/lifeflow/editor/edit_five.html
Expand Up @@ -30,6 +30,13 @@
var txt = titleCaps($("#title").val());
$("#title").val(titleCaps($("#title").val()));
}

var delete_series = function(pk) {
delete_model("series",pk);
var id = "#series_" + pk;
$(id).fadeOut('slow');
$("#select_" + pk).fadeOut('slow');
}
</script>

<div class="editing">
Expand All @@ -38,7 +45,7 @@
<p> Click on the series that this article should appear in. </p>
<div id="selectables" class="selectables">
{% for serie, selected in series %}
<a class="selectable {% if selected %} selected{% endif %}" id="{{ serie.pk }}"> {{ serie.title }}</a>
<a id="select_{{ serie.pk }}" class="selectable {% if selected %} selected{% endif %}" id="{{ serie.pk }}"> {{ serie.title }}</a>
{% endfor %}
</div>
</li>
Expand All @@ -52,6 +59,14 @@
</table>
</form>
</li>
<li>
<p> Delete unwanted series. </p>
{% for serie, selected in series %}
<a id="series_{{ serie.pk}}" class="button negative" onclick="delete_series({{ serie.pk }});"> Delete "{{ serie }}"</a>
{% endfor %}

</li>

</ul>
</div>
{% endblock %}

0 comments on commit c867ab0

Please sign in to comment.