-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the explorer listnavs more compact and drop the explorer_tree #1986
Conversation
35826a8
to
08e7444
Compare
var url = '/' + $('body').data('controller') + '/accordion_select?id=' + $(e.target).attr('id'); | ||
miqJqueryRequest(url, {beforeSend: true, complete: true}); | ||
// No need to load anything if only a single accordion is present | ||
if ($('#accordion > .panel').length > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@himdel I have a feeling that you might not like this approach here, but as we're going in the direction of components, this will be eventually moved into a controller/component around accordions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough :)
08e7444
to
850363f
Compare
- if @accords | ||
#accordion.panel-group | ||
-# Set the first accordion as selected if there is no active_accord in the sandbox | ||
- selected = @accords.find(-> { @accords.first }) { |accord| accord[:name].to_sym == @sb[:active_accord] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby keeps surprising me with things like this find
syntax. I have no idea why it needs a callable, but I still ❤️ it!
850363f
to
f26af33
Compare
Checked commit skateman@f26af33 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Tested in UI, LGTM 👍 |
This is a necessary next step in angularizing explorer accordions and trees:
explorer_tree
partial as its being rendered only in this filemiqAccordSelect
JS callbackParent issue: #1871
Possible merge conflicts with: #1984
@miq-bot add_label trees, explorers, refactoring, fine/no
@miq-bot assign @himdel