fixes #544 - No warning being given when running IE in compatibility mode

This commit is contained in:
Luke Pulverenti 2013-09-16 23:41:49 -04:00
parent 85d7eb917f
commit 3b41f9cd23
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,4 @@
using System.Runtime.InteropServices; using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.IO; using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;

View File

@ -414,6 +414,11 @@ namespace MediaBrowser.WebDashboard.Api
/// <returns>System.String.</returns> /// <returns>System.String.</returns>
private static string GetCommonJavascript(Version version) private static string GetCommonJavascript(Version version)
{ {
var builder = new StringBuilder();
builder.Append("<script type=\"text/javascript\">if (navigator.userAgent.toLowerCase().indexOf('compatible; msie 7')!=-1){alert(\"Please ensure you're running at least IE10 and that compatibility mode is disabled.\");}");
builder.Append("</script>");
var versionString = "?v=" + version; var versionString = "?v=" + version;
var files = new[] var files = new[]
@ -426,7 +431,9 @@ namespace MediaBrowser.WebDashboard.Api
var tags = files.Select(s => string.Format("<script src=\"{0}\"></script>", s)).ToArray(); var tags = files.Select(s => string.Format("<script src=\"{0}\"></script>", s)).ToArray();
return string.Join(string.Empty, tags); builder.Append(string.Join(string.Empty, tags));
return builder.ToString();
} }
/// <summary> /// <summary>