Skip to content

Instantly share code, notes, and snippets.

View ericf's full-sized avatar

Eric Ferraiuolo ericf

View GitHub Profile
/**
* 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.
*
_initWelcomeGuide : function () {
var savedStep = this.getSavedWelcomeGuideStep(),
guide, guideHandles;
guide = new Y.TTW.Guide({
srcNode : '#welcome-guide',
width : '580px',
tabIndex : 0,
var zombie = require('zombie');
zombie.visit('http://tiptheweb.org/', function (err, browser) {
console.log(browser.text('title'));
});
eferraiuolo@BlackMagic ~/Tools/node $ npm install zombie
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info preinstall [email protected]
npm info install [email protected]
Checking for program g++ or c++ : /usr/bin/g++
Zombie: GET http://tiptheweb.org/
Zombie: GET http://tiptheweb.org/ => 200
Zombie: Running script from http://tiptheweb.org/:undefined:undefined<script>
Zombie: Running script from http://tiptheweb.org/:undefined:undefined<script>
Zombie: Running script from http://tiptheweb.org/
Zombie: Running script from http://tiptheweb.org/
Zombie: Running script from http://tiptheweb.org/
Zombie: Running script from http://tiptheweb.org/
Zombie: GET /combo/?yui3:_v_3.3.0.PR3/yui/yui-min.js;44b0m6neh3zsx55rvs35hebp68&yui3:_v_3.3.0.PR3/loader/loader-min.js;xpp217cqc6ah58aceqp499k5ac&utils:yui_config;05p40pwqscw0n5g7675gfrecbc&res:yui_config;bw1knegscrpwbj2sftpfzw0f68
Zombie: GET /combo/?yui3:_v_3.3.0.PR3/yui/yui-min.js;44b0m6neh3zsx55rvs35hebp68&yui3:_v_3.3.0.PR3/loader/loader-min.js;xpp217cqc6ah58aceqp499k5ac&utils:yui_config;05p40pwqscw0n5g7675gfrecbc&res:yui_config;bw1knegscrpwbj2sftpfzw0f68 => 200
In the table:
<inputs>
<key id="url" type="xs:string" paramType="variable" required="true" />
<key id="timeout" type="xs:integer" paramType="variable" required="false" default="25000" />
<map id="integrations" type="xs:string" paramType="variable" required="true" />
</inputs>
In the .env file:
var caseResource = new Y.Resource({
uri : this.get(CASE_INFO_PATH),
headers : { Accept: 'application/xhtml+xml' },
entityTranslators : { XML: {
contentType : 'application/xhtml+xml',
deserialize : function(r){
var doc = r.responseXML.documentElement,
title = Y.DOM.getText(Y.Selector.query('title', doc, true)),
steps = Y.Selector.query('div', doc),
_uiSetStep : function (newStep, prevStep) {
var contentBox = this.get(CONTENT_BOX),
infoNodes = this.get(INFO_NODES),
prevInfoNode = isValue(prevStep) ? infoNodes.item(prevStep) : null,
newInfoNode = infoNodes.item(newStep);
if (isValue(prevInfoNode)) {
prevInfoNode.hide(true, function(){
prevInfoNode.remove();
@ericf
ericf / gist:795477
Created January 25, 2011 19:30
Single-page, multi-view
/**
* CaseWindow
*/
var CaseWindow,
CASE_WINDOW = 'caseWindow',
ATTRS = {},
VIEWS = {},
USER_ID = 'userID',
/**
* InfoViewer
*/
var InfoViewer,
INFO_VIEWER = 'infoViewer',
ATTRS = {},
TRANSITIONS = {},
INFO_NODES = 'infoNodes',