Kiosk Policy UI - Single Mode App

revert-dabc3590
Saad Sahibjan 6 years ago committed by Inosh Perara
parent 59a4d9d034
commit 53baccd2e7

@ -210,6 +210,7 @@ var androidOperationModule = function () {
payload["kioskBackgroundImage"] = deviceGlobalConfigurations["kioskBackgroundImage"];
payload["kioskLogoImage"] = deviceGlobalConfigurations["kioskLogoImage"];
payload["kioskAppName"] = deviceGlobalConfigurations["kioskAppName"];
payload["isSingleModeApp"] = deviceGlobalConfigurations["isSingleModeApp"];
payload["isIdleGraphicsEnabled"] = deviceGlobalConfigurations["isIdleGraphicsEnabled"];
payload["idleTimeout"] = deviceGlobalConfigurations["idleTimeout"];
payload["isMultiUserDevice"] = deviceGlobalConfigurations["isMultiUserDevice"];
@ -501,6 +502,20 @@ var androidOperationModule = function () {
if (operationData["kioskAppName"]) {
deviceGlobalConfigurations["kioskAppName"] = operationData["kioskAppName"];
}
deviceGlobalConfigurations["isSingleModeApp"] = operationData["isSingleModeApp"];
if (deviceGlobalConfigurations["isSingleModeApp"] === true) {
var selectedSingleModeAppElement = "div#install-app-enrollment .child-input";
if ($(selectedSingleModeAppElement + "[data-child-key='type']").val() === "Web Clip") {
var webClipApp = {
"identity": $(selectedSingleModeAppElement + "[data-child-key='packageName']").val(),
"title": $(selectedSingleModeAppElement + "[data-child-key='appName']").val()
};
deviceGlobalConfigurations["singleModeApp"] = JSON.stringify(webClipApp);
} else {
deviceGlobalConfigurations["singleModeApp"]
= $(selectedSingleModeAppElement + "[data-child-key='packageName']").val();
}
}
deviceGlobalConfigurations["isIdleGraphicsEnabled"] = operationData["isIdleGraphicsEnabled"];
if (operationData["idleTimeout"]) {
deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"];

@ -365,6 +365,22 @@ var validatePolicyProfile = function () {
}
}
if (continueToCheckNextInputs) {
var isSingleAppMode = $("input#cosu-global-config-is-single-application-mode").is(":checked");
if (isSingleAppMode === true) {
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if ($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "No application has been selected in Enrollment Application Install " +
"config to run on Single Application Mode.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
@ -778,7 +794,7 @@ var validatePolicyProfile = function () {
//If enrollment app install configured
operation = androidOperationConstants["ENROLLMENT_APP_INSTALL"];
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if($(enrollmentAppInstallAppList).length == 0) {
if($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not selected to be installed during device enrollment.",

@ -1722,6 +1722,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp"/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

@ -1327,7 +1327,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent" disabled/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp" disabled/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

@ -308,6 +308,22 @@ var validatePolicyProfile = function () {
}
}
if (continueToCheckNextInputs) {
var isSingleAppMode = $("input#cosu-global-config-is-single-application-mode").is(":checked");
if (isSingleAppMode === true) {
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if ($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "No application has been selected in Enrollment Application Install " +
"config to run on Single Application Mode.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
@ -713,7 +729,7 @@ var validatePolicyProfile = function () {
//If enrollment app install configured
operation = androidOperationConstants["ENROLLMENT_APP_INSTALL"];
var enrollmentAppInstallAppList = "div#install-app-enrollment .child-input";
if($(enrollmentAppInstallAppList).length == 0) {
if($(enrollmentAppInstallAppList).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not selected to be installed during device enrollment.",

@ -1453,6 +1453,26 @@
class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/>
</div>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
Selected initial app in
<strong>Enrollment Application Install policy config</strong>
will be selected for single application mode
</ul>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-single-application-mode" type="checkbox"
class="form-control operationDataKeys"
data-key="isSingleModeApp"/>
<span class="helper">
Is single application mode
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is single application mode"></span>
</span>
</label>
</div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">

Loading…
Cancel
Save