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 Validator(req, res) { | |
this.req = req; | |
this.res = res; | |
this.validators = []; | |
this.errors = []; | |
} | |
Validator.prototype.add = function(name, rules) { | |
this.validators.push({ | |
name: name, |
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
{{ govukErrorSummary({ | |
titleText: "There is a problem", | |
errorList: [ | |
{ | |
text: "Enter at least one way to contact the user", | |
href: "#passport-issued-error" | |
} | |
] | |
}) }} |
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
onKeyUp(event) { | |
const div = this.textarea.nativeElement; | |
const firstChild = div.firstChild; | |
const lastChild = div.lastChild; | |
if ( | |
event.keyCode === 13 | |
&& !event.shiftKey | |
&& firstChild.nodeName.toLowerCase() !== 'p' | |
) { |
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 Toggler(button, toggleElement) { | |
this.toggleElement = toggleElement; | |
this.showing = true; | |
button.addEventListener('click', this.onToggleButtonClick.bind(this), false); | |
} | |
Toggler.prototype.onToggleButtonClick = function(e) { | |
this.toggle(); | |
} |
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
// --------------------------------------------------------------------------------------------------------- | |
// --- license header; --- | |
// --------------------------------------------------------------------------------------------------------- | |
/* Copyright (c) 2008 - 2009 by Adoro Media | |
info@adoromedia.com | |
This file is part of Adoro Media open source projects | |
Adoro Media projects are free software: you can redistribute it and/or modify | |
it under the terms of the GNU Lesser General Public License as published by |
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
<html> | |
<head> | |
<script> | |
window.onload = function() { | |
parent.helloworld(200, {"message":"","data":{"current_url":"","name":"Home","page_type":"standard","entity_uuid":null,"page_state":null,"uuid":"f7280510-3cf6-012e-7987-12313d034988","template":null,"asset_uuids":[],"user_uuid":null,"site_uuid":"a682cb70-3cf6-012e-74a4-12313d034988","navigation":false,"locked":false,"style":null}}); | |
} | |
</script> | |
</head> | |
<body></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
var JournalEntryView = function(container) { | |
this.container = container; | |
} | |
JournalEntryView.prototype.onReplyButtonClicked = function(e) { | |
e.preventDefault(); | |
// ... | |
}; |
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
String.prototype.unDelimit = function(delimeters) { | |
delimeters = delimeters || ["&", "="]; | |
if (delimeters.length === 1) | |
return this.split(delimeters[0]); | |
var items = this.split(delimeters[0]), | |
o = {}, | |
i = 0, | |
j = items.length, | |
subItem; | |
for (i; i<j; i++) { |
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
<div class="subNav js-subNav"> | |
<div class="breadcrumbs js-breadcrumbs"> | |
<a href="#" class="breadcrumb breadcrumb_link">Personal</a> | |
> | |
<a href="#" class="breadcrumb breadcrumb_link">Manage</a> | |
> | |
<span class="breadcrumb breadcrumb_current">Current account</span> | |
</div> | |
<ul class="subNav-secondaryLinks js-subNav-secondaryLinks"> |
NewerOlder