1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-12-01 05:24:11 +01:00

Disable the possibilty to edit tag 2 times

This commit is contained in:
Brice Maron 2012-08-07 21:28:49 +00:00
parent ef3bcfc969
commit 1bf1ca39a2

View File

@ -325,9 +325,10 @@ function hasProtocol(url) {
}
function renameTag(event) {
if($('input[name="tag_new_name"]').length) return; // Do nothing if a tag is currenlty edited
tag_el = $(this).closest('li');
tag_el.append('<input name="tag_new_name" type="text">');
tag_el.find('.tag_edit').hide();
tag_name = tag_el.find('.tag').hide().text();
tag_el.find('input').val(tag_name).bind('blur',submitTagName);
@ -337,6 +338,7 @@ function submitTagName(event) {
tag_el = $(this).closest('li')
new_tag_name = tag_el.find('input').val();
old_tag_name = tag_el.find('.tag').show().text();
tag_el.find('.tag_edit').show();
tag_el.find('input').remove();
//submit