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
| Y.on('yqlData', function(e) { | |
| Y.log(e.myYqlResponse); | |
| }); | |
| Y.YQL('select...', function(e) { | |
| Y.fire('yqlData', {myYqlResponse: e}); | |
| }); |
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('placeholder', function(Y) { | |
| var VALUE = 'value', | |
| PLACEHOLDER = 'placeholder', | |
| elements = {}, | |
| events = []; | |
| /* | |
| * The sync method allows you to add additional inputs to the page and then resync the placeholders | |
| */ |
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
| isNumberSetter: function(value, name) { | |
| Y.log('isNumberSetter', 'info', this.name); | |
| var intValue = parseInt(value, 10); | |
| if (!isNaN(intValue)) { | |
| return intValue; | |
| } else { | |
| Y.log(name + ' is not a valid integer.', 'warn', this.name); | |
| this.fire(name + 'ValidationFail'); |
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
| Y.DataTable.BodyView.prototype._afterDataChange = function (e) { | |
| var view = this; | |
| this.publish('render', { | |
| defaultFn: function() { | |
| view.render(); | |
| } | |
| }) | |
| this.fire('render'); | |
| }; |
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
| //This is untested code, might need some tweaking | |
| Y.PopupCalendar.prototype._bindEvents = function() { | |
| Y.log('_bindEvents', 'info', this.name); | |
| var input = this.get('input'); | |
| if (input.get('type') === 'text') { | |
| input.on('focus', this.showCalendar, this); | |
| } else { |
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
| export PS1='\u@\h \w `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[37m\]:' |
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
| modules: { | |
| 'mock-model-sync-rest': { | |
| fullpath: 'lib/mock-model-sync-rest.js', | |
| condition: { | |
| trigger: 'model-sync-rest', | |
| test: function() { | |
| return true | |
| }, | |
| when: 'after' | |
| } |
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.use('module', function(Y) { | |
| Y.use('newModule'); | |
| // will load into current scope but you have no guarantee it's available | |
| Y.use('newModule', function(Y) { | |
| //Will only execute once the module is loaded but your now in your new scope | |
| }); | |
| Y.on('newModuleLoaded', callbackInMainScope); |
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 Y = require('yui/handlebars'); | |
| app.configure(function() { | |
| app.engine('handlebars', function(path, options, fn) { | |
| fs.readFile('views/layout.handlebars', 'utf8', function(err, layout) { | |
| fs.readFile(path, 'utf8', function(err, str) { | |
| if (err) { return fn(err); } | |
| var container = Y.Handlebars.compile(layout); | |
| fn(null, container({body: str})); |
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
| /*global YUI:true */ | |
| YUI.add("extension-view-parent", function(Y) { | |
| var ViewParent; | |
| ViewParent = function() {}; | |
| ViewParent.ATTRS = { | |
| views : { | |
| value : false | |
| }, | |
| render : { |