[PATCH 0/2] Fixes to issue #405

https://github.com/kimchi-project/kimchi/issues/405 Patches fixes problem (1) and (3). Problem (2) is caused by libvirt. Error has already been reported to libvirt community. Rodrigo Trujillo (2): Fix cancel button in edit guest storage tab Fix enter hit in storage tab under guest edit window ui/js/src/kimchi.guest_edit_main.js | 1 + ui/pages/guest-edit.html.tmpl | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) -- 1.9.3

When the user is in storage tab in edit guest window, he can clicks on 'replace' button in order to change the ISO path. However, if user types anything in the path input box and wants to cancel the changes, turns out that the 'cancel' button was not restoring previous value. This patch fixed this problem. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> --- ui/js/src/kimchi.guest_edit_main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 01d8045..99ab491 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -85,6 +85,7 @@ kimchi.guest_edit_main = function() { var pathBox = $('.path input', rowNode) .prop('readonly', !toEdit); toEdit && pathBox.select(); + pathBox.val(pathBox.attr('value')); }; var replaceCDROM = function(event) { -- 1.9.3

If user goes to storage tab in edit guest window, whenever he focuses a input boxes (any device name or path) and press ENTER, the default behaviour is trigger a "click" event in the first window button. In this case, the "Attach new storage" window is opened. This patch fixes this problem, so, when user press ENTER, nothing happens. Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com> --- ui/pages/guest-edit.html.tmpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl index ed7ddeb..8870429 100644 --- a/ui/pages/guest-edit.html.tmpl +++ b/ui/pages/guest-edit.html.tmpl @@ -100,7 +100,7 @@ <div class="header"> <span class="cell">$_("Device")</span> <span class="cell">$_("Path")</span> - <button id="guest-edit-attach-cdrom-button" class="action-area attach"></button> + <button type="button" id="guest-edit-attach-cdrom-button" class="action-area attach"></button> </div> <div class="body"></div> </form> @@ -164,19 +164,19 @@ value="{path}" readonly="readonly" /> </span> <span class="action-area"> - <button class="guest-edit-cdrom-button replace" + <button type="button" class="guest-edit-cdrom-button replace" data-vm="{vm}" data-dev="{dev}" title='$_("Replace")'> </button> - <button class="guest-edit-cdrom-button detach" + <button type="button" class="guest-edit-cdrom-button detach" data-vm="{vm}" data-dev="{dev}" data-type="{type}" title='$_("Detach")'> </button> - <button class="guest-edit-cdrom-button save hidden" + <button type="button" class="guest-edit-cdrom-button save hidden" data-vm="{vm}" data-dev="{dev}" title='$_("Save")'> </button> - <button class="guest-edit-cdrom-button cancel hidden" + <button type="button" class="guest-edit-cdrom-button cancel hidden" data-vm="{vm}" data-dev="{dev}" title='$_("Cancel")'> </button> @@ -212,7 +212,7 @@ value="{path}" readonly="readonly" /> </span> <span class="action-area"> - <button class="guest-edit-cdrom-button detach" + <button type="button" class="guest-edit-cdrom-button detach" data-vm="{vm}" data-dev="{dev}" data-type="{type}" title="$_("Detach")"> </button> -- 1.9.3

-- Reviewed-by: Paulo Vital <pvital@linux.vnet.ibm.com> On Fri, 2014-08-22 at 12:47 -0300, Rodrigo Trujillo wrote:
https://github.com/kimchi-project/kimchi/issues/405 Patches fixes problem (1) and (3).
Problem (2) is caused by libvirt. Error has already been reported to libvirt community.
Rodrigo Trujillo (2): Fix cancel button in edit guest storage tab Fix enter hit in storage tab under guest edit window
ui/js/src/kimchi.guest_edit_main.js | 1 + ui/pages/guest-edit.html.tmpl | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-)

Reviewed-by: Crístian Viana <vianac@linux.vnet.ibm.com> On 22-08-2014 12:47, Rodrigo Trujillo wrote:
https://github.com/kimchi-project/kimchi/issues/405 Patches fixes problem (1) and (3).
Problem (2) is caused by libvirt. Error has already been reported to libvirt community.
Rodrigo Trujillo (2): Fix cancel button in edit guest storage tab Fix enter hit in storage tab under guest edit window
ui/js/src/kimchi.guest_edit_main.js | 1 + ui/pages/guest-edit.html.tmpl | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-)
participants (4)
-
Aline Manera
-
Crístian Viana
-
Paulo Ricardo Paz Vital
-
Rodrigo Trujillo