From c732513d8a1e48f8f723cbd85377e7589ab4fbf1 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Wed, 11 May 2011 17:55:41 -0700 Subject: [PATCH] cloudStack UI - Recurring Snapshot - fix a bug that when "hour" is "08" or "09", it will mysteriously change to "12" when Apply button is clicked. --- ui/scripts/cloud.core.volume.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/scripts/cloud.core.volume.js b/ui/scripts/cloud.core.volume.js index 5c9846dd525..d9416cf5037 100644 --- a/ui/scripts/cloud.core.volume.js +++ b/ui/scripts/cloud.core.volume.js @@ -875,7 +875,7 @@ function doRecurringSnapshot($actionLink, $detailsTab, $midmenuItem1) { if(meridiem=="AM") hour24 = hour12; else //meridiem=="PM" - hour24 = (parseInt(hour12)+12).toString(); + hour24 = (parseInt(hour12,10)+12).toString(); //specify number base to be 10. Otherwise, "08" and "09" will be treated as octal numbers (base 8). schedule = minute + ":" + hour24; max = bottomPanel.find("#edit_max").val(); timezone = bottomPanel.find("#edit_timezone").val(); @@ -892,7 +892,7 @@ function doRecurringSnapshot($actionLink, $detailsTab, $midmenuItem1) { if(meridiem=="AM") hour24 = hour12; else //meridiem=="PM" - hour24 = (parseInt(hour12)+12).toString(); + hour24 = (parseInt(hour12,10)+12).toString(); //specify number base to be 10. Otherwise, "08" and "09" will be treated as octal numbers (base 8). dayOfWeek = bottomPanel.find("#edit_day_of_week").val(); dayOfWeekString = bottomPanel.find("#edit_day_of_week option:selected").text(); schedule = minute + ":" + hour24 + ":" + dayOfWeek; @@ -911,7 +911,7 @@ function doRecurringSnapshot($actionLink, $detailsTab, $midmenuItem1) { if(meridiem=="AM") hour24 = hour12; else //meridiem=="PM" - hour24 = (parseInt(hour12)+12).toString(); + hour24 = (parseInt(hour12,10)+12).toString(); //specify number base to be 10. Otherwise, "08" and "09" will be treated as octal numbers (base 8). dayOfMonth = bottomPanel.find("#edit_day_of_month").val(); schedule = minute + ":" + hour24 + ":" + dayOfMonth; max = bottomPanel.find("#edit_max").val();