PDA

View Full Version : [Beta 1] Saki's FileTree for Ext 2.0



Pages : 1 [2] 3 4

jsakalos
7 May 2008, 11:32 AM
Take a look at the function onContextClick, that should be the only one you need to override.

silcreval
9 May 2008, 9:24 AM
Firstly - thanks for a fantastic plugin!

I've managed to get the FileTree working with a PHP backend, all the
various features are working OK. I can upload files, rename them,
create folders, delete, etc, however, I'm just getting a bit stuck
on the download side.

Just as a simple start, I'd like to download a file and display it in a window,
the file could just be text say.

I can see that on using Open->Download the FileTree POSTs with
cmd = 'download' and path='name of file', I didnt get any response
with Open though.

however, not sure what I should do at this point. Do I return the file
in JSON format, etc. How do I overload the 'open' and 'download'
etc events to say open a simple window with the file contents. I'd
prefer to do this without changing URL.

If you could give me a start on that it would be great.

jsakalos
9 May 2008, 9:41 AM
You should return plain file data, not json encoded, with proper headers (content-disposition).

silcreval
9 May 2008, 10:05 AM
I'd like to return the data in AJAX style though, for example it would
be nice to open data in a separate window, perhaps a splitter on the
TreePanel window.

However when I click on Open in the menu, I dont get a message passed
through to the server just the request for the URL. I'd like to change
this to a 'getfile' type command, and return the data in JSON format
say.

Thanks

Ian.

bomka
9 May 2008, 12:46 PM
Saki, is there a reason why I can't force the initial request from FileTreePanel to be a 'get'? I am passing in method:'get', yet when I look in FireBug I see that it sends a POST (i guess that's default). is there anything else I need to do? thanks a lot.

jsakalos
10 May 2008, 2:54 AM
I'd like to return the data in AJAX style though, for example it would
be nice to open data in a separate window, perhaps a splitter on the
TreePanel window.

However when I click on Open in the menu, I dont get a message passed
through to the server just the request for the URL. I'd like to change
this to a 'getfile' type command, and return the data in JSON format
say.

Thanks

Ian.
If you want a different open behavior you need to override openNode function of FileTreePanel.

jsakalos
10 May 2008, 2:56 AM
Saki, is there a reason why I can't force the initial request from FileTreePanel to be a 'get'? I am passing in method:'get', yet when I look in FireBug I see that it sends a POST (i guess that's default). is there anything else I need to do? thanks a lot.
Try to put there GET in uppercase letters. However, I recommend against using get method.

bomka
10 May 2008, 4:15 AM
Saki, is there a specific reason why you prefer "POST'? I am using Ruby on Rails and wish to stick to the 7 actions that REST provides (same URL with GET gives me a index action, wheereas with POST gives me create action). Anyway, I will try the capitalized 'GET' and let you know. thanks.

jsakalos
10 May 2008, 5:42 AM
GET size is limited and it is insecure.

silcreval
10 May 2008, 6:43 AM
Hi Saki,

Thanks. I'm on a fairly steep learning curve here, I've got to grips somewhat with
ExtJs, but message/action passing still escapes me.

Could you show me how I would override the openNode behaviour. Do I subclass
FileTreePanel, and add a 'listener'?

I wanted to add some buttons to a toolbar which talked to the FileTreePanel, but
I had to call functions directly in the FileTreePanel to get it to work.

Thanks.

jsakalos
10 May 2008, 10:02 AM
To pass the new openNode function as config option should be enough. Such as:


var tp = new Ext.ux.FileTreePanel({
openNode:function(...) {
// your code here
}
, // the rest of config
});

bomka
10 May 2008, 11:41 AM
Try to put there GET in uppercase letters. However, I recommend against using get method.

I tried GET in both lower and upper case. Even tried to change the method property in FileTreePanel.js. I still get a POST.

Just to explain myself, I want POST for everything else, but for the very first request that gets the entire tree (for loader), I would like a GET. I realize that it passes me the cmd, path etc.
thanks.

bomka
10 May 2008, 12:50 PM
Saki,
Another question: Is there any way to override the text in FileTreeMenu.js? I wish to change the text "New folder... (Ctrl+N)". I see that when FileTreeMenu is initialized, it gets a config that only indicates single or multiple files. I appreciate all your help. thanks a lot.

silcreval
10 May 2008, 12:57 PM
Fantastic thanks. In the end I created a new class and used .extend to
add my own openNode. Excellent.

One thing I never managed to get sorted, and I noticed some other people
have mentioned it in the post is 'progress'.

I see that progress.php is called automatically if the progress option is
true, and looking at the apache server log this is definitely happening.

I've installed the 'uploaderprogress' add-ons for PHP, but I'm wondering
what the server is expecting back. Is this a JSON string or some other
format. I've looked at the code in Ext.ux.FileUploader and noticed
the following for the progressmap

bytes_total:'bytesTotal'
,bytes_uploaded:'bytesUploaded'
,est_sec:'estSec'
,files_uploaded:'filesUploaded'
,speed_average:'speedAverage'
,speed_last:'speedLast'
,time_last:'timeLast'
,time_start:'timeStart'

is this the expected JSON string format?

Many thanks

jsakalos
11 May 2008, 1:43 AM
Sure, it's json encoded output of uploadprogress() call.

sekundek
12 May 2008, 11:49 AM
I checked Uploader and implement our own upload panel, because of some other data we need and different look. Also we need upload for only one file.

I have a lot of problems with config singleUpload set to true. While set this one to false things started to work somehow. Except one thing. I does not fire finish, so progress keps refreshing.

I would also like to see some addition to be able setting upload id from outside. For example we use GUID for upload identification.

jsakalos
12 May 2008, 12:26 PM
I'll review FileTreePanel in a couple of weeks to move it forward to the stable release. However, I cannot debug "a lot of problems", I need more specific bug report instead.

siebertm
15 May 2008, 12:27 AM
Hello there,

I've got a rather severe problem / bug with the UploadPanel:

