Idea #2884
closedImprove file selection dialog (switch projects, add preview area)
Added by Tom Clegg over 10 years ago. Updated over 10 years ago.
Description
- List of files probably has to be condensed a bit (but maybe that's good in both settings)
- "Source information" portion should surely use the same code/partial as the "show collection" page (we will certainly be working on improving the content as a separate effort).
Files
Screenshot from 2014-06-02 09_28_41.png (93.7 KB) Screenshot from 2014-06-02 09_28_41.png | Tom Clegg, 06/02/2014 09:29 AM |
Updated by Tom Clegg over 10 years ago
Updated by Tom Clegg over 10 years ago
- Subject changed from Bring up file selection dialog instead of using "shopping cart" mechanism to Improve file selection dialog (switch projects, add preview area)
Updated by Tom Clegg over 10 years ago
- Target version changed from 2014-06-17 Curating and Crunch to 2014-07-16 Sprint
Updated by Tim Pierce over 10 years ago
Review at 76dea877
I don't understand generally what's going on with the ajax:complete
vs ajaxComplete
and ajax:send
ajaxSend
changes. Can you explain a little more?
My JavaScript is not very strong so I don't have anything substantive, but I'm going to ask for some stupid little changes that make the code easier for me to follow because jQuery makes my head hurt:
- apps/workbench/app/assets/javascripts/select_modal.js
$(this)
->$this
in the $.ajax call- Does the jqxhr
.done()
callback imply that the request succeeded? The docs sort of suggest that but I'm not sure. (If the call didn't succeed, then I think we don't want to populate modal-dialog-preview-pane with whatever's in the "data" argument.)
- apps/workbench/app/controllers/application_controller.rb
@objects = Group.find(params[:project_uuid]).contents({:filters => [['uuid', 'is_a', "arvados\##{ArvadosApiClient.class_kind(model_class)}"]]})
- I can't make head or tails of this. Is this code basically filtering the uuids listed in the
project_uuid
param for uuids which are members of the current controller class? I'd expect every uuid in that list to bearvados#group
anyway, so I'm pretty lost here. - Not your code, but -- can we move
ArvadosApiClient.class_kind
into a helper library function of some kind? It's confusing to call a class method in a totally unrelated class just because that's where it happens to be defined. Might as well move generic code to an all-purpose location.
- I can't make head or tails of this. Is this code basically filtering the uuids listed in the
- apps/workbench/app/controllers/collections_controller.rb
- Leftover debugging
puts
statement?
- Leftover debugging
- apps/workbench/app/views/collections/_choose_rows.html.erb
- Leftover debugging
puts
statements?
- Leftover debugging
Updated by Peter Amstutz over 10 years ago
Tim Pierce wrote:
Review at 76dea877
I don't understand generally what's going on with the
ajax:complete
vsajaxComplete
andajax:send
ajaxSend
changes. Can you explain a little more?
Added comment in the source to explain what is going on.
My JavaScript is not very strong so I don't have anything substantive, but I'm going to ask for some stupid little changes that make the code easier for me to follow because jQuery makes my head hurt:
- apps/workbench/app/assets/javascripts/select_modal.js
$(this)
->$this
in the $.ajax call
Fixed
- Does the jqxhr
.done()
callback imply that the request succeeded? The docs sort of suggest that but I'm not sure. (If the call didn't succeed, then I think we don't want to populate modal-dialog-preview-pane with whatever's in the "data" argument.)
done() is only called on success. Added fail() callback which states the preview load failed.
- apps/workbench/app/controllers/application_controller.rb
@objects = Group.find(params[:project_uuid]).contents({:filters => [['uuid', 'is_a', "arvados\##{ArvadosApiClient.class_kind(model_class)}"]]})
- I can't make head or tails of this. Is this code basically filtering the uuids listed in the
project_uuid
param for uuids which are members of the current controller class? I'd expect every uuid in that list to bearvados#group
anyway, so I'm pretty lost here.
Added comment to source.
- Not your code, but -- can we move
ArvadosApiClient.class_kind
into a helper library function of some kind? It's confusing to call a class method in a totally unrelated class just because that's where it happens to be defined. Might as well move generic code to an all-purpose location.
I agree this is stupid and annoying, but I don't have a better idea of where to put it at the moment.
- apps/workbench/app/controllers/collections_controller.rb
- Leftover debugging
puts
statement?- apps/workbench/app/views/collections/_choose_rows.html.erb
- Leftover debugging
puts
statements?
Fixed.
Updated by Anonymous over 10 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|commit:47042547e7873d63f764e85ace085a8da314afd3.