This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.IO; | |
| using System.Text; | |
| using System.Web; | |
| using System.Web.Optimization; | |
| using Jurassic; | |
| using System.Globalization; | |
| namespace Fewt.Web | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function nestCollection(model, attributeName, nestedCollection) { | |
| //setup nested references | |
| for (var i = 0; i < nestedCollection.length; i++) { | |
| model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
| } | |
| //create empty arrays if none | |
| nestedCollection.bind('add', function (initiative) { | |
| if (!model.get(attributeName)) { | |
| model.attributes[attributeName] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static UrlHelper CreateUrlHelperToFakeIsLocalUrl(string fakeRequestUrl) | |
| { | |
| var httpContextBase = new Mock<HttpContextBase>(); | |
| httpContextBase.Setup(x => x.Request.Url).Returns(new Uri(fakeRequestUrl)); | |
| var requestContext = new RequestContext(httpContextBase.Object, new RouteData()); | |
| return new UrlHelper(requestContext); | |
| } | |
| // controller.Url = CreateUrlHelperToFakeIsLocalUrl("http://aFakeHost/aFakePage"); |