-
Notifications
You must be signed in to change notification settings - Fork 91
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
Added ability to disable custom buttons and show disabled text #1012
Conversation
GH issue #948 |
ohhhh...shiny! |
ng-if="vm.hasRequiredRole(button)" | ||
ng-disabled="!button.enabled" | ||
ng-click="vm.invokeCustomAction(button)" | ||
> |
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.
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)}}" |
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.
just curious, any reason why the tooltip wasn't applied directly to the button? suspicious of this new <span>
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.
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.
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 |
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.
LG2M!
No UX change (just disabling what is there) |
@miq-bot add_label enhancement
@miq-bot add_label fine/no