[PATCH conductor] BZ 815783 - fixed checking of launch time params (rev. 1)
Jirka Tomasek
jtomasek at redhat.com
Wed Sep 26 13:50:37 UTC 2012
On 09/26/2012 03:39 PM, jprovazn at redhat.com wrote:
> From: Jan Provaznik <jprovazn at redhat.com>
>
> If there are multiple tabs (=multiple assemblies) on launch time params page,
> then checking of empty params doesn't work properly - only params on last tab
> are checked.
>
> This patch also fixes CSS for disabled buttons (after consultation with
> UI guys).
>
> https://bugzilla.redhat.com/show_bug.cgi?id=815783
> ---
> src/app/stylesheets/_buttons.scss | 8 ++++----
> src/app/views/deployments/launch_time_params.html.haml | 4 +++-
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/src/app/stylesheets/_buttons.scss b/src/app/stylesheets/_buttons.scss
> index 3f6703b..91055b2 100644
> --- a/src/app/stylesheets/_buttons.scss
> +++ b/src/app/stylesheets/_buttons.scss
> @@ -42,9 +42,9 @@ Application Button Set
> *display: inline;
> }
>
> -.button:hover,
> -.button:focus,
> -.button:active,
> +.button:not(.disable):hover,
> +.button:not(.disable):focus,
> +.button:not(.disable):active,
> .button.active {
> border-color: #3072b3;
> border-bottom-color: #2a65a0;
> @@ -58,7 +58,7 @@ Application Button Set
> background-image: linear-gradient(#599bdc, #3072b3);
> }
>
> -.button:active,
> +.button:not(.disable):active,
> .button.active {
> border-color: #2a65a0;
> border-bottom-color: #3884cd;
> diff --git a/src/app/views/deployments/launch_time_params.html.haml b/src/app/views/deployments/launch_time_params.html.haml
> index 78cbd69..57e3661 100644
> --- a/src/app/views/deployments/launch_time_params.html.haml
> +++ b/src/app/views/deployments/launch_time_params.html.haml
> @@ -47,15 +47,17 @@
>
> :javascript
> function checkEnteredParams() {
> + var allFilled = true;
> $('.launch-time-params .parameters').each(function() {
> var $parameters = $(this).find('.parameter input');
> var filledOut = _.all($parameters, function(item) {
> return ! _.isEmpty($(item).val());
> });
> var param_id = $(this).attr('id');
> + if (!filledOut) allFilled = false;
> $('.labels').find('#' + param_id).toggleClass('filled-out', filledOut);
> - $('#submit_params').attr('disabled', !filledOut);
> });
> + $('#submit_params').toggleClass('disable', !allFilled).attr('disabled', !allFilled);
> };
>
> (function () {
ACK, checking empty params works properly now. Disabled Finalize button
is visually different.
Jirka
More information about the aeolus-devel
mailing list