Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added View and removed web config

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

0 notes on commit a5d0789

Please sign in to comment.
Something went wrong with that request. Please try again.