Skip to content

Instantly share code, notes, and snippets.

View dohomi's full-sized avatar
🎯
Focusing

Dominic Garms dohomi

🎯
Focusing
View GitHub Profile
Router.configure({
layoutTemplate: 'layoutBackend',
notFoundTemplate: 'page404',
loadingTemplate: 'loading',
i18n: {
languages: TP.Const.AllowedLangKey,
setLanguage: function (lang) {
if (Meteor.isClient) {
TP.Core.Functions.setLanguageKey(lang);
@dohomi
dohomi / client.js
Last active August 29, 2015 14:09
autoform pure schema validation create user
Template.registerHelper(Schemas, Schema);
<template name="pageTreeNav">
<div id="pageTree" class="js-pa-sortable js-pa-container" data-parent-id="null">
{{#each getPageNodes}}
{{> pageTreeItem itemData=. level="2"}}
{{/each}}
</div>
</template>
<template name="pageTreeItem">
@dohomi
dohomi / helper.js
Last active August 29, 2015 14:01
Simple filter over collection
Template.exerciseList.events({
"keyup .js-exercise-text-search": function (ev, templ) {
Session.set("ExerciseListFilter", {"name": {$regex: ev.currentTarget.value, $options: 'i'}});
}
});
Template.exerciseList.helpers({
exercises: function () {
@dohomi
dohomi / club.html
Last active August 29, 2015 14:00
SimpleSchema in Collection2 with autoValue
{{#autoForm collection=Collections.Clubs id="createClubForm" type="method" meteormethod="createClub"}}
<div class="form-group {{#if afFieldIsInvalid name='name'}}has-error{{/if}}">
<div class="input-group">
<span class="input-group-addon">
Name
</span>
{{>afFieldInput name="name"}}
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">
@dohomi
dohomi / gist:8667357
Created January 28, 2014 13:12
Find node with _name property
${q(site).find('instanceof TYPO3.Neos:Document').property('_name') == 'blog'}
@dohomi
dohomi / gist:8647189
Created January 27, 2014 11:46
PackageStates
<?php
# PackageStates.php
# This file is maintained by Flow's package management. Although you can edit it
# manually, you should rather use the command line commands for maintaining packages.
# You'll find detailed information about the typo3.flow:package:* commands in their
# respective help screens.
# This file will be regenerated automatically if it doesn't exist. Deleting this file
# should, however, never become necessary if you use the package commands.