This file contains 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
/* globals Mithril, console, document */ | |
(function (m) { | |
var app = { | |
//models | |
// I keep a static copy of the list in the app | |
// so it doesn't get reloaded each time the route changes | |
// and a new app instance gets initialized | |
list: null, |
This file contains 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
/* globals Mithril, console, document */ | |
(function (m) { | |
//controller | |
var app = function () { | |
// model initialization, if does not already exists | |
if (!app.list) { | |
app.list = m.request({ | |
method: 'GET', |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<title>Virtual DOM with node references</title> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/mithril/0.1.18/mithril.min.js"></script> | |
<script src="../../node_modules/htmlparser-jresig/htmlparser-lib/htmlparser.js"></script> | |
<!-- This is the main container and "shell" for the todo app. --> | |
<script type="text/x-template" id="todo-app-template"> | |
<div id="todo-app"> |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<title>YUI todo demo in Mithril</title> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/mithril/0.1.18/mithril.min.js"></script> | |
<script src="../../node_modules/htmlparser-jresig/htmlparser-lib/htmlparser.js"></script> | |
<!-- This is the main container and "shell" for the todo app. --> | |
<script type="text/x-template" id="todo-app-template"> | |
<div id="todo-app"> |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<title>Mithirl ES6 test</title> | |
<meta charset="UTF-8"> | |
<script src="http://cdn.jsdelivr.net/mithril/0.2.0/mithril.min.js"></script> | |
<script src="node_modules/babel-core/browser.js"></script> | |
</head> |
This file contains 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>JSON Schema and DataTypes</title> | |
<style> | |
td , th , table { | |
border: thin solid silver; | |
} | |
td , th { |
This file contains 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
YUI.add('widget-buttons-patch', function (Y) { | |
"use strict"; | |
var WB = Y.WidgetButtons, | |
WBp = WB.prototype, | |
BUTTON = 'button', | |
getCN = Y.ClassNameManager.getClassName, | |
DISABLED = getCN(BUTTON, 'disabled'), | |
DEFAULT = getCN(BUTTON, 'default'); | |
This file contains 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
/* | |
App plugins can be loaded over an instance of App by setting a route with a wildcard path | |
such as: | |
{ | |
path:'/:app/*', | |
callback: 'dispatchApp' | |
} | |
where the app param is the module name of the plugin, | |
which should have its entry in the YUI config file (unless loaded by some other means) | |
*/ |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Better yet, see: https://gist.github.com/2044488 --> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Button test</title> | |
<script type="text/javascript" src="http://yui.yahooapis.com/3.5.0pr1/build/yui/yui.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.5.0pr1/build/cssreset/reset-min.css&3.5.0pr1/build/cssfonts/fonts-min.css&3.5.0pr1/build/cssbase/base-min.css&3.5.0pr1/build/cssgrids/grids-min.css" /> |
OlderNewer