Commit 641136fc authored by Dimitris Moraitis's avatar Dimitris Moraitis
Browse files

rename fixes - Refs #307

parent d7961f26
......@@ -21,7 +21,7 @@
</div>
<img class="logo" src="" />
<a href="#" class="name">
<h5 class="namecontainer">
<h5 class="namecontainer editable">
{% trans "Name: " %}<span class="name">node.name</span><span class="rename"></span>
<div class="editbuttons" style="display:none">
<img class="save" src="/static/save.png" />
......@@ -74,10 +74,12 @@ $("a.show-metadata").live('click', function() {
});
//rename machine
$(".rename, h5.namecontainer span.name").live('click', function() {
$(".rename, h5.editable span.name").live('click', function() {
$(this).parent().find('.name').html("<input id=\"txtEdit\" type=\"text\" class=\"nametextbox\" value=\"" + $(this).parent().find('.name').text() + "\" / ><span class=\"oldValue\" style=\"display:none;\" >" + $(this).parent().find('.name').text() + "</span>");
$(this).parent().find('.rename').hide();
$(this).parent().find(".editbuttons").fadeIn();
$(this).parent().removeClass('editable');
return false;
});
//cancel renaming
......@@ -86,6 +88,7 @@ $(".editbuttons .cancel").live('click', function() {
$(this).parent().parent().find('.name').html($(this).parent().parent().find('.name').find('.oldValue').text());
$(this).parent().parent().find(".editbuttons").hide();
$(this).parent().parent().find(".rename").fadeIn();
$(this).parent().parent().addClass('editable');
});
// intercept reboot click
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment