From db6fde2922d124b221fdd78ef79ed8651ac12956 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Wed, 17 Apr 2019 17:06:44 +0530 Subject: [PATCH 1/2] Add single mode app kiosk policy UI --- .../public/js/operation-mod.js | 6 +++ .../public/templates/android-policy-edit.hbs | 51 ++++++++++++------ .../public/templates/android-policy-view.hbs | 52 +++++++++++++------ .../templates/android-policy-operations.hbs | 51 ++++++++++++------ 4 files changed, 112 insertions(+), 48 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js index e4bd32974..fe820ecc3 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js @@ -211,6 +211,10 @@ var androidOperationModule = function () { payload["kioskLogoImage"] = deviceGlobalConfigurations["kioskLogoImage"]; payload["kioskAppName"] = deviceGlobalConfigurations["kioskAppName"]; payload["isSingleModeApp"] = deviceGlobalConfigurations["isSingleModeApp"]; + if (payload["isSingleModeApp"] === true) { + payload["isSingleModeAppBuiltForKiosk"] = + deviceGlobalConfigurations["isSingleModeAppBuiltForKiosk"]; + } payload["isIdleGraphicsEnabled"] = deviceGlobalConfigurations["isIdleGraphicsEnabled"]; payload["idleTimeout"] = deviceGlobalConfigurations["idleTimeout"]; payload["isMultiUserDevice"] = deviceGlobalConfigurations["isMultiUserDevice"]; @@ -515,6 +519,8 @@ var androidOperationModule = function () { deviceGlobalConfigurations["singleModeApp"] = $(selectedSingleModeAppElement + "[data-child-key='packageName']").val(); } + deviceGlobalConfigurations["isSingleModeAppBuiltForKiosk"] = + operationData["isSingleModeAppBuiltForKiosk"]; } deviceGlobalConfigurations["isIdleGraphicsEnabled"] = operationData["isIdleGraphicsEnabled"]; if (operationData["idleTimeout"]) { diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs index 2d0318501..bcbe19cad 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/templates/android-policy-edit.hbs @@ -1722,26 +1722,45 @@ class="form-control operationDataKeys" data-key="kioskAppName" maxlength="100" placeholder="Name to appear on the agent"/> -
- -
-
-