[PATCH] BZ859954 - Don't display buttons on instance card if actions are not supported
Jozef Zigmund
jzigmund at redhat.com
Thu Oct 4 15:19:37 UTC 2012
On Wed, 2012-10-03 at 16:17 +0200, Tomáš Hrčka wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=859954
> ---
> src/app/stylesheets/_buttons.scss | 8 ++++----
> src/app/views/instances/_instance_card.html.mustache | 12 ------------
> 2 files changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/src/app/stylesheets/_buttons.scss b/src/app/stylesheets/_buttons.scss
> index 91055b2..ac39977 100644
> --- a/src/app/stylesheets/_buttons.scss
> +++ b/src/app/stylesheets/_buttons.scss
> @@ -94,9 +94,9 @@ Application Button Set
> color: #900;
> }
>
> -.button.danger:hover,
> -.button.danger:focus,
> -.button.danger:active {
> +.button.danger:hover:not(.disable),
> +.button.danger:not(.disable):focus,
> +.button.danger:not(.disable):active {
> border-color: #b53f3a;
> border-bottom-color: #a0302a;
> color: #fff;
> @@ -108,7 +108,7 @@ Application Button Set
> background-image: linear-gradient(#dc5f59, #b33630);
> }
>
> -.button.danger:active,
> +.button.danger:not(.disable):active,
> .button.danger.active {
> border-color: #a0302a;
> border-bottom-color: #bf4843;
> diff --git a/src/app/views/instances/_instance_card.html.mustache b/src/app/views/instances/_instance_card.html.mustache
> index 1cb651b..2745fbc 100644
> --- a/src/app/views/instances/_instance_card.html.mustache
> +++ b/src/app/views/instances/_instance_card.html.mustache
> @@ -34,12 +34,6 @@
> :disabled => false, :class => 'button danger') %>
> </li>
> {{/stop_enabled}}
> - {{^stop_enabled}}
> - <li>
> - <%= button_to(t('deployments.pretty_view_show.stop'), stop_instance_path('replace_id').sub('replace_id', '{{id}}'),
> - :disabled => true, :class => 'button danger') %>
> - </li>
> - {{/stop_enabled}}
>
> {{#reboot_enabled}}
> <li>
> @@ -47,12 +41,6 @@
> :disabled => false, :class => 'button danger') %>
> </li>
> {{/reboot_enabled}}
> - {{^reboot_enabled}}
> - <li>
> - <%= button_to(t('deployments.pretty_view_show.reboot'), reboot_instance_path('replace_id').sub('replace_id', '{{id}}'),
> - :disabled => true, :class => 'button danger') %>
> - </li>
> - {{/reboot_enabled}}
> </ul>
> </div>
> </li>
ACK
More information about the aeolus-devel
mailing list