This file contains 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
{{! this is a specific (dummy) page with a menu in the 'portal' application}} | |
{{< portal/prototypes/menuPage.html}} | |
{{$pageId}}aboutMe{{/pageId}} | |
{{$pageTitle}} | |
{{#i18n}}aboutMe.title{{/i18n}} | |
{{/pageTitle}} | |
{{$pageContent}} | |
{{#i18n}}aboutMe.title{{/i18n}} | |
{{/pageContent}} |
This file contains 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
<div id="{{$fieldId}}{{/fieldId}}" class="{{#required}}required{{/required}} lulu-datepicker field {{$fieldClass}}{{/fieldClass}}"> | |
<label for="{{$id}}{{/id}}"> | |
{{$label}}{{/label}} | |
</label> | |
<input type="text" id="{{$id}}{{/id}}" name="{{name}}" value="{{$value}}{{value}}{{/value}}" disabled /> | |
<a href="#"> | |
<img src="{{application.shared.imgRoot}}/cal01.png" alt="{{$clickText}}{{#i18n}}global.datepicker.clickToSelect{{/i18n}}{{/clickText}}" /> | |
</a> | |
<div class="description">{{dateFormat}}</div> | |
<ul class="errors"> |
This file contains 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
@Test | |
public void testSurprisingBehavior() throws Exception { | |
final class Book { | |
public String title; | |
public Book(String title) { | |
this.title = title; | |
} | |
} |
This file contains 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
var prototype = Hogan.compile('<div class="content-one">{{$content1}}{{/content1}}</div>\n<div class="content-two">{{$content2}}{{/content2}}</div>'); | |
var sub = Hogan.compile('{{< prototype}}{{$content1}}{{#i18n}}content{{/i18n}}{{/content1}}{{/ prototype}}'); | |
function translateLambda() { | |
return function(message) { | |
console.log(message); //logs '}{{/con' | |
return 'translated ' + message; | |
} | |
} | |
var rendered = sub.render({i18n: translateLambda}, {prototype: prototype}); |
This file contains 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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="hogan-TEST.js"></script> | |
<script id="parent" type="template/mustache"> | |
This is a parent template.<br/> | |
{{$content}}Child content goes here{{/content}}<br/> | |
Ending the parent template.<br/> | |
</script> |
This file contains 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
<div class="field {{classFromName}} {{#required}}required{{/required}}"> | |
<label for="{{id}}"> | |
{{label}} | |
{{#required}} | |
<span class="required">{{#i18n}}input.required{{/i18n}}</span> | |
{{/required}} | |
</label> | |
<input type="text" name="{{name}}" value="{{value}}" id="{{id}}"/> | |
{{#errors}} | |
<div class="error">{{message}}</div> |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |