Permalink
Browse files

Added View and removed web config

Web config seemed to be causing 'must derive from WebViewPage' error
  • Loading branch information...
1 parent 29ac060 commit a5d07892d5a443ce714058a3f0d556412d46e26f @NicholasMurray committed Sep 20, 2012
View
9 CodeCamper.Web/CodeCamper.Web.csproj
@@ -231,6 +231,7 @@
<Content Include="Scripts\lib\amplify.request.js" />
<Content Include="Scripts\lib\amplify.store.js" />
<Content Include="Scripts\lib\infuser.js" />
+ <Content Include="index.cshtml" />
<None Include="Scripts\lib\jquery-1.7.2-vsdoc.js" />
<Content Include="Scripts\lib\jquery-1.7.2.js" />
<Content Include="Scripts\lib\jquery-1.7.2.min.js">
@@ -303,11 +304,15 @@
<Content Include="Images\orderedList9.png" />
<Content Include="Images\twitter.png" />
<Content Include="Images\windowsLive.png" />
- <Content Include="Views\Web.config" />
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
+ <Content Include="Views\favorites.cshtml" />
+ <Content Include="Views\session.cshtml" />
+ <Content Include="Views\sessions.cshtml" />
+ <Content Include="Views\speaker.cshtml" />
+ <Content Include="Views\speakers.cshtml" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
@@ -343,7 +348,7 @@
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>0</DevelopmentServerPort>
+ <DevelopmentServerPort>49523</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:52692/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
View
59 CodeCamper.Web/Views/Web.config
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<configuration>
- <configSections>
- <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
- <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
- <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
- </sectionGroup>
- </configSections>
-
- <system.web.webPages.razor>
- <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
- <pages pageBaseType="System.Web.Mvc.WebViewPage">
- <namespaces>
- <add namespace="System.Web.Mvc" />
- <add namespace="System.Web.Mvc.Ajax" />
- <add namespace="System.Web.Mvc.Html" />
- <add namespace="System.Web.Optimization"/>
- <add namespace="System.Web.Routing" />
- </namespaces>
- </pages>
- </system.web.webPages.razor>
-
- <appSettings>
- <add key="webpages:Enabled" value="false" />
- </appSettings>
-
- <system.web>
- <httpHandlers>
- <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
- </httpHandlers>
-
- <!--
- Enabling request validation in view pages would cause validation to occur
- after the input has already been processed by the controller. By default
- MVC performs request validation before a controller processes the input.
- To change this behavior apply the ValidateInputAttribute to a
- controller or action.
- -->
- <pages
- validateRequest="false"
- pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
- pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
- userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
- <controls>
- <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
- </controls>
- </pages>
- </system.web>
-
- <system.webServer>
- <validation validateIntegratedModeConfiguration="false" />
-
- <handlers>
- <remove name="BlockViewHandler"/>
- <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
- </handlers>
- </system.webServer>
-</configuration>
View
25 CodeCamper.Web/Views/favorites.cshtml
@@ -0,0 +1,25 @@
+<section id="favorites-view" class="view">
+
+ <nav>
+ <ul data-bind="foreach: days">
+ <li class="route-left" data-bind="css :{'route-active': isSelected()}">
+ <a data-bind="attr: {href: hash }">
+ <span data-bind="text: day"></span>
+ </a>
+ </li>
+ </ul>
+ </nav>
+
+ <div data-bind="template: {name: filterTemplate}"></div>
+
+ <section class="view-list" data-bind="template: {name: sessionTemplate, foreach: sessions}"></section>
+
+ <!-- Knockout Debugging -->
+ <!--
+ <div style="border:white dotted thin">
+ <h4>Sessions JSON</h4>
+ <pre data-bind="text:ko.utils.debugInfo(sessions)"></pre>
+ </div>
+ -->
+
+</section>
View
10 CodeCamper.Web/Views/session.cshtml
@@ -0,0 +1,10 @@
+<section id="session-view" class="view">
+ <button class="button-back" data-bind="command: goBackCmd"></button>
+ <div class="save-cancel-button-bar">
+ <button class="button-cancel"
+ data-bind="command: cancelCmd, activity: cancelCmd.isExecuting">Cancel</button>
+ <button class="button-save"
+ data-bind="command: saveCmd, activity: saveCmd.isExecuting">Save</button>
+ </div>
+ <div data-bind="template: {name: tmplName}"></div>
+</section>
View
27 CodeCamper.Web/Views/sessions.cshtml
@@ -0,0 +1,27 @@
+<section id="sessions-view" class="view">
+
+ <nav>
+
+ <label for="track">Track</label>
+ <select id="track" data-bind="options: tracks, value: sessionFilter.track, optionsText: 'name', optionsCaption:'All'">
+ </select>
+
+ <label for="speaker">Speaker</label>
+ <select id="speaker" data-bind="options: speakers, value: sessionFilter.speaker, optionsText: 'fullName', optionsCaption: 'All'">
+ </select>
+
+ <label for="timeslot">Time slot</label>
+ <select id="timeslot" data-bind="options: timeslots, value: sessionFilter.timeslot, optionsText: 'shortStart', optionsCaption:'All'">
+ </select>
+
+ <button data-bind="checkboxImage: {checked: sessionFilter.favoriteOnly}"></button>
+
+ <button class="clear-trash" data-bind="click: clearAllFilters">Clear Filters</button>
+
+ </nav>
+
+ <div data-bind="template: {name: filterTemplate}"></div>
+
+ <section class="view-list" data-bind="template: {name: sessionTemplate, foreach: sessions}"></section>
+
+</section>
View
17 CodeCamper.Web/Views/speaker.cshtml
@@ -0,0 +1,17 @@
+<section id="speaker-view" class="view">
+
+ <button class="button-back" data-bind="command: goBackCmd"></button>
+
+ <div class="save-cancel-button-bar" data-bind="if:canEdit">
+
+ <button class="button-cancel"
+ data-bind="command: cancelCmd, activity: cancelCmd.isExecuting">Cancel</button>
+
+ <button class="button-save"
+ data-bind="command: saveCmd, activity: saveCmd.isExecuting">Save</button>
+
+ </div>
+
+ <div data-bind="template: {name: tmplName}"></div>
+
+</section>
View
25 CodeCamper.Web/Views/speakers.cshtml
@@ -0,0 +1,25 @@
+<section id="speakers-view" class="view">
+
+ <div class="filter-box-container-full-width">
+
+ <input class="filter-box"
+ data-bind="value: speakerFilter.searchText, valueUpdate: 'afterkeydown', escape: clearFilter"
+ placeholder="filter by first or last name" type="text"/>
+
+ <a class="clear-text" data-bind="click: clearFilter" title="Clear"></a>
+
+ <div class="filter-box-container-full-width">
+
+ <button class="refresh"
+ data-bind="command: forceRefreshCmd, activity: forceRefreshCmd.isExecuting">Refresh</button>
+
+ <small>Showing <span data-bind="text:speakers().length"></span> speakers</small>
+
+ </div>
+
+ </div>
+
+ <section class="view-list" data-bind="template: {name: tmplName, foreach: speakers}">
+ </section>
+
+</section>
View
2 CodeCamper.Web/Web.config
@@ -16,7 +16,7 @@
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
<add key="webpages:Version" value="2.0.0.0" />
- <add key="webpages:Enabled" value="false" />
+ <add key="webpages:Enabled" value="true" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
View
67 CodeCamper.Web/index.cshtml
@@ -0,0 +1,67 @@
+@using System.Web.Optimization
+<!DOCTYPE html>
+<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
+<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
+<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
+<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
+<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
+<!-- <html lang="en"> -->
+<head>
+ <meta charset="utf-8" />
+
+ <!-- Mobile viewport optimized: h5bp.com/viewport -->
+ <meta name="viewport" content="width=device-width">
+ <title>Code Camper</title>
+
+ @Styles.Render("~/Content/css", "~/Content/less")
+
+ <!-- All JavaScript at the bottom, except this Modernizr build.
+ Modernizr enables HTML5 elements & feature detects for optimal performance.
+ Create your own custom Modernizr build: www.modernizr.com/download/ -->
+ @Scripts.Render("~/bundles/modernizr")
+</head>
+<body>
+ <div id="busyindicator"></div>
+ <header>
+ <h1>Code Camper</h1>
+ <nav id="shellTop-view" class="main-nav">
+ <div class="accent-top" data-bind="text: currentUser().fullName"></div>
+ <div class="accent-left"></div>
+ <ul data-bind="with: menuHashes">
+ <li class="route-top"><a data-bind="attr: {href: favorites}">Favorites</a></li>
+ <li class="route-top"><a data-bind="attr: {href: sessions}">Sessions</a></li>
+ <li class="route-top"><a data-bind="attr: {href: speakers}">Speakers</a></li>
+ </ul>
+ </nav>
+ </header>
+
+ <section class="main">
+ @RenderPage("Views/favorites.cshtml")
+ @RenderPage("Views/speakers.cshtml")
+ @RenderPage("Views/sessions.cshtml")
+ @RenderPage("Views/session.cshtml")
+ @RenderPage("Views/speaker.cshtml")
+ </section>
+
+ <!--
+ When bundling, load in this sequence:
+ 1) shivs and jQuery
+ 2) 3rd party libraries
+ 3) require.js
+ 4) your app libraries
+ 5) main.js
+ -->
+
+
+ @Scripts.Render(
+ "~/bundles/jquery",
+ "~/bundles/jsextlibs",
+ "~/Scripts/lib/require.js",
+ "~/bundles/jsapplibs",
+ "~/bundles/jsmocks", // remove mocks for release
+ "~/Scripts/main.js"
+ )
+
+</body>
+</html>

0 comments on commit a5d0789

Please sign in to comment.