Skip to content

Instantly share code, notes, and snippets.

@JeroenVinke
JeroenVinke / app.html
Created August 7, 2017 07:46
Aurelia Gist
<template>
<h1>${message}</h1>
<button click.delegate="toggleValue()">Toggle</button>
<select value.bind="boundValue" change.delegate="onChange()">
<option model.bind="1">option one</option>
<option model.bind="2">option two</option>
</select>
</template>
bind(ctx, overrideCtx) {
this.widgetBase.useParentCtx(overrideCtx);
if (this.kWidget) {
// this had to be kValue and not value
this.kWidget.value(this.kValue);
}
}
@JeroenVinke
JeroenVinke / app.html
Last active July 27, 2017 08:28
Grid: batch editing
<template>
<require from="aurelia-kendoui-bridge/grid/grid"></require>
<require from="aurelia-kendoui-bridge/grid/col"></require>
<ak-grid k-data-source.bind="datasource"
k-pageable.bind="true"
k-navigatable.bind="true"
k-toolbar.bind="['create', 'save', 'cancel']"
k-editable.bind="true">
<ak-col k-field="UnitPrice" k-title="Unit Price" k-format="{0:c}" k-width.bind="120"></ak-col>
@JeroenVinke
JeroenVinke / app.html
Created July 27, 2017 08:19 — forked from gist-master/app.html
Grid: batch editing
<template>
<require from="aurelia-kendoui-bridge/grid/grid"></require>
<require from="aurelia-kendoui-bridge/grid/col"></require>
<ak-grid k-data-source.bind="datasource"
k-pageable.bind="true"
k-navigatable.bind="true"
k-toolbar.bind="['create', 'save', 'cancel']"
k-editable.bind="true">
<ak-col k-field="UnitPrice" k-title="Unit Price" k-format="{0:c}" k-width.bind="120"></ak-col>
// Karma configuration
// Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST)
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
frameworks: ['jasmine'],
require('aurelia-polyfills');
const gulp = require('gulp');
const Container = require('aurelia-dependency-injection').Container;
const CLIOptions = require('../../lib/cli-options').CLIOptions;
const definition = require('../../lib/commands/new/new-application.json');
const WorkflowEngine = require('../../lib/workflow/workflow-engine').WorkflowEngine;
const ProjectCreate = require('../../lib/workflow/activities/project-create');
const ProjectInstall = require('../../lib/workflow/activities/project-install');
const UI = require('../../lib/ui').UI;
const ConsoleUI = require('../../lib/ui').ConsoleUI;
require('aurelia-polyfills');
const gulp = require('gulp');
const Container = require('aurelia-dependency-injection').Container;
const definition = require('../../lib/commands/new/new-application.json');
const WorkflowEngine = require('../../lib/workflow/workflow-engine').WorkflowEngine;
const ProjectCreate = require('../../lib/workflow/activities/project-create');
const UI = require('../../lib/ui').UI;
const ConsoleUI = require('../../lib/ui').ConsoleUI;
const fs = require('fs');
const path = require('path');
@JeroenVinke
JeroenVinke / app.html
Created July 11, 2017 15:38
Grid: inline editing
<template>
<require from="aurelia-kendoui-bridge/grid/grid"></require>
<require from="aurelia-kendoui-bridge/grid/col"></require>
<require from="aurelia-kendoui-bridge/grid/grid-command"></require>
<ak-grid k-widget.bind="grid" k-data-source.bind="datasource" k-pageable.bind="true" k-toolbar.bind="['create']" k-editable="inline">
<ak-col k-field="ProductName"></ak-col>
<ak-col k-field="UnitPrice" k-title="Unit Price" k-format="{0:c}" k-width="120px"></ak-col>
<ak-col k-field="UnitsInStock" k-title="Units In Stock" k-width="120px"></ak-col>
<ak-col k-field="Discontinued" k-width="120px"></ak-col>
@JeroenVinke
JeroenVinke / app.css
Created July 10, 2017 18:56 — forked from CesarAfonso/app.css
Grid: basic usage
.customer-photo {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 50%;
background-size: 32px 35px;
background-position: center center;
vertical-align: middle;
line-height: 32px;
box-shadow: inset 0 0 1px #999, inset 0 0 10px rgba(0,0,0,.2);
@JeroenVinke
JeroenVinke / app.html
Last active July 3, 2017 15:34
Aurelia KendoUI component - problem report
<template>
<style>
.active {
background-color: red;
}
</style>
<ul class="nav navbar-nav" id="nav">
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
<a data-toggle="collapse" data-target="#skeleton-navigation-navbar-collapse.in" href.bind="row.href">${row.title}</a>