Repository navigation
Refactor upload js - #2279
Refactor upload js#2279
Conversation
|
now also working without js warnings in ie |
|
oh and the upload code is now indented correctly |
There was a problem hiding this comment.
would also be true if the type is null, please use ===
|
Code looks good except that == didnt test 👍 |
|
Is is possible to switch to one of the existing jQuery plugins that support chunked uploading. We still have people complaining that the web-interface doesn' work with big fileuploads. |
|
blueimps jquery fileupload which we already use already supports chunked fileuploads ... wait let me rephrase that ... which we loaded but hacked apart and reimplemented browser workarounds in the wrong places. The library already fixes ALL of them AND supports chunked uploads: https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads So let us first use it correctly. This PR does the first step. I still have more changes from a customer that will provide nicer notifications when hundreds of files are deleted. I could even add code for upload buttons in the gallery and media app if we want that: @jancborchardt ? |
|
Cool. 👍 |
|
@butonic oooh sweet yes people would very mch like upload functionality in the Pictures and Music app directly! :) |
|
But then you really have to make clear and visible, that the "Music" and "Pictures" tabs are only views onto the "Files" one, otherwise ppl will wonder, why the pics they uploaded in "Pictures" suddenly appear in the "Files". |
|
They should probably appear in a folder called »Pictures« and »Music«, making it very obvious what happens. |
|
I wouldn't add an upload to music, to pictures it makes more sense since the target it clear, the gallery you're currently viewing |
|
code looks good 👍 can someone test IE? |
|
Upload functionality, or let’s call it »add new stuff here« inside of both Music and Pictures was expected multiple times in usability tests. |
|
How we implement upload functionality is a completely separate topic. Before we dive into that someone please test and merge this. I saw three thumbs but don't have the feeling more than one of them really tested the branch. hint hint |
|
Code tested and works as expected in Safari 6 and Firefox 19 on OS X 10.8.3. This is about refactoring code, new features should be discussed in another threat imo. Besides that, the fact that users think the music & pictures pages are separate directories is a usability issue. |
|
I'll do the IE testing as usual - but I need some more time on this. Too busy with other stuff. |
|
@stefannagtegaal I don’t understand how you can say (about Music and Pictures) »I do not think we need to allow uploads on those pages«. I’m not joking when I say that this has come up in every single usability test we did. People have no idea how to add Pictures or Music. This is a big issue. We don’t need to educate people about how our software works, we just need to fix it. It’s as simple as adding an upload function in those apps. |
|
But yes, this is a different issue tracked in owncloud-archive/apps#82 |
|
@jancborchardt While I don't think it's appropriate to discuss this here, I do think that this needs fixing. However, Pictures and Music is just nothing else as another (limited) view of the Files page with a different presentation (eg. image-files are presented as such, and music-files are being capable of playing. Besides that, it's nothing new.. The fact that the above is totally misunderstood by users, is that the menu items "Images" and "Music" appear in the top navigation which gives people the idea of switching between different directories, while they are basically only switching views (only display images and only display music-files). If you want to go this way and have a different navigation-item for Images and Music, how would you do that for the rest of all file formats like pdf/doc/docx/ppt/wav/mp4/ogg, etc, etc.. Do you want them all to appear in the top navigation, categorised by type? It doesn't make sense to me.. Code wise, we are doing nothing else as selecting all the filetypes which are of a special mime-type, and presenting it differently. So, some sort of menu which gives users the ability to switch between different views, would be better imo. |
|
@stefannagtegaal please move that discussion to owncloud-archive/apps#82 |
|
now testing .... |
|
|
data.result is undefined in IE8 |
|
@DeepDiver1975 I cannot reproduce the error you posted with a VM runnning Win7 and IE8 in IE8 standards mode or IE9 in IE9 standards mode. I don't have a VM with IE10 ... |
|
@butonic rebase please - thx |
|
rabased and added css fixes for bonuspoints. dac875e actually shows the cancel button in browsers that support it again. 7ecbaef uses the new css browser switch of the html tag instead of the deprecated jquery detection. @karlitschek @Raydiation @DeepDiver1975 @icewind1991 @schiesbn @stefannagtegaal please test and 👍 the rebased version. |
|
pulling @tanghus here, too to make him not only admire but also test the upload rewrite! |
|
lol - I'll test right after dinner :) |
|
This works flawlessly with FF 19.0.2 and Chromium 25.0.1364.160 A few issues that probably doesn't have anything to do with this PR.
Otherwise I'm in awe over the code ;) 👍 |
Today I bring you a completely refactored file upload. It features a correct usage of fileupload events and a seperation of ui updates (now in filelist.js) and file upload handling (files.js). While this might not really solve any current issues, it sure cleans up the code and makes it at least barely understandable.
Here it works at least in Chrome, FF. With multi-file upload and drag'n'drop of files. Dragging files onto folders will correctly show the upload there. Dragging of folders is still experimental in HTML5 so nothing new here.
@icewind1991 @Raydiation @DeepDiver1975 @bartv2 @karlitschek Drool later! Test and 👍!
PS: this is for after the release.