This file contains hidden or 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
font-family: sans-serif; | |
box-sizing: border-box; | |
} | |
.container { |
This file contains hidden or 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; | |
font-family: "Open Sans", Arial, Helvetica, sans-serif; | |
font-size: 24pt; | |
} |
This file contains hidden or 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
define([], function () { | |
'use strict'; | |
return function (text) { | |
return text.toUpperCase(); | |
}; | |
}); |
This file contains hidden or 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
define([], function () { | |
function Ticker () { | |
this.seed = 0; | |
} | |
Ticker.prototype = { | |
next: function () { | |
return this.seed++; | |
} | |
}; |
This file contains hidden or 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
define([], function () { | |
'use strict'; | |
var i = 0; | |
return { | |
next: function () { | |
return i++; | |
} | |
}; |
This file contains hidden or 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.applyConfig({ | |
groups: { | |
'cdnjs': { | |
base : '//cdnjs.cloudflare.com/ajax/libs', | |
modules: { | |
'moment' : { | |
path: '/moment.js/2.0.0/moment.min.js' | |
} | |
} | |
} |
This file contains hidden or 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
require.config({ | |
... | |
shim: { | |
'backbone': { | |
deps: ['underscore', 'jquery'], | |
exports: 'Backbone' | |
}, | |
'underscore': { |
This file contains hidden or 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
Ext.define('My.ToDo.Model', { | |
extend: 'Ext.data.Model', | |
fields: [ | |
{ | |
name: 'description', | |
type: 'string' | |
}, | |
{ | |
name: 'isDone', | |
type: 'boolean' |
This file contains hidden or 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
var toDoTpl = new Ext.XTemplate([ | |
'<ul>', | |
'<tpl for=".">', | |
'<li class="todo <tpl if="isDone"> todo-done</tpl>">', | |
'{description:htmlEncode}', | |
'</li>', | |
'</tpl>', | |
'</ul>' | |
]); |
This file contains hidden or 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
Ext.create('Ext.form.Panel', { | |
renderTo: Ext.getBody(), | |
url: '/register.aspx', | |
method: 'POST', | |
items: [ | |
{ | |
xtype: 'textfield', | |
name: 'username', | |
fieldLabel: 'Username' | |
} |