Skip to content

Instantly share code, notes, and snippets.

@Kotrotsos
Kotrotsos / designer.html
Created August 27, 2014 11:45
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
{
vehicle: {
_id: "11",
make: "Audi",
model: "A4",
Modeltype: "Business Edition",
licensePlate: "3-KFN-28",
vehicleType: "Passenger vehicle",
constructionYear: 2014,
dangerousSubstance: false,
"vehicle": {
"_id": "11",
"make": "Audi",
"model": "A4",
"Modeltype": "Business Edition",
"licensePlate": "3-KFN-28",
"vehicleType": "Passenger vehicle",
"constructionYear": 2014,
"dangerousSubstance": false,
"loadCapacity": 2000,
{
"name": "Inboedelverzekering",
"id": "2342342",
"mandatory": false,
"selected": true,
"premium": 45.50,
"option": [
{
"name" : "Geen beveiliging",
"value": "Geen beveiliging"
{
"options": [
{
"label": "insuredSum",
"values": [
{
"name": "0",
"value": "X"
},
{
This file has been truncated, but you can view the full file.
/**
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
//Going sloppy to avoid 'use strict' string cost, but strict practices should
//be followed.
/*jslint sloppy: true */
// register url get variables and pass those url to new form and submit this form
// typicly for submitting form with ajax injection without the help of backend programming
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery','pat-registry','pat-logger','pat-parser'], function ($, patterns,logger, Parser) {
return factory($, patterns, logger,Parser);
});
} else {
factory(root.jQuery, root.patterns, root.patterns.logger,root.patterns.Parser);
}
@Kotrotsos
Kotrotsos / gist:976222
Created May 17, 2011 09:54
Sexy element declaration
<style>
.highlight { background-color:yellow; }
</style>
<script>
$("<div />", {
text: "click here",
click: function()
{
$(this).toggleClass("highlight");
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://0.0.0.0:4000/lib/patterns/leaflet/leaflet.js"></script>
<script src="http://0.0.0.0:4000/lib/patterns/leaflet/Leaflet.fullscreen.js"></script>
<script src="http://0.0.0.0:4000/bundles/patterns.js"></script>
<style>
@Kotrotsos
Kotrotsos / Typeahead.js
Created July 9, 2012 06:49
Type ahead in Bootstrap
$('.typeahead').typeahead({
source: function (typeahead, query) {
return $.post('/typeahead', { query: query }, function (data) {
return typeahead.process(data);
});
}
});