Choose button remains disabled unless files are chosen#25900
Conversation
|
@sharidas, thanks for your PR! By analyzing the annotation information on this pull request, we identified @tanghus, @DeepDiver1975 and @butonic to be potential reviewers |
There was a problem hiding this comment.
Please limit this to the scope to the one of the dialog.
If there is any other unrelated DOM element with the class "primary" in the same page, they'd be selected as well.
|
|
@PVince81 Thanks for the review. Sure I will make the changes accordingly for the comments shared. Also I will take care of disabling choose button when a folder/directory is selected. |
57a8b91 to
77faa1c
Compare
There was a problem hiding this comment.
Why not add an explicit id to the button which allows us to address it directly?
There was a problem hiding this comment.
Because it means you need to invent very long ids that are unique across pages and across apps.
So here you'd call it (let me exagerate a bit for fun): "ownCloudCoreTheMightyFilePickersPrimaryButton".
Also, if you happen to have two dialogs open at the same time (for some reason, stacked), you'd still have a name conflict.
Best is to simply use scoped selectors. In this case here, self.$filePicker.find('.primary') already does the job nicely.
77faa1c to
49e199a
Compare
There was a problem hiding this comment.
no need for $() around getOcDialog. The method closest as for most jQuery methods already return a jQuery object.
49e199a to
b72ce8d
Compare
There was a problem hiding this comment.
same here, you can remove $(), it's already a jQuery object
|
@sharidas just ping me in the PR when you're done, I'll get an email 😄 |
|
@PVince81 Thanks for the review feedback. I missed out the $() part near the buttonEnableDisable variable. |
b72ce8d to
29491b4
Compare
|
@PVince81 I have updated my patch by removing the $() from the buttonEnableDisable variable too. |
|
Retested and I found another case where the button needs to re-disable itself: when clicking on the breadcrumbs to navigate back to a previous folder. |
|
@sharidas steps to reproduce on this branch:
Expected: "Choose" button disabled again |
|
@PVince81 I am not able to understand what is going on wrong at my end. For some reason I am seeing choose button disabled : http://imgur.com/a/m9Vau. |
|
@sharidas this looks correct so far since you didn't select anything. Now from here, select something, the button will enable itself. And then click on the house icon. The button must disable again but doesn't. |
from filepicker This is will help user to understand that you can only click choose button once the files are selected from the file picker. This addresses the solution for issue 16106 Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
29491b4 to
00fb145
Compare
|
@PVince81 I have tried with the new change and I have verified by clicking the house icon mentioned in the previous comment. It worked for me. I have also verified by creating different folders inside sub. Hope this sounds ok. |
|
I deleted and checked out the branch again, it works now. Maybe I had an older version, sorry. 👍 |
|
Fixes #16106 |
from filepicker
This is will help user to understand that you can only
click choose button once the files are selected from the
file picker. This addresses the solution for issue 16106
Signed-off-by: Sujith Haridasan Sujith_Haridasan@mentor.com