(function($, undefined){
$.widget('ui.foo', {
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 a demo |
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 a FreeMarker template --> | |
| <#-- You can change the contents of the license inserted into | |
| # each template by opening Tools | Templates and editing | |
| # Licenses | Default License --> | |
| <#assign licenseFirst = "/* "> | |
| <#assign licensePrefix = " * "> | |
| <#assign licenseLast = " */"> | |
| <#include "../Licenses/license-${project.license}.txt"> | |
| /** |
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
| /** | |
| * Draggable Background Widget | |
| * | |
| * A widget that will use a specified image and dimensions to | |
| * produce a draggable, window-like view of an image. | |
| * | |
| * Example usage: | |
| * | |
| * YUI.use('widget-draggable-background', function(Y) { | |
| * var widget = new Y.WD.Widget.DraggableBackground({ |
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
| <html> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/yui/3.3.0/build/yui/yui.js"></script> | |
| </head> | |
| <body> | |
| <script> | |
| YUI({ | |
| modules: { |
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
| /** | |
| * Load a YUI Gallery module locally for testing. | |
| * | |
| * Assumes you've built your module with ant and have a local copy of the | |
| * yui3-gallery repo. | |
| * | |
| * This will override Loader's Gallery configuration. Existing Gallery modules | |
| * will load locally, and your new module should load locally as well. | |
| * | |
| * Props to Caridy for helping piece this together. |
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(d){ | |
| var iframe = d.body.appendChild(d.createElement('iframe')), | |
| doc = iframe.contentWindow.document; | |
| iframe.src = 'javascript:false;'; | |
| iframe.style.cssText = "position:absolute;width:1px;height:1px;left:-9999px;"; | |
| doc.open().write('<body onload="YUI_config={win:window.parent,doc:window.parent.document};var d=document;d.getElementsByTagName(\'head\')[0].appendChild(d.createElement(\'script\')).src=\'some.js\'">'); | |
| doc.close(); |
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> | |
| <meta charset="utf-8"> | |
| <title>Lorem Ipsum Dolor Sit</title> | |
| <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css"> | |
| </head> | |
| <body> | |
| <div id="pageWrapper"><div id="page"> | |
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
| _styleIframe: function () { | |
| var optimizedName = 'setAttribute', | |
| iframe = this.get('iframe'); // TODO: this have to be in a lang bundle | |
| Y.each (['border', 'frameBorder', 'marginWidth', 'marginHeight', 'leftMargin', 'topMargin'], function (name) { | |
| iframe[optimizedName](name, 0); | |
| }); | |
| // this is equivalent to: iframe.setAttribute('foo', 'bar').setAttribute('more', 'chaining'); but | |
| // since we don't have setAttributes, we do this crazy stuff to gain some bytes with the compressor. | |
| iframe[optimizedName]('allowTransparency', "true"); | |
| } |