[Kimchi-devel] [PATCH] Fix Kimchi UI issues on IE11

Adam King rak at linux.vnet.ibm.com
Fri Feb 21 20:04:56 UTC 2014


I discovered that the Kimchi UI would not render in IE11 due to some
Javascript syntax sensitivity. This patch corrects those issues.

Signed-off-by: Adam King <rak at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.main.js     |  4 ++--
 ui/js/src/kimchi.network.js  | 18 +++++++++---------
 ui/pages/kimchi-ui.html.tmpl |  1 +
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index 5387495..f652b46 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -197,7 +197,7 @@ kimchi.getDefaultPage = function(url) {
             if (path) {
                 defautLocation = path.substring(0, path.length - 5);
             }
-        },
+        }
     });
     return defautLocation;
 };
@@ -215,7 +215,7 @@ kimchi.getTabHtml = function(url) {
                 var path = $tab.find('path').text();
                 tabsHtml += "<li><a class='item' href=" + path + ">" + title + "</a></li>";
             });
-        },
+        }
     });
     return tabsHtml;
 };
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index c1f87ce..faf1285 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -135,7 +135,7 @@ kimchi.initNetworkCreation = function() {
             var network = kimchi.getNetworkDialogValues();
             var data = {
                 name : network.name,
-                connection: network.type,
+                connection: network.type
             };
             if (network.type === kimchi.NETWORK_TYPE_BRIDGE) {
                 data.connection = "bridge";
@@ -160,6 +160,13 @@ kimchi.initNetworkCreation = function() {
 };
 
 kimchi.initNetworkDialog = function() {
+
+    buttonsObj= {};
+    buttonsObj['id'] = "networkFormOk";
+    buttonsObj['text'] = i18n.KCHAPI6005M;
+    buttonsObj['class'] = "ui-button-primary";
+    buttonsObj['disabled'] = true;
+    buttonsObj['click'] = function() { };
     $("#networkConfig").dialog({
         autoOpen : false,
         modal : true,
@@ -174,14 +181,7 @@ kimchi.initNetworkDialog = function() {
         beforeClose : function() {
             kimchi.cleanNetworkDialog();
         },
-        buttons : [ {
-            id : "networkFormOk",
-            text : i18n.KCHAPI6005M,
-            class: "ui-button-primary",
-            disabled: true,
-            click : function() {
-            }
-        } ]
+        buttons : [buttonsObj]
     });
     kimchi.setupNetworkFormEvent();
 };
diff --git a/ui/pages/kimchi-ui.html.tmpl b/ui/pages/kimchi-ui.html.tmpl
index eebe886..31b46eb 100644
--- a/ui/pages/kimchi-ui.html.tmpl
+++ b/ui/pages/kimchi-ui.html.tmpl
@@ -30,6 +30,7 @@
 <head>
 <meta charset="UTF-8">
 <title>Kimchi</title>
+<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
 <link rel="shortcut icon" href="images/logo.ico">
 <link rel="stylesheet" href="$href('libs/themes/base/jquery-ui.min.css')">
-- 
1.8.1.4




More information about the Kimchi-devel mailing list