#16899: Added a simple js 'loading' indicator to setup.

--HG--
branch : dev
This commit is contained in:
Dave Reed
2010-12-02 15:17:46 -08:00
parent 625ad33476
commit a6d1786e00
5 changed files with 70 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -74,9 +74,9 @@
<Compile Include="ViewModels\SetupViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Setup\Index.cshtml">
<SubType>Designer</SubType>
</Content>
<Content Include="Content\synchronizing.gif" />
<Content Include="Scripts\setup.js" />
<Content Include="Views\Setup\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
@@ -100,6 +100,16 @@
<Content Include="Module.txt" />
<Content Include="Views\Web.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Web.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="Scripts\Web.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -1 +1,14 @@
$("#SiteName").closest("form").helpfullyFocus();
(function () {
function show() {
window.setTimeout(function () {
document.getElementById("throbber").style.display = "block";
}, 2000);
}
if (document.addEventListener) {
document.addEventListener("submit", show, false);
}
else {
document.attachEvent("onsubmit", show);
}
})();

View File

@@ -1,5 +1,7 @@
@model Orchard.Setup.ViewModels.SetupViewModel
@{
Script.Include("setup.js");
}
<h1>@Html.TitleForPage(T("Get Started").ToString())</h1>
@using (Html.BeginFormAntiForgeryPost()) {
@@ -48,6 +50,18 @@ if (!Model.DatabaseIsPreconfigured) {
</div>
</fieldset>
}
<div id="throbber">
<div class="curtain"></div>
<div class="curtain-content">
<div>
<h1>@T("Configuring Orchard...")</h1>
<p>
<img src="@Href("../../content/synchronizing.gif")" alt="" />
</p>
</div>
</div>
</div>
<fieldset>
<button class="primaryAction" type="submit">@T("Finish Setup")</button>
</fieldset>

View File

@@ -173,6 +173,34 @@ button:focus::-moz-focus-inner, .button:focus::-moz-focus-inner {
/* Confirmations, Messages and the like
***************************************************************/
#throbber {
display:none;
}
#throbber .curtain
{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
background-color:Gray;
filter:alpha(opacity=70);
opacity: 0.7;
}
#throbber .curtain-content
{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
}
#throbber .curtain-content div {
text-align:center;
padding:250px;
color:White;
}
.message, .validation-summary-errors {
margin:10px 0 4px 0;
padding:4px;