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
<select> | |
<option> Select ... </option> | |
<option value='__ko.bindingHandlers.options.optionValueDomData__'>Hi</option> | |
</select> |
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 () { | |
// Normally, SELECT elements and their OPTIONs can only take value of type 'string' (because the values | |
// are stored on DOM attributes). ko.selectExtensions provides a way for SELECTs/OPTIONs to have values | |
// that are arbitrary objects. This is very convenient when implementing things like cascading dropdowns. | |
ko.selectExtensions = { | |
readValue : function(element) { | |
if (element.tagName == 'OPTION') { | |
var valueAttributeValue = element.getAttribute("value"); | |
if (valueAttributeValue !== ko.bindingHandlers.options.optionValueDomDataKey) | |
return valueAttributeValue; |
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 override string CreateTemplate(object input, Func<object, object>[] hash) | |
{ | |
string url = Pattern; | |
_routeInputs.Where(x => x.CanTemplate(input)) | |
.Each(r => url = r.Substitute((T)input, url)); | |
if (hash != null) | |
hash.Each(func => | |
{ |
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
{% model Model:SweetVids.Web.Models.TestModel %} | |
<html> | |
<head> | |
<title>{% block title %}Django View Engine Demo{% endblock title %}</title> | |
</head> | |
<body> | |
<h1>Hello {{ Model.FirstName }}</h1> | |
</body> | |
</html> |
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; | |
namespace NDjango | |
{ | |
public class NDjangoAttribute : Attribute | |
{ | |
public string View { get; set; } | |
public NDjangoAttribute(string view) | |
{ |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using FieldBook.Core.Domain; | |
using FieldBook.Core.Navigation; | |
using FieldBook.Core.Persistence; | |
using FieldBook.Interface.Actions.Permissions; | |
using FieldBook.Interface.Dtos; | |
using FubuMVC.Core; |
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
define(["./views/appView" ,"./collections/jobList","./models/job"], | |
function(app, Jobs, Job) { | |
var mainView = { | |
toggleButtons : function (){ | |
if(this.employee && this.task && this.equipment){ | |
$('#create-job').removeAttr('disabled').focus(); |
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 class BillingModule extends AbstractModule { | |
@Override | |
protected void configure() { | |
bind(TransactionLog.class).to(DatabaseTransactionLog.class); | |
bind(CreditCardProcessor.class).to(PaypalCreditCardProcessor.class); | |
bind(BillingService.class).to(RealBillingService.class); | |
} | |
} |
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 class NavigationVisitor : IBehaviorVisitor | |
{ | |
private readonly IConfigurationObserver _observer; | |
private readonly ListDependency _policies = new ListDependency(typeof(IEnumerable<IMenuPolicy>)); | |
public NavigationVisitor(IConfigurationObserver observer) | |
{ | |
_observer = observer; | |
} |