Skip to content
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

Added ability to disable custom buttons and show disabled text #1012

Merged
merged 2 commits into from
Sep 26, 2017
Merged

Added ability to disable custom buttons and show disabled text #1012

merged 2 commits into from
Sep 26, 2017

Conversation

chalettu
Copy link
Contributor

@miq-bot add_label enhancement
@miq-bot add_label fine/no

@chalettu
Copy link
Contributor Author

GH issue #948

@chalettu
Copy link
Contributor Author

Screenshot
tooltip

@chriskacerguis chriskacerguis self-assigned this Sep 26, 2017
@chriskacerguis chriskacerguis added this to the Sprint 70 Ending Oct 2, 2017 milestone Sep 26, 2017
@chalettu chalettu changed the title Added ability to disable custom button and show disabled text Added ability to disable custom buttons and show disabled text Sep 26, 2017
@chriskacerguis
Copy link
Contributor

ohhhh...shiny!

ng-if="vm.hasRequiredRole(button)"
ng-disabled="!button.enabled"
ng-click="vm.invokeCustomAction(button)"
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a nit, but this should be up a line

<i ng-class="button.options.button_icon" ng-style="{color: button.options.button_color }"></i>
{{ button.name }}
</button>
<span uib-tooltip="{{(button.enabled? button.description: button.disabled_text)}}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, any reason why the tooltip wasn't applied directly to the button? suspicious of this new <span>

Copy link
Contributor Author

@chalettu chalettu Sep 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added because buttons in a disabled state do not show a tooltip. It has something to do with the cursor css. I researched different solutions and the easiest/less hacky solution was to wrap the element in a simple span.

chriskacerguis
chriskacerguis previously approved these changes Sep 26, 2017
@miq-bot
Copy link
Member

miq-bot commented Sep 26, 2017

Checked commits https://github.com/chalettu/manageiq-ui-service/compare/563dc7f49822505821d51aa6a6b89b9bf1665f41~...890c8b4690ba697ee7adcdde43c4bf15f24369e5 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG2M!

@chriskacerguis
Copy link
Contributor

No UX change (just disabling what is there)

@chriskacerguis chriskacerguis merged commit 199d37a into ManageIQ:master Sep 26, 2017
@chriskacerguis
Copy link
Contributor

@chalettu chalettu deleted the custom-button-visibility branch January 10, 2018 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants