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
| protected void renderYUI3Instance(HtmlContentWriter container, String component, String constructor) throws IOException { | |
| writeInlineScript(container, new YUI3Instance(component, constructor)); | |
| } | |
| // … | |
| private class YUI3Instance implements TextContent { | |
| private String component; |
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
| protected void writeDocument(HtmlContentWriter html) throws IOException { | |
| HtmlContentWriter head, body, content; | |
| head = html.head(); | |
| head.title().text("Tips You Made at TipTheWeb"); | |
| head.link(REL_STYLESHEET, TYPE_TEXT_CSS, relHref(getWebutils().getLocation("reset.css", "base.css"))); | |
| head.link(REL_STYLESHEET, TYPE_TEXT_CSS, relHref( | |
| getResources().getLocation( | |
| "style/style.css", |
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
| URL('exmaple.com').toString() // http://example.com/ | |
| // Accessor methods | |
| URL('example.com').protocol(); // http: | |
| URL('foo.example.com').host(); // foo.example.com | |
| URL('foo.example.com').domain(); // example.com | |
| URL('example.com').path(); // / | |
| // or getter style | |
| URL('example.com').getProtocol(); // http: | |
| URL('foo.example.com').getHost(); // foo.example.com |
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
| /** | |
| * Link Tests | |
| */ | |
| YUI.add('ttw-link-test', function(Y){ | |
| var matchSuite = new Y.Test.Suite('Link - Matching'), | |
| sanitizeSuite = new Y.Test.Suite('Link - Sanitize'); | |
| // *** Protocol Match TestCase *** // |
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
| /** | |
| * Guide | |
| * | |
| * Provides an interactive Guide Widget (Overlay) to present content in a series of Steps. | |
| * | |
| * GuideSteps are Widgets with WidgetStdMod support and are children to a Guide. | |
| * These Steps also have WidgetPositionAlign support which is overloaded to reference related content for the Step; | |
| * meaning a GuideStep can be aligned with it’s related content on the page, and when active, | |
| * the Guide Overlay will position itself according the currently-selected Step’s defined alignment. |
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
| _initWelcomeGuide : function () { | |
| var guide; | |
| guide = new Y.TTW.Guide({ | |
| srcNode : '#welcome-guide', | |
| render : true, | |
| visible : true, | |
| centered : true, |
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.MyWidget = Y.Base.create('myWidget', Y.Widget, [], { | |
| // *** Prototype *** // | |
| bindUI : function () { | |
| this.after('myAttrChange', this._afterMyAttrChange); | |
| }, | |
| syncUI : 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
| var guide; | |
| guide = new Y.TTW.Guide({ | |
| srcNode : '#welcome-guide', | |
| width : '500px', | |
| tabIndex : 0, | |
| render : true, | |
| centered : true, | |
| zIndex : 250, |
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
| head.link(REL_STYLESHEET, TYPE_TEXT_CSS, relHref( | |
| combo() | |
| .add(webutils(), | |
| "reset.css", | |
| "base.css") | |
| .add(yui3(), | |
| "cssgrids/grids-min.css") | |
| .add(resources(), | |
| "style/style.css", | |
| "style/chrome.css", |
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
| head.link(REL_STYLESHEET, TYPE_TEXT_CSS, relHref( | |
| combo() | |
| .add(webutils(), | |
| "reset.css", | |
| "base.css") | |
| .add(yui3(), | |
| "cssgrids/grids-min.css") | |
| .add(resources(), | |
| "style/style.css", | |
| "style/chrome.css", |