Skip to content

Instantly share code, notes, and snippets.

Avatar

Nikolaj Ivancic adriatic

View GitHub Profile
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Window: basic usage
View app.html
<template>
<require from="./basic-use.css"></require>
<div id="example">
<div id="window"
ak-window="k-width: 600px; k-title: About Alvar Aalto; k-visible.bind: false; k-actions.bind: actions; k-widget.bind: window"
k-on-close.delegate="onClose()">
<div class="armchair">
<img src="http://demos.telerik.com/kendo-ui/content/web/window/armchair-402.png" alt="Artek Alvar Aalto - Armchair 402" /> Artek Alvar Aalto - Armchair 402</div>
<p>Alvar Aalto is one of the greatest names in modern architecture and design. Glassblowers at the iittala factory still meticulously handcraft the legendary vases that are variations on one theme, fluid organic shapes that let the end user decide the use. Interpretations of the shape in new colors and materials add to the growing Alvar Aalto Collection that remains true to his original design.</p>
@adriatic
adriatic / app.html
Last active Jul 20, 2016
ValueConverters: basic usage
View app.html
<template>
<div id="example">
<div class="demo-section k-content">
<p>${2.5 | kendoToString:'n5'}</p>
<p>${'5/16/2016' | kendoParseDate:'MM/dd/yyyy'}</p>
<p>${'2012/07/16' | kendoParseDate:["MM/dd/yyyy", "yyyy/MM/dd"]}
<p>${'1.212,22 €' | kendoParseInt}</p>
<p>${'1.212,22 €' | kendoParseFloat}</p>
<p>${'#ff0000' | kendoParseColor | kendoStringify}</p>
<p>${'{0:c} - {1:c}' | kendoFormat:12:24}</p>
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Validator: custom validation
View app.html
<template>
<require from="./custom-validation.css"></require>
<div id="example">
<div class="demo-section k-content">
<form id="employeeForm"
ak-validator="k-widget.bind: validator; k-rules.bind: rules"
data-role="validator"
novalidate="novalidate">
<ul id="fieldlist">
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Validator: basic usage
View app.html
<template>
<require from="./basic-use.css"></require>
<div id="example">
<div class="demo-section k-content">
<div id="tickets">
<form id="ticketsForm" submit.delegate="submit($event)" ak-validator="k-widget.two-way: validator">
<ul id="fieldlist">
<li>
<label for="fullname" class="required">Your Name</label>
<input type="text" id="fullname" name="fullname" class="k-textbox" placeholder="Full name" required validationMessage="Enter {0}" style="width: 220px;" />
@adriatic
adriatic / app.html
Last active Jul 19, 2016
Upload: initial files
View app.html
<template>
<div id="example">
<div class="box">
<h4>Information</h4>
<p>
The Upload can be used as a drop-in replacement
for file input elements. This "synchronous" mode does not require
special handling on the server.
</p>
</div>
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Upload: templates
View app.html
<template>
<require from="./templates.css"></require>
<div id="example">
<div class="demo-section k-content">
<ak-upload k-multiple.bind="true" k-async.bind="asyncUpload">
<ak-template>
<span class='k-progress'></span>
<div class='file-wrapper'>
<span class='file-icon ${addExtensionClass(files[0].extension)}'></span>
<h4 class='file-heading file-name-heading'>Name: ${name}</h4>
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Upload: Api
View app.html
<template>
<div id="example">
<div class="box">
<h4>API Functions</h4>
<ul class="options">
<li>
<button ak-button click.delegate="upload.toggle()">Toggle enabled state</button>
</li>
<li>
<button ak-button click.delegate="upload.enable()">Enable</button>
@adriatic
adriatic / app.html
Last active Aug 9, 2016
Upload: events
View app.html
<template>
<require from="./logger.js"></require>
<div id="example">
<div class="box">
<h4>Information</h4>
<p>
This example shows how to handle events triggered by kendoUpload.
</p>
</div>
<div>
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Upload: asynchronous upload
View app.html
<template>
<div id="example">
<div class="box">
<h4>Information</h4>
<p>
The Upload is able to upload files out-of-band using the
HTML5 File API with fallback for legacy browsers.
</p>
<p>
You need to configure save action that will receive
@adriatic
adriatic / app.html
Last active Jul 20, 2016
Upload: basic usage
View app.html
<template>
<div id="example">
<div class="box">
<h4>Information</h4>
<p>
The Upload can be used as a drop-in replacement
for file input elements. This "synchronous" mode does not require
special handling on the server.
</p>
</div>