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
| _onSuccess : function (txId, r, args) { | |
| var entity = r.responseText; | |
| if (entity && entity.length > 0) { | |
| try { | |
| entity = Y.JSON.parse(entity); | |
| } catch (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
| document.addEventListener('focus', prepareHandler, true); // capture phase | |
| input.addEventListener('focus', inputHandler, false); | |
| function prepareHandler(e) { | |
| var id = e.target.id; | |
| process[id] = true; | |
| setTimeout(function () { | |
| if (process[id]) { | |
| // do stuff (e is available, but its methods are useless) |
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
| /** | |
| * MyWidget | |
| */ | |
| var MyWidget, | |
| MY_WIDGET = 'myWidget', | |
| SUBJECT = 'subject', | |
| MESSAGE = 'message', | |
| SUBJECT_NODE = 'subjectNode', |
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({ | |
| modules: { | |
| 'gallery-overlay-modal': { | |
| fullpath: 'http://yui.yahooapis.com/gallery-2009.12.08-22/build/gallery-overlay-modal/gallery-overlay-modal-min.js', | |
| requires: ['overlay','plugin','event-focus'], | |
| optional: [], | |
| supersedes: [] | |
| } | |
| } |
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>test</title> | |
| </head> | |
| <body class="yui-skin-sam"> | |
| <script type="text/javascript" src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script> | |
| <script type="text/javascript" src="http://yui.yahooapis.com/gallery-2009.12.08-22/build/gallery-overlay-modal/gallery-overlay-modal-min.js"></script> | |
| <script type="text/javascript"> |
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('event-synthetic', 'node', function(Y){ | |
| /*! | |
| * Technique from Juriy Zaytsev via jQuery 1.4.2 | |
| * http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ | |
| */ | |
| function eventSupported (eventName) { | |
| eventName = "on" + eventName; | |
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
| /** | |
| * Base Component Manager | |
| * | |
| * Oddnut Software | |
| * Copyright (c) 2010 Eric Ferraiuolo - http://eric.ferraiuolo.name | |
| */ | |
| var ComponentMgr, | |
| COMPONENTS = 'components', |
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 purgeCSS; | |
| Y.Get.css('path/to/file.css', { onSuccess: function(e){ | |
| purgeCSS = e.purge; | |
| // now you could call purgeCSS(); and it will be removed | |
| }}); |
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('node', function(Y){ | |
| var testEl, hasPosFixed; | |
| testEl = Y.Node.create('<div></div>').setStyles({ | |
| position : 'absolute', | |
| top : '1px', | |
| left : '1px', | |
| width : '0', | |
| height : '0' |
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({ | |
| groups : { | |
| utils : { | |
| base : 'base/path/', | |
| comboBase : 'combo/base/path/', | |
| root : '', | |
| combine : true, | |
| modules : { |