YUI({
//Last Gallery Build of this module
gallery: 'gallery-2013.04.03-19-53'
}).use('gallery-treeble', function(Y) {
var my_data = [...];
// treeble config to be set on root datasource
var schema =
{
resultFields:
[
"id","quantity","year","title",
{key: 'kiddies', parser: 'treebledatasource'}
]
};
var schema_plugin_config =
{
fn: Y.Plugin.DataSourceArraySchema,
cfg: {schema:schema}
};
var treeble_config =
{
generateRequest: function() { },
schemaPluginConfig: schema_plugin_config,
childNodesKey: 'kiddies',
totalRecordsReturnExpr: '.meta.totalRecords'
};
// root data source
var root = new Y.DataSource.Local({source: data});
root.treeble_config = Y.clone(treeble_config, true);
root.plug(schema_plugin_config);
// TreebleDataSource
var ds = new Y.DataSource.Treeble(
{
root: root,
paginateChildren: false,
uniqueIdKey: 'the-key-which-uniquely-identifies-each-record'
});
// request data
var callback =
{
success: function(e)
{
// do something with e.response.results
},
error: function()
{
// do something with e.error
}
};
ds.sendRequest(
{
request:
{
startIndex: 0,
resultCount: 10
},
callback: callback
});
});/home/y/libexec/ant/bin/ant all
Buildfile: build.xml
[echo] Starting Build For gallery-treeble
clean:
init:
[mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp
[echo] Starting Build For gallery-treeble
-lint-server:
[echo] Starting Build For gallery-treeble
-node:
[echo] For faster builds, install Node.js.
-concatdebug:
[copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/ant
[delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/ant
-registerdebug:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp
-prependdebug:
-appenddebug:
builddebug:
-createcore:
[copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp
-loggerregex:
buildcore:
-rollupjs:
-concatskins:
[copy] Copying 2 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/ant
[delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/ant
[yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/assets/skins/sam/gallery-treeble.css
[yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/assets/skins/sam/gallery-treeble.css
-buildskins:
-rollupcss:
buildskins:
-buildlangs:
-rolluplangs:
buildlangs:
build:
minify:
[yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/gallery-treeble.js
[yuicompressor]
[yuicompressor] [WARNING] Invalid hint syntax: use strict
[yuicompressor] add("gallery-treeble",function(Y){ ---> "use strict" <--- ;functionTreebleDataSource(){TreebleDataSource.superclass.
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ){var data=req.data; ---> var <--- startIndex=req.start;var childNodesKey=req
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] data;var startIndex=req.start; ---> var <--- childNodesKey=req.ds.treeble_config.childNodesKey;
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] =req.ds.treeble_config.childNodesKey; ---> var <--- nodeOpenKey=req.ds.treeble_config.nodeOpenKey;
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .ds.treeble_config.nodeOpenKey;for( ---> var <--- j=0;j=startIndex){break;}} ---> var <--- uniqueIdKey=this.get("uniqueIdKey");var
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] uniqueIdKey=this.get("uniqueIdKey"); ---> var <--- result=true;for(var k=0
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] );var result=true;for( ---> var <--- k=0;k var <--- i=startIndex+k;var ds=data
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ){var i=startIndex+k; ---> var <--- ds=data[k][childNodesKey];
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] [j].index>i){ ---> var <--- item={index:i,open:null
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] childTotal:0,parent:parent}; ---> var <--- cached_item=null;if(uniqueIdKey){cached_item
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ){var open=this._open; ---> var <--- last=path.length-1;for(
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] =path.length-1;for( ---> var <--- i=0;i var <--- node=searchOpen(open,path[i]
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .get("paginateChildren")){for( ---> var <--- i=0;i var <--- node=open[i];if(node
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] slices=[],send=false; ---> var <--- m=0,prev=-1,presend
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] -1,presend=false;for( ---> var <--- i=0;i var <--- node=open[i];if(!
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] !node.open){continue;} ---> var <--- delta=node.index-prev;if(
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] :0,children:null}); ---> var <--- n=0,m=0,prev=
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] 0,prev=-1;for( ---> var <--- i=0;i var <--- node=open[i];if(!
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] !node.open){continue;} ---> var <--- delta=node.index-prev;if(
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] if(node.childTotal>0){ ---> var <--- info=getVisibleSlicesPgAll(skip,show,rootDS,
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] }}prev=node.index;} ---> var <--- info={count:n,send:send
[yuicompressor]
[yuicompressor] [WARNING] The variable info has already been declared in the same scope...
[yuicompressor] }prev=node.index;}var ---> info <--- ={count:n,send:send}
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ._slices.length;i++){ ---> var <--- slice=this._slices[i];var
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] slice=this._slices[i]; ---> var <--- ds=slice.ds;var req=findRequest
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ];var ds=slice.ds; ---> var <--- req=findRequest.call(this,ds)
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ("TreebleDataSource found path length mismatch");}else{for( ---> var <--- j=0;j var <--- i=0;i i <--- =0;i var <--- req=this._req[i];request
[yuicompressor]
[yuicompressor] [WARNING] The variable req has already been declared in the same scope...
[yuicompressor] _req.length;i++){var ---> req <--- =this._req[i];request.
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ._req.length;i++){ ---> var <--- req=this._req[i];if
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .response;req.error=false; ---> var <--- dataStartIndex=0;if(req.ds.
[yuicompressor]
[yuicompressor] [WARNING] Using 'eval' is not recommended. Moreover, using 'eval' reduces the level of compression!
[yuicompressor] req.ds.treeble_config.startIndexExpr){ ---> eval <--- ("dataStartIndex=req.resp"+req.ds.treeble_config.startIndexExpr
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .ds.treeble_config.startIndexExpr);} ---> var <--- sliceStartIndex=req.start-dataStartIndex;req.
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] req.path,req.ds); ---> var <--- parent=(req.path.length>0
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ,req.path):null); ---> var <--- open=(parent!==null?parent.children
[yuicompressor]
[yuicompressor] [WARNING] Using 'eval' is not recommended. Moreover, using 'eval' reduces the level of compression!
[yuicompressor] req.ds.treeble_config.totalRecordsExpr){ ---> eval <--- ("this._topNodeTotal=e.response"+req.ds.treeble_config.totalRecordsExpr
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] var depth=path.length;for( ---> var <--- i=0;i var <--- i=0;i var <--- response={meta:{}};Y
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] ;i var <--- slice=this._slices[i];var
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] slice=this._slices[i]; ---> var <--- req=findRequest.call(this,slice.
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .error("Failed to find request for a slice");continue;} ---> var <--- j=slice.start-req.start;
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] =slice.start-req.start; ---> var <--- data=req.data.slice(j,
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .results.concat(data);} ---> var <--- rootDS=this.get("root");if
[yuicompressor]
[yuicompressor] [WARNING] Using 'eval' is not recommended. Moreover, using 'eval' reduces the level of compression!
[yuicompressor] if(rootDS.treeble_config.totalRecordsExpr){ ---> eval <--- ("response"+rootDS.treeble_config.totalRecordsExpr+"="
[yuicompressor]
[yuicompressor] [WARNING] Using 'eval' is not recommended. Moreover, using 'eval' reduces the level of compression!
[yuicompressor] if(rootDS.treeble_config.totalRecordsReturnExpr){ ---> eval <--- ("response"+rootDS.treeble_config.totalRecordsReturnExpr+"="
[yuicompressor]
[yuicompressor] [WARNING] Using 'eval' is not recommended. Moreover, using 'eval' reduces the level of compression!
[yuicompressor] node.ds.treeble_config.totalRecordsExpr){ ---> eval <--- ("node.childTotal=e.response"+node.ds.treeble_config.totalRecordsExpr
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] length){returnfalse;}for( ---> var <--- i=0;i var <--- k=k1[i];if(k
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .error("TreebleDataSource root DataSource requires schema.resultFields because treeble_config.childNodesKey was not specified.");}for( ---> var <--- i=0;i var <--- i=0;i var <--- node=searchOpen.call(this,list,
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] var list=this._open;for( ---> var <--- i=0;i var <--- node=searchOpen.call(this,list,
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] else{type="Local";}}} ---> var <--- src=oData.dataType?oData.liveData:
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] .dataType?oData.liveData:oData; ---> var <--- treeble_config=this.get("host").treeble_config
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] window[src]:src;}} ---> var <--- ds=new Y.DataSource[type](
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] this.datasource.get("datasource"); ---> var <--- key=ds.get("root").treeble_config
[yuicompressor]
[yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
[yuicompressor] (o.data[key]){ ---> var <--- path=o.data._yui_node_path;o.
[yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/gallery-treeble-min.js
lint:
[echo] Using Rhino. Install nodejs to improve jslint speed, or skip with -Dlint.skip=true
[java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-treeble/build_tmp/gallery-treeble.js
[java]
[java]
[java] 295, 24: 'getVisibleSlicesPgAll' is not defined.
[java] this._slices = getVisibleSlicesPgAll(req.startIndex, req.resultCount,
[java]
[java] 300, 24: 'getVisibleSlicesPgTop' is not defined.
[java] this._slices = getVisibleSlicesPgTop(req.startIndex, req.resultCount,
[java]
[java] 304, 5: 'requestSlices' is not defined.
[java] requestSlices.call(this, req);
[java]
[java] 307, 5: 'checkFinished' is not defined.
[java] checkFinished.call(this);
[java]
[java] 498, 14: 'info' is already defined.
[java] var info =
[java]
[java] 513, 21: 'findRequest' is not defined.
[java] var req = findRequest.call(this, ds);
[java]
[java] 555, 15: 'i' is already defined.
[java] for (var i=0; i
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info