From e23ecc5b64f5640e16ec3de3744308098c337a6e Mon Sep 17 00:00:00 2001 From: Megala Date: Tue, 25 Oct 2016 17:34:53 +0530 Subject: [PATCH 1/3] Fixing EMM-1779 --- .../services/impl/DeviceManagementAdminServiceImpl.java | 2 +- .../public/templates/operations.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java index b7fcd5f92..2349aa3ef 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java @@ -1072,7 +1072,7 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe private static void validateScheduleDate(String dateString){ try { - if (dateString != null) { + if (dateString != null && !dateString.isEmpty()) { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); sdf.setLenient(false); sdf.parse(dateString); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs index 0b94ae088..877ef2e47 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs @@ -205,7 +205,7 @@ showDropdowns: true, timePickerIncrement: 1, locale: { - format: 'MM-DD-YYYY hh:mm a' + format: "YYYY-MM-DDTHH:mm:ssZZ" } }); }); @@ -222,7 +222,7 @@ showDropdowns: true, timePickerIncrement: 1, locale: { - format: 'MM-DD-YYYY hh:mm a' + format: "YYYY-MM-DDTHH:mm:ssZZ" } }); } From 91f0722b1de1588d477c5309bbbfeacc553bc44a Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Wed, 26 Oct 2016 10:24:55 +0530 Subject: [PATCH 2/3] Fix for variable declaration with single var --- .../units/mdm.unit.policy.create/public/js/policy-create.js | 4 ++-- .../app/units/mdm.unit.policy.edit/public/js/edit.js | 4 ++-- .../app/units/mdm.unit.policy.view/public/js/view.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js index 272be8ed2..7e3947ec7 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js @@ -2543,8 +2543,8 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var selectedValueOnChange = selectElement.value; - var i, slideDownVotes = 0; - for (i = 0; i < valueSet.length; i++) { + var slideDownVotes = 0; + for (var i = 0; i < valueSet.length; i++) { if (selectedValueOnChange == valueSet[i]) { slideDownVotes++; } diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js index eacae0229..99a25a385 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js @@ -2319,8 +2319,8 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var selectedValueOnChange = selectElement.value; - var i, slideDownVotes = 0; - for (i = 0; i < valueSet.length; i++) { + var slideDownVotes = 0; + for (var i = 0; i < valueSet.length; i++) { if (selectedValueOnChange == valueSet[i]) { slideDownVotes++; } diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js index ad6651977..69b6403b3 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js @@ -1954,8 +1954,8 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var selectedValueOnChange = selectElement.value; - var i, slideDownVotes = 0; - for (i = 0; i < valueSet.length; i++) { + var slideDownVotes = 0; + for (var i = 0; i < valueSet.length; i++) { if (selectedValueOnChange == valueSet[i]) { slideDownVotes++; } From fcdce211b7dfb8a6e03d3f2406d1f18ec96b8c0c Mon Sep 17 00:00:00 2001 From: Megala Date: Wed, 26 Oct 2016 11:57:56 +0530 Subject: [PATCH 3/3] Changing the required fields use css to add astriek --- .../public/templates/hidden-operations-android.hbs | 4 ++-- .../public/templates/hidden-operations-android-edit.hbs | 8 ++++---- .../public/templates/hidden-operations-android-view.hbs | 4 ++-- .../public/templates/hidden-operations-android.hbs | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs index 2cf3579e1..3dfe75928 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs @@ -870,8 +870,8 @@