dojox/form/uploader/FileList.js

  • Provides:

    • dojox.form.uploader.FileList
  • Requires:

    • dojox.form.uploader.Base in common
  • dojox.form.uploader.FileList

    • type
      Function
    • chains:
      • dojox.form.uploader.Base: (prototype)
      • dojox.form.uploader.Base: (call)
    • summary
  • dojox.form.uploader.FileList.uploaderId

    • summary
  • dojox.form.uploader.FileList.uploader

    • type
      dojox.form.Uploader
    • summary
      The dojox.form.Uploader to connect to. Use either this property of unploaderId. This
      property is populated if uploaderId is used.
  • dojox.form.uploader.FileList.headerIndex

    • type
      String
    • summary
      The label for the index column.
  • dojox.form.uploader.FileList.headerType

    • type
      String
    • summary
      The label for the file type column.
  • dojox.form.uploader.FileList.headerFilename

    • type
      String
    • summary
      The label for the file name column.
  • dojox.form.uploader.FileList.headerFilesize

    • type
      String
    • summary
      The label for the file size column.
  • dojox.form.uploader.FileList._upCheckCnt

    • summary
  • dojox.form.uploader.FileList.rowAmt

    • summary
  • dojox.form.uploader.FileList.templateString

    • summary
  • dojox.form.uploader.FileList.postCreate

    • type
      Function
    • source: [view]
        this.setUploader();
        this.hideProgress();
    • summary
  • dojox.form.uploader.FileList.reset

    • type
      Function
    • source: [view]
        for(var i=0;i   this.listNode.deleteRow(0);
        }
        this.rowAmt = 0;
    • summary
      Clears all rows of items. Happens automatically if Uploader is reset, but you
      could call this directly.
  • dojox.form.uploader.FileList.setUploader

    • type
      Function
    • source: [view]
        if(!this.uploaderId && !this.uploader){
         console.warn("uploaderId not passed to UploaderFileList");
        }else if(this.uploaderId && !this.uploader){
         this.uploader = dijit.byId(this.uploaderId);
        }else if(this._upCheckCnt>4){
         console.warn("uploader not found for ID ", this.uploaderId);
         return;
        }
        if(this.uploader){
         this.connect(this.uploader, "onChange", "_onUploaderChange");
         this.connect(this.uploader, "reset", "reset");
         this.connect(this.uploader, "onBegin", function(){
          this.showProgress(true);
         });
         this.connect(this.uploader, "onProgress", "_progress");
         this.connect(this.uploader, "onComplete", function(){
          setTimeout(dojo.hitch(this, function(){
           this.hideProgress(true);
          }), 1250);
         });
        }else{
         this._upCheckCnt++;
         setTimeout(dojo.hitch(this, "setUploader"), 250);
        }
    • summary
      Connects to the Uploader based on the uploader or the uploaderId properties.
  • dojox.form.uploader.FileList.hideProgress

    • type
      Function
    • parameters:
      • animate: (typeof Boolean)
    • source: [view]
        var o = animate ? {
         ani:true,
         endDisp:"none",
         beg:15,
         end:0
        } : {
         endDisp:"none",
         ani:false
        };
        this._hideShowProgress(o);
    • summary
  • dojox.form.uploader.FileList.showProgress

    • type
      Function
    • parameters:
      • animate: (typeof Boolean)
    • source: [view]
        var o = animate ? {
         ani:true,
         endDisp:"block",
         beg:0,
         end:15
        } : {
         endDisp:"block",
         ani:false
        };
        this._hideShowProgress(o);
    • summary
  • dojox.form.uploader.FileList._progress

    • type
      Function
    • parameters:
      • customEvent: (typeof Object)
    • source: [view]
        this.percentTextNode.innerHTML = customEvent.percent;
        dojo.style(this.percentBarNode, "width", customEvent.percent);
    • summary
  • dojox.form.uploader.FileList._hideShowProgress

    • type
      Function
    • parameters:
      • o: (typeof )
    • source: [view]
        var node = this.progressNode;
        var onEnd = function(){
         dojo.style(node, "display", o.endDisp);
        }
        if(o.ani){
         dojo.style(node, "display", "block");
         dojo.animateProperty({
          node: node,
          properties:{
           height:{
            start:o.beg,
            end:o.end,
            units:"px"
           }
          },
          onEnd:onEnd
         }).play();
        }else{
         onEnd();
        }
    • summary
  • dojox.form.uploader.FileList._onUploaderChange

    • type
      Function
    • parameters:
      • fileArray: (typeof )
    • source: [view]
        this.reset();
        dojo.forEach(fileArray, function(f, i){
         this._addRow(i+1, this.getFileType(f.name), f.name, f.size);
        }, this)
    • summary
  • dojox.form.uploader.FileList._addRow

    • type
      Function
    • parameters:
      • index: (typeof )
      • type: (typeof )
      • name: (typeof )
      • size: (typeof )
    • source: [view]
        var c, r = this.listNode.insertRow(-1);
        c = r.insertCell(-1);
        dojo.addClass(c, "dojoxUploaderIndex");
        c.innerHTML = index;


        c = r.insertCell(-1);
        dojo.addClass(c, "dojoxUploaderIcon");
        c.innerHTML = type;


        c = r.insertCell(-1);
        dojo.addClass(c, "dojoxUploaderFileName");
        c.innerHTML = name;
        c = r.insertCell(-1);
        dojo.addClass(c, "dojoxUploaderSize");
        c.innerHTML = this.convertBytes(size).value;


        this.rowAmt++;
    • summary
  • dojox.form.uploader.FileList.percentTextNode.innerHTML

    • summary
  • dojox.form.uploader

    • type
      Object
    • summary
  • dojox.form

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary