Skip to content

Commit

Permalink
remove requirement for non ajax from some pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mpodonyi committed Feb 22, 2012
1 parent 09eccf6 commit a6ccc7b
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 67 deletions.
20 changes: 20 additions & 0 deletions src/Yom.Web/Controllers/OweController.cs
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Yom.Web.Controllers
{
public class OweController : Controller
{
//
// GET: /Owe/

public ActionResult Index()
{
return View();
}

}
}
59 changes: 10 additions & 49 deletions src/Yom.Web/Views/Home/Details.cshtml
@@ -1,53 +1,14 @@
@{
Layout = "~/Views/Shared/_Layout.Mobile.cshtml";
ViewBag.Title = "Details";
}
<!-- Start of first page: #one -->
<div data-role="page" >
<div data-role="header">
@RenderPage("~/Views/Shared/DefaultHeader.Mobile.cshtml")
<fieldset class="ui-grid-a">
<legend></legend>
<div class="ui-block-a">
@Html.ActionLink("Owe", "Index", "Owe", null, new { data_role = "button" })
</div>
<!-- /header -->
<div data-role="content">
<fieldset class="ui-grid-a">
<legend></legend>
<div class="ui-block-a">
<a href="#owe" data-role="button">Owe</a>
</div>
<div class="ui-block-b">
<a href="#pay" data-role="button">Pay</a>
</div>
<div class="ui-block-a">
<a href="#report" data-role="button">Report</a></div>
</fieldset>
<div class="ui-block-b">
<a href="#pay" data-role="button">Pay</a>
</div>
<!-- /content -->
<div data-role="footer" data-theme="d">
<h4>
Page Footer</h4>
</div>
<!-- /footer -->
</div>
<!-- /page one -->
<!-- Start of second page: #two -->
<div data-role="page" id="owe" >
<div data-role="header">
@RenderPage("~/Views/Shared/DefaultHeader.Mobile.cshtml")
</div>
<!-- /header -->
<div data-role="content" >
<ul data-role="listview" data-inset="true">
<li>@Html.ActionLink("You Owe Me Money","Create","YouOweMe")</li>
<li>@Html.ActionLink("I Owe You Money","Create","IOweYou")</li>
</ul>
@*@Html.ActionLink("You Owe Me", "Create", "YouOweMe", null, new { data_role = "button" })*@
</div>
<!-- /content -->
<div data-role="footer">
<h4>
Page Footer</h4>
</div>
<!-- /footer -->
</div>
<!-- /page two -->
<!-- Start of third page: #popup -->

