Skip to content

Commit

Permalink
Improve IE8/old IE messages
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted committed Jan 13, 2016
1 parent 9c474e8 commit c32ce28
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
13 changes: 5 additions & 8 deletions code/modules/tgui/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,16 @@
* If the src_object's ui_act() returns 1, update all UIs attacked to it.
**/
/datum/tgui/Topic(href, href_list)
var/action = href_list["action"] // Pull the action out.
href_list -= "action"
var/action = href_list["action"]
var/params = href_list; params -= "action"

// Handle any special actions.
switch(action)
if("tgui:initialize")
user << output(url_encode(get_json(initial_data)), "[window_id].browser:initialize")
return
if("tgui:ie")
user << link("http://windows.microsoft.com/en-us/internet-explorer/download-ie")
return
if("tgui:eol")
user << link("https://support.microsoft.com/en-us/lifecycle#gp/Microsoft-Internet-Explorer")
if("tgui:link")
user << link(params["url"])
return
if("tgui:fancy")
user.client.prefs.tgui_fancy = TRUE
Expand All @@ -282,7 +279,7 @@
if(status != UI_INTERACTIVE || user != usr)
return // If UI is not interactive or usr calling Topic is not the UI user.

var/update = src_object.ui_act(action, href_list, state) // Call ui_act() on the src_object.
var/update = src_object.ui_act(action, params, state) // Call ui_act() on the src_object.
if(src_object && update)
SStgui.update_uis(src_object) // If we have a src_object and its ui_act() told us to update.

Expand Down
6 changes: 3 additions & 3 deletions tgui/assets/tgui.js

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions tgui/scripts/components/warnings.ract
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ component.exports = {

{{#if config.fancy && ie && ie < 11}}
<ui-notice>
<span>You have an old ({{ie}}), EOL version of Internet Explorer installed. Please upgrade to the latest available version of IE.</span><br/>
<span>To upgrade, please click 'Check For Upgrades' below to download the latest available version from Microsoft.</span><br/>
<span>Otherwise, if you are unable (XP/Wine) or unwilling to upgrade, please click 'No Frills' below to disable incompatible features (and this message).</span>
<span>You have an old (IE{{ie}}), EOL (click 'EOL Info' for more information) version of Internet Explorer installed.</span><br/>
<span>To upgrade, click 'Upgrade IE' to download IE11 from Microsoft.</span><br/>
<span>If you are unable to upgrade directly, click 'IE VMs' to download a VM with IE11 or Edge from Microsoft.</span><br/>
<span>Otherwise, click 'No Frills' below to disable potentially incompatible features (and this message).</span>
<hr/>
<ui-button icon='internet-explorer' action='tgui:ie'>Check For Upgrades</ui-button>
<ui-button icon='close' action='tgui:nofrills'>No Frills</ui-button>
<ui-button icon='info' action='tgui:eol'>EOL Info</ui-button>
<ui-button icon='internet-explorer' action='tgui:link' params='{"url": "http://windows.microsoft.com/en-us/internet-explorer/download-ie"}'>
Upgrade IE</ui-button>
<ui-button icon='edge' action='tgui:link' params='{"url": "https://dev.windows.com/en-us/microsoft-edge/tools/vms"}'>
IE VMs</ui-button>
<ui-button icon='info' action='tgui:link' params='{"url": "https://support.microsoft.com/en-us/lifecycle#gp/Microsoft-Internet-Explorer"}'>
EOL Info</ui-button>
<ui-button icon='bug' on-press='debug'>Debug Info</ui-button>
{{#if debug}}
<hr/>
Expand Down
4 changes: 2 additions & 2 deletions tgui/scripts/tgui.ract
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ component.exports = {
this.toggle('resize')
return false
})
document.addEventListener('mousemove', (event) => {
window.addEventListener('mousemove', (event) => {
if (this.get('drag')) {
drag.bind(this)(event)
} else if (this.get('resize')) {
resize.bind(this)(event)
}
})
document.addEventListener('mouseup', (event) => {
window.addEventListener('mouseup', (event) => {
this.set({ drag: false, resize: false, x: null, y: null })
})
},
Expand Down
15 changes: 12 additions & 3 deletions tgui/tgui.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,23 @@
}
};
</script>
<link rel='stylesheet' href='tgui.css'/>
<link rel='stylesheet' type='text/css' href='tgui.css'/>
<script id='data' type='application/json' data-ref='[ref]'>{}</script>
<script defer src='tgui.js'></script>
<script defer type='application/javascript' src='tgui.js'></script>
</head>
<body>
<div id='container' class='container'>
<div class='notice'>
<span>Loading...</span>
<span>Loading...</span><br/>
<!--[if IE 8]>
<span>You are running Internet Explorer 8, which is End of Life, and unsupported by this interface.</span><br/>
<span>Please upgrade or use a virtual machine if you wish to use this interface.</span><br/>
<ul>
<li><span>Upgrade IE: http://windows.microsoft.com/en-us/internet-explorer/download-ie</span></li>
<li><span>IE VMs: https://dev.windows.com/en-us/microsoft-edge/tools/vms</span></li>
<li><span>EOL Info: https://support.microsoft.com/en-us/lifecycle#gp/Microsoft-Internet-Explorer</span></li>
</ul>
<![endif]-->
</div>
</div>
<noscript>
Expand Down

0 comments on commit c32ce28

Please sign in to comment.