• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    Build Tag: gallery-2012.01.11-21-03

    Return to DataTable Footer Plugin

    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.01.11-21-03'
    }).use("datatable-scroll", "dataschema", "datatype", "gallery-datatable-footer", function(Y) {
         var fmtTotal = function(o) {
    		return Y.DataType.Number.format( o.value, {prefix:"$ ", thousandsSeparator:",", decimalPlaces:2} );
    	}
     
         var jsCustomers = [ 
    		{ cust_id:1, cust_name:"George Simon", location:"New York", status:1, no_orders:3, ord_total:8546.8 },
    		{ cust_id:2, cust_name:"Angela Marconi", location:"Florence, Italy", status:1, no_orders:1, ord_total:8733.04 },
    		{ cust_id:3, cust_name:"Nancy Keeler", location:"Chicago", status:2, no_orders:2, ord_total:1784.32 },
    		{ cust_id:4, cust_name:"Mickey Gates", location:"Seattle", status:1, no_orders:7, ord_total:7209.31 },
    		{ cust_id:5, cust_name:"Wuchan Hsu", location:"Beijing", status:3, no_orders:0, ord_total:0 },
    		{ cust_id:6, cust_name:"Dmitri Zaganuv", location:"Russia", status:2, no_orders:1, ord_total:907.10 } 
    	];
     
        var cols = [ 
    		{ key:"cust_id", label:"Cust ID" }, 
    		{ key:"cust_name", label:"Customer" },
    		{ key:"location", label:"Location" },
    		{ key:"no_orders", label:"No. Orders" },
    		{ key:"ord_total", label:"Order Total", formatter:fmtTotal } 
    	 ];
     
        var dt = new Y.DataTable.Base( { 
                columnset: cols,
    	    recordset: jsCustomers
    	}).plug( Y.Plugin.DataTableScroll, { height:'7.2em' } );
     
        dt.plug( Y.Plugin.DataTableFooter, {
              fixed : true,
              heading : { colspan : 3,  label:"TOTALS ( {ROW_COUNT} Customers) :", className:"align-right" },
              col_keys : [
                  { key:"no_orders",  calc:"{SUM}" },
                  { key:"ord_total",  calc:"{SUM}"}
             ]
         } );
     
    	dt.render("#dtable");
    });

    Build Output

    /home/y/libexec/ant/bin/ant all
    Buildfile: build.xml
         [echo] Starting Build For gallery-datatable-footer
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-datatable-footer
         [echo]     component.basefilename : gallery-datatable-footer
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer/assets
    
    clean:
    
    init:
        [mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
         [echo] Starting Build For gallery-datatable-footer
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-datatable-footer
         [echo]     component.basefilename : gallery-datatable-footer
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer/assets
    
    -lint-server:
         [echo] Starting Build For gallery-datatable-footer
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-datatable-footer
         [echo]     component.basefilename : gallery-datatable-footer
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-datatable-footer/assets
    
    -node:
         [echo] For faster builds, install Node.js.
    
    -concatdebug:
         [echo] Concatenating
         [echo]     Source Files : datatable-footer.js
         [echo]     In Source Dir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/js
         [echo]     To : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/gallery-datatable-footer-debug.js
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/ant
       [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/ant
    
    -registerdebug:
         [echo] Wrapping /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/gallery-datatable-footer-debug.js in YUI.add module
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
    
    -prependdebug:
    
    -appenddebug:
    
    builddebug:
    
    -createcore:
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp
    
    -loggerregex:
         [echo] Replacing Logger Statements in /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/gallery-datatable-footer.js
    
    buildcore:
    
    -rollupjs:
    
    -concatskins:
         [echo] Concating Skins
         [echo] Concating Skin files for /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/assets/skins/sam :: sam
         [echo] Concatenating
         [echo]     Source Files : gallery-datatable-footer-core.css, skins/sam/gallery-datatable-footer-skin.css
         [echo]     In Source Dir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/assets
         [echo]     To : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/assets/skins/sam/gallery-datatable-footer.css
         [copy] Copying 2 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/ant
       [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/ant
         [echo] Adding CSS Registration Code to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/assets/skins/sam/gallery-datatable-footer.css
    [yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/assets/skins/sam/gallery-datatable-footer.css
    [yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/assets/skins/sam/gallery-datatable-footer.css
    
    -buildskins:
         [echo] Fixing CRLF for Skin files for /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/assets/skins/sam :: sam
    
    -rollupcss:
    
    buildskins:
    
    -buildlangs:
    
    -rolluplangs:
    
    buildlangs:
    
    build:
    
    minify:
    [yuicompressor] Compressing /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/gallery-datatable-footer.js
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor]  var  <--- ckey=ckeys[j].key,tdel
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] ,tdel=null,tdliner=null; ---> var  <--- csKeyIndex=this._rtnColumnSetKeyIndex(CS,ckey)
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] );if(csKeyIndex!==false){ ---> var  <--- indx=csKeyIndex-this.get("heading.colspan")
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] tdliner=tdel.one("div"); ---> var  <--- oValue=parseFloat(this._doRecordSetMath(ckeys[
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] j])),rtnValue=null; ---> var  <--- fmtFunction=ckeys[j].formatter||CS
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] .addClass(hdg.className);} ---> var  <--- j=(hdg.colspan)?hdg.
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor]  var  <--- ckey=CS[j].get("key"
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] [j].get("key"); ---> var  <--- tdel=this._tfootTrNode.appendChild(YCreate(
    [yuicompressor] 
    [yuicompressor] [WARNING] Try to use a single 'var' statement per scope.
    [yuicompressor] .appendChild(YCreate("")); ---> var  <--- tdliner=tdel.appendChild(YCreate("
    ") [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] );tdliner.addClass(CLASS_LINER); ---> var <--- index_foot_cols=this._indexOfObj(ckeys,"key", [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] ,cstring){var rtnValue=null; ---> var <--- dt=this.get(HOST),CS [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] .Lang.isObject(col)){ ---> var <--- ckey=col.key,calc=col. [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] =BIG,nitem=0;for( ---> var <--- i=0;i var <--- rec=RS.getRecord(i),rdata [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] )){tcellWidth=0;for( ---> var <--- i=0;i var <--- fudge=1;tcellWidth+=fudge*(thColspan [yuicompressor] [yuicompressor] [WARNING] Try to use a single 'var' statement per scope. [yuicompressor] setStyle("width",tcellWidth+"px"); ---> var <--- i=thColspan;for(;i i <--- =thColspan;for(;i var <--- indx=i-thColspan+1;tcell= [yuicompressor] [yuicompressor] [WARNING] The symbol YNode is declared but is apparently never used. [yuicompressor] This code can probably be written in a more compact way. [yuicompressor] ("gallery-datatable-footer",function(Y){var ---> YNode <--- =Y.Node,YLang=Y.Lang [yuicompressor] [yuicompressor] [WARNING] The symbol FTR is declared but is apparently never used. [yuicompressor] This code can probably be written in a more compact way. [yuicompressor] ,DTRS="recordset",DTCS="columnset", ---> FTR <--- ="dtFooter",YgetClassName=Y.ClassNameManager.getClassName [yuicompressor] [yuicompressor] [WARNING] The symbol RS is declared but is apparently never used. [yuicompressor] This code can probably be written in a more compact way. [yuicompressor] dt.get(DTCS).keys, ---> RS <--- =dt.get(DTRS),hdg= [yuicompressor] Compressed to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-datatable-footer/build_tmp/gallery-datatable-footer-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-datatable-footer/build_tmp/gallery-datatable-footer-debug.js [java] [java] [java] 12, 3: Mixed spaces and tabs. [java] BIG = 1.0e15, [java] [java] 40, 9: Mixed spaces and tabs. [java] NAME : 'dataTableFooter', [java] [java] 41, 7: Mixed spaces and tabs. [java] NS : 'footer', // name attached to DataTable as property, also as dt._plugins.footer [java] [java] 64, 1: Mixed spaces and tabs. [java] /** [java] [java] 79, 1: Mixed spaces and tabs. [java] /** [java] [java] 206, 17: 'j' is not defined. [java] for(j=0; j" ); [java] [java] 350, 13: 'tfdiv' is not defined. [java] tfdiv.addClass( CLASS_LINER ); [java] [java] 353, 17: Expected '{' and instead saw 'this'. [java] this._tfootThNode.setAttribute('colSpan', hdg.colspan ); [java] [java] 356, 17: Expected '{' and instead saw 'tfdiv'. [java] tfdiv.addClass( hdg.className ); [java] [java] 356, 17: 'tfdiv' is not defined. [java] tfdiv.addClass( hdg.className ); [java] [java] 376, 25: Expected '{' and instead saw 'tdliner'. [java] tdliner.addClass( ckeys[index_foot_cols].className ); [java] [java] 380, 8: Mixed spaces and tabs. [java] return this._tfootNode; [java] [java] 425, 30: A trailing decimal point can be confused with a dot '0.'. [java] rsum = 0., [java] [java] 440, 57: Expected '{' and instead saw 'nitem'. [java] if ( rdata[ckey] !== null ) nitem++; [java] [java] 486, 17: Expected '{' and instead saw 'if'. [java] if ( colset[i].get('key') === key_value ) return i; [java] [java] 486, 59: Expected '{' and instead saw 'return'. [java] if ( colset[i].get('key') === key_value ) return i; [java] [java] 502, 17: Expected '{' and instead saw 'if'. [java] if ( arr[i][key] === key_value ) return i; [java] [java] 502, 50: Expected '{' and instead saw 'return'. [java] if ( arr[i][key] === key_value ) return i; [java] [java] 516, 5: Mixed spaces and tabs. [java] var dt = this.get( HOST ), [java] [java] 517, 5: Mixed spaces and tabs. [java] dt_headerTable = dt.get("contentBox").one('.'+CLASS_HEADER), [java] [java] 518, 5: Mixed spaces and tabs. [java] dt_headerCells = dt_headerTable.one("tr").all('.'+CLASS_LINER), // THEAD liner DIVs [java] [java] 519, 5: Mixed spaces and tabs. [java] footerCells = this._tfootTrNode.all('.'+CLASS_LINER), // TFOOT liner DIVs [java] [java] 522, 13: Mixed spaces and tabs. [java] widthProperty = (YUA.ie) ? 'offsetWidth' : 'clientWidth', [java] [java] 523, 13: Mixed spaces and tabs. [java] tcell = null, [java] [java] 524, 13: Mixed spaces and tabs. [java] tcellWidth = 0., [java] [java] 524, 33: A trailing decimal point can be confused with a dot '0.'. [java] tcellWidth = 0., [java] [java] 525, 13: Mixed spaces and tabs. [java] thColspan = this.get("heading.colspan"); [java] [java] 532, 32: A trailing decimal point can be confused with a dot '0.'. [java] tcellWidth = 0.; [java] [java] 534, 21: Expected '{' and instead saw 'tcellWidth'. [java] tcellWidth += dt_headerCells.item(i).get(widthProperty); [java] [java] 551, 9: Mixed spaces and tabs. [java] var i = thColspan; [java] [java] 551, 23: 'i' is already defined. [java] var i = thColspan; [java] [java] 552, 9: Mixed spaces and tabs. [java] for(;i" ); [java] [java] 350, 13: 'tfdiv' is not defined. [java] tfdiv.addClass( CLASS_LINER ); [java] [java] 353, 17: Expected '{' and instead saw 'this'. [java] this._tfootThNode.setAttribute('colSpan', hdg.colspan ); [java] [java] 356, 17: Expected '{' and instead saw 'tfdiv'. [java] tfdiv.addClass( hdg.className ); [java] [java] 356, 17: 'tfdiv' is not defined. [java] tfdiv.addClass( hdg.className ); [java] [java] 376, 25: Expected '{' and instead saw 'tdliner'. [java] tdliner.addClass( ckeys[index_foot_cols].className ); [java] [java] 380, 8: Mixed spaces and tabs. [java] return this._tfootNode; [java] [java] 425, 30: A trailing decimal point can be confused with a dot '0.'. [java] rsum = 0., [java] [java] 440, 57: Expected '{' and instead saw 'nitem'. [java] if ( rdata[ckey] !== null ) nitem++; [java] [java] 486, 17: Expected '{' and instead saw 'if'. [java] if ( colset[i].get('key') === key_value ) return i; [java] [java] 486, 59: Expected '{' and instead saw 'return'. [java] if ( colset[i].get('key') === key_value ) return i; [java] [java] 502, 17: Expected '{' and instead saw 'if'. [java] if ( arr[i][key] === key_value ) return i; [java] [java] 502, 50: Expected '{' and instead saw 'return'. [java] if ( arr[i][key] === key_value ) return i; [java] [java] 516, 5: Mixed spaces and tabs. [java] var dt = this.get( HOST ), [java] [java] 517, 5: Mixed spaces and tabs. [java] dt_headerTable = dt.get("contentBox").one('.'+CLASS_HEADER), [java] [java] 518, 5: Mixed spaces and tabs. [java] dt_headerCells = dt_headerTable.one("tr").all('.'+CLASS_LINER), // THEAD liner DIVs [java] [java] 519, 5: Mixed spaces and tabs. [java] footerCells = this._tfootTrNode.all('.'+CLASS_LINER), // TFOOT liner DIVs [java] [java] 522, 13: Mixed spaces and tabs. [java] widthProperty = (YUA.ie) ? 'offsetWidth' : 'clientWidth', [java] [java] 523, 13: Mixed spaces and tabs. [java] tcell = null, [java] [java] 524, 13: Mixed spaces and tabs. [java] tcellWidth = 0., [java] [java] 524, 33: A trailing decimal point can be confused with a dot '0.'. [java] tcellWidth = 0., [java] [java] 525, 13: Mixed spaces and tabs. [java] thColspan = this.get("heading.colspan"); [java] [java] 532, 32: A trailing decimal point can be confused with a dot '0.'. [java] tcellWidth = 0.; [java] [java] 534, 21: Expected '{' and instead saw 'tcellWidth'. [java] tcellWidth += dt_headerCells.item(i).get(widthProperty); [java] [java] 551, 9: Mixed spaces and tabs. [java] var i = thColspan; [java] [java] 551, 23: 'i' is already defined. [java] var i = thColspan; [java] [java] 552, 9: Mixed spaces and tabs. [java] for(;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