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.add('sampleView',function(Y, NAME) { | |
| Y.SampleView = Y.Base.create(NAME, Y.View, [], { | |
| initializer:function(){ | |
| var self = this; | |
| self.parallel = new Y.Parallel(); | |
| Y.io('templates/' + NAME + '.html',{ | |
| on:{ | |
| complete: self.parallel.add(function(id,response){ | |
| console.log('io completed'); | |
| self.template = response.responseText; |
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( | |
| {gallery: 'gallery-2012.08.29-20-10'} | |
| ).use('gallery-yui3treeview-ng', function (Y) { | |
| 'use strict'; | |
| var count = 0, | |
| makeBranch = function (prefix, depth) { | |
| var branch = [], node; | |
| count +=1; | |
| for (var i = 0; i < 5; i+=1) { |
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.add('personView',function(Y, NAME){ | |
| var TEMPLATES = {}, | |
| COMPILED_TEMPLATES = {}; | |
| Y.Object.each(TEMPLATES, function (template, name) { | |
| COMPILED_TEMPLATES[name] = Y.Handlebars.compile(template); | |
| }); | |
| Y.PersonView = Y.Base.create( | |
| NAME, | |
| Y.View, | |
| [], |
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 express = require('express'), | |
| fs = require('fs'), | |
| path = require('path'), | |
| server = express.createServer(), | |
| rexpTEMPLATE = /TEMPLATES\s*=\s*\{\s*\}/, | |
| rexpJs = /\.js$/i, | |
| rexpHtml = /\.html$/i, | |
| VIEWS = '/scripts/views/', | |
| MODELS = '/scripts/models/'; |
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.add('personView',function(Y){ | |
| Y.PersonView = Y.Base.create( | |
| 'personView', | |
| Y.View, | |
| [], | |
| { | |
| initializer:function(){ | |
| this.model = this.get('model'); | |
| }, | |
| render:function(){ |
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
| model.read(idPersona, function(err, rows) { | |
| if (err) { | |
| ac.error(err); | |
| return; | |
| } | |
| ac.done({ | |
| debug:Y.JSON.stringify(rows), | |
| persona:rows | |
| }, {params:{route: {idDireccion:rows[0].idDireccion}}}); |
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
| ac.done = (function (original) { | |
| return function (data, opts) { | |
| opts = opts || {}; | |
| var instance = ac.command.instance, | |
| config = instance.config || {}, | |
| action = instance.action, | |
| children = config.children, | |
| params = ac.params.getAll(), | |
| me = this, | |
| childOpts = opts.children || {}; |
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 () { | |
| var TV = YAHOO.widget.TreeView, | |
| TVProt = TV.prototype, | |
| Event = YAHOO.util.Event, | |
| Dom = YAHOO.util.Dom; | |
| TVProt.draw = TVProt.render = function () { | |
| var html = this.root.getHtml(), | |
| el = this.getEl(), | |
| ed = TV.editorData; |
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> | |
| <!-- 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" /> |