From bab293df50a16fab0607e61372dc6e86ea4c05a5 Mon Sep 17 00:00:00 2001 From: Brian McLaughlin Date: Wed, 24 May 2017 14:19:58 -0400 Subject: [PATCH 1/3] Fix VMRC console connectivity in IE11 https://bugzilla.redhat.com/show_bug.cgi?id=1414869 --- app/views/vm_common/console_vmrc.html.haml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/views/vm_common/console_vmrc.html.haml b/app/views/vm_common/console_vmrc.html.haml index 93a0d1a3f8f..b70363e8edf 100644 --- a/app/views/vm_common/console_vmrc.html.haml +++ b/app/views/vm_common/console_vmrc.html.haml @@ -1,16 +1,10 @@ = render :partial => 'layouts/doctype' %html{:lang => I18n.locale.to_s.sub('-', '_')} %head - - if %w(5.1 5.5 6.0).include?(api_version) && is_browser_ie? - - if browser_info(:version).to_i > 10 - %meta{:content => "IE=EmulateIE8", "http-equiv" => "X-UA-Compatible"} - - elsif browser_info(:version).to_i > 9 - %meta{:content => "IE=8", "http-equiv" => "X-UA-Compatible"} %meta{:content => "text/html; charset=ISO-8859-1", "http-equiv" => "Content-Type"} = favicon_link_tag = stylesheet_link_tag "vmrc" - -# need jQuery that works in IE8 mode and has $.browser, the plugin is broken in IE9 mode - = javascript_include_tag 'jquery-1.8/jquery' + = javascript_include_tag 'jquery' = javascript_include_tag 'jquery_overrides' :javascript @@ -328,13 +322,14 @@ } console.debug("VMRC: is ready to start."); - if ($.browser.msie) { + isIE = #{is_browser_ie?}; + if (isIE) { vmrc.attachEvent("onScreenSizeChange", onSizeChanged); vmrc.attachEvent("onConnectionStateChange", onConnectionStateChanged); vmrc.attachEvent("onGrabStateChange", onGrabStateChanged); vmrc.attachEvent("onMessage", onMessage); vmrc.attachEvent("onWindowStateChange", onWindowStateChanged); - } else if ($.browser.mozilla || $.browser.chrome) { + } else { vmrc.onScreenSizeChange = onSizeChanged; vmrc.onConnectionStateChange = onConnectionStateChanged; vmrc.onGrabStateChange = onGrabStateChanged; From 9e1ac2b47cdc5a4bc0af958064ecd4c9cec1e73d Mon Sep 17 00:00:00 2001 From: Brian McLaughlin Date: Thu, 25 May 2017 09:14:10 -0400 Subject: [PATCH 2/3] Fix global variable reference https://bugzilla.redhat.com/show_bug.cgi?id=1414869 --- app/views/vm_common/console_vmrc.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/vm_common/console_vmrc.html.haml b/app/views/vm_common/console_vmrc.html.haml index b70363e8edf..7d29864844a 100644 --- a/app/views/vm_common/console_vmrc.html.haml +++ b/app/views/vm_common/console_vmrc.html.haml @@ -322,7 +322,7 @@ } console.debug("VMRC: is ready to start."); - isIE = #{is_browser_ie?}; + var isIE = #{is_browser_ie?}; if (isIE) { vmrc.attachEvent("onScreenSizeChange", onSizeChanged); vmrc.attachEvent("onConnectionStateChange", onConnectionStateChanged); From 82dd9749c10227ff07d78e63cc440181d2b2114c Mon Sep 17 00:00:00 2001 From: Brian McLaughlin Date: Thu, 25 May 2017 09:15:03 -0400 Subject: [PATCH 3/3] Removed jQuery 1.8 from bower per: https://github.com/ManageIQ/manageiq-ui-classic/pull/1430 https://bugzilla.redhat.com/show_bug.cgi?id=1414869 --- bower.json | 1 - 1 file changed, 1 deletion(-) diff --git a/bower.json b/bower.json index 41c486fedaa..603185705f5 100644 --- a/bower.json +++ b/bower.json @@ -34,7 +34,6 @@ "fetch": "~1.0.0", "jasmine-jquery": "~2.1.1", "jquery": "~2.2.4", - "jquery-1.8": "~1.8.3", "jquery-ui": "jqueryui#~1.12.1", "jquery-ujs": "~1.2.2", "jquery.observe_field": "himdel/jquery.observe_field#~0.1.0",