1. #61
    Ext User
    Join Date
    Sep 2007
    Posts
    11
    Vote Rating
    0
    southside is on a distinguished road

      0  

    Default


    Hi Maxim;

    Have you managed to implement a multiple file or folder select instead of single file select before uploading?

    SC

  2. #62
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    78
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by Animal View Post
    You can't return JSON from a file upload. The response is loaded into an iframe as HTML. The response text is scraped as the innerHTML of the document body.

    That probably won't be valid JSON.

    XML is returned correctly though.
    That's not true. I've done a json return from a file upload from a generic ext.form.form

  3. #63
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    Quote Originally Posted by milanz View Post
    Just found a small logic fix. Seems that the permitted_extensions does not take case into consideration. So 'jpg' is not the same as 'JPG' depending how it is named on the user's machine. Simply solved it by defining my allowed extensions in lower case and added the "toLowerCase"
    Thanks for report milanz, I'll patch the extension according your suggestion.

    Quote Originally Posted by southside
    Have you managed to implement a multiple file or folder select instead of single file select before uploading?
    No, this can be implemented using helper flash object (SWFUpload for example), but flash is unstable under Mozilla/Linux configuration as jsakalos has reported in upload form thread, so I don't want to stick with it.
    Use the force - read the source.

  4. #64
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    78
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by MaximGB View Post
    Thanks for report milanz, I'll patch the extension according your suggestion.


    No, this can be implemented using helper flash object (SWFUpload for example), but flash is unstable under Mozilla/Linux configuration as jsakalos has reported in upload form thread, so I don't want to stick with it.
    Weirdly, i can select multiple files with OS X + FF2x, but it only really chooses the first of the list.

  5. #65

    Default Calling with another (formatted) button?

    Calling with another (formatted) button?


    Alright, I got it working. Thank you! It's really beautiful.

    I want to show the dialog with another button, created outside of the function. The reason is I need it styled, and when I apply 'cls' to the show-button, I get the ExtJS button inside of my formatting (rather than the full format of the button).

    I am somewhat of a noob (to ExtJS), and I can't figure out how to access that dialog with a variable. I get all sorts of 'not defined' errors.

    Simply put, please fill in the blank:

    <input type="button" id="myOwnDialogShowButton" onClick="???">

    Thank you!

    *** UPDATE: SOLUTION ***

    Alright, for all of you noobs out there like me, here is how you do it:

    1. Remove the 'var' keyword in front of 'dialog' in the first line of the function. This allows the variable 'dialog' to be accessed globally (from anywhere on the page).

    2. In the init function at the bottom, put only this item: getDialog(); This will create the dialog so you can refer to it. (The example creates the dialog when it is called.)

    3. In your button (or function), call dialog.show(); and you're set!). Here is the full code as I adjusted it:

    Code:
    	var UploadDialogController = function()
    	{
    	  dialog = null;
    	  var button = null;
    
    	  function getDialog()
    	  {
    		if (!dialog) {
    		  dialog = new Ext.ux.UploadDialog.Dialog('imageUploadDialog', {
    			autoCreate: true,
    			closable: true,
    			collapsible: false,
    			draggable: true,
    			minWidth: 400,
    			minHeight: 200,
    			width: 400,
    			height: 200,
    			proxyDrag: true,
    			resizable: true,
    			constraintoviewport: true,
    			permitted_extensions: ['gif','jpg','jpeg','png'],
    			title: 'Image upload - Click the \'Add\' Button',
    			url: 'ajaxForms/uploadImage.php',
    			reset_on_hide: false,
    			allow_close_on_upload: true,
    			upload_autostart: true
    		  });
    		  //dialog.show('show-button'); // if you want it to open with the page launch
    		  dialog.on('uploadsuccess', onUploadSuccess);
    		}
    		return dialog;
    	  }
    
    	  function onUploadSuccess(dialog, filename, resp_data)
    	  {
    		// do this upon success
    	  }
    
    	  return {
    		init : function()
    		{
    		  getDialog();
    		}
    	  }
    	}();
    Maxim, first off - do you see any issues with the modifications above?

    Secondly, the hideLoadingMask() function was throwing errors to me, so I removed it. Can you explain what that does?

    Thanks again!!

  6. #66
    Ext User DigitalSkyline's Avatar
    Join Date
    Apr 2007
    Location
    Rochester, MI
    Posts
    461
    Vote Rating
    1
    DigitalSkyline is on a distinguished road

      0  

    Default


    Any one get this working with Ext2 ?

    I've only gone live with 1 app and I'd like to use 2.0 for future apps... No idea if any of these plugins will work with 2.0 so far its been a hellova learning curve. :/

    Wonder how long it will take for people to adapt ...

  7. #67
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    Maxim, first off - do you see any issues with the modifications above?

    Secondly, the hideLoadingMask() function was throwing errors to me, so I removed it. Can you explain what that does?
    1. Polluting the global scope is actually a bad idea, with var the dialog variable becomes private for UploadDialogController.

    2. The UploadDialogController has private and public interfaces, the public interface is declared in the return {} statement. And if you have to call the getDialog() function from outside of the UploadDialogController scope than you should make it public:
    Code:
      return {
        init : function()
        {
           ...
        },
    
        getDialog : getDialog
      }
    The code marked with bold will expose getDialog method to the outer scope and you'll be able to call it in your onclick handler:
    Code:
    <input type="button" id="myOwnDialogShowButton" onClick="UploadDialogController.getDialog().show(this)">
    3. The hideLoadingMask() method is removing the page mask - the one with blue background and "Loading..." message in the demo, it's called after page is loaded.
    Use the force - read the source.

  8. #68
    Sencha Premium Member MaximGB's Avatar
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    495
    Vote Rating
    4
    MaximGB is on a distinguished road

      0  

    Default


    Quote Originally Posted by DigitalSkyline View Post
    Any one get this working with Ext2 ?

    I've only gone live with 1 app and I'd like to use 2.0 for future apps... No idea if any of these plugins will work with 2.0 so far its been a hellova learning curve. :/

    Wonder how long it will take for people to adapt ...
    I have a private message from Valera were he told me that he've ported this extension for Ext 2.0
    Use the force - read the source.

  9. #69
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    78
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Thank you very much for your contribution. I used this extension to finish a project. You really should setup a donation account. I can be first in line!


    I've posted about this work and linked to your site:
    http://tdg-i.com/10/lighthouseproper...grade-complete


  10. #70
    Sencha User
    Join Date
    Sep 2007
    Posts
    73
    Vote Rating
    0
    hga77 is on a distinguished road

      0  

    Default


    Hi MaximGB,

    I want to use your uploader. I downloaded the zip.

    Can you please explain where i need to put those folders/files like the 2 folders "ProgressBar" and "UploadDialog". And how can I call this component.

    Sorry if I am asking a very basic question, but I am new to EXT.

    Thanks