Modify no support handling.

This commit is contained in:
kovacsv 2014-10-21 15:40:17 +02:00
parent 6e781a037b
commit 01a2fb338a
3 changed files with 22 additions and 13 deletions

View File

@ -12,12 +12,17 @@ html, body
#nosupport
{
width : 450px;
margin : 0px auto;
padding : 10px;
text-align : center;
}
#nosupport div.title
#nosupport div.nosupporterror
{
font-size : 17px;
color : #aa0000;
background : transparent;
font-size : 14px;
margin-bottom : 10px;
}

View File

@ -17,8 +17,8 @@ ImporterApp.prototype.Init = function ()
div.className = 'nosupport';
div.innerHTML = [
'<div id="nosupport">',
'<div class="title">Unfortunately your browser does not support this site.</div>',
'You need a browser which supports the following technologies: WebGL, WebGLRenderingContext, File, FileReader, FileList, Blob, URL.',
this.GetWelcomeText (),
'<div class="nosupporterror">You need a browser which supports the following technologies: WebGL, WebGLRenderingContext, File, FileReader, FileList, Blob, URL.</div>',
'</div>'
].join ('');
document.body.appendChild (div);
@ -61,11 +61,7 @@ ImporterApp.prototype.WelcomeDialog = function ()
{
var dialogText = [
'<div class="importerdialog">',
'<div class="welcometitle">Welcome to Online 3D Viewer!</div>',
'<div class="welcometext">Here you can view your local 3D models online. Just simply drag and drop 3D files and textures to this browser window or use the open button above.</div>',
'<div class="welcometextformats">Supported formats: 3ds, obj, stl.</div>',
'<div class="welcometext">Powered by <a target="_blank" href="https://github.com/mrdoob/three.js/">Three.js</a> and <a target="_blank" href="https://github.com/kovacsv/JSModeler">JSModeler</a>.</div>',
'<div class="welcometext"><a target="_blank" href="https://github.com/kovacsv/Online3DViewer"><img src="images/githublogo.png"/></a></div>',
this.GetWelcomeText (),
'</div>',
].join ('');
this.dialog.Open ({
@ -82,6 +78,18 @@ ImporterApp.prototype.WelcomeDialog = function ()
});
};
ImporterApp.prototype.GetWelcomeText = function ()
{
var welcomeText = [
'<div class="welcometitle">Welcome to Online 3D Viewer!</div>',
'<div class="welcometext">Here you can view your local 3D models online. Just simply drag and drop 3D files and textures to this browser window or use the open button above.</div>',
'<div class="welcometextformats">Supported formats: 3ds, obj, stl.</div>',
'<div class="welcometext">Powered by <a target="_blank" href="https://github.com/mrdoob/three.js/">Three.js</a> and <a target="_blank" href="https://github.com/kovacsv/JSModeler">JSModeler</a>.</div>',
'<div class="welcometext"><a target="_blank" href="https://github.com/kovacsv/Online3DViewer"><img src="images/githublogo.png"/></a></div>',
].join ('');
return welcomeText;
};
ImporterApp.prototype.Resize = function ()
{
function SetWidth (elem, value)

View File

@ -6,7 +6,6 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" src="../../build/three.min.js"></script>
<link rel="stylesheet" type="text/css" href="include/importer.css">
<link rel="stylesheet" type="text/css" href="include/floatingdialog.css">
@ -33,9 +32,6 @@
</head>
<body>
<div style="display:none">
Here you can view your local 3D models online. Just simply drag and drop 3D files and textures to this browser window or use the open button above.
</div>
<div id="top">
</div>
<div id="left">