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 config, | |
| button; | |
| config = { | |
| xtype: 'button', | |
| cls: 'main green', | |
| text: 'Save', | |
| listeners: { | |
| click: { | |
| alert('Save clicked'); |
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 panel = Ext.create('Ext.panel.Panel', { | |
| cls: 'my-panel', | |
| title: 'Filters', | |
| items: [ | |
| { | |
| xtype: 'datefield', | |
| fieldLabel: 'Start date' | |
| }, | |
| { | |
| xtype: 'datefield', |
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 button = Ext.create('Ext.Button', { | |
| text: 'Click me', | |
| renderTo: Ext.getBody(), | |
| handler: function() { | |
| alert('You clicked the button!'); | |
| } | |
| }); |
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 view = Ext.create('My.ToDo.View', { | |
| renderTo: 'containerEl', | |
| store: 'toDoStore' | |
| }); |
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.View', { | |
| extend: 'Ext.view.View', | |
| tpl: '<ul><tpl for="."><li class="todo<tpl if="isDone"> todo-done</tpl>">{description:htmlEncode}</li></tpl></ul>', | |
| renderTo: Ext.getBody(), | |
| itemSelector: '.todo', | |
| baseCls: 'todo-list', | |
| emptyText: 'No items', | |
| listeners: { | |
| itemclick: function (view, record) { | |
| this.markDone(record); |
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
| (function (global) { | |
| 'use strict'; | |
| var ristretto = { | |
| // ... | |
| }; | |
| if (typeof define === 'function' && define.amd) { | |
| define([], function () { | |
| return ristretto; |
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
| http://l.yimg.com/g/combo/1/3.7.3?cookie/cookie-min.js&oop/oop-min.js&attribute-core/attribute-core-min.js&base-core/base-core-min.js&event-custom-base/event-custom-base-min.js&event-custom-complex/event-custom-complex-min.js&attribute-events/attribute-events-min.js&attribute-extras/attribute-extras-min.js&attribute-base/attribute-base-min.js&attribute-complex/attribute-complex-min.js&base-base/base-base-min.js&dom-core/dom-core-min.js&dom-base/dom-base-min.js&dom-style/dom-style-min.js&selector-native/selector-native-min.js&selector/selector-min.js&node-core/node-core-min.js&node-base/node-base-min.js&event-base/event-base-min.js&node-style/node-style-min.js&anim-base/anim-base-min.js&anim-color/anim-color-min.js&dom-screen/dom-screen-min.js&node-screen/node-screen-min.js&anim-xy/anim-xy-min.js&anim-curve/anim-curve-min.js&anim-easing/anim-easing-min.js&pluginhost-base/pluginhost-base-min.js&pluginhost-config/pluginhost-config-min.js&node-pluginhost/node-pluginhost-min.js&anim-node-plugin/anim-node-plugin-mi |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Using modules</title> | |
| <script src="require-config.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.6/require.min.js"></script> | |
| <script> | |
| require.config({ | |
| baseUrl: './build' | |
| }) |
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
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| requirejs: { | |
| compile: { | |
| options: { | |
| baseUrl: './js', | |
| mainConfigFile: 'require-config.js', | |
| dir: './build/', | |
| paths: { | |
| // default path if pulled in using Bower |
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 $ = require('./dollar.js'); | |
| var Bolderiser = function () { | |
| }; | |
| Bolderiser.prototype = { | |
| embolden: function (id) { | |
| var el = $.byId(id); | |
| el.style.fontWeight = 'bold'; |