Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.

My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@{
    ViewBag.Title = "Edit Aspect";
    Layout = "~/Areas/Administrator/Views/Shared/_Layout.cshtml";
}
	@if( false ){
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.js"></script>

		<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8/jquery.validate.min.js"></script>
		<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"></script>
		<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js"></script>

	
		<script type="text/javascript" src="https://github.com/jquery/jquery-tmpl/raw/master/jquery.tmpl.min.js"></script>
		<script type="text/javascript" src="http://cloud.github.com/downloads/SteveSanderson/knockout/knockout-1.2.0.js"></script>
		<script type="text/javascript" src="https://github.com/SteveSanderson/knockout.mapping/raw/master/build/output/knockout.mapping-latest.debug.js"></script>
	}
@{ Html.BeginForm("Edit","Aspects", FormMethod.Post, new { @id = "__frmAspect"}); }
@( Html.ValidationSummary(false) )
@( Html.AntiForgeryToken() )
@( Html.EditorFor(model => model) )
<h2>Properties</h2>
<hr />
<br class="space" />
<div class="clearfix right">
	<button type="submit">Submit</button>
</div>
@{ Html.EndForm(); }

<script type="text/javascript">

	// Construct knockout view models for persisting the aspect
	var viewModel = {
		// a GUID that the user will never be able to edit. This
		// is assigned, maintained, and persisted by the server.
		Id
			: ko.observable(),
		Name
			: ko.observable(),
		Description
			: ko.observable(),
		Archetype
			: ko.observable(),
		Classification
			: ko.observable(),
		Properties
			: ko.observableArray([]),

		Save: function () {	
			alert('we reached the save function.');

			// we will try to send the model to the server.
			ko.utils.postJson(
				$("#__frmAspect").attr('action'),
				{ model: ko.toJS(this) }
			);
		}
	};

	// ----------------------------------------------------------------------- //
	// **************************** MODEL BINDING **************************** //
	// ----------------------------------------------------------------------- //

	// apply the knockout binding to the viewModel
	ko.applyBindings(viewModel, $("#__frmAspect")[0]);

	// attach the jquery unobtrusive validator
	$.validator.unobtrusive.parse("#__frmAspect");

	// bind the submit handler to unobtrusive validation.
	$("#__frmAspect").validate({
		submitHandler: function () {
			viewModel.Save();
		}
	});
</script>