mirror of
https://github.com/owncloud/bookmarks.git
synced 2024-11-29 04:24:11 +01:00
Disable the possibilty to edit tag 2 times
This commit is contained in:
parent
ef3bcfc969
commit
1bf1ca39a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user