<div class="ui-block-a">
<a href="#report" data-role="button">Report</a></div>
</fieldset>
2 changes: 1 addition & 1 deletion src/Yom.Web/Views/IOweYou/Create.cshtml
Expand Up @@ -3,7 +3,7 @@
ViewBag.Title = "Create";
ViewBag.PageId = "iOweYouCreate";
}
@using (Html.BeginForm(null, null, FormMethod.Post, new { data_ajax = "false" }))
@using (Html.BeginForm(null, null, FormMethod.Post))
{
@Html.ValidationSummary(false)
<div data-role="fieldcontain">
Expand Down
10 changes: 4 additions & 6 deletions src/Yom.Web/Views/IOweYou/Success.cshtml
@@ -1,14 +1,12 @@
@{
ViewBag.Title = "Success";
Layout = "~/Views/Shared/_Layout.Result.Mobile.cshtml";
ViewBag.DataUrl = "/IOweYou/Success";
}
<div class="append-bottom">

Success

Success
</div>

<ul data-role="listview" data-inset="true">
<li>@Html.ActionLink("Create another", "Create")</li>
<li>@Html.ActionLink("Back to main menu", "Index","Home")</li>
<li>@Html.ActionLink("Create another", "Create")</li>
<li>@Html.ActionLink("Back to main menu", "Index", "Home")</li>
</ul>
5 changes: 5 additions & 0 deletions src/Yom.Web/Views/Owe/Index.cshtml
@@ -0,0 +1,5 @@
@{
ViewBag.Title = "Owe";
}
@Html.ActionLink("You Owe Me Money", "Create", "YouOweMe", null, new { data_role = "button" })
@Html.ActionLink("I Owe You Money", "Create", "IOweYou", null, new { data_role = "button" })
2 changes: 1 addition & 1 deletion src/Yom.Web/Views/ReferenceUser/Create.cshtml
Expand Up @@ -2,7 +2,7 @@
@{
ViewBag.Title = "Create";
}
@*MP: try in as future Version of jquery mobile ToolboxDataAttribute run IRouteWithArea out Ajax disabled*@

@using (Html.BeginForm(null, null, FormMethod.Post))
{
@Html.ValidationSummary(false)
Expand Down
2 changes: 1 addition & 1 deletion src/Yom.Web/Views/ReferenceUser/Index.cshtml
Expand Up @@ -6,7 +6,7 @@
<div class="append-bottom">
@Html.ActionLink("Create Reference User", "Create", null, new { data_role = "button" })
</div>
<ul data-role="listview" data-inset="true">
<ul data-role="listview" >
@foreach (var item in Model)
{
<li>@Html.ActionLink(item.ToString(), "Details", "ReferenceUser", new { id = item.Id }, null)</li>
Expand Down
2 changes: 1 addition & 1 deletion src/Yom.Web/Views/Shared/DefaultHeader.Mobile.cshtml
@@ -1,4 +1,4 @@
<a href="@Url.Action("Details", "Home")" data-icon="home" class="ui-btn-left" data-ajax="false" >Home</a>
<a href="@Url.Action("Details", "Home")" data-icon="home" class="ui-btn-left" >Home</a>
<h1>
Page Titlex</h1>
<a href="@Url.Action("LogOff", "Account")" class="ui-btn-right" data-ajax="false">Logout</a>
Expand Down
19 changes: 18 additions & 1 deletion src/Yom.Web/Views/Shared/_Layout.Result.Mobile.cshtml
@@ -1,7 +1,24 @@
@{
Layout = "~/Views/Shared/_Layout.Mobile.cshtml";
}
<div data-role="page">
@functions{
private string PageId
{
get
{
return (ViewData.ContainsKey("PageId") ? string.Format("id=\"{0}\"", ViewData["PageId"]) : "");
}
}

private string DataUrl
{
get
{
return (ViewData.ContainsKey("DataUrl") ? string.Format("data-url=\"{0}\"", ViewData["DataUrl"]) : "");
}
}
}
<div data-role="page" @Html.Raw(PageId) @Html.Raw(DataUrl)>

<!-- /header -->
<div data-role="content">
Expand Down
2 changes: 1 addition & 1 deletion src/Yom.Web/Views/YouOweMe/Create.cshtml
Expand Up @@ -3,7 +3,7 @@
ViewBag.Title = "Create";
ViewBag.PageId = "youOweMeCreate";
}
@using (Html.BeginForm(null, null, FormMethod.Post, new { data_ajax = "false" }))
@using (Html.BeginForm(null, null, FormMethod.Post))
{
@Html.ValidationSummary(false)
<div data-role="fieldcontain">
Expand Down
10 changes: 4 additions & 6 deletions src/Yom.Web/Views/YouOweMe/Success.cshtml
@@ -1,14 +1,12 @@
@{
ViewBag.Title = "Success";
Layout = "~/Views/Shared/_Layout.Result.Mobile.cshtml";
ViewBag.DataUrl = "/YouOweMe/Success";
}
<div class="append-bottom">

Success

Success
</div>

<ul data-role="listview" data-inset="true">
<li>@Html.ActionLink("Create another", "Create")</li>
<li>@Html.ActionLink("Back to main menu", "Index","Home")</li>
<li>@Html.ActionLink("Create another", "Create")</li>
<li>@Html.ActionLink("Back to main menu", "Index", "Home")</li>
</ul>
2 changes: 2 additions & 0 deletions src/Yom.Web/Yom.Web.csproj
Expand Up @@ -97,6 +97,7 @@
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\IOweYouController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\OweController.cs" />
<Compile Include="Controllers\ReferenceUserController.cs" />
<Compile Include="Controllers\ManagementController.cs" />
<Compile Include="Controllers\YouOweMeController.cs" />
Expand Down Expand Up @@ -277,6 +278,7 @@
<Content Include="Views\Home\Details.cshtml" />
<Content Include="Views\IOweYou\Create.cshtml" />
<Content Include="Views\IOweYou\Success.cshtml" />
<Content Include="Views\Owe\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
Expand Down

0 comments on commit a6ccc7b

Please sign in to comment.