diff --git a/CodeProse.Shifter/CodeProse.Shifter.csproj b/CodeProse.Shifter/CodeProse.Shifter.csproj
index 79082c3..2bd74d5 100644
--- a/CodeProse.Shifter/CodeProse.Shifter.csproj
+++ b/CodeProse.Shifter/CodeProse.Shifter.csproj
@@ -40,17 +40,21 @@
..\packages\DapperExtensions.1.3.0\lib\net40\DapperExtensions.dll
-
- ..\packages\Nancy.0.9.0\lib\net40\Nancy.dll
+
+ False
+ ..\packages\Nancy.0.10.0\lib\net40\Nancy.dll
-
- ..\packages\Nancy.Authentication.Forms.0.9.0\lib\net40\Nancy.Authentication.Forms.dll
+
+ False
+ ..\packages\Nancy.Authentication.Forms.0.10.0\lib\net40\Nancy.Authentication.Forms.dll
-
- ..\packages\Nancy.Hosting.Aspnet.0.9.0\lib\net40\Nancy.Hosting.Aspnet.dll
+
+ False
+ ..\packages\Nancy.Hosting.Aspnet.0.10.0\lib\net40\Nancy.Hosting.Aspnet.dll
-
- ..\packages\Nancy.Viewengines.Razor.0.9.0\lib\net40\Nancy.ViewEngines.Razor.dll
+
+ False
+ ..\packages\Nancy.Viewengines.Razor.0.10.0\lib\net40\Nancy.ViewEngines.Razor.dll..\packages\System.Data.SQLite.1.0.79.0\lib\net40\System.Data.SQLite.dll
@@ -66,8 +70,8 @@
-
- ..\packages\Nancy.Viewengines.Razor.0.9.0\lib\net40\System.Web.Razor.dll
+
+ ..\packages\Nancy.Viewengines.Razor.0.10.0\lib\net40\System.Web.Razor.dll
@@ -81,7 +85,10 @@
+
+
+
@@ -96,7 +103,8 @@
PreserveNewestDesigner
-
+
+
@@ -120,7 +128,10 @@
-
+
+
+
+
@@ -186,6 +197,11 @@
+
+
+xcopy /s /y "$(SolutionDir)packages\Nancy.Viewengines.Razor.0.10.0\BuildProviders\Nancy.ViewEngines.Razor.BuildProviders.dll" "$(ProjectDir)bin"
+xcopy /s /y "$(SolutionDir)packages\Nancy.Viewengines.Razor.0.10.0\lib\Net40\Nancy.ViewEngines.Razor.dll" "$(ProjectDir)bin"
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
@@ -17,4 +30,7 @@
+
+
+
\ No newline at end of file
diff --git a/CodeProse.Shifter/content/base.css b/CodeProse.Shifter/content/base.css
index eb03091..88e4eab 100644
--- a/CodeProse.Shifter/content/base.css
+++ b/CodeProse.Shifter/content/base.css
@@ -152,4 +152,13 @@ li.user
.ui-widget-content
{
padding: 10px;
+}
+
+.time-selector > * {
+ display: inline;
+}
+
+.number-picker input[type=button], .number-picker input[type=text], .number-picker select {
+ width: 40px;
+ height: 40px;
}
\ No newline at end of file
diff --git a/CodeProse.Shifter/content/number-picker.js b/CodeProse.Shifter/content/number-picker.js
new file mode 100644
index 0000000..abc846a
--- /dev/null
+++ b/CodeProse.Shifter/content/number-picker.js
@@ -0,0 +1,46 @@
+(function ($) {
+ $(document).ready(function () {
+ $('.number-picker').each(function () {
+ var picker = $(this);
+ var max = picker.data('maximum');
+ var min = picker.data('minimum');
+
+ var number = picker.children(':input').first();
+ var incrementor = number.next();
+ var decrementor = incrementor.next();
+
+ if (number.val() === '') {
+ number.val(min);
+ }
+
+ incrementor.click(function () {
+ var current = parseInt(number.val());
+
+ if (current === max) {
+ current = min;
+ } else {
+ current++;
+ }
+
+ number.val(current);
+ });
+
+ decrementor.click(function () {
+ var current = parseInt(number.val());
+
+ if (current === min) {
+ current = max;
+ } else {
+ current--;
+ }
+
+ number.val(current);
+ });
+ });
+ });
+
+ $.fn.number = function () {
+ return this.children(':input').first().val();
+ };
+
+})(jQuery);
\ No newline at end of file
diff --git a/CodeProse.Shifter/content/string-extensions.js b/CodeProse.Shifter/content/string-extensions.js
new file mode 100644
index 0000000..e88cfac
--- /dev/null
+++ b/CodeProse.Shifter/content/string-extensions.js
@@ -0,0 +1,8 @@
+(function () {
+ String.prototype.padLeft = function (padString, length) {
+ var str = this;
+ while (str.length < length)
+ str = padString + str;
+ return str;
+ };
+})();
\ No newline at end of file
diff --git a/CodeProse.Shifter/content/time-selector.js b/CodeProse.Shifter/content/time-selector.js
new file mode 100644
index 0000000..b07bac9
--- /dev/null
+++ b/CodeProse.Shifter/content/time-selector.js
@@ -0,0 +1,29 @@
+(function ($) {
+ $(document).ready(function () {
+
+ });
+
+ $.fn.time = function () {
+ var numbers = this.children('.number-picker');
+
+ var hour = numbers.first().number();
+ var minute = numbers.first().next().number();
+ var ampm = this.children('select').children('option:selected').val();
+
+ var formatted = function () {
+ var minutePart = '';
+ if (minute > 0) {
+ minutePart = ':' + minute.toString().padLeft('0', 2);
+ };
+
+ return hour.toString() + minutePart + ' ' + ampm;
+ };
+
+ return {
+ hour: hour,
+ minute: minute,
+ ampm: ampm,
+ formatted: formatted
+ };
+ };
+})(jQuery);
\ No newline at end of file
diff --git a/CodeProse.Shifter/layouts/base.cshtml b/CodeProse.Shifter/layouts/base.cshtml
index 03359ff..2de5531 100644
--- a/CodeProse.Shifter/layouts/base.cshtml
+++ b/CodeProse.Shifter/layouts/base.cshtml
@@ -1,15 +1,18 @@
-
-
+
+
@RenderSection("Title")
-
+
+
-
+
+
+
@Html.Partial("partials/topnav.cshtml", Model)
diff --git a/CodeProse.Shifter/modules/HomeModule.cs b/CodeProse.Shifter/modules/HomeModule.cs
index a8fd848..82c13e3 100644
--- a/CodeProse.Shifter/modules/HomeModule.cs
+++ b/CodeProse.Shifter/modules/HomeModule.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using Nancy;
+using Nancy;
using CodeProse.Shifter.models;
namespace CodeProse.Shifter.modules
diff --git a/CodeProse.Shifter/packages.config b/CodeProse.Shifter/packages.config
index b8d883b..8fc74d8 100644
--- a/CodeProse.Shifter/packages.config
+++ b/CodeProse.Shifter/packages.config
@@ -2,9 +2,9 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/CodeProse.Shifter/partials/controls/NumberPickerModel.cs b/CodeProse.Shifter/partials/controls/NumberPickerModel.cs
new file mode 100644
index 0000000..1c190a3
--- /dev/null
+++ b/CodeProse.Shifter/partials/controls/NumberPickerModel.cs
@@ -0,0 +1,14 @@
+namespace CodeProse.Shifter.partials.controls
+{
+ public class NumberPickerModel
+ {
+ public NumberPickerModel(int minValue, int maxValue)
+ {
+ MaxValue = maxValue;
+ MinValue = minValue;
+ }
+
+ public int MaxValue { get; private set; }
+ public int MinValue { get; private set; }
+ }
+}
\ No newline at end of file
diff --git a/CodeProse.Shifter/partials/controls/LabeledCheckBoxModel.cs b/CodeProse.Shifter/partials/controls/WeekDayCheckBoxModel.cs
similarity index 50%
rename from CodeProse.Shifter/partials/controls/LabeledCheckBoxModel.cs
rename to CodeProse.Shifter/partials/controls/WeekDayCheckBoxModel.cs
index 2b2a159..f7fe64c 100644
--- a/CodeProse.Shifter/partials/controls/LabeledCheckBoxModel.cs
+++ b/CodeProse.Shifter/partials/controls/WeekDayCheckBoxModel.cs
@@ -1,14 +1,16 @@
namespace CodeProse.Shifter.partials.controls
{
- public class LabeledCheckBoxModel
+ public class WeekDayCheckBoxModel
{
- public LabeledCheckBoxModel(string name, bool @checked)
+ public WeekDayCheckBoxModel(string name, string abbreviation, bool @checked)
{
Name = name;
Checked = @checked;
+ Abbreviation = abbreviation;
}
public string Name { get; private set; }
public bool Checked { get; private set; }
+ public string Abbreviation { get; private set; }
}
}
\ No newline at end of file
diff --git a/CodeProse.Shifter/partials/controls/number-picker.cshtml b/CodeProse.Shifter/partials/controls/number-picker.cshtml
new file mode 100644
index 0000000..cd9662b
--- /dev/null
+++ b/CodeProse.Shifter/partials/controls/number-picker.cshtml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/CodeProse.Shifter/partials/controls/time-selector.cshtml b/CodeProse.Shifter/partials/controls/time-selector.cshtml
index 6558819..abb682f 100644
--- a/CodeProse.Shifter/partials/controls/time-selector.cshtml
+++ b/CodeProse.Shifter/partials/controls/time-selector.cshtml
@@ -1,12 +1,9 @@
-