Display all tags in add_post and edit_post

Reverse post list in all_posts
This commit is contained in:
Gregory Soutade
2013-11-03 09:17:24 +01:00
parent 0394ada46e
commit f66feb4dbe
5 changed files with 39 additions and 3 deletions

View File

@@ -50,3 +50,21 @@ function previewPost(blog_id)
form.action = action;
form.target = target;
}
function addTag()
{
text_tags = document.getElementById('id_text_tags');
avail_tags = document.getElementById('available_tags');
cur_elem = avail_tags.selectedIndex;
cur_elem = (cur_elem >= 0) ? avail_tags.options[cur_elem].value : "";
if(cur_elem != "" && text_tags.value.indexOf(cur_elem) == -1)
{
if (text_tags.value.length > 0)
text_tags.value += ", " + cur_elem;
else
text_tags.value = cur_elem;
}
}