1. Add a file
2. click "remove all" in toolbar or the remove button in the dataview
3. see that the add button disappears (actually it doesnt disapper, but the button's <td class="x-btn-center"> becomes empty

This bug was reported some time ago for IE 6 and 7, but it also appears on Safari 3.1.1 (5525.18) and sometimes on FF (but not at the moment...)
test it on http://filetree.extjs.eu/

Another bug is on IE 7 for me, but our customers report it with ie6, too:
sometimes, when you click the browsebutton, it seems that the floating button does not be where its supposed to be, so you'll have to click several times to make it work.
the cusious thing is, that the debug mode works perfectly....
it seems that only clicking in the upper half of the button works...

siebertm
15 May 2008, 12:49 AM
Another bug is on IE 7 for me, but our customers report it with ie6, too:
sometimes, when you click the browsebutton, it seems that the floating button does not be where its supposed to be, so you'll have to click several times to make it work.


as i just read in the browsebutton thread (http://extjs.com/forum/showthread.php?p=150878#post150878), 4him was able to solve this problem

mankz
15 May 2008, 3:29 AM
For the removeAll bug on IE6/7, see this post

http://extjs.com/forum/showthread.php?p=149078#post149078

Gosa
15 May 2008, 5:26 AM
Hi Saki,
I have a problem to cancel event. I wrote a handler for beforenewdir event that returns false value, but component continue executing and insert new directory.

I browsed through your code and I noticed this code:

// fire beforenewdir event
if (true !== this.eventsSuspended && false === this.fireEvent('beforenewdir', this, node)) {
return;
}

Shouldn't this condition be:

// fire beforenewdir event
if (true !== this.eventsSuspended || false === this.fireEvent('beforenewdir', this, node)) {
return;
}

In a firebug this.eventsSuspended is undefined so if statement executes else branch.

jsakalos
15 May 2008, 5:40 AM
Ext.util.Observable already has logic to not fire events when they are suspended so you can try:


if(false === this.fireEvent(...)) {
return;
}

lobo-tuerto
15 May 2008, 6:40 PM
Hello Saki,

How can you set the name of the POST var that gets sent with the file in it?
Right now what I'm receiving server side is something like this:


{"UPLOAD_IDENTIFIER"=>"4384440158", "authenticity_token"=>"329992acbd5ebee138577182e5c00ce7bf3bb386", "APC_UPLOAD_PROGRESS"=>"4384440158", "action"=>"create", "controller"=>"crash_photos", "asset"=>{"crash_id"=>"1"}, "path"=>"root", "ext-gen668"=>#<File:/tmp/CGI13727-3>, "MAX_FILE_SIZE"=>"1048576"}


I guess what I want is inside "ext-gen668"=>#<File:/tmp/CGI13727-3>. But don't know how to retrieve it because I don't know the name beforehand.

Or what do you normally do to get the files on the server side, in your PHP code?

jsakalos
15 May 2008, 9:35 PM
Name is not interesting, you just use $_FILES array as described here: http://www.php.net/manual/en/features.file-upload.php

lobo-tuerto
15 May 2008, 10:52 PM
I'm using Rails, and all the vars you get be it from POST, GET or FILES are inside one var called params. So it is important for Rails devs.

I think it would be good if there was a way to specify the name.

jsakalos
16 May 2008, 2:35 PM
PHP must be PHP also in Rails, so you can iterate through array:

http://www.php.net/manual/en/control-structures.foreach.php

juandj
16 May 2008, 2:59 PM
Saki, Is there anything in particular that needs to be enabled for qtips to work?

I am returning my files like this:


[{"text":"New listing notes in doc format","iconCls":"file-doc","disabled":false,"leaf":true,"qtip":"Size: 1047552"},{"text":"meeting notes in pdf format","iconCls":"file-pdf","disabled":false,"leaf":true,"qtip":"Size: 1047552"}]

But the qtip doesn't pop up..

Thanks in advance for any help

randcasburn
16 May 2008, 6:12 PM
Perfect! I like it very much. =D>=D>=D>

Have you tried to hide root? And, I still don't know how to limit extensions...

Hi Saki,

Don't know if you every concurred this or not...

I simply added ,rootVisible:true
to the configs and over ride it with ,rootVisible:false when I don't want the root node to show. Works like a charm for me. Must have been a simple oversight by the master ;)

Can you PM me when you get a chance? This is about your PHP backend and a donation.

Thanks,

Best regards,

Randy

jsakalos
18 May 2008, 12:49 AM
Saki, Is there anything in particular that needs to be enabled for qtips to work?

I am returning my files like this:


[{"text":"New listing notes in doc format","iconCls":"file-doc","disabled":false,"leaf":true,"qtip":"Size: 1047552"},{"text":"meeting notes in pdf format","iconCls":"file-pdf","disabled":false,"leaf":true,"qtip":"Size: 1047552"}]

But the qtip doesn't pop up..

Thanks in advance for any help
Ext.QuickTips.init() early in your onReady function.

jsakalos
18 May 2008, 12:51 AM
Hi Saki,

Don't know if you every concurred this or not...

I simply added ,rootVisible:true
to the configs and over ride it with ,rootVisible:false when I don't want the root node to show. Works like a charm for me. Must have been a simple oversight by the master ;)

Can you PM me when you get a chance? This is about your PHP backend and a donation.

Thanks,

Best regards,

Randy
@Randy,

I'm not getting what is the question or what should I do/inspect around rootVisible. Explain it more or in another words please.

randcasburn
18 May 2008, 5:56 AM
@Randy,

I'm not getting what is the question or what should I do/inspect around rootVisible. Explain it more or in another words please.

Yeah, That was quite obscure! Sorry...way, way back in post 125 (http://extjs.com/forum/showthread.php?p=147326#post147326) & 126 (http://extjs.com/forum/showthread.php?p=147332#post147332) you mentioned:
2.2) I'm not quite sure what you mean. rootVisible:false? Try, I haven't.

I misunderstood that post, but needed rootVisible:false to work and tried the setting. It did not work. So I put the config setting into your FileTreePanel Object config to override the ExtJs setting. Now your FileTreePanel rootVisible behavior is the same as ExtJs.

I am certain you need to add ,rootVisible:true to your FileTreePanel config object.

Is this clearer?

Randy

jsakalos
18 May 2008, 6:54 AM
Yeah, rootVisible config option of FileTreePanel is now passed to config of root node.

randcasburn
18 May 2008, 7:59 AM
OK, Great. Thanks!

extjsF4n
19 May 2008, 6:07 PM
Hello Saki,

I am in need of just a simple file uploader that I can put it as my field.

But judging from your extension, it looks like it is for a file tree.

Is there any way or examples that you may have that can achieve a simple single file upload with your script?

Thx in advance.

jsakalos
20 May 2008, 12:33 AM
You can use normal TextField with inputType:'file' in a FormPanel with config option fileUpload:true.

loeppky
20 May 2008, 10:56 AM
extjsF4n: you can look at the sample for Ext.ux.form.BrowseButton. You could easily adapt it for your use case. See http://extjs.com/forum/showthread.php?p=136247#post136247

bomka
20 May 2008, 11:49 AM
Saki, is there any way to exactly tell what field names will be passed for <input type="file">? tosthe server, if I have multiple files, what will the name be? I see that I get cmd=upload, path='xyz/abc' (this seems like the parent), dir=".", 'ext-gen320=fileitself'. Will this ext-gen320 be same every time (i am guessing not). In my server side (Rails), should I look for any field that starst with ext-gen? Should that be the strategy for single/multiple?

thanks again.
EDIT: Noticed that there was another such request earlier, so decided to ask that user how he/she dealt with it. thanks.

bomka
20 May 2008, 12:10 PM
I'm using Rails, and all the vars you get be it from POST, GET or FILES are inside one var called params. So it is important for Rails devs.

I think it would be good if there was a way to specify the name.


I have exactly the same problem. Were you able to retrieve the file names in params in Rails? thanks.
I will delete my other comment I posted before I read this.

jsakalos
20 May 2008, 2:14 PM
Just iterate through $_FILES array. Names of inputs are not interesting.

http://www.php.net/manual/en/features.file-upload.multiple.php#53240

Nthalk
20 May 2008, 2:35 PM
The deferredRender config option destroys some components. And sometimes, if they are not deferred but rendered on a hiddent element, they somehow get their scope screwed up.

The Ext.ux.UploadPanel seems to be one of the objects that have this problem, and I will attempt to demonstrate it here.

After grabbing all of the files off of http://filetree.extjs.eu/ and including them on my page, I cannot seem to get the UploadPanel to work if it is either rendered hidden or deferredRendered.

The following examples can be copied and pasted into your firebug console while viewing the demo site: http://filetree.extjs.eu/

The following examples show that the panel is completely blank without setting the deferredRender config option to false.


// Upload Form does not show up with instantiation
var w = new Ext.Window({
width:400
,height:400
,title:'Upload Test'
,modal:true
,items:[
new Ext.TabPanel({
items:[
{title:'Single item'
,height:400
,html:'First tab panel'},
{title:'Upload items'
,height:400
,items:[
new Ext.ux.UploadPanel({
buttonsAt:'tbar'
,id:'uploady'
,height:400
,url:'uploadtest.php'
})
]
}
]
})
]
});
w.show();


// Upload Form does not show up with xtype
var w = new Ext.Window({
width:400
,height:400
,title:'Upload Test'
,modal:true
,items:[
new Ext.TabPanel({
items:[
{title:'Single item'
,height:400
,html:'First tab panel'},
{title:'Upload items'
,height:400
,items:[
{xtype:'uploadpanel'
,id:'uploady'
,buttonsAt:'tbar'
,url:'uploadtest.php'
}
]
}
]
})
]
});
w.show();
The next two examples show that the UploadPanel renders correctly, however, it seems to either lose it's internal scope on or after initComponent. (The handlers on those buttons are null!)



// Upload Form does shows up but buttons have null handlers with xtype
var w = new Ext.Window({
width:400
,height:400
,title:'Upload Test'
,modal:true
,items:[
new Ext.TabPanel({
deferredRender:false
,items:[
{title:'Single item'
,height:400
,html:'First tab panel'},
{title:'Upload items'
,height:400
,items:[
{xtype:'uploadpanel'
,id:'uploady'
,buttonsAt:'tbar'
,url:'uploadtest.php'
}
]
}
]
})
]
});
w.show();


// Upload Form shows up but buttons have null handlers with instatiation
var w = new Ext.Window({
width:400
,height:400
,title:'Upload Test'
,modal:true
,items:[
new Ext.TabPanel({
deferredRender:false
,items:[
{title:'Single item'
,height:400
,html:'First tab panel'},
{title:'Upload items'
,height:400
,items:[
{xtype:'uploadpanel'
,id:'uploady'
,buttonsAt:'tbar'
,url:'uploadtest.php'
}
]
}
]
})
]
});
w.show();
The next example shows that if the panel is rendered immediately, there are no issues. And the only problems are situations where the panel is created, but not immediately visible!



// Upload Form shows up but buttons have null handlers
var w = new Ext.Window({
width:400
,height:400
,title:'Upload Test'
,modal:true
,items:[
new Ext.TabPanel({
// deferredRender:false, // this line makes no difference now
activeTab: 1 // This line makes all of the difference!
,items:[
{title:'Single item'
,height:400
,html:'First tab panel'},
{title:'Upload items'
,height:400
,items:[
{xtype:'uploadpanel'
,id:'uploady'
,buttonsAt:'tbar'
,url:'uploadtest.php'
}
]
}
]
})
]
});
w.show();
I tried changing the source, but everything looks fine! When I console.log(this) within the initComponent on the uploadpanel.js, the onAddFile function is present, however in the onRender function (within the same file), it is not.

Any help, hints, or fixes would be much appreciated.

jsakalos
20 May 2008, 2:47 PM
Any attempt to render to a hidden container === problem. If you need to have the UploadPanel/FileTree in an initially inactive tab or an accordion item then use the same technology as you can find here:

http://examples.extjs.eu/?ex=gridintab
http://examples.extjs.eu/?ex=gridinacc

Nthalk
20 May 2008, 3:11 PM
Any attempt to render to a hidden container === problem. If you need to have the UploadPanel/FileTree in an initially inactive tab or an accordion item then use the same technology as you can find here:

http://examples.extjs.eu/?ex=gridintab
http://examples.extjs.eu/?ex=gridinacc


Ah, that makes so much more sense now!

In the documentation and the examples, it was never so clear that the tab panel's collection of items were just renderable objects like the tabpanel and gridpanel and not anonymous objects that contain items!

It was that level of nesting that screwed my example over, thank you.

treqx
21 May 2008, 12:53 PM
Hi Saki,

I am having an issue with FileUploader/UploadPanel, it seems to ignore errors returned by my server.

For example, here is the JSON response from the server:



{"success":false,"errors":"java.sql.SQLException: Data size bigger than max size for this type: 201170"}


But the UploadPanel shows the green checkmark icon and the qtip states that the file uploaded successfully.

Any ideas?

Thanks,
Michel

jsakalos
21 May 2008, 4:14 PM
Take another look at the client/server spec at http://filetree.extjs.eu. Your errors returned from server is not an object.

juandj
22 May 2008, 10:27 AM
Hi Saki,

I am having an issue with FileUploader/UploadPanel, it seems to ignore errors returned by my server.

For example, here is the JSON response from the server:



{"success":false,"errors":"java.sql.SQLException: Data size bigger than max size for this type: 201170"}


But the UploadPanel shows the green checkmark icon and the qtip states that the file uploaded successfully.

Any ideas?

Thanks,
Michel


{"success":false,"errors":"java.sql.SQLException: Data size bigger than max size for this type: 201170"}

it should be:

{"success":false,"error":"java.sql.SQLException: Data size bigger than max size for this type: 201170"}

juandj
22 May 2008, 10:32 AM
Saki,

What approach would you recommend for somebody who wants to add custom options to the FileTree?

E.g. A specific application requires a "download as zip" option in the context menu.. In this case we could just take the code provided and mod it to add that. However, it'd make it harder to apply future releases by you or by the community.

Would you recommend adding an additional script that adds the elements to the objects in a non-intrusive way? or is this completely stupid? -- if this were an option, how would you address the objects? by ID and such?

Thank you in advance,

jsakalos
22 May 2008, 1:39 PM
Easiest and most standard would be to extend FileTreeMenu, however, it's quite hardcoded in the FileTreePanel.

I will keep this in mind while getting version 1.0 out; to make it more extensible.

Thanks for tip.

Gosa
23 May 2008, 6:07 AM
Hi Saki,

I am trying to trigger click event on upload panel add button, but it does nothing. No JS error and not result of any kind at all.

I need this because I want to trigger add file action when user click on other panel button.

Do you have any suggestion form me. Thanks in advance :)

jsakalos
23 May 2008, 8:23 AM
I'd go for calling the handler not for simulating the click.

mashiki
23 May 2008, 6:16 PM
Hi Saki.

I made Japanese "locale/ja_JP.js" seeing the other locale file.
File is attached as ja_JP.zip. If it is good, use. please.

Gosa
23 May 2008, 10:30 PM
I'd go for calling the handler not for simulating the click.

That wouldn't help because (if I understood add file handler function) it only process browse button input field, it doesn't prompt select file dialog to user.

I need tree node click to trigger user select file dialog box opening, and then to call the file uploader add file handler function.


Is there an easy way for doing this?

jsakalos
23 May 2008, 11:38 PM
Oh yes, if you mean BrowseButton you're right; I just thought you mean a normal button or menu item...

Gosa
23 May 2008, 11:45 PM
Oh yes, if you mean BrowseButton you're right; I just thought you mean a normal button or menu item...

And now when we understood each other :), any suggestion for my problem?

jsakalos
23 May 2008, 11:51 PM
No idea better than calling click method of input field but I don't like it too much. Would it work cross-browser?

Gosa
23 May 2008, 11:57 PM
Well I cant get it work in any browser :s
It simply ignore my command!?
I can't get even a error!

jsakalos
24 May 2008, 12:04 AM
That is what I expected. It's a security measure I guess...

bomka
25 May 2008, 5:29 AM
Saki, I was wondering if there was a way to do display an image using "qtip"? I intend to display a thumbnail of the file when a user mouses over a file. I thought qtip might help, but cannot fathom if "qtip" right way (and how to use it to display thumbnail) or if there is any other way to accomplish the same?
Lile always, thanks a lot in advance. You've been a great help.

jsakalos
25 May 2008, 6:33 AM
qtip accepts any markup including <img src="...">, I haven't tried it personally though.

edui
25 May 2008, 4:18 PM
I just want to try the UploadPanel from SAKI extensions. But i got error "Cannot decode JSON object".
What's wrong?

DM

jsakalos
25 May 2008, 4:38 PM
Format of JSON returned by your server is invalid.

fxlacroix
26 May 2008, 2:16 AM
Hi saki,

I have just use you amazing component and it will help me a lot.
Actually, i would like to integrate the multi selection nodes for drag and drop multiple files like this post http://www.extjs.com/forum/showthread.php?t=28115&highlight=tree+multi+selection+node

maybe have some tips and clues to help ?

jsakalos
26 May 2008, 3:39 AM
Multiselection is not implemented in FileTreePanel (yet). There is some job to be done client side, prepare and deliver json, and multiple file move server side.

juandj
27 May 2008, 7:45 AM
Im trying to use the TreePanel's selectPath to work, but it doesn't seem to...

if I have a structure that looks like:
a
---b
-------c

and I try to call selectPath( 'root/a/b' ), it doesn't work. selectPath('root') works and getPath(node) for node = a -> b shows 'root/a/b', so the path im searching for matches what the structure uses..

This might not belong in this thread specifically, but since what I am using is indeed the filetreepanel, you might have come accross this, or maybe have implemented a method to do something equivalent.


thanks!!

Chida
29 May 2008, 1:40 PM
How can i put the filetree in a layout window? i try but it don't work.:((:((
thanks

jsakalos
29 May 2008, 3:58 PM
FileTreePanel is extension of Panel so you do it exactly as placing a Panel in a "layout window". If you don't know how to place an ordinary panel there, take a look at more examples, docs and search forums.

rtrocc
31 May 2008, 10:35 AM
Ok so I am still amazed by this extension, but I seem to be having trouble getting the "busy" or "working" icon to display during an upload. In uploadpanel.js I have set the proper css class for the icon like so:


workingIconCls:'icon_waiting_ajax'in my css file, I have the following declaration:


.icon_waiting_ajax{background-image:url(/img/icons/wait.gif) !important ;}I tested the icon path in my browser without a problem. The thing is, firebug doesnt seem to try and load "wait.gif" whatsoever.

I hope this isnt due to missing the PECL extension in php for the progress feature...

Any ideas?

maximumcoder
1 Jun 2008, 2:36 AM
Ok so I am still amazed by this extension, but I seem to be having trouble getting the "busy" or "working" icon to display during an upload. In uploadpanel.js I have set the proper css class for the icon like so:


workingIconCls:'icon_waiting_ajax'in my css file, I have the following declaration:


.icon_waiting_ajax{background-image:url(/img/icons/wait.gif) !important ;}I tested the icon path in my browser without a problem. The thing is, firebug doesnt seem to try and load "wait.gif" whatsoever.

I hope this isnt due to missing the PECL extension in php for the progress feature...

Any ideas?

Remove the starting / in the link... it should work provided the rest of the folder structure is correct

.icon_waiting_ajax{background-image:url(img/icons/wait.gif) !important ;}

rtrocc
1 Jun 2008, 9:34 AM
Thanks for the reply, but I have over 50 different css class declarations that all precede with a forward slash and they work fine. But I still tried and I still dont see any icon while the files are uploaded.

In testing further, I also realized that for some reason IE 7 attempts to download the php script rather than submitting the form to it. And the hidden browse button isnt lined up correctly either, so I am forced to click in the top right corner since its not centered behind the Ext button.

This seems like a very useful extension, so I'm sure that alot of us would love to perfect it :)

I see that saki's version works seamlessly on all browsers, thats why Im not giving up on this one.

jsakalos
1 Jun 2008, 11:58 PM
Re icon: There is one universal advice I'm giving in such cases: If my demo page works as expected then see what is different in your app. If my demo page doesn't work (same problem), please let me know.

Re browse button: There has been some discussion recently with the original author; I will also contact him for some debug.

rtrocc
2 Jun 2008, 8:58 AM
Re icon: There is one universal advice I'm giving in such cases: If my demo page works as expected then see what is different in your app. If my demo page doesn't work (same problem), please let me know.

Re browse button: There has been some discussion recently with the original author; I will also contact him for some debug.



Thanks saki,

The only thing I can think of is that I'm not including the filetree files and resources. Would this be a probable cause?

Another thing I forgot to mention is that it seems the "working" or "busy" icon does not work with any components for me, not just this extension. Im not sure why... but if anyone has an idea, please share it :)

