--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-10-19 17:54:53 -07:00
6 changed files with 10 additions and 31 deletions

View File

@@ -1,14 +0,0 @@
<html>
<body onload="iframeResizePipe()">
<iframe id="helpframe" src="" frameborder="0" width="0" height="0"></iframe>
<script type="text/javascript">
function iframeResizePipe() {
var height = document.body.scrollHeight;
var helpFrame = document.getElementById('helpframe') || frames['helpframe'];
helpFrame.src = 'Admin/DashboardProxy' + '#' + height;
}
</script>
<!-- Your advisory message here -->
</body>
</html>

View File

@@ -154,7 +154,6 @@
<Compile Include="WebRole.cs" /> <Compile Include="WebRole.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Advisory.html" />
<Content Include="Default.aspx" /> <Content Include="Default.aspx" />
<Content Include="Global.asax" /> <Content Include="Global.asax" />
</ItemGroup> </ItemGroup>

View File

@@ -1,14 +0,0 @@
<html>
<body onload="iframeResizePipe()">
<iframe id="helpframe" src="" frameborder="0" width="0" height="0"></iframe>
<script type="text/javascript">
function iframeResizePipe() {
var height = document.body.scrollHeight;
var helpFrame = document.getElementById('helpframe') || frames['helpframe'];
helpFrame.src = 'Admin/DashboardProxy' + '#' + height;
}
</script>
<!-- Your advisory message here -->
</body>
</html>

View File

@@ -1,4 +1,5 @@
@model dynamic @model dynamic
@using Orchard.Utility.Extensions;
<script type="text/javascript"> <script type="text/javascript">
// Resize iframe to full height // Resize iframe to full height
@@ -11,7 +12,7 @@
} }
</script> </script>
<iframe id="advisory" src="http://www.orchardproject.net/advisory" frameborder="0" height="0" width="100%" > <iframe id="advisory" src="http://www.orchardproject.net/advisory?url=@Server.UrlEncode(Url.AbsoluteAction("Index", "Helper", new { area = "Dashboard" }))" frameborder="0" height="0" width="100%" >
<p>Your browser does not support iframes.</p> <p>Your browser does not support iframes.</p>
</iframe> </iframe>

View File

@@ -121,7 +121,6 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Advisory.html" />
<Content Include="Default.aspx" /> <Content Include="Default.aspx" />
<Content Include="Global.asax" /> <Content Include="Global.asax" />
<Content Include="Refresh.html" /> <Content Include="Refresh.html" />

View File

@@ -1,4 +1,6 @@
using System;
using System.Web; using System.Web;
using System.Web.Mvc;
namespace Orchard.Utility.Extensions { namespace Orchard.Utility.Extensions {
public static class HttpRequestExtensions { public static class HttpRequestExtensions {
@@ -33,5 +35,11 @@ namespace Orchard.Utility.Extensions {
public static string ToUrlString(this HttpRequest request) { public static string ToUrlString(this HttpRequest request) {
return string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.RawUrl); return string.Format("{0}://{1}{2}", request.Url.Scheme, request.Headers["Host"], request.RawUrl);
} }
public static string AbsoluteAction(this UrlHelper url, string action, string controller, object routeValues) {
Uri requestUrl = url.RequestContext.HttpContext.Request.Url;
return string.Concat(requestUrl.GetLeftPart(UriPartial.Authority),url.Action(action, controller, routeValues));
}
} }
} }