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-mod/public/js/operation-mod.js 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-mod/public/js/operation-mod.js index f47bbd997..a7002bb7f 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-mod/public/js/operation-mod.js +++ 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-mod/public/js/operation-mod.js @@ -80,7 +80,9 @@ var operationModule = function () { "AUTO_TIME" : "AUTO_TIME", "SET_SCREEN_CAPTURE_DISABLED" : "SET_SCREEN_CAPTURE_DISABLED", "SET_STATUS_BAR_DISABLED" : "SET_STATUS_BAR_DISABLED", - "APPLICATION_OPERATION_CODE":"APP-RESTRICTION" + "APPLICATION_OPERATION_CODE":"APP-RESTRICTION", + "SYSTEM_UPDATE_POLICY_CODE": "SYSTEM_UPDATE_POLICY", + "KIOSK_APPS_CODE": "KIOSK_APPS" }; // Constants to define Windows Operation Constants @@ -1012,6 +1014,24 @@ var operationModule = function () { } }; break; + case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]: + operationType = operationTypeConstants["PROFILE"]; + payload = { + "operation": { + "type": operationData["cosuSystemUpdateType"], + "startTime": operationData["cosuWindowStartTime"], + "endTime": operationData["cosuWindowEndTime"] + } + }; + break; + case androidOperationConstants["KIOSK_APPS_CODE"]: + operationType = operationTypeConstants["PROFILE"]; + payload = { + "operation": { + "whitelistedApplications": operationData["cosuWhitelistedApplications"] + } + }; + break; default: // If the operation is neither of above, it is a command operation operationType = operationTypeConstants["COMMAND"]; @@ -1276,6 +1296,8 @@ var operationModule = function () { value = operationDataObj.val(); } else if (operationDataObj.is(":checkbox")) { value = operationDataObj.is(":checked"); + } else if (operationDataObj.is(":radio") && operationDataObj.is(":checked")) { + value = operationDataObj.val(); } else if (operationDataObj.is("select")) { value = operationDataObj.find("option:selected").attr("value"); } else if (operationDataObj.hasClass("grouped-array-input")) { 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 be9a56826..655acfc1d 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 @@ -2441,6 +2441,24 @@ 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++) { + if (selectedValueOnChange == valueSet[i]) { + slideDownVotes++; + } + } + + var paneSelector = "#" + paneID; + if(slideDownVotes > 0) { + $(paneSelector).removeClass("hidden"); + } else { + $(paneSelector).addClass("hidden"); + } +}; // End of HTML embedded invoke methods 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 9eb9fac82..bc5c26c46 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 @@ -57,6 +57,17 @@ + + + + + + COSU Configuration + + + + + @@ -1268,6 +1279,249 @@ + + + + + + + System Update Policy + + + + + + + + + + + + + + + + System Update + + + + + + + + + + + Automatic + + + + + + + Postpone + + + + + + Window + + + + + + + + + + + Below configuration of start time and end time are valid only when + window option is selected. + + + + + Start Time + + + + + + + 12 AM + + 1 AM + 2 AM + 3 AM + 4 AM + 5 AM + 6 AM + 7 AM + 8 AM + 9 AM + 10 AM + 11 AM + 12 noon + 1 PM + 2 PM + 3 PM + 4 PM + 5 PM + 6 PM + 7 PM + 8 PM + 9 PM + 10 PM + 11 PM + + + + + Start Time + + + + + + + 12 AM + + 1 AM + 2 AM + 3 AM + 4 AM + 5 AM + 6 AM + 7 AM + 8 AM + 9 AM + 10 AM + 11 AM + 12 noon + 1 PM + 2 PM + 3 PM + 4 PM + 5 PM + 6 PM + 7 PM + 8 PM + 9 PM + 10 PM + 11 PM + + + + + + + + + + + + Whitelisted Applications + + + + + + + + + + + + + + + + Whitelisted Application List to enter Lock Task Mode + + + + + + + + + + + Add Application + + + + + + + No: + Application Name/Description + Package Name + + + + + + + No entries added yet. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file