Skip to content

Commit

Permalink
Getting rid of framesets
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Jun 23, 2010
1 parent 0494e1d commit d80f895
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 162 deletions.
9 changes: 7 additions & 2 deletions client/AjaxLife.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ if(window.parent)
}
}

window.onload = function() {
jQuery(document).ready(function(){
AjaxLife.Media.RunFirst();
};
var iframeResize = function(){
jQuery('#index iframe').height(jQuery(window).height() - 80);
};
iframeResize();
jQuery(window).resize(iframeResize);
});

AjaxLife.Debug("AjaxLife: Set up onbeforeunload handler.");
21 changes: 21 additions & 0 deletions client/ajaxlife.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @author SignpostMarv
*/
@import "login.css";
@import "ui.css";

#index{
margin: 0 ;
padding: 0 ;
}
#index iframe{
width: 100% ;
height: 100% ;
border-width: 0 ;
margin: 0 ;
padding: 0 ;
}
#loginscreen{
position: relative ;
height: 80px ;
}
4 changes: 0 additions & 4 deletions server/AjaxLife.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
<Compile Include="Html\BasicStats.cs" />
<Compile Include="Html\Connect.cs" />
<Compile Include="Html\EventQueue.cs" />
<Compile Include="Html\Index.cs" />
<Compile Include="Html\MainPage.cs" />
<Compile Include="Html\Logout.cs" />
<Compile Include="Html\Proxy.cs" />
Expand Down Expand Up @@ -157,9 +156,6 @@
<Content Include="Html\Templates\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Html\Templates\AjaxLife.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="openjpeg-dotnet-x86_64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion server/Html/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void OnFileRequested(HttpRequest request, IDirectory directory)
}
// Parse the template.
Html.Template.Parser parser = new Html.Template.Parser(hash);
writer.Write(parser.Parse(File.ReadAllText("Html/Templates/AjaxLife.html")));
writer.Write(parser.Parse(File.ReadAllText("Html/Templates/index.html")));
}
catch (Exception exception)
{
Expand Down
139 changes: 0 additions & 139 deletions server/Html/Templates/AjaxLife.html

This file was deleted.

146 changes: 132 additions & 14 deletions server/Html/Templates/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,132 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>AjaxLife</title>
<link href="{STATIC_ROOT}license.txt" type="text/plain" rel="license" />
</head>
<frameset rows="*, 80" border="0" frameborder="0" framespacing="0" id="frameset">
<frame id="loginpage" src="http://ajaxlife.net/login/" />
<frame id="loginform" src="ajaxlife.kat" noscroll="noscroll" />
</frameset>
<noframes>
<p><a href="ajaxlife.kat?noframes=1">Begin</a></p>
</noframes>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>AjaxLife</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="{STATIC_ROOT}license.txt" type="text/plain" rel="license" />
<link href="{STATIC_ROOT}resources/css/ext-all.css" type="text/css" rel="stylesheet" />
<link href="{STATIC_ROOT}resources/css/ytheme-aero.css" type="text/css" rel="stylesheet" />
<script src="{STATIC_ROOT}AjaxLife.Libs.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
jQuery.noConflict();
</script>
<script src="{STATIC_ROOT}Crypto.js"></script>
<link href="{STATIC_ROOT}ajaxlife.css" type="text/css" rel="stylesheet" />
<script src="{STATIC_ROOT}login.js"></script>
<!-- The really big file -->
<!-- <script src="{STATIC_ROOT}AjaxLife.All.js-{ENCODING)"></script> -->
<!-- The below is used for development. -->
<script src="{STATIC_ROOT}AjaxLife.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Strings.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Widgets.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Constants.js"></script>
<script src="{STATIC_ROOT}AjaxLife.InstantMessage.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Map.js"></script>
<script src="{STATIC_ROOT}AjaxLife.NameCache.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Network.js"></script>
<script src="{STATIC_ROOT}AjaxLife.SpatialChat.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Toolbar.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Friends.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Groups.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Contacts.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Search.js"></script>
<script src="{STATIC_ROOT}AjaxLife.StatusBar.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Profile.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Utils.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Texture.js"></script>
<script src="{STATIC_ROOT}AjaxLife.AvatarsNear.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Inventory.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Stats.js"></script>
<script src="{STATIC_ROOT}AjaxLife.MiniMap.js"></script>
<script src="{STATIC_ROOT}AjaxLife.ScriptDialogs.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Keyboard.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Notecard.js"></script>
<script src="{STATIC_ROOT}AjaxLife.LSL.js"></script>
<script src="{STATIC_ROOT}AjaxLife.InventoryProperties.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Sound.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Parcel.js"></script>
<script src="{STATIC_ROOT}AjaxLife.Media.js"></script>

<script>
var gSessionID = "{SESSION_ID}";
AjaxLife.STATIC_ROOT = "{STATIC_ROOT}";
// RSA encryption details.
var CHALLENGE = "{CHALLENGE}";
var RSA_EXPONENT = "{RSA_EXPONENT}";
var RSA_MODULUS = "{RSA_MODULUS}";
</script>
</head>
<body class="ltr" id="index">
<iframe src="http://ajaxlife.net/login/"></iframe>
<div id="loginscreen">
<div>
<form action="" id="form_login">
<!-- Right aligned. -->
<div id="advanced">
<span id="label_lang">(loading)</span>
<!-- This is filled when the script loads
As an added bonus, if your local language is available
it will be used. -->
<select name="lang" id="lang">
<option value="en" selected="selected">(loading)</option>
</select>
</div>
<!-- Left-aligned -->
<table id="loginstuff">
<tr>
<td id="label_first">(loading)</td>
<td id="label_last">(loading)</td>
<td id="label_pass">(loading)</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<input type="text" id="first" />
</td>
<td>
<input type="text" id="last" />
</td>
<td>
<input type="password" id="password" />
</td>
<td>
<input type="button" value="(loading)" id="btn_login" />
</td>
</tr>
</table>
<input type="hidden" name="sid" value="{SESSION_ID}" />
</form>
</div>
<div id="login_secondrow">
<div id="loginlocation">
<span id="label_loginlocation">(loading)</span>:
<select size="1" id="location">
<option value="home">(loading)</option>
<option value="last" selected="selected">(loading)</option>
<option value="arbitrary">(loading)</option>
</select>
<input type="text" id="loginsim" style="display: none;" />
<span id="label_sound">(loading)</span>:
<input type="checkbox" checked="checked" id="enablesound" />
</div>
<div id="logingrid">
<span id="label_grid">(loading)</span>:
<select id="grid">
{GRID_OPTIONS}
</select>
</div>
</div>
</div>
<div id="uiscreen" style="display: none; height: 100%; width: 100%;">
<img src="{STATIC_ROOT}images/background.jpg" id="background" alt="Background - island in the sunset" />
<div id="statusbar"></div>
<div id="toolbar"></div>
<!-- Canvases seem to have issues with dynamic generation and scaling, at least in WebKit -->
<canvas id="minimap" width="256" height="256"></canvas>
<!-- This one is used to avoid having to redraw the backround each time. -->
<canvas id="minimap-landscape" width="256" height="256"></canvas>
<!-- This is hidden behind the background image. -->
</div>
</body>
</html>
3 changes: 1 addition & 2 deletions server/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ public AjaxLife(string[] arg)
// Create the virtual files, passing most of them (except index.html and differentorigin.kat,
// as they don't need to deal with SL) the Users dictionary. Users is a reference object,
// so changes are reflected in all the pages. The same goes for individual User objects.
root.AddFile(new Html.Index("index.html", root));
root.AddFile(new Html.MainPage("ajaxlife.kat", root, Users));
root.AddFile(new Html.MainPage("index.html", root, Users));
root.AddFile(new Html.Proxy("differentorigin.kat", root));
root.AddFile(new Html.BasicStats("ping.kat", root, Users));
root.AddFile(new Html.MakeFile("makefile.kat", root));
Expand Down

0 comments on commit d80f895

Please sign in to comment.