cafebabe
2 Jun 2008, 10:16 AM
I'm having an issue with folder icons .... disregard... it's because i had not linked the resources to the correct place... PEBKAC error ... :(

juandj
2 Jun 2008, 1:14 PM
Thanks saki,

The only thing I can think of is that I'm not including the filetree files and resources. Would this be a probable cause?

Another thing I forgot to mention is that it seems the "working" or "busy" icon does not work with any components for me, not just this extension. Im not sure why... but if anyone has an idea, please share it :)

You're probably not including all the css files required.... If you are, then use firebug under "Net" to see if some of the icons may be in the wrong paths..

jsakalos
2 Jun 2008, 1:55 PM
Thanks juandj, you've replied exactly what I would do... :)

johnrembo
3 Jun 2008, 12:24 AM
saki,

firstly, thank you for a useful ux

secondly, some notices regarding FileTreePanel.js misbehavior when faulty response is received on certain ajax call (method cmdCallback). This usualy happens when filetree.php contains errors and cannot return correct json response - for example "Warning: Invalid argument supplied for foreach() in /opt/filetree/filetree.php on line 99 null".

1: aditional check is required for line 603 to avoid browser complain:

- if(true === o.success) {
+if(o && true === o.success) {

2.: shouldn't "undo" work as well instead of only showing error message? For example unsuccessful rename attempt should be reverted to original node's name:
lines 628<->665 should be alternatively performed after line 673.

most likely all of above are allready corrected in your current development branch - please ignore my post in such case.

jsakalos
3 Jun 2008, 12:39 AM
Re 1) PHP, or any other backend, must always return valid JSON, not its own error messages.

Re 2) I'm not quite sure what's happening in your case but still I think that javascript client cannot handle/display php errors.

johnrembo
3 Jun 2008, 5:02 AM
you have misunderstood me (:|

1.
here's how it looks when I try to delete a node and ajax request fails (it might be may reasons - web server failure, php/perl script failure etc...).
http://www.netzond.com/images/scr/saki/delete_fails.png

you're expecting a valid ajax response, but it can fail - you have even noted that:


// process Ajax failure
else {
this.showError(response.responseText);

everything's fine excep the fact that object "o" doesn't exist and browser returns JS error.

2. after any kind of failure (it doesn't matter if json returns error, or ajax response fails at all) - any operations performed should be "undone" - renamed back, moved back, undeleted.

I've tried to rename node here, and request has failed. "Alcatel-blah" should become "Alcatel" - but it did not because options.params.cmd isn't processed
http://www.netzond.com/images/scr/saki/rename_fails.png

I imagine the code part should look like the following:

,cmdCallback:function(options, success, response) {
var i, o, node;
var showMsg = true;

// process Ajax success
if(true === success) {

// try to decode JSON response
try {
o = Ext.decode(response.responseText);
}
catch(ex) {
this.showError(response.responseText);
}

// process command success
if(o && true === o.success) {
switch(options.params.cmd) {
case 'delete':
if(true !== this.eventsSuspended) {
this.fireEvent('delete', this, this.getPath(options.node));
}
options.node.parentNode.removeChild(options.node);
break;

case 'newdir':
if(true !== this.eventsSuspended) {
this.fireEvent('newdir', this, options.node);
}
break;

case 'rename':
this.updateCls(options.node, options.params.oldname);
if(true !== this.eventsSuspended) {
this.fireEvent('rename', this, options.node, options.params.newname, options.params.oldname);
}
break;
}
} // eo process command success
// process command failure
else {
this.undoTasks(options);
// show default message box with server error
this.showError(o ? o.error : response.responseText);
} // eo process command failure
} // eo process Ajax success

// process Ajax failure
else {
this.undoTasks(options);
this.showError(response.responseText);
}
} // eo function cmdCallback
,undoTasks:function(options) {
switch(options.params.cmd) {

case 'rename':
// handle drag & drop rename error
if(options.oldParent) {
options.oldParent.appendChild(options.node);
}
// handle simple rename error
else {
options.node.setText(options.oldName);
}
// signal failure to onNodeDrop
if(options.e) {
options.e.failure = true;
}
if(true !== this.eventsSuspended) {
this.fireEvent('renamefailure', this, options.node, options.params.newname, options.params.oldname);
}
break;

case 'newdir':
if(false !== this.eventsSuspended) {
this.fireEvent('newdirfailure', this, options.params.dir);
}
options.node.parentNode.removeChild(options.node);
break;

case 'delete':
if(true !== this.eventsSuspended) {
this.fireEvent('deletefailure', this, options.node);
}
options.node.parentNode.reload.defer(1, options.node.parentNode);
break;

//default:
//this.root.reload();
//break;
}
}

got my point?

ps: i would have preffered to inform you on this subject in private message istead of messing here, but this forums doesn't seems to support PM :-|

Fabyo
4 Jun 2008, 3:15 AM
It could provide an example filetree.php and progress.php?

thank you very much

And the example of the testing site of this error:

"Cannot Decode JSON Object"

jsakalos
4 Jun 2008, 5:25 AM
I want Saki's FileTree backend (http://extjs.com/forum/showthread.php?p=147056)

rtrocc
4 Jun 2008, 8:25 AM
You're probably not including all the css files required.... If you are, then use firebug under "Net" to see if some of the icons may be in the wrong paths..

I am watching the images tab (under the net tab) in firebug, and I see every icon from the upload panel get loaded successfully. Now when I click the button to initiate the transfer, I never see a request to the 'working icon' image.

Could it be something in the filetree (not fileuploader) extension that would affect the upload panel working icon?

I was under the impression that if I only want to use the the file uploader , I just need to include those files...

jsakalos
4 Jun 2008, 9:26 AM
Take a look at http://filetree.extjs.eu/source.php?file=css/filetree.css . You need to include this file as it contains css also for UploadPanel. All ux-up-* classes.

rtrocc
4 Jun 2008, 12:28 PM
this is the head of my html file:


<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/Ext.ux.IconCombo.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/icons.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/webpage.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/filetree.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/filetype.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/famflag.css">
<link rel="stylesheet" type="text/css" href="extensions/fileuploader/css/Ext.ux.IconCombo.css">
<link rel="stylesheet" type="text/css" href="ext-2.1/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="ext-2.1/resources/css/xtheme-gray.css">

<script type="text/javascript" src="ext-2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-2.1/ext-all.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.WebPage.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.form.BrowseButton.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.FileUploader.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.UploadPanel.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.ThemeCombo.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.IconCombo.js"></script>
<script type="text/javascript" src="extensions/fileuploader/js/Ext.ux.LangSelectCombo.js"></script>
<script type="text/javascript" src="extensions/fileuploader/local/en_US.js"></script>this is how my panel config looks :



var uploadPanel = new Ext.ux.UploadPanel({
title: 'Upload files',
xtype:'uploadpanel',
buttonsAt:'tbar',
id:'uppanel',
url:'ajax.php',
path:'root',
maxFileSize:1048576,
enableProgress:false
});

var uploadTabPanel= new Ext.TabPanel({
activeTab: 0,
border: false,
frame: true,
items: [uploadPanel]
});

var uploadWin = new Ext.Window({
width:300,
//minWidth:165,
id:'winid',
height:400,
//minHeight:200,
layout:'fit',
border:false,
closable:true,
//closeAction: 'hide',
title:'Window Title',
iconCls:'window_icon',
items:[uploadTabPanel]
});

and I in my Ext.ux.UploadPanel.js file I configured the busy icon class as follows:



/**
* @cfg {String} workingIconCls iconClass to use for busy indicator
*/
,workingIconCls:'icon_waiting_ajax'

// }}}
The above 'icon_waiting_ajax' class works when applied to other iconCls configs, and never seems to attempt to get loaded when a file is uploaded...

jsakalos
4 Jun 2008, 12:51 PM
I found it. The mandatory class names for state icons are: ux-up-icon-{state}. States are done, failed, uploading, stopped, queued. These are used in template for DataView. If you want another icon, keep css class name and replace only url of the image.

rtrocc
4 Jun 2008, 6:16 PM
I found it. The mandatory class names for state icons are: ux-up-icon-{state}. States are done, failed, uploading, stopped, queued. These are used in template for DataView. If you want another icon, keep css class name and replace only url of the image.


You are the man Saki! Thanks so much for looking further into it for me, as I had left it aside and continued on the rest of my project planning to go back to it at the end.

So it seems that regardless the class name setting in the uploadPanel.js config, the default state class will be used as defined in the template like you said:

from UploadPanel.js


// create view
Ext.apply(this, {
items:[{
xtype:'dataview'
,itemSelector:'div.ux-up-item'
,store:this.store
,selectedClass:this.selectedClass
,singleSelect:true
,emptyText:this.emptyText
,tpl: this.tpl || new Ext.XTemplate(
'<tpl for=".">'
+ '<div class="ux-up-item">'
// + '<div class="ux-up-indicator"> </div>'
+ '<div class="ux-up-icon-file {fileCls}"> </div>'
+ '<div class="ux-up-text x-unselectable" qtip="{fileName}">{shortName}</div>'
+ '<div id="remove-{[values.input.id]}" class="ux-up-icon-state ux-up-icon-{state}"'
+ 'qtip="{[this.scope.getQtip(values)]}"> </div>'
+ '</div>'
+ '</tpl>'Thanks again for your help.

Now my other problem was getting IE7 to not attempt to open the file Im uploading to. I think it might have to do with the proper response header. I also remember seeing someone else having the same issue but can't seem to track down the post I read.. :-?

-Ralph

jsakalos
5 Jun 2008, 2:00 AM
That config option is a relict of some stage of devel - it will be removed in final version.

Your current problem is the server-side problem. Look at that direction..

rtrocc
5 Jun 2008, 4:20 AM
Ok, according to your instructions on supplying the correct JSON response from the server, I was setting the http response header like so:


header('Content-Type: text/html, charset=utf-8');

I just removed that line from my server script and it works fine... :)

Should it not have been there in the first place?

hsurya
6 Jun 2008, 6:24 PM
I used to use classic ASP, with zero knowledge of PHP. So for a week I tried to make my own ASP back-end, and finally I got it.

For those who is like me, only know classic ASP, I will share the work with a little donation. You then may ask through email further, and I will try to answer as long as I can, with the knowledge that brought me to make the FileTreePanel works. But I do not guarantee that the things may work on your server as it does on mine. So far it works well at least on IIS 5.1 Windows XP.

The differences with Saki's example is that we can choose in which directory we want to upload using the UploadPanel.

I will include on the script also the Ext JS tree working example using ASP generated JSON, i.e. two-trees and reorder examples.

Sorry for everybody, especially Saki, that I wish some donation for sharing the ASP script. I am a poor student and I must do part-time work at the same time to cover my study expense. If you are not pleased or if this infringes the license, then I will remove this posting.

See demo: http://hsurya.brinkster.net/filetree/filetree.asp

Snapshot:
http://hsurya.brinkster.net/filetree/images/snapshot.gif

jsakalos
7 Jun 2008, 12:55 AM
No problem with asking for donation; I use the same for PHP backend.

Good luck!

hsurya
7 Jun 2008, 2:44 AM
No problem with asking for donation; I use the same for PHP backend.

Good luck!

Thank you, Saki.. you are great!

calicoder
11 Jun 2008, 2:54 PM
I'm trying to hook this up to a servlet. I walked through the code and all looks well until I hit

line 5222 in ext-all-debug.js

form.submit();On this line I get a dialog box from FF that asks if I'd like to save the file or open... behavior that is invoked when downloading files.

I can't step into this call since the function part of the native JS libraries. Any help would be much appreciated

Here is my client code


new Ext.Panel({
width:180
,minWidth:165
,id:'winid'
,minHeigth:250
,height:250
,layout:'fit'
,title:'UploadPanel'
,iconCls:'icon-upload',
bodyStyle:'backgroundColor:#ffffff',
border:false,
items:[{
xtype:'uploadpanel'
,buttonsAt:'tbar'
,id:'uppanel'
,url: 'admin?action=save-image'
,path:'root'
,maxFileSize:1048576 // 10 MB
}]
})

calicoder
11 Jun 2008, 3:26 PM
FIXED my problem... classic contentType problem. I should've known

rtrocc
11 Jun 2008, 3:53 PM
yep, its all about the response header from the server... I had that same problem...

Spirit
13 Jun 2008, 2:23 AM
Hi Saki!

I have a little problem with css (i think).
If i move the last file out of a folder to another one, the now empty folder doesnt have the folder icon anymore.
I verified the html output on your demo server (where it works) and all classes seem to be set right, so i m a little bit confused. The html which doesnt work:


<li class="x-tree-node">
<div id="extdd-7" class="x-tree-node-el x-unselectable x-tree-node-leaf" unselectable="on" ext:tree-node-id="ynode-420">
<span class="x-tree-node-indent">
</span>
<img class="x-tree-ec-icon x-tree-elbow" src="resources/images/default/s.gif"/>
<img id="extdd-8" class="x-tree-node-icon folder" unselectable="on" src="resources/images/default/s.gif"/>

...


if i reload the page (now the folder is still empty) and the icon is shown right with the following code:


<li class="x-tree-node">
<div id="extdd-7" class="x-tree-node-el x-unselectable x-tree-node-collapsed x-tree-node-leaf" unselectable="on" ext:tree-node-id="ynode-420">
<span class="x-tree-node-indent">
</span>
<img class="x-tree-ec-icon x-tree-elbow" src="resources/images/default/s.gif"/>
<img id="extdd-8" class="x-tree-node-icon folder" unselectable="on" src="resources/images/default/s.gif"/>
...



The Difference between these 2 comes down to the class "x-tree-node-collapsed" but i see no reason why it works on your server and not on mine.

So where is the class "x-tree-node-el x-unselectable x-tree-node-leaf" defined ?

Any suggestions, any hints would be appreciated :)

Greetz Spirit

luisparada
13 Jun 2008, 11:56 AM
Hello, I'm looking this extension, and I need to break appart the fileuploader panel, in this module we have a panel with a bbar or tbar, but, how can I change the position of the toolbar (add and upload buttons) to transform this uploadpanel into a clasical position of a input type file? I mean the panel in the leftside and the toolbar at the right of the uploadpanel?, and the size of the panel must have the same dimension of a normal input text., how can i do this??

jsakalos
13 Jun 2008, 4:37 PM
Hi Saki!

The Difference between these 2 comes down to the class "x-tree-node-collapsed" but i see no reason why it works on your server and not on mine.

So where is the class "x-tree-node-el x-unselectable x-tree-node-leaf" defined ?

Any suggestions, any hints would be appreciated :)

Greetz Spirit


I don't know either. Look for ext-all.css and, generally, for *.css.

smartlit
15 Jun 2008, 11:49 PM
Hello,

I posted in http://www.extjs.com/forum/showthread.php?t=38628 but later I thought this thread may be the correct one for my message.
Thanks,

Paul

jsakalos
16 Jun 2008, 3:51 AM
You can extend UploadPanel to achieve what you need.

rtrocc
16 Jun 2008, 6:24 AM
Saki, there is a bug in IE7 that removes all buttons from the tbar when clicking the "remove all" button.

It even happens in your demo. Try to add a file or files and click the remove all button (before attempting upload). This happens in IE7, works great in FF2. Just thought you should know ;)

luisparada
16 Jun 2008, 8:17 AM
Thanks a lot, I'll try extending the uploadpanel, so we an add another configs to set the toolbar position to left or right. I think it's quite simple performing the css.
Thanks.

mystix
16 Jun 2008, 8:32 AM
haven't explored this example yet, but couldn't you set the toolbar position left/right simply by adding a Ext.Toolbar.Spacer (i.e. '->') as the 1st / last toolbar element?

luisparada
16 Jun 2008, 10:44 AM
ok, I appologies for my ignorance, I haven't use this component yet. So i'll look at it.
Thanks a lot.

luisparada
16 Jun 2008, 11:56 AM
Sadly I must say, that is not what I thought it was, that method is useless, I guess, I don't know, because what it does is to add more horizontal space to the bbar or tbarm (up or down), that's not what i need, maybe is just that i'm kind of newbie and don't know how to set the new position. Please let me know about some method I could try.
Thanks.

rtrocc
16 Jun 2008, 12:55 PM
since the toolbar items are configured on the inside of the extension you wouldnt be able to add the '->' items. I would imagine this can be accomplished with the DomHelper Singleton ;)

wes
17 Jun 2008, 9:31 AM
Saki, there is a bug in IE7 that removes all buttons from the tbar when clicking the "remove all" button.

It even happens in your demo. Try to add a file or files and click the remove all button (before attempting upload). This happens in IE7, works great in FF2. Just thought you should know ;)

I encountered this problem as well. I fixed it by commenting out the following section in Ext.ux.UploadPanel.js onRemoveFile function. I can see no side effects and the Panel is working beautifully in IE and FF.

//if(wrap) {
// wrap.remove();
//}

If anyone is aware of another solution or knows that this solution will cause problems, please let me know.

Thanks again to Saki for a great control.

njeriextjs
17 Jun 2008, 9:32 AM
Saki,

I am looking to add some custom menu (e.g "zip" , "unzip" ) to the context menu of the FileTreeMenu like mentioned in post#296 on this forum. I saw your response in post #297 on extending the FileTreeMenu but I don't seem to get it. I know the concept of extending a class and I have done this on other controls BUT for the FileTreeMenu...I seem lost.

Currently , I don't see an addItem function ( or something similar ) in FileTreeMenu - How do I add new Menu?

Thanks

rtrocc
17 Jun 2008, 9:33 AM
I encountered this problem as well. I fixed it by commenting out the following section in Ext.ux.UploadPanel.js onRemoveFile function. I can see no side effects and the Panel is working beautifully in IE and FF.

//if(wrap) {
// wrap.remove();
//}

If anyone is aware of another solution or knows that this solution will cause problems, please let me know.

Thanks again to Saki for a great control.

Thanks for this solution, im glad I wasn't the only one who found the problem :)

yhwh
17 Jun 2008, 12:38 PM
Hi Saki!
I think there is a bug in the cmdCallback at line 609 of Ex.ux.FileTreePanel.js
The original look like this.


if(true === o.success) {
switch(options.params.cmd) {
case 'delete':
if(true !== this.eventsSuspended) {
this.fireEvent('delete', this, this.getPath(options.node));
}
options.node.parentNode.removeChild(options.node);
break;

As you can see the node is removed after the fireEvent, so when you listen for 'delete' event in FileTreepanel the node is still present.
So to correct this


if(true === o.success) {
switch(options.params.cmd) {
case 'delete':
if(true !== this.eventsSuspended) {
options.node.parentNode.removeChild(options.node);
this.fireEvent('delete', this, this.getPath(options.node));
}
break;

Then i have some questions :)
Here an example
Why in deleteNode at line 763 of FileTreePanel do you this?


var options = {
url:this.deleteUrl || this.url
,method:this.method
,scope:this
,callback:this.cmdCallback
,node:node
,params:{
cmd:'delete'
,file:this.getPath(node)
}
};


You could use instead for best REST compliance something like this:


var options = {
url:this.deleteUrl || this.url
,method:'DELETE'
,scope:this
,callback:this.cmdCallback
,node:node
,params:{
file:this.getPath(node)
}
};

The cmd params isn't needed.

So it's better to use different url for each action creating directory delete rename etc..(by forcing the use of newdirUrl deleteUrl options) and making a difference between deleting dir and deleting a file (so we could use different url for each delete).
Because it could be easy to add to Saki's FileTree a support for database version and it will separate server_side implementation (easy to use with different MVC framework).
Will you integrate big patch for database support (it needs additionnal params in uploadpanel too) and separate server_side implementation ? Because i'am working on it and filetree is in beta state so you may not want to add extra features...

Best Regards,

Nicolas FERRERO

jsakalos
18 Jun 2008, 2:03 AM
1) Why is it bug? Event listener gets node that is going to be deleted as argument as it may need it for some user processing.

2) method can be only GET or POST.

3) You can provide deleteUrl if you want. If it is defined it takes precedence over url. I find it very questionable if different urls for different operations is a good idea. In my backend, the whole processing is done in one PHP script and cmd says what command is to be executed.

smartlit
18 Jun 2008, 6:55 AM
Hello,

I've downloaded your component and trying to use it. One question: it seems that to show the progress of the upload you use a file called progress.php. I cannot find it included in your package. Where can I find it?

I will use the system on a Windows server and I'm programming in .NET. Is there something available in .NET (.aspx)?

Thanks,

Paul

jsakalos
18 Jun 2008, 3:55 PM
I personally do not use M$ "products" except hardware ones and I'm not aware of any aspx FileTreePanel backends. Anyway, there is full client/server doc on the demo page that you can use to code it yourself.

smartlit
19 Jun 2008, 8:20 AM
Hello,

Thanks for your reply. I have found a small bug in FF3 using http://filetree.extjs.eu. You can reproduce it this way:


Go to http://filetree.extjs.eu
In the UploadPanel click Add to upload a new file
Choose the file and click Upload
Wait for the upload to finish; once finished please read carefully the browser's status bar: although the upload has finished, it still says something like "Transferring data from ..."


Thanks,

Paul

jsakalos
19 Jun 2008, 11:13 AM
Is it a FF3 or a FileTreePanel bug?

smartlit
19 Jun 2008, 11:53 AM
Is it a FF3 or a FileTreePanel bug?

How can I test it? I tested your FileTreePanel with IE6 and FF2 and it is working.

But I tested other upload components with FF3, and it works. Just FileTreePanel with FF3 is broken... :-?

Thanks,

Paul

jwmianzu
21 Jun 2008, 12:07 AM
hi ,saki. I have a problem with Ext.ux.UploadPanel. It will make me insane.
Ext.ux.UploadPanel can't work with ie6,and it told that lacks of object
would you please tell me why? code as below ,thanks a lot

dxpt.js
[code]
Ext.onReady(function(){
function yddh_bt_sclk(e){
var win;
var uploadPanel=new Ext.ux.UploadPanel({
title:'

jsakalos
21 Jun 2008, 1:52 AM
hi ,saki. I have a problem with Ext.ux.UploadPanel. It will make me insane.
Ext.ux.UploadPanel can't work with ie6,and it told that lacks of object
would you please tell me why? code as below ,thanks a lot

dxpt.js


I cannot tell anything from "a problem" or "can't work". Does the demo page work in IE6? If so, find the difference.

jwmianzu
21 Jun 2008, 7:15 AM
i'm sorry ,saki. i try to describe it particularly.
i just tested my demo with ie 6.0.
my code in dxpt.js may be divided into three parts

first


var win;
if(!win){
win = new Ext.Window({
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,
title:'upload,
buttons: [{
text:'submit,
disabled:true
},{
text: 'close,
handler: function(){
win.hide();
}
}]
});
};


second


var uploadPanel=new Ext.ux.UploadPanel({
title:'uploading file',
xtype:'uploadpanel',
buttonsAt:'tbar',
id:'upload',
url:'dxzy.jsp' (http://www.extjs.com/forum/'dxzy.jsp'),
path:'root',
maxFileSize:'1048576',
enableProgress:false
});


third


win.add(uploadPanel);
win.show(this);


everyting is ok in first,second part. as the execution reached the line
"win.show(this)", ie 6.0 browser informed me "no objects". Then i try
add another panel to window, no problem except uploadPanel.

I have tried my best,I don't know whether you figure out what happened.

thanks a lot,saki

anjelika
21 Jun 2008, 12:57 PM
Hey Saki, thanks for the great extension!
Is there a way to integrate the widget into a form?
Almost all the upload widgets I've seen so far are pop up windows wich let you browse for files and then upload them.
I need to integrate the widget into a form (actually in this particular case it is a wizard, a card layout).
Trying to render it into a form ; I understat that it requires a div container to render to so I added one in the form like this:

Ext.DomHelper.append(wiz2.body, {
tag : "div",
id : "upload_panel"
});
Then I render the upload widget into it:

new Ext.ux.UploadForm('upload_panel', {
autoCreate : true,
url : '/filetree/filetree.php',
method : 'post',
maxFileSize : 1048570,
pgCfg : {
uploadIdName : 'UPLOAD_IDENTIFIER',
uploadIdValue : 'auto',
progressBar : true,
progressTarget : 'under',
interval : 1000,
maxPgErrors : 10,
options : {
url : 'progress.php',
method : 'post'
// , callback: pgCallback
}
},
baseParams : {
cmd : 'upload',
path : 'root'
}
})
I got the widget rendered but seems like the css is not loaded correcly, I am not a css expert tho :(
I've uploaded a picture with the form.
Is there another simpler way to use the widget along with a form as an ordinary input widget?
Thanks

jwmianzu
21 Jun 2008, 10:54 PM
I have made a stupid mistake.I don't import browserbutton.js.
saki,Filetree is amazing extention. thks very much

hsurya
23 Jun 2008, 2:20 AM
Hello,

I've downloaded your component and trying to use it. One question: it seems that to show the progress of the upload you use a file called progress.php. I cannot find it included in your package. Where can I find it?

I will use the system on a Windows server and I'm programming in .NET. Is there something available in .NET (.aspx)?

Thanks,

Paul

Hi Paul, I did the ASP back-end successfully, may be you want to take a look. It should be easier in .NET because it has many function needed than the classic ASP. By seeing mine you might have an idea to build your own .aspx back-end.
See my posting here:
http://extjs.com/forum/showthread.php?t=29090&page=34

snapshot:
http://hsurya.brinkster.net/filetree/images/snapshot.gif

smartlit
23 Jun 2008, 5:26 AM
Hi Paul, I did the ASP back-end successfully, may be you want to take a look. It should be easier in .NET because it has many function needed than the classic ASP. By seeing mine you might have an idea to build your own .aspx back-end.
See my posting here:
http://extjs.com/forum/showthread.php?t=29090&page=34

snapshot:
http://hsurya.brinkster.net/filetree/images/snapshot.gif

Hello!

Thanks for your reply! I tried your demo on your website, however I noted it is missing the upload progress (e.g. 10%, 15%, etc.) Can you confirm this? That is the part I would need...

Thanks,

Paul

smartlit
23 Jun 2008, 5:28 AM
Hi Saki,

Do you have any news for my problem as described in post #360?

Another question: in your component, when you upload a file, you can stop the upload. My question is: do you really stop the upload (stop sending data), or do you just remove the list of the file, while in the background data keeps being uploaded?

Thanks,

Paul

smartlit
23 Jun 2008, 8:36 AM
Hi Saki,
Another question: in your component, when you upload a file, you can stop the upload. My question is: do you really stop the upload (stop sending data), or do you just remove the list of the file, while in the background data keeps being uploaded?


A made a few tests, and it works (i.e. you stop sending data) in FF, it does not work (i.e. data is being sent) in IE (at least IE6, not tested un IE7).

So, my only question is the one in my previous message.
Thanks,

Paul

jsakalos
23 Jun 2008, 11:17 AM
The attempt is made to stop transfer as if you would hit stop button in browser. If it doesn't work it can be 1) a bug, 2) a browser incompatibility.

smartlit
24 Jun 2008, 9:39 AM
Hi Saki,

Sorry, any news for my problem as described in post #360?
Thank you,

Paul

jsakalos
24 Jun 2008, 10:22 AM
Not yet, finishing a crucial phase of my main project. Stay tuned I'll tackle on that afterwards.

smartlit
24 Jun 2008, 1:35 PM
Not yet, finishing a crucial phase of my main project. Stay tuned I'll tackle on that afterwards.

Thank you! :)

Paul

anjelika
24 Jun 2008, 1:39 PM
Hi Saki,
Is there a way to add extra info once the file was uploaded successfully?
I am parsing excel files and would like to notify the user about the content of the uploaded file, like number of rows, colons, etc...is there a way to display this info along with the (successfull) file name and status icon?
Thanks

jsakalos
24 Jun 2008, 1:55 PM
There is a plan for user defined fields in underlying store - not implemented yet.

anjelika
24 Jun 2008, 10:38 PM
OK, nice to hear that...thank you!

hsurya
25 Jun 2008, 8:02 AM
Hello!

Thanks for your reply! I tried your demo on your website, however I noted it is missing the upload progress (e.g. 10%, 15%, etc.) Can you confirm this? That is the part I would need...

Thanks,

Paul

Yes, Paul, I have yet to work on that upload progress part because I am very busy with my study project now. I will update you once I got it later.
Keep trying and good luck!

juljupy
25 Jun 2008, 11:22 AM
Hi i tested your plugin on windows with firefox, apache and php, it worked fine, but now i'm trying to use it on openSuse linux 11 with firefox, apache and php and i got the following problem:

Whem the tree is going to get childnodes form the php file response it doesn't work so i look on firebug console for the response and i see the whole file content including <?....?>.

i'm testing the same with other trees and i got the same thing, what's going on with this?

juljupy
25 Jun 2008, 11:31 AM
Sorry,

I've already have found the solution, the php file must begin with <?php...... and not like this <?... because apache on linux donesn't recognize it...

jsakalos
25 Jun 2008, 11:45 AM
Sorry,

I've already have found the solution, the php file must begin with <?php...... and not like this <?... because apache on linux donesn't recognize it...

It is configurable in php.ini, short_open_tags or something like that.

ixnixnixn
25 Jun 2008, 8:08 PM
hello saki, thanks a lot you for your extension,, I've implemented it on my work with using a php backend,,

but now, i have a problem with synchronizing things. Is this issue already been discussed? for example, there are 2 clients (user A, user B ) accessing the same folder. if user A renames a file, it didn't have any effect on user B's file's filename unless (s)he uses reload function from the menu (manually).

I'm thinking to use a frequent request to server for handle this problem, but thats not too effective. Some user might be annoyed if every 1-2 minutes or so the filetree always refreshing things. For every aski's filetree user, any advice or idea to fix this problem? Maybe an automatic request from the clients or so, but i don't have a clue at all on how to actually implement it. every idea/help will be much appreciated. :)

Thx a bunch
-iksan

jsakalos
26 Jun 2008, 5:26 AM
There no way how server could push something to the client so your concept of periodical polling is the only feasible I can think of.

mystix
26 Jun 2008, 6:05 PM
There no way how server could push something to the client
actually there is:
http://en.wikipedia.org/wiki/Comet_(programming)
though i'm unsure how much additional strain that will exert on the server.


here's a thread which discussed this to some extent:
http://extjs.com/forum/showthread.php?t=4935
(look for the "sprocket")


it's also on the roadmap for 3.0:
http://extjs.com/products/extjs/roadmap.php



just fyi ;)

jsakalos
26 Jun 2008, 10:51 PM
actually there is:
http://en.wikipedia.org/wiki/Comet_(programming (http://en.wikipedia.org/wiki/Comet_%28programming))
though i'm unsure how much additional strain that will exert on the server.

Interesting. One learns whole life. Thank mystix.
Is there any any demo of that (I'd guess it would be long polling) anywhere around so I could see that?

mystix
26 Jun 2008, 11:17 PM
this live example is supposed to be working, but i guess since the comet fuss has died down somewhat the counter didn't jump the entire 10 minutes i was on the page:
http://satoshi.blogs.com/uie/2006/10/live_pageview_c.html

there are more examples here
http://www.pathf.com/blogs/2007/04/roundup_comet_t/
but they're not live.

jsakalos
26 Jun 2008, 11:28 PM
You've got bad luck - nobody visited in your 10 mins. It incremented by 1 while I was here. It looks like long poll; one request in FB net tab stays running.

mystix
26 Jun 2008, 11:35 PM
You've got bad luck

arrrghhh!!!! :((

ixnixnixn
29 Jun 2008, 5:26 PM
well comet seems promising, but maybe i'll wait for the 3.0 releases, since according to roadmap it supports comet technology,, maybe i will try sprocket later on after i have succeed on a simpler approach.. thx to mystix for the new informations

for my current project, i tried to used a simpler approach with automatic request but i have a little problem *yet again* i want to simply refresh the server root node every 10 seconds, but i don't know what function should i use,, i tried to make a new function that uses reload() on 'this.getRootNode()' but i think i got it wrong,, and i'm using startAutoRefresh to trigger the filetree's function *still a dummy function, it just contains alert* but it gets a warning for each requests,,

pardon for my silly question, i'm on my 3rd week on extjs and any help would be much appreciated. :)

jsakalos
30 Jun 2008, 3:42 AM
The approach you've chosen looks good. I would also call reload on periodical basis. Now it's only about finding the correct methods and about putting it all together.

gogogo521
1 Jul 2008, 10:17 PM
Very nice

dimitrij.zub
2 Jul 2008, 3:10 AM
Wonderfull extension and works fine for FF 3.0 But:

In IE there are still some major bugs:


Clicking on Add.. results in nothing. Only the second click will work
Add a file, remove a file: The 'Add..' button is vanished.I am not good enough with ExtJS to fix those. Can you try to work on it, as we really need to have ff 2.x, 3.0 and IE 7.0 supported :)

zombeerose
10 Jul 2008, 12:18 PM
Really great ux Saki! Been using for awhile.

I have integrated your filetreepanel into an app so users can access their remote documents from anywhere. Since I can't control how the users organize their docs, they tend to be sloppy and have an enormous amount directly in the root. This creates significant lag as the tree loads and the browser renders. I therefore tried to make use of your loadMask option and found the following issue.

a) The loadmask would not appear for the initial tree load because the 'beforeload' event is not attached until after the tree expands. Therefore, I would suggest moving the
if(true === this.loadMask) { block before the
if(this.expandOnRender) { block. Once I did this, I get a mask on load as expected.

b) However, this initial mask is not centered correctly for some reason. The filetreepanel is loaded in a card panel that is in the center region of a border layout. My fix, which I am not thrilled about, is I create the mask for the card panel el (this.ownerCt.el) instead of this.el.

If you have any suggestions or if I am mistaken, please let me know. Thx

tegel
10 Jul 2008, 1:45 PM
Hi all,

I use FileTree Widget and I need to map it to an alfresco repository, please could you tell me how can I do it :-?

thanks
best regards

jsakalos
10 Jul 2008, 2:21 PM
Is there any chance, a public link, where I could see your implementation?

tegel
11 Jul 2008, 1:12 AM
there is my function that create the panel:



initFileTree: function(){
// --------------------------------------------
// -- NAVIGATION TREE
// --------------------------------------------
var treepanel = new Ext.ux.FileTreePanel({
height:400
,autoWidth:true
,id:'ftp'
,title:'FileTreePanel'
,renderTo:'tree-div'
,rootPath:'root'
,rootText: 'Company Home'
//,url:ALFRESCO_URL + 'service/teggo/tree.json'

,loader: new Ext.tree.TreeLoader({
dataUrl: ALFRESCO_URL + 'service/teggo/tree.json',
// dataUrl : 'demoData/tree.json',
requestMethod: 'GET'
})

,topMenu:true
,autoScroll:true
,enableProgress:false
// ,baseParams:{additional:'haha'}
// ,singleUpload:true
});
var root = new Ext.tree.AsyncTreeNode({
text:'Company Home'
,path:ALFRESCO_URL + 'service/teggo/tree.json'
,allowDrag:false
});

treepanel.setRootNode(root);
treepanel.render();

treepanel.on('click', showDocumentFromTree);
function showDocumentFromTree(node){
if (treepanel.getSelectionModel().isSelected(node)) {
dataStore.baseParams = {
node: node.id,
limit: 10
}
dataStore.load({
params: {
start: 0
}
});
}
};

treepanel.on('nodedrop', function(e){
alert('in nodedrop'); // never display this!!!
});

treepanel.on('beforenodedrop', function(e){
alert('in before node drop:' + e.target.id); // This alert
// msg is
// getting
// displayed
});
}


and the WebScript used is:
tree.get.json.ftl


[
<#list node.children as space>
<#if space.isContainer>
{"id": "${space.nodeRef}", "text": "${space.name}", "iconCls":"folder"}<#if space_has_next>,</#if>
</#if>
</#list>
]

tree.get.js


var node = companyhome;
if(args['node'] != 'Home'){
node = search.findNode(args['node']);
}
model.node = node;

mammerman
11 Jul 2008, 4:16 AM
Wonderfull extension and works fine for FF 3.0 But:

In IE there are still some major bugs:

Clicking on Add.. results in nothing. Only the second click will work
Add a file, remove a file: The 'Add..' button is vanished.I am not good enough with ExtJS to fix those. Can you try to work on it, as we really need to have ff 2.x, 3.0 and IE 7.0 supported :)

I second this - are there any plans for a release that fixes these issues in Internet Explorer? I just want to make sure the developers are aware of the issues. If there aren't any plans I could probably track down the problem and fix, but I don't have time in the next few days to do so...

mikecx
17 Jul 2008, 1:25 PM
Love the widget but have one question and one possible bug.

Question: Is there a way to pick up the upload in python (through cgi) rather than php? I know with the standard upload button you can just catch the upload name and get its .file property but I don't know if that's possible with yours.

Bug: The icons all show up improperly in IE6. The upload button has a black background and the rest gray. Seems like IE6 does not do png transparency properly.

jsakalos
17 Jul 2008, 11:35 PM
1. Don's you have something like FILES array in python? 'Cause you can upload more than one file at once.

2. That is well known IE6 feature/bug.

mystix
17 Jul 2008, 11:47 PM
Bug: The icons all show up improperly in IE6. The upload button has a black background and the rest gray. Seems like IE6 does not do png transparency properly.

as @jsakalos has said, this is yet another m$ie browser quirk (feature? 8-|)

nothing you can do about it except to ditch ie / switch to using only gifs / employ this fix for ie:
http://www.twinhelix.com/css/iepngfix (http://www.twinhelix.com/css/iepngfix/demo/)

YMMV.

mikecx
18 Jul 2008, 6:14 AM
1. Don's you have something like FILES array in python? 'Cause you can upload more than one file at once.

2. That is well known IE6 feature/bug.

1.) Not quite but anything passed in as either a get or post variable should be accessible in python in one way or another. I'm going to try a few things and if I figure out how to get them via python let you know.

2.) Ahh IE6, how nice of it. Would it be possible to include a second set of gif/jpg icons and a config flag to use them instead or perhaps just use them instead? I know it's a pain but IE is still a huge market share and some places (like the places I develop for) still demand IE6.

jsakalos
18 Jul 2008, 10:44 AM
Re 2: Yes, it is possible but I don't need it as I force my users to use firefox so I won't do it. ;)

njeriextjs
21 Jul 2008, 3:18 PM
Saki,

I am using your extension to load files from disk - I have figured how to do this. We have your php backend which helped alot.

Now......I have another section of the app that needs the tree structure BUT the data is store in a MySQL database. I need to retrieve the data from the database (which I know how to do) but there is no concept of rootpath. This is tripping me - how do I move on? Once I get the data from the database , I am not sure how to package it for the FileTreePanel to accept it.
Looks like I need to write some new stuff - I just need to get started and then I will get it.

Thanks

jsakalos
21 Jul 2008, 11:55 PM
The stable point is JSON what tree expects. Client doesn't know anything about how the data is stored on server; it only sends request and expects a JSON.

Thus, the basic server side viewpoint would be: Let's use or ignore data from request as needed and satisfy the tree by sending correct JSON.

Does it help?

njeriextjs
22 Jul 2008, 7:54 AM
Thanks Saki - that helps. I think I am complicating the matter.....I need to think JSON

ningle
23 Jul 2008, 1:35 AM
I download the source code of filetree from http://extjs.eu/, put it into my local app server.
I used a simple struts application as a upload server to replace the filetree.php. The file uploading is successful, but filetree's uploadCallback function is not invoked. Firefox and IE7 pop up a file downloading dialog to download the returned json data.
The downloaded json data file is below:
{"msg":"OK","success":true}

By the way, I modified the function 'uploadFile' in Ext.ux.FileUploader.js for struts.

inp.set({name:inp.id}); --> inp.set({name: 'file'});

I debug the code, but found nothing. Please help!

ZooKeeper
23 Jul 2008, 6:29 AM
Is there a way to plug Upload panel as a form component?

Thanks

ClemsonJeeper
23 Jul 2008, 7:04 AM
Am I missing something regarding the "Upload File (Ctrl+U)" menu item?

Does it actually do anything? It seems when I click on it nothing happens. It fires 'upload' command but it doesn't look like that is handled anywhere that I can see.

Future functionality?

Michelangelo
24 Jul 2008, 1:20 AM
I don't understand how it works.
When I click on the upload button inside the little window, what happens?

thanks

jsakalos
24 Jul 2008, 1:56 AM
Am I missing something regarding the "Upload File (Ctrl+U)" menu item?

Does it actually do anything? It seems when I click on it nothing happens. It fires 'upload' command but it doesn't look like that is handled anywhere that I can see.

Future functionality?

I admit it looks misleading. Upload file is menu item of UploadPanel, including everything below it.

jsakalos
24 Jul 2008, 1:58 AM
Is there a way to plug Upload panel as a form component?

Thanks

UploadPanel is Ext.Panel extension so everything that applies to Panel applies also to UploadPanel.

Michelangelo
24 Jul 2008, 1:58 AM
Thanks for the prompt reply.

jsakalos
24 Jul 2008, 2:02 AM
I download the source code of filetree from http://extjs.eu/, put it into my local app server.
I used a simple struts application as a upload server to replace the filetree.php. The file uploading is successful, but filetree's uploadCallback function is not invoked. Firefox and IE7 pop up a file downloading dialog to download the returned json data.
The downloaded json data file is below:
{"msg":"OK","success":true}

By the way, I modified the function 'uploadFile' in Ext.ux.FileUploader.js for struts.

inp.set({name:inp.id}); --> inp.set({name: 'file'});

I debug the code, but found nothing. Please help!

I would bet that the problem is related to your modifications. If uploadCallback wasn't invoked due to a bug in uploader then demo page couldn't work.

Sorry, I cannot help you any further as I do not know what is struts.

Michelangelo
24 Jul 2008, 2:04 AM
1. Can I use only the upload form without the treeview?
2. When I click on upload button doesn't send any post variable to the php backend file. Why?!

thanks

jsakalos
24 Jul 2008, 2:06 AM
1. yes
2. it works different way, same as Ext uploads files. Has been discussed many times, please search.

Michelangelo
24 Jul 2008, 2:21 AM
Nothing, I don't find what you said. Can you provide me the link, please?

thanks

jsakalos
24 Jul 2008, 2:43 AM
http://extjs.com/deploy/dev/docs/?class=Ext.form.BasicForm&member=fileUpload.

Michelangelo
24 Jul 2008, 3:08 AM
Thanks for the link.
Strange problem at the opening of the window:
When I try to open my window seems that the filetreepanel doesn't load the filetree.php but if I open the firebug window the request of the filetreepanle starts.

Seems that the firebug fire some events inside the filetreepanel.

any idea?
thanks

Michelangelo
24 Jul 2008, 6:04 AM
Maybe I have understand what's the problem!
The tab that contains the filetreepanel is the second one and the first tab is the first tab that appears opened.

If now I set activeTab: 1 the filetreepanel starts but the htmleditor inside the first one panel doesn't start.

Have I set something when I click in the tab to activate the object included?

Thanks

ningle
24 Jul 2008, 10:49 PM
Thanks for your reply!
Sorry, struts is a java MVC framework.
I have to know the name of the file input tag in java for saving the uploaded file. So I modified the source code.

jt
25 Jul 2008, 12:47 PM
I just came across this issue when trying the UploadPanel demo on Saki's site (http://filetree.extjs.eu/) using IE6.

If I add a file to the UploadPanel and before I upload the file I select to remove it, the 'Add' button disappears and there doesn't appear to be a way to get it back.

If I just add the file and then upload it to the server, this issue doesn't appear to be happening.

Sorry if this issue has been previously raised.

iulian
29 Jul 2008, 9:00 AM
Ext.ux.FileUploader (singleUpload = true context), line 321:

records = this.store.queryBy(function(r){return 'done' !== r.get('state');});

If I start uploading a file (record.state = 'uploading') and in a few moments I start uploading another one, in the second call also records with state = 'uploading' gets uploaded.

What about if line 321 would look like this:

records = this.store.queryBy(function(r){return 'queued' === r.get('state');});
or maybe

records = this.store.queryBy(function(r){
var state = r.get('state');
return 'done' !== state && 'uploading' !== state;
});

jsakalos
29 Jul 2008, 12:59 PM
Sorry, I don't get what the problem is.

iulian
29 Jul 2008, 1:32 PM
Concurrency.

All records but the ones that have state 'done' are selected for upload. Let me know if you need an example.

EDIT
Some more details, maybe helps in understanding the issue:
1. start uploading a file
2. before file mentioned at point 1. finished uploading select another file and start upload this one
3. after all uploads are finished observe the results: file at point 1. was uploaded twice.

jsakalos
29 Jul 2008, 1:45 PM
I see. This your version I take:


records = this.store.queryBy(function(r){
var state = r.get('state');
return 'done' !== state && 'uploading' !== state;
});

ningle
29 Jul 2008, 7:31 PM
Hi, jsakalos
I use the original filetree client, it's uploadCallback function is still not invoked by using my simple java server.
Firefox and IE7 pop up a file downloading dialog to download the returned json data.
The downloaded json data file is below:
{"error":"Error","success":false}

Thanks!

jsakalos
30 Jul 2008, 12:33 AM
What is Content-Type header?

rtrocc
30 Jul 2008, 8:06 AM
I hate to barge in an existing support conversation, but I was just curious if anyone has noticed the following issue in FF3 (could happen in other browsers too) :

After a file is uploaded via the UploadPanel , you will see the browser remain in a "transferring data" status. Im assuming the connection is not closed properly or is stuck in a loop somewhere.

I would try to pinpoint this myself but I am trying to meet a deadline with a project and I need to get other sections done atm.

Your help is always appreciated ;)

jsakalos
30 Jul 2008, 8:30 AM
Does it happen only with UploadPanel or also with standard Ext upload?

ningle
30 Jul 2008, 5:33 PM
hi, jsakalos
The Content-Type header is "application/json, charset=utf-8".

paul@demiduk.com
31 Jul 2008, 9:14 AM
Hi,
Has anyone integrated Saku's FileTreePanel extension and/or the Ext.ux.FileUploader into a .Net application?

I have created a page to accept the post requests and it works great on all cmd choices except 'upload'. My problem is I can't see what happens in FireBug during the post and I am not sure how to implement the code that will deal with the uploaded files.

Can anyone help with this?

Thanks,
Paul

jsakalos
31 Jul 2008, 9:44 AM
If it is response to file upload it has to be text/html; charset=utf-8. application/json; charset=utf-8 in all other cases. BTW, correct delimiter is ; (semicolon) not , (comma).

ningle
31 Jul 2008, 5:59 PM
Thank you, jsakalos
I'll try it.

kpopov
1 Aug 2008, 5:04 PM
Saki,

I know you are not using any Microsoft products, but I suspect the issue may have a similar resolution regardless of the OS, if there is such a solution.

My questions is if you knew of a way to enable the component to accept a file dropped from another application, like Windows Explorer, instead of having to use a "File Open" dialog box, or using such a dialog, but being able to select multiple files that then get added to the Upload component.

People always complain about having to upload one file at a time, and what they really mean is that they don't like having to pick one file at a time to load to the same place. I have seen some solutions in Flash, but I was hoping to stay with HTML/JS.

Any help would be appreciated.

jsakalos
2 Aug 2008, 3:01 PM
Unfortunately, that is possible only with flash, not with standard file input.

jorgemuza
2 Aug 2008, 5:49 PM
Saki,

I thing there is a little bug in IE7, once you add a file, and then 'Click to Remove' on the added file the 'Add..' button disappears...

With FF 3.0 it works perfectly!

Regards!
Jorge

mankz
3 Aug 2008, 12:56 AM
Saki,

I thing there is a little bug in IE7, once you add a file, and then 'Click to Remove' on the added file the 'Add..' button disappears...

With FF 3.0 it works perfectly!

Regards!
Jorge

@Jorge, see this post

http://extjs.com/forum/showthread.php?p=149078#post149078

captainfish
4 Aug 2008, 5:33 AM
Great extension! I have a quick question though. I added a 'click' listener to my FileTreePanel in order to retrieve the node record info. All is fine except the FTP fires a POST every time a node is clicked. This wasn't happening prior to my adding of the listener. I've searched through the FTP js files for a click event that I may be setting off but I can't seem to find it. I'm new to Ext and it's very possible (likely) I'm doing something stupid. Any help would be appreciated.




new Ext.ux.FileTreePanel({
height: 400,
autoWidth: true,
title: 'Sending These Files',
region:'west',
margins:'5 5 5 5',
width:300,
border: true,
frame: true,
id: 'ftp',
rootPath: "C:\\Temp",
url:'POS.Comm.FileUploader.cls',
autoScroll: true,
singleUpload: false,
enableNewDir: false,
enableRename: false,
enableProgress: false,
enableOpen: false,
rootVisible: false,
topMenu: false,
onContextMenu:function(node, e) {
if(this.readOnly) {
return false;
}
this.showContextMenu(node);
Ext.getCmp('ftp').uploadPanel.uploader.addListener('beforefilestart',
newfile,this.uploadPanel.uploader,{
single: true
});
Ext.getCmp('ftp').uploadPanel.uploader.addListener('allfinished', hideContext);
return false;
},
listeners:{'click' : function(n,e){
var cellindex=Ext.getCmp('grdControl').selModel.getSelectedCell();
Ext.StoreMgr.get("fileStore").load({params:
{pCtlID:Ext.StoreMgr.get("conStore").getAt(cellindex[0]).data.ID,fn:n.text},
callback: function(rec,options,success){
Ext.getCmp('fileForm').form.items.items[0].setValue(rec[0].get("FileName")); Ext.getCmp('fileForm').form.items.items[1].setValue(rec[0].get("DestinationPath"));
}
});
}
}
})

jsakalos
4 Aug 2008, 11:21 AM
You're sending requests by calling store's load method.

captainfish
4 Aug 2008, 11:54 AM
Thanks for the reply jsakalos. I apologize for not being clear enough.

It is actually kicking off 2 requests...the first one is intentional (Ext.StoreMgr.get("fileStore").load(...etc)) ...the second one is coming from the FileTreePanel with the url 'POS.Comm.FileUploader.cls', which I don't want to happen because it seems to mess with all my data stores. For instance I cannot get at a grids selection model after it fires.

Maybe I am missing the larger picture here, with the way I'm using data stores?

I didn't attach all of my code because it is rather extensive and I don't expect anyone to go through it all.

Thanks again

jsakalos
4 Aug 2008, 12:49 PM
Do you suspect there is a bug in FileTreePanel?

shadoi
5 Aug 2008, 12:34 AM
Hello, first of all, thanks for the awesome widget. It's saving me tons of time.

I'm trying to use it in rails, I've got everything working except for setting the name of the uploaded file. It's not passed as a url parameter, here's what I'm seeing:
Parameters: {"UPLOAD_IDENTIFIER"=>"8452682485", "dir"=>".", "ext-gen310"=>#<ActionController::UploadedStringIO:0xb6186210>, "cmd"=>"upload", "APC_UPLOAD_PROGRESS"=>"8452682485", "action"=>"file", "controller"=>"inv/custom_modules", "path"=>"root/test", "MAX_FILE_SIZE"=>"524288"}

Has anyone else figured this out for rails?

jorgemuza
5 Aug 2008, 7:40 AM
@manks: Thanks, that solved the issue!

@jsakalos: Just one little locale correction:

the line:
fileQueuedText:'El archivo <b>{0}</b> is queued for upload' ,

should be changed to:
fileQueuedText:'El archivo <b>{0}</b> esta en cola para ser subido' ,

jsakalos
5 Aug 2008, 9:29 AM
I haven't made Spanish translation. I'm posting here the Spanish file es_ES.js, correct it please in it and repost.

[code]
/**
* FileTree Translation : Spanish es_ES
*
* @author Ing. Jozef Sak

captainfish
5 Aug 2008, 9:56 AM
Do you suspect there is a bug in FileTreePanel?

No. After doing some more work which involved adding more datastores, I realized that my one load call in the 'click' event is causing every datastore on my form to reload. I think my confusion is unrelated to the FileTreePanel. It appears that I was misusing the StoreMgr. I'll keep working on it,

Thanks

jorgemuza
5 Aug 2008, 1:09 PM
Ok, here it goes...


[code]
/**
* FileTree Translation : Spanish es_ES
*
* @author Ing. Jozef Sak

jsakalos
5 Aug 2008, 1:24 PM
Super, thank you.

craigharmonic
6 Aug 2008, 12:52 AM
Hi saki,

Brilliant UX, you saved me hours of work! Thank you.
Got everything up and running beautifully except a strange little bug when I create/delete folders. Everything appears to work in that the folders are created/deleted etc. and the filetree updates but the icon for the folder do not display correctly.

Firstly, if I create a folder there is no icon beside it. If I reload the tree then the icon appears correctly. If I then add a subfolder to this folder I get the same issue, but when I delete the subfolder the parent folder icon changes to the default folder icon. Again, this is fixed by refreshing.

I am assuming this is something to do with an event listener changing the icon incorrectly. Any ideas what/where this could be?

Thanks again!

Craig

jsakalos
6 Aug 2008, 11:49 AM
It is matter of css. Look if you include all mandatory css files.

mjlecomte
6 Aug 2008, 1:03 PM
Hi Saki.

I'm not using your extension, nor I have browsed the 538,000 pages of support work you do for it (I can see why you wouldn't release more extensions if you continue to support them all as well as you do ;) ).

At any rate, I viewed the demo in IE7, and it looks like someone has added a long filename which has apparently screwed up some width calculation for the panel somewhere.

Didn't know if you knew. Again, I'm not using, so don't go fixing it for me.

Cheers.

jsakalos
6 Aug 2008, 2:25 PM
Hmmm, I've upgraded Ext on demo pages to the latest svn... Could it be that? I guess it was fine before. Anyway, I'll rather wait for an IE fan to propose a patch then to fix it myself because I force my users to use Firefox - I just specify it as a "minimum system requirement".

craigharmonic
6 Aug 2008, 5:19 PM
Thanks Saki! You were spot on. I had relocated ext to be in a different folder and this caused the incorrect path for the folder icon and thus no icon was showing up.

Thanks again for all your help and advice, always much appreciated!

mystix
6 Aug 2008, 5:57 PM
because I force my users to use Firefox - I just specify it as a "minimum system requirement".
:))

that's going into my box of tricks.

jsakalos
6 Aug 2008, 11:34 PM
@mystix, ...and you would be surprised as well and willingly they take it. They are just used from boxed versions of software that there are some "minimum system requirements". We just say: Software runs on server but you need to download and install Firefox and it is free of charge. They (or we) do it, create an icon on desktop and that's it.

mystix
6 Aug 2008, 11:38 PM
@mystix, ...and you would be surprised as well and willingly they take it. They are just used from boxed versions of software that there are some "minimum system requirements". We just say: Software runs on server but you need to download and install Firefox and it is free of charge. They (or we) do it, create an icon on desktop and that's it.

wow... i'll definitely try this the next time i get a chance to define the system requirements. =D>

jsakalos
6 Aug 2008, 11:43 PM
Wish you good luck with this technique. Let us know what happend... ;)

shadoi
7 Aug 2008, 5:33 PM
Hello, first of all, thanks for the awesome widget. It's saving me tons of time.

I'm trying to use it in rails, I've got everything working except for setting the name of the uploaded file. It's not passed as a url parameter, here's what I'm seeing:
Parameters: {"UPLOAD_IDENTIFIER"=>"8452682485", "dir"=>".", "ext-gen310"=>#<ActionController::UploadedStringIO:0xb6186210>, "cmd"=>"upload", "APC_UPLOAD_PROGRESS"=>"8452682485", "action"=>"file", "controller"=>"inv/custom_modules", "path"=>"root/test", "MAX_FILE_SIZE"=>"524288"}

Has anyone else figured this out for rails?

To answer my own question, for anyone else that happens upon it: ActionController::UploadedStringIO includes the module ActionController::UploadedFile which has an "original_filename" method:
http://api.rubyonrails.org/classes/ActionController/UploadedFile.html#M000695

-s-

craigharmonic
9 Aug 2008, 1:24 AM
Is there anyway to access the toolbar menu to add buttons to it? I have been trying:

treepanel.tbar
treepanel.topMenu
treepanel.getTopToolbar

But none of them seem to be the Ext toolbar object.

The only way I found to do it was editing the code in Ext.ux.FileTreePanel.js:

this.tbar = [{
text:this.fileText
,disabled:true
,scope:this
,menu:this.getContextMenu()
}];

I'm looking at adding a file search to the system.

Thanks!

jsakalos
9 Aug 2008, 3:47 AM
Navigate to http://filetree.extjs.eu and then type in the Firebug's console:

Ext.getCmp('ftp').getTopToolbar().add({text:'Some item'})

markkl
10 Aug 2008, 11:37 AM
i would like to make a system that check befor a file is uploaded if the file already exists and if it does i would like to ask the user to overwrite it or not.

How do i know the File name and path befor uploading?



var tree = new Ext.ux.FileTreePanel({
region:'west',
split:true,
collapsible: true,
collapseMode: 'mini',
width:200,
minWidth: 150,
maxWidth: 350,
border: false,
title: 'Bestanden',
margins: '5 0 5 5',
cmargins: '0 0 0 0',
el:'tree-div',
enableRename: true,
autoScroll:true,
animate:true,
enableDD:true,
iconCls:'icon-upload',
rootPath:'root',
containerScroll: true,
loader: new Tree.TreeLoader({
dataUrl:'php/get-nodes.php'
}),
pathSeparator: '/',
onBeforeUpload:function(node) {
alert(node);
}

});

ZooKeeper
11 Aug 2008, 3:08 AM
Are you planning to port this extention to the official FileUpload Component introduced in 2.2?

jsakalos
11 Aug 2008, 8:01 AM
I was thinking about it but I'll wait until loeppky answers your question you posted in his thread.

mikecc
12 Aug 2008, 2:43 PM
hey guys, i am a very-much beginner with ExtJS. I am trying to get Saki's FileTree going (which btw, Saki from what I see, great work!). I am sorry if this is a basic answer or something, but I am trying to get this working under my Ruby on Rails environment and I keep tackling error after error and now I cannot get around this:

"Ext.ux.FileTreePanel is not a constructor"

any ideas? this is my code:


<%= stylesheet_link_tag "../ext/resources/css/ext-all.css" %>
<%= javascript_include_tag '../ext/adapter/prototype/ext-prototype-adapter.js' %>
<%= javascript_include_tag '../ext/adapter/ext/ext-base.js' %>
<%= javascript_include_tag '../ext/ext-all.js' %>
<%= javascript_include_tag '../filetree/WebPage.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.form.BrowseButton.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.FileUploader.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.UploadPanel.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.FileTreeMenu.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.FileTreePanel.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.ThemeCombo.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.IconCombo.js' %>
<%= javascript_include_tag '../filetree/Ext.ux.LangSelectCombo.js' %>
<%= javascript_include_tag '../locale/es-EN.js' %>

<% javascript_tag do -%>
Ext.onReady(function(){

var treepanel = new Ext.ux.FileTreePanel({
width:500,
height:400,
id:"ftp",
title:"Directory Browser",
renderTo:"treepanel",
rootPath:"../public/uploads/",
rootText:"Root",
topMenu:true,
autoScroll:true,
url:"/ftp",
singleUpload:false,
enableProgress:false
});

});
<% end -%>

<div id="treepanel"></div>

ZooKeeper
13 Aug 2008, 12:02 AM
Studying your code I've stumbled upon

else if('done' === 'state') {
isn't it supposed to be like this?

else if('done' === state) {

jsakalos
14 Aug 2008, 9:23 AM
Yes, it's definitely the bug. Thank you for debugging. I'm uploading the corrected version to the server.

sabline
15 Aug 2008, 4:17 PM
Thanks Saki for that great extension: i made my own filetree.php and now everything works perfectly.

Now i'd like to put the filetree in a window of the "Ext Desktop Sample" but i can't do it: someone could show me an example? thanks a lot!

mjlecomte
15 Aug 2008, 6:06 PM
Thanks Saki for that great extension: i made my own filetree.php and now everything works perfectly.

Now i'd like to put the filetree in a window of the "Ext Desktop Sample" but i can't do it: someone could show me an example? thanks a lot!
Your question is not specific to this thread, that is an extension about filetrees. Your question is more about desktop, so should be in a thread about desktop or in your own new thread. You are less likely to get an answer posting in this thread.

sekundek
19 Aug 2008, 5:38 AM
One thing about download. In case of error (I use dynamic file get, because some logic is done in the backend) is there a way to show this to user.

Right now i output error in plain text and when I check html inside iframe I can see this text. But access to this text with Ext.get('frame-id') I get nothing at all. Do you have any idea how to trace errors when downloading files.

jsakalos
19 Aug 2008, 1:33 PM
I think downloads have nothing to do with Ext. Content-Disposition: attachment just triggers browser's download dialog w/o Ext even knowing about that.

sekundek
19 Aug 2008, 9:56 PM
Yes I know that, but what I did was: If everything is ok on backend side i set Content type and other apropriate headers so dowload dialog is triggered. In case of error i set content type to text/html and output some msg.

Because form have target set to the id of iframe, all output is written inside iframe. If I inspect the html I can see this msg in the iframe (btw, i remove the code for removing iframe from body). But when I try to get this msg inside iframe with Ext.get or even document.getElementById nothing is inside this frame. Maybe someone have an idea why such difference.

jsakalos
20 Aug 2008, 12:28 AM
This I've never tried. Somebody else?

sabline
20 Aug 2008, 7:46 AM
in filetree.php i send the error:

<?php
...
$contentType = "text/html; charset=utf-8";
header("Content-Type: {$contentType}");
echo '[{"success":false,"errors":" '.$error_text.'"}]';
...
?>

and i read it in FileUploader.js doing one little change at line 581 :

// process command failure
else {
this.processFailure(options, response,o[0].errors);
}
}
// process ajax failure
else {

i hope it helps...

sekundek
20 Aug 2008, 11:53 AM
I'm talking about Download not upload. Download is done in filetree.js

Silver Paladin
21 Aug 2008, 5:05 PM
I have the upload script working in my project, it's awesome!

Had no trouble with the upload.php, but don't have a clue about how to make progress.php.

Any hints anyone?

Silver Paladin
21 Aug 2008, 8:43 PM
When the clients form uploadMaxSize is set to a value higher than the servers upload_max_filesize or post_max_size, the value of the $_FILES array is empty.

This results in the ['key'] value which is passed through the $_FILES array being unknown and not returnable to the upload form, which results in an Unknown error in the upload form on the client side.

I realize this may be a trivial error from your point of view, as it is related to server configuration and the upload form configuration, but is there perhaps an alternate method to trap this error? It's a real head banger to figure it out when you can't actually see the upload.php in firebug!

jsakalos
22 Aug 2008, 12:19 AM
What's your server config for $_FILES to be empty? I have another problem: bigger files are uploaded but not saved eating the bandwidth while uploading.

GokhanNL
22 Aug 2008, 12:32 AM
Hello All,

I have a small issue with my uploadpanel/form.

My .js code for uploadpanel is (It works well, I pop it with a button)



var win = new Ext.Window({
width:180
,minWidth:165
,id:'winid'
,height:220
,minHeight:200
,layout:'fit'
,border:false
, closable: true
, closeAction: 'hide'
,title:'File Upload'
,iconCls:'icon-upload'
,items:[{
xtype:'uploadpanel'
,buttonsAt:'tbar'
,id:'uppanel'
,url:'upload.aspx'
,path: "upload"
,maxFileSize:1048576
,enableProgress:false
,singleUpload:true
}]
});


And my upload.aspx is



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class transactions_upload : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Get the HttpFileCollection
HttpFileCollection hfc = Request.Files;
Response.Write("File count:" + hfc.Count.ToString());
}
}


Unfortunately File count shows 0 and as you see nothing comes to upload.aspx.

Any thoughts?

jsakalos
22 Aug 2008, 7:25 AM
What is aspx? ... just kidding. Anyway, I don't use M$ "products" except hardware ones so somebody else has to pick this up to help you.

Silver Paladin
22 Aug 2008, 8:03 AM
I am using this page for my reference: http://www.php.net/manual/en/features.file-upload.php


What's your server config for $_FILES to be empty? I have another problem: bigger files are uploaded but not saved eating the bandwidth while uploading.

From the PHP manual:
The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field, and its value is the maximum filesize accepted by PHP. Fooling this setting on the browser side is quite easy, so never rely on files with a greater size being blocked by this feature. The PHP settings for maximum-size, however, cannot be fooled. This form element should always be used as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer failed.

This seems to infer that the browser itself should abort the transfer if the user has selected a file that is too large. Further reading reveals that this is not, and has never been the case!

From a post in the comments
As said before if POST size exceeds server limit then $_POST and $_FILES arrays become empty. You can track this using $_SERVER['CONTENT_LENGTH'].

So, the only thing that would really get around this issue is if we probe the server for the maximum post size and maximum file size. On the client side, we need to check the size of the file, and since that is impossible with javascript, the best alternative is to use flash. If we used flash for our file chooser, we would know the file size and that can be passed to a javascript variable (getURL()) , which we could then use to alert the client that the transfer will not be allowed. I haven't done any testing, but maybe this is something I can give a shot at when my project is finished.

jsakalos
22 Aug 2008, 8:14 AM
Thank you very much for the analysis, it's very helpful. Unfortunately, I do not see any reasonable solution.

The0s
22 Aug 2008, 10:51 AM
I just started integrating with this extension today (which is awesome saki), so I may be missing something about how it works, but...

Assuming your using PHP's built-in automagic multipart/form-data handler:

When uploading files that are larger than upload_max_filesize contained in a request body thats under max_post_size youll get an error in your $_FILES array which you can reuturn without a problem. (I would suggest not using max_file_size all together)

If you exceed max_post_size, the entire request body is rejected by PHP when interfacing with the web server. The best you can do is return a 413 text/html "marker" (cant get the status code anyways) when you see that the content-type is multipart/form-data, content-length > 0 and sizeof _POST and _FILES is 0.

So if uploadSingle:true, you would reject all the uploads if you see at 413 since they all failed. Otherwise, each has its own iframe so you should be able to sort out which ones are too large (?).

Another alternative is to move your "key" into the query string since it will always get through via _GET.

Silver Paladin
22 Aug 2008, 11:18 AM
(I would suggest not using max_file_size all together)

Can we?



Another alternative is to move your "key" into the query string since it will always get through via _GET.

That would be great for one file, getting more difficult for 2 or more? Plus writing the override could get complicated and messy to be able to GET and POST at the same time.

The problem I ran into was max_post_size was exceeded by the file I was sending. That is kind of a bug or oversight in PHP afaik because there are error codes defined to trap exceeding upload_max_filesize for when you send a file larger that the server can handle. (error code 1 is returned). There is no error code for max_post_length.

Silver Paladin
22 Aug 2008, 12:13 PM
I noticed in Ext.ux.UploadPanel.js there is a section:


// add custom fields if passed
if(Ext.isArray(this.customFields)) {
fields.push(this.customFields);
}

I tried to add a field like so:


xtype: 'uploadpanel',
buttonsAt: 'tbar',
id: 'uploadPanel',
url: 'upload.php',
path: '/files/',
maxFileSize: 1073741824 /* 30 mb */,
enableProgress: false,
singleUpload: false,
customFields: [{
xtype: 'hidden',
name: 'categoryId',
value: this.category_id
}]

Am I assuming incorrectly that the purpose of this section is not to add other input fields to the form?

jsakalos
22 Aug 2008, 12:27 PM
That's not finished yet - custom fields don't work yet.

The0s
22 Aug 2008, 1:41 PM
Can we?

I think its a pretty useless feature. If you want to restrict the filesize of a particular upload below that of upload_max_size you'll have to do it manually since its php is using the user's own request to do the validation (!)


The problem I ran into was max_post_size was exceeded by the file I was sending. That is kind of a bug or oversight in PHP afaik because there are error codes defined to trap exceeding upload_max_filesize for when you send a file larger that the server can handle. (error code 1 is returned). There is no error code for max_post_length.

Its not a bug, perhaps just poorly documented. PHP has to interface with the web server to get the body of the HTTP request.Even though they call it max_post_size its really the size of the request body. If the web server tries to give it something too big, php will dump it since it cant parse a fragment of a request body. If it were to read it all in, it might hit the memory_limit and die, unable to respond at all (worst case). They SHOULD have a flag that says 'BTW I DISCARDED the request body to save my life'...

I whipped this up, I dunno if it works, but you get the idea:



$too_big = !sizeof($_POST)
&& !sizeof($_FILES)
&& array_key_exists('CONTENT_LENGTH',$_SERVER)
&& array_key_exists('CONTENT_TYPE',$_SERVER)
&& stripos($_SERVER['CONTENT_TYPE'],'multipart/form-data') !== false
&& $_SERVER['CONTENT_LENGTH'] > 0;

That would be great for one file, getting more difficult for 2 or more? Plus writing the override could get complicated and messy to be able to GET and POST at the same time.

Remember that the query string has nothing to do with the http method (post,get,put,etc). A URI can have a query string at any time. The general consensus is that you cannot have a request body if your doing a get, but the HTTP standard doesnt say anything explicit on the topic (so be conservative...).

You have to re-write the URI before the form gets submitted, and since youre posting, Ext wont do any funky modifications ot the URI. To handle both multi and single, just concat on a single query param: upload.php?node_ids=ext-gen1,ext-gen2....

If you hit max_post_size all the uploads will fail, so ordering doesnt matter. If you dont, you'll get errors for all the files that were too big.

shadoi
27 Aug 2008, 4:00 PM
I have everything working correctly, the only issue remaining is that files never finish uploading, the spinner stays active forever, even though the files are uploaded successfully and my server is returning the following:

Header:
Content-Type: text/html; charset=utf-8

Response:
{"success": true}

The upload panel is configured like so:

xtype:'uploadpanel',
buttonsAt:'bbar',
id:'uppanel',
url:'custom_modules/file',
path:'root',
maxFileSize:1048576,
enableProgress:false,
singleUpload:false

What am I doing wrong?

jsakalos
27 Aug 2008, 11:44 PM
Try to set singleUpload:true to see what happens.

shadoi
28 Aug 2008, 1:30 PM
Try to set singleUpload:true to see what happens.

OK, I feel a little silly. I totally misread the comments in the code, assuming singleUpload:true was default.

Thanks for the help, it's working wonderfully. You rock Saki. :)

-Blake

dan.plifeye
29 Aug 2008, 6:50 AM
Can columns be applied to this extension similar to the example: http://extjs.com/deploy/dev/examples/tree/column-tree.html ?

dan.plifeye
29 Aug 2008, 7:53 AM
Also whilst I think about it, are there any plans (or any extensions I've missed) that use a similar approach but utilises the DataView rather than TreePanel?

hsurya
29 Aug 2008, 10:24 AM
Hello!
Thanks for your reply! I tried your demo on your website, however I noted it is missing the upload progress (e.g. 10%, 15%, etc.) Can you confirm this? That is the part I would need...
Thanks,
Paul



Yes, Paul, I have yet to work on that upload progress part because I am very busy with my study project now. I will update you once I got it later.
Keep trying and good luck!
hsurya

Hi Paul, today I have implemented the upload progress, a bit different with Saki's though, because I modified the script "Ext.ux.FileUploder" and "Ext.ux.UploadPanel" to upload each file separately, so I can fetch each file progress on the server independently.

Just information for others, I use classic ASP for Saki's filetree-panel back-end. Quite difficult because of the limitation the old ASP inherits. But finally, there it is. ;)

see demo: http://hsurya.brinkster.net/filetree/filetree.asp
snapshot:
http://hsurya.brinkster.net/filetree/images/progress.png

fxlacroix
4 Sep 2008, 7:06 AM
hi saki,

I point an issue about the shortKey on IE... I know that this subject may not interrest a lot of people but i would like to debug it so it could work on Ie as it works on FF or Chrome :)

well, tested on your page, when I use a shortKey like F2 => rename, or N => new folder, it works the first time... end then bad trip :( the treePanel is losing its focus wheter it is not in an other browser...
I tried to force 'focus' it with the method of the treePanel but no way....

Finally, when i click on a [+] near a folder, i get the focus back ^^ it seems to be an event like 'move' that make it work...
you can test it with the arrow to be sure that you are in the treePanel or if you are in the navigator... in first case, selection move; in second, the browser page move...

My question is : Do you have an idea to launch an event (maybe like 'move') transparently to get back the focus ?
or maybe a better idea ... ?

jsakalos
4 Sep 2008, 11:32 AM
I don't know off the top of my head... Also, I'm very reluctant to use my precious time to workaround bugs M$ put into their "products"...

fxlacroix
5 Sep 2008, 2:39 AM
ok saki,

If you want your tree shortkey to work on IE,
You got to add a this.getTreeEl().focus().... maybe after you callback function.

++

jbird526
10 Sep 2008, 5:25 AM
In IE 7.0.5730.11 on Win XP

When tying to delete an individual file in the UploadPanel, the file is deleted but the Add button disappears also. I know this is a Beta so I'm not expecting any of your time to figure out why. It is doing the same thing in my app, so I figured I'd test it on your site also.


http://mysite.verizon.net/jpecsek/ext/buttonVanish.png

sdrew
10 Sep 2008, 8:46 AM
First, thanks for this great widget. It does work well, and is nicely designed.

However, I have found one issue that prevented me from implementing it, although I am still trying to track down the issue.

After using the uploader a bunch of times IE starts to slow down and uses alot of memory.

So I ran Drip memory leak detector against it and sure enough under IE7 lots of dom objects are not being cleaned up. Looks like the objects are related to Uploader Panel.

See attached for a list of just some of the dom objects I ran this against the demo site http://filetree.extjs.eu/ using drip and IE7.

By the way no memory leaks with IE6.

Any ideas?

jsakalos
10 Sep 2008, 12:00 PM
Hmm, difficult to say anything reasonable on that. Is it UploadPanel, IE7 (why not IE6 then?) or Ext problem? No idea.

Somebody else?

jsakalos
10 Sep 2008, 12:02 PM
Button disappearing seems to be BrowseButton problem. Try to ask loeppky to look at it.

jbird526
11 Sep 2008, 8:10 AM
Button disappearing seems to be BrowseButton problem. Try to ask loeppky to look at it.

I realize now that you said it that it might be the browsebutton code. I'll look into it.