Page 75 of 84 FirstFirst ... 25657374757677 ... LastLast
Results 741 to 750 of 837

Thread: [Beta 1] Saki's FileTree for Ext 2.0

  1. #741
    Ext User
    Join Date
    Nov 2007
    Posts
    297
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by jsakalos View Post
    Which one of those three (form && form.dom && form.dom.target)is falsie?

    It could be some timing or a changed sequence of something in 2.3
    form.dom.target is an empty string, so it returns false. It's an empty string because it's overwritten by the following code (buf.target is empty):

    Code:
    form.target = buf.target;
    as soon as the form has been submitted. So, when you try to stop it, you don't know the ID of the hidden iframe.

    What can I do?

  2. #742
    Ext User
    Join Date
    Nov 2007
    Posts
    297
    Vote Rating
    0
      0  

    Default

    It also seems that version "3.0 final" has this problem (only the "3.0 RC1" did not have the problem).

  3. #743
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    407
      0  

    Default

    I haven't ported it to 3.x yet but I can take a brief look to find out why it's empty hopefully this weekend.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  4. #744
    Ext User
    Join Date
    Nov 2007
    Posts
    297
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by jsakalos View Post
    I haven't ported it to 3.x yet but I can take a brief look to find out why it's empty hopefully this weekend.
    Thank you very much. When you solve it for 3.0, I think it will be automatically solved also for 2.3.

  5. #745
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    534
    Vote Rating
    0
      0  

    Default

    @Saki--Do you have any thoughts on when you might port to Ext 3.x? Tnx!

  6. #746
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    407
      0  

    Default

    I've started re-writing (not porting ) my main project to support Ext 3 and FileTreePanel is a part of it. However, I must still keep old version (Ext 2.x + Ext 1.x in iframe) running and I still need to add some features and fix bugs - this is top priority.

    So I cannot say or promise a date; the all I can say now is: "I'm working on it."
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  7. #747
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    646
    Vote Rating
    12
      0  

    Default Replaced BrowseButton with the FileUploadField

    After following the changes made by other users for Ext 3 compatibility, I revised the FileTreePanel to utilize the Ext.ux.form.FileUploadField extension instead. Below are the changes necessary thus far.

    In the UploadPanel.js...
    * replace
    Code:
    		var addCfg = {
    			 xtype:'browsebutton'
    			,text:this.addText + '...'
    			,iconCls:this.addIconCls
    			,scope:this
    			,handler:this.onAddFile
    		};
    * with
    Code:
          var addCfg = {
                buttonCfg: {
                    hideLabel: true
                    ,iconCls:this.addIconCls
                }
                ,buttonText:this.addText + '...'
                ,buttonOnly: true //no textfield
                ,listeners: { 
                    fileselected: {fn:this.onAddFile, scope:this}
                }
                ,style: { display: 'none' } //IE hack - can't use visibility b/c IE buffers the space
                ,xtype:'fileuploadfield'
    	};
    * replace
    Code:
    	/**
    	 * called when file is added - adds file to store
    	 * @private
    	 * @param {Ext.ux.BrowseButton}
    	 */
    	,onAddFile:function(bb) {
    		if(true !== this.eventsSuspended && false === this.fireEvent('beforefileadd', this, bb.getInputFile())) {
    			return;
    		}
    		var inp = bb.detachInputFile();
    		inp.addClass('x-hidden');
    * with
    Code:
    	/**
    	 * called when file is added - adds file to store
    	 * @private
         * @param {Ext.form.FileUploadField} fu
         * @param {String} fileName 
    	 */
        ,onAddFile:function(fu,fileName) {
            var inp = fu.getFileInput();
    		if(true !== this.eventsSuspended && false === this.fireEvent('beforefileadd', this, inp)) {
    			return;
    		}
            fu.detachFileInput();
    Instead of adding this code to the onAddFile method per the recommendation of @ Bobrovnik, add it to the syncShadow method after the call to show.
    Code:
    this.ownerCt.doLayout();
    It is also necessary to make the following changes to the FileUploadField.js
    * New methods:
    Code:
        /**
         * Detaches the input file without clearing the value so that it can be used for 
         * other purposes (e.g. uploading).
         * 
         * The returned input file has all listeners applied to it by this class removed.
         * @return {Ext.Element} the detached input file element.
         */    
        detachFileInput : function(){
            var result = this.fileInput;
            
            this.fileInput.removeAllListeners();
            this.fileInput = null;        
            this.id = Ext.id(); //avoid dom conflicts
            this.createFileInput();
            this.bindListeners();
            
            return result;
        },
        
        /**
         * @return {Ext.Element} the input file element
         */
        getFileInput: function(){
            return this.fileInput;
        },
    * Change this line so the concatenation is disabled. Otherwise the icon will be overlayed with the text.
    Code:
    cls: 'x-form-file-btn' //+ (btnCfg.iconCls ? ' x-btn-icon' : '')
    Thanks again Saki !!!

  8. #748
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    407
      0  

    Default

    Thank you very much.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  9. #749
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    646
    Vote Rating
    12
      0  

    Default

    I encountered an issue in Chrome when trying to upload because it fails when trying to encode the form during the record.set operation. I think IE also bombs during the encode. I have reported this to ext (http://www.extjs.com/forum/showthread.php?p=395726)

    In the meantime, below are my (hack) changes to the FileUploader.js that address both the IE & Chrome issues.

    * Replace:
    Code:
    record.set('form', form);
    * With:
    Code:
    record.form = form;
    * Replace:
    Code:
    record.set('form', null);
    * With:
    Code:
    delete record.form;
    * Replace:
    Code:
    var form = record.get('form');
    * With:
    Code:
    var form = record.form;
    If anyone has a better suggestion, please feel free.

  10. #750
    Ext JS Premium Member
    Join Date
    Aug 2008
    Posts
    93
    Vote Rating
    0
      0  

    Default

    Thank you zombeerose,
    your changes got at least the Add-Button working within ExtJs 3.0.

    But I don't understand your extension of methods to FileUploadField.js
    I don't have the functions
    createFileInput();
    bindListeners();

    which you are calling in your detachFileInput method.
    Am I missing something ?

    TIA Stephan

Page 75 of 84 FirstFirst ... 25657374757677 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •