Revision 71ecd0bb
b/ui/templates/machines.html | ||
---|---|---|
645 | 645 |
// intercept click on remove button in metadata edit dialog |
646 | 646 |
$('#editor-1.meta-modal button.remove').live('click', function() { |
647 | 647 |
// get the server id and meta key needed for the ajax call |
648 |
var serverID = $(this).parent().parent().parent().parent().children("h3").attr('id');
|
|
649 |
var meta_key = $(this).parent().find("label").text();
|
|
648 |
var serverID = $(this).closest('div.container').children('h3').attr('id');
|
|
649 |
var meta_key = $(this).parent().find('label').text();
|
|
650 | 650 |
// make the ajax call and list the new GET results |
651 | 651 |
delete_metadata(serverID, meta_key); |
652 | 652 |
return false; |
... | ... | |
670 | 670 |
// intercept click on save button in metadata add dialog |
671 | 671 |
$('#editor-2.meta-modal button.save').live('click', function() { |
672 | 672 |
// get the server id, meta key and meta value needed for the ajax call |
673 |
var serverID = $(this).parent().children("h3").attr('id');
|
|
674 |
var meta_key = $(this).parent().find(".content input.key").attr('value');
|
|
675 |
var meta_value = $(this).parent().find(".content input.value").attr('value');
|
|
673 |
var serverID = $(this).parent().find('h3').attr('id');
|
|
674 |
var meta_key = $(this).parent().find('input.key').attr('value');
|
|
675 |
var meta_value = $(this).parent().find('input.value').attr('value');
|
|
676 | 676 |
// make the ajax call and list the new GET results |
677 | 677 |
add_metadata(serverID, meta_key, meta_value); |
678 | 678 |
// close add metadata and open edit metadata dialog |
Also available in: Unified diff