Commit 9f98460f by Bence Dányi

webui: fix vm-renaming issue

fixes #120
parent 12a342c9
......@@ -81,12 +81,14 @@ $(function() {
var content = $('#vm-' + id + '-name').html();
var self=this;
var url = $(this).data('url');
$('#vm-'+id).addClass('editing');
$(this).unbind('click').click(function(e){
e.preventDefault();
e.stopPropagation();
$(this).unbind('click').click(handler);
$('#vm-' + id + '-name-details').show();
$('#vm-' + id + '-name').html(content);
$('#vm-'+id).removeClass('editing');
})
$('#vm-' + id + '-name-details').hide();
$('#vm-' + id + '-name').html('<input type="text" value="' + oldName + '" />\
......@@ -108,6 +110,8 @@ $(function() {
$('#vm-' + id + '-name-details').removeAttr('style');
$('#vm-' + id + '-name').text(data.name);
$(self).click(handler);
$(self).data('name', newName);
$('#vm-'+id).removeClass('editing');
}
});
})
......
......@@ -67,7 +67,27 @@
list-style-type: none;
}
.entry {
&.editing {
.summary {
&:hover .name > span {
width: 100%;
max-width: 100%;
}
.name > span {
width: 100%;
max-width: 100%;
}
}
}
&.opened {
&.editing {
.summary {
.name > span {
width: 100%;
max-width: 100%;
}
}
}
.actions {
display: block !important;
}
......
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 sign in to comment