[Kimchi-devel] [PATCH] Bug 446 Fix

Aline Manera alinefm at linux.vnet.ibm.com
Fri Sep 19 13:25:04 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>
Tested-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 09/19/2014 07:17 AM, huoyuxin at linux.vnet.ibm.com wrote:
> From: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
>
> Signed-off-by: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.guest_edit_main.js |   21 ++++++++++++++-------
>   1 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
> index 938dfd9..c281289 100644
> --- a/ui/js/src/kimchi.guest_edit_main.js
> +++ b/ui/js/src/kimchi.guest_edit_main.js
> @@ -163,7 +163,8 @@ kimchi.guest_edit_main = function() {
>           $(".add", "#form-guest-edit-interface").button({
>               icons: { primary: "ui-icon-plusthick" },
>               text: false
> -        }).click(function(){
> +        }).click(function(evt){
> +            evt.preventDefault();
>               addItem({
>                   mac: "",
>                   network: "",
> @@ -192,13 +193,15 @@ kimchi.guest_edit_main = function() {
>                   disabled: true,
>                   icons: { primary: "ui-icon-pencil" },
>                   text: false
> -            }).click(function(){
> +            }).click(function(evt){
> +                evt.preventDefault();
>                   toggleEdit($(this).parent().parent(), true);
>               });
>               $(".delete", itemNode).button({
>                   icons: { primary: "ui-icon-trash" },
>                   text: false
> -            }).click(function(){
> +            }).click(function(evt){
> +                evt.preventDefault();
>                   var item = $(this).parent().parent();
>                   kimchi.deleteGuestInterface(kimchi.selectedGuest, item.prop("id"), function(){
>                       item.remove();
> @@ -207,7 +210,8 @@ kimchi.guest_edit_main = function() {
>               $(".save", itemNode).button({
>                   icons: { primary: "ui-icon-disk" },
>                   text: false
> -            }).click(function(){
> +            }).click(function(evt){
> +                evt.preventDefault();
>                   var item = $(this).parent().parent();
>                   var interface = {
>                       network: $("select", item).val(),
> @@ -231,7 +235,8 @@ kimchi.guest_edit_main = function() {
>               $(".cancel", itemNode).button({
>                   icons: { primary: "ui-icon-arrowreturnthick-1-w" },
>                   text: false
> -            }).click(function(){
> +            }).click(function(evt){
> +                evt.preventDefault();
>                   var item = $(this).parent().parent();
>                   $("label", item).text()==="" ? item.remove() : toggleEdit(item, false);
>               });
> @@ -332,7 +337,8 @@ kimchi.guest_edit_main = function() {
>               filterNodes(key, $("#permission-sel-users"));
>               filterNodes(key, $("#permission-sel-groups"));
>           });
> -        $('#permissionGo').button().click(function() {
> +        $('#permissionGo').button().click(function(evt) {
> +            evt.preventDefault();
>               $("#permission-avail-users").children(".item-picked").appendTo("#permission-sel-users").removeClass("item-picked");
>               sortNodes($("#permission-sel-users"), true);
>               $("#permission-avail-groups").children(".item-picked").appendTo("#permission-sel-groups").removeClass("item-picked");
> @@ -341,7 +347,8 @@ kimchi.guest_edit_main = function() {
>               filterNodes("", $("#permission-sel-users"));
>               filterNodes("", $("#permission-sel-groups"));
>           });
> -        $('#permissionBack').button().click(function() {
> +        $('#permissionBack').button().click(function(evt) {
> +            evt.preventDefault();
>               $("#permission-sel-users").children(".item-picked").appendTo("#permission-avail-users").removeClass("item-picked");
>               sortNodes($("#permission-avail-users"), true);
>               $("#permission-sel-groups").children(".item-picked").appendTo("#permission-avail-groups").removeClass("item-picked");




More information about the Kimchi-devel mailing list