Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 55 lines (49 sloc) 1.071 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
<!DOCTYPE html>

<html>
<head>
<title>Sample App</title>
<script src="src/lib/curl.js"></script>
<script>
var config = {
baseUrl: "src",
paths: {
"curl": "lib/curl.js",
},
preloads: [
"src/lib/polyfills"
]
};

curl(config, [
"lib/jquery",
"lib/jquery-nohtml",
"ui/stack/stack",
"ui/card/card",
"ui/button/button",
"ui/abstractwidget/abstractwidget",
"ui/fields/textfield",
"lib/model",
"link!app.css" ]
).then(function( $, create, Stack, Card, Button, AbstractWidget, TextField, Model ) {

var App = AbstractWidget.extend({
init: function() {
var stack = new Stack({ parent: "body" });

var model = window.model = new Model({
data: {
value1: "oh yeh!"
}
});

stack.push(new Card({
title: "Field Test",
children: [
new TextField({ id: "test", model: model, modelField: "value1" }),
new Button({ id: "button", label: "Validate" })
]
}));
}
});

new App({});
});
</script>
</head>
<body></body>
</html>
Something went wrong with that request. Please try again.