[PATCH conductor] BZ790833 Added confirmation to stopping deployment and stopping and restarting instances
Tomas Sedovic
tsedovic at redhat.com
Mon Feb 20 15:31:34 UTC 2012
On 02/20/2012 04:19 PM, Matt Wagner wrote:
> On Mon, Feb 20, 2012 at 02:02:51PM +0100, jtomasek at redhat.com wrote:
>> From: Jiri Tomasek<jtomasek at redhat.com>
>>
>> ---
>> src/public/javascripts/application.js | 28 ++++++++++++++++++++++++++++
>> 1 files changed, 28 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
>> index 3d76c90..22439bb 100644
>> --- a/src/public/javascripts/application.js
>> +++ b/src/public/javascripts/application.js
>> @@ -143,6 +143,32 @@ $.extend(Conductor, {
>> });
>> },
>>
>> + multiStopValidation: function() {
>> + $('#stop_button, #stop_selected_instances').live('click', function(e) {
>> + if ($(".checkbox_table input[@type=radio]:checked").length == 0) {
>> + alert('Please make a selection before clicking Stop button.');
>> + e.preventDefault();
>> + } else {
>> + if (!confirm("Are you sure you want to proceed?")) {
>
> Reading this patch on the heels of another patch about I18n, it occurs
> to me that this isn't translation-friendly. I don't have a better
> solution here, so please don't take this as a criticism. Just thought
> I'd mention it... I wonder if there's a clever solution here.
>
> I did find i18n-js for doing this: https://github.com/fnando/i18n-js
>
> Arguably not in scope for a bug-fix sprint, though, but it might be
> interesting to revisit in an upcoming sprint.
>
> -- Matt
Oh my, I completely missed the I18n issue (and I was actually writing
localization-related code earlier today).
Thanks for spotting this, Matt.
More information about the aeolus-devel
mailing list