Kiosk Policy UI

revert-dabc3590
Saad Sahibjan 6 years ago committed by Inosh Perara
parent 278fbccff4
commit db44610c11

@ -196,59 +196,93 @@ var androidOperationModule = function () {
}; };
break; break;
case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]: case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]:
payload = { payload = {};
"cosuProfileRestrictionStartTime": operationPayload["cosuProfileOperationRestrictionEndTime"], payload["isDeviceRestrictOperationTimeEnabled"] =
"cosuProfileRestrictionEndTime": operationPayload["cosuProfileOperationRestrictionEndTime"], operationPayload["isDeviceRestrictOperationTimeEnabled"];
"idleMediaURL" : operationPayload["deviceGlobalConfigurations"]["idleMediaURL"], payload["isDeviceGlobalConfigEnabled"] = operationPayload["isDeviceGlobalConfigEnabled"];
"kioskBackgroundImage": operationPayload["deviceGlobalConfigurations"]["kioskBackgroundImage"], if (payload["isDeviceRestrictOperationTimeEnabled"] === true) {
"kioskLogoImage" : operationPayload["deviceGlobalConfigurations"]["kioskLogoImage"], payload["cosuProfileRestrictionStartTime"] = operationPayload["cosuProfileRestrictionStartTime"];
"kioskAppName" : operationPayload["deviceGlobalConfigurations"]["kioskAppName"], payload["cosuProfileRestrictionEndTime"] = operationPayload["cosuProfileRestrictionEndTime"];
"isIdleGraphicsEnabled" : operationPayload["deviceGlobalConfigurations"]["isIdleGraphicsEnabled"], }
"idleTimeout" : operationPayload["deviceGlobalConfigurations"]["idleTimeout"], if (payload["isDeviceGlobalConfigEnabled"] === true) {
"isMultiUserDevice" : operationPayload["deviceGlobalConfigurations"]["isMultiUserDevice"], var deviceGlobalConfigurations = operationPayload["deviceGlobalConfigurations"];
"isLoginRequired" : operationPayload["deviceGlobalConfigurations"]["isLoginRequired"], payload["idleMediaURL"] = deviceGlobalConfigurations["idleMediaURL"];
"displayOrientation" : operationPayload["deviceGlobalConfigurations"]["displayOrientation"], payload["kioskBackgroundImage"] = deviceGlobalConfigurations["kioskBackgroundImage"];
"primaryURL": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["primaryURL"], payload["kioskLogoImage"] = deviceGlobalConfigurations["kioskLogoImage"];
"isTopBarEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isTopBarEnabled"], payload["kioskAppName"] = deviceGlobalConfigurations["kioskAppName"];
"isAddressBarEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"] payload["isIdleGraphicsEnabled"] = deviceGlobalConfigurations["isIdleGraphicsEnabled"];
["isAddressBarEnabled"], payload["idleTimeout"] = deviceGlobalConfigurations["idleTimeout"];
payload["isMultiUserDevice"] = deviceGlobalConfigurations["isMultiUserDevice"];
"showBackController": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["showBackController"], if (payload["isMultiUserDevice"] === true) {
"isForwardControllerEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isForwardControllerEnabled"], payload["isLoginRequired"] = deviceGlobalConfigurations["isLoginRequired"];
"isHomeButtonEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isHomeButtonEnabled"], var userAppConfigurations = operationPayload["userAppConfigurations"];
"isReloadEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isReloadEnabled"], var index;
"lockToPrimaryURL": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["lockToPrimaryURL"], for (index = 0; index < userAppConfigurations.length; index++) {
"isJavascriptEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isJavascriptEnabled"], userAppConfigurations[index]["visibleAppList"] =
"isTextCopyEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isTextCopyEnabled"], userAppConfigurations[index]["visibleAppList"].map(function (item) {
"isDownloadsEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isDownloadsEnabled"], var packageName = item.trim();
"isLockedToBrowser": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isLockedToBrowser"], if (packageName && packageName.charAt(0) !== "{") {
"isFormAutoFillEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isFormAutoFillEnabled"], var indexValue = packageName.lastIndexOf(":");
"isContentAccessEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isContentAccessEnabled"], if (indexValue > -1) {
"isFileAccessAllowed": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isFileAccessAllowed"], packageName = packageName.substring(0, indexValue);
"isAllowedUniversalAccessFromFileURLs": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isAllowedUniversalAccessFromFileURLs"], }
"isAllowedFileAccessFromFileURLs": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isAllowedFileAccessFromFileURLs"], }
"isAppCacheEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isAppCacheEnabled"], return packageName;
"appCachePath": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["appCachePath"], }).filter(Boolean);
"cacheMode": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["cacheMode"], if (userAppConfigurations[index]["username"] === "primaryUser") {
"isLoadsImagesAutomatically": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isLoadsImagesAutomatically"], payload["primaryUserApps"] = userAppConfigurations[index]["visibleAppList"];
"isBlockNetworkImage": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isBlockNetworkImage"], delete userAppConfigurations[index];
"isBlockNetworkLoads": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isBlockNetworkLoads"], }
"isSupportZoomEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isSupportZoomEnabled"], }
"isDisplayZoomControls": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isDisplayZoomControls"], payload["userAppConfigurations"] = userAppConfigurations.filter(Boolean);
"textZoom": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["textZoom"], }
"defaultFontSize": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["defaultFontSize"], payload["displayOrientation"] = deviceGlobalConfigurations["displayOrientation"];
"defaultTextEncodingName": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["defaultTextEncodingName"], if ("browserProperties" in deviceGlobalConfigurations) {
"isDatabaseEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isDatabaseEnabled"], var browserProperties = deviceGlobalConfigurations["browserProperties"];
"isDomStorageEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isDomStorageEnabled"], payload["isBrowserPropertyEnabled"] = browserProperties["isBrowserPropertyEnabled"];
"geolocationEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["geolocationEnabled"], payload["primaryURL"] = browserProperties["primaryURL"];
"isJavaScriptCanOpenWindowsAutomatically": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isJavaScriptCanOpenWindowsAutomatically"], payload["isTopBarEnabled"] = browserProperties["isTopBarEnabled"];
"isMediaPlaybackRequiresUserGesture": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isMediaPlaybackRequiresUserGesture"], payload["isAddressBarEnabled"] = browserProperties["isAddressBarEnabled"];
"isSafeBrowsingEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isSafeBrowsingEnabled"], payload["showBackController"] = browserProperties["showBackController"];
"isUseWideViewPort": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["isUseWideViewPort"], payload["isForwardControllerEnabled"] = browserProperties["isForwardControllerEnabled"];
"userAgentString": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["userAgentString"], payload["isHomeButtonEnabled"] = browserProperties["isHomeButtonEnabled"];
"mixedContentMode": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["mixedContentMode"] payload["isReloadEnabled"] = browserProperties["isReloadEnabled"];
payload["lockToPrimaryURL"] = browserProperties["lockToPrimaryURL"];
}; payload["isJavascriptEnabled"] = browserProperties["isJavascriptEnabled"];
payload["isTextCopyEnabled"] = browserProperties["isTextCopyEnabled"];
payload["isDownloadsEnabled"] = browserProperties["isDownloadsEnabled"];
payload["isLockedToBrowser"] = browserProperties["isLockedToBrowser"];
payload["isFormAutoFillEnabled"] = browserProperties["isFormAutoFillEnabled"];
payload["isContentAccessEnabled"] = browserProperties["isContentAccessEnabled"];
payload["isFileAccessAllowed"] = browserProperties["isFileAccessAllowed"];
payload["isAllowedUniversalAccessFromFileURLs"] =
browserProperties["isAllowedUniversalAccessFromFileURLs"];
payload["isAllowedFileAccessFromFileURLs"] =
browserProperties["isAllowedFileAccessFromFileURLs"];
payload["isAppCacheEnabled"] = browserProperties["isAppCacheEnabled"];
payload["appCachePath"] = browserProperties["appCachePath"];
payload["cacheMode"] = browserProperties["cacheMode"];
payload["isLoadsImagesAutomatically"] = browserProperties["isLoadsImagesAutomatically"];
payload["isBlockNetworkImage"] = browserProperties["isBlockNetworkImage"];
payload["isBlockNetworkLoads"] = browserProperties["isBlockNetworkLoads"];
payload["isSupportZoomEnabled"] = browserProperties["isSupportZoomEnabled"];
payload["isDisplayZoomControls"] = browserProperties["isDisplayZoomControls"];
payload["textZoom"] = browserProperties["textZoom"];
payload["defaultFontSize"] = browserProperties["defaultFontSize"];
payload["defaultTextEncodingName"] = browserProperties["defaultTextEncodingName"];
payload["isDatabaseEnabled"] = browserProperties["isDatabaseEnabled"];
payload["isDomStorageEnabled"] = browserProperties["isDomStorageEnabled"];
payload["geolocationEnabled"] = browserProperties["geolocationEnabled"];
payload["isJavaScriptCanOpenWindowsAutomatically"] =
browserProperties["isJavaScriptCanOpenWindowsAutomatically"];
payload["isMediaPlaybackRequiresUserGesture"] =
browserProperties["isMediaPlaybackRequiresUserGesture"];
payload["isSafeBrowsingEnabled"] = browserProperties["isSafeBrowsingEnabled"];
payload["isUseWideViewPort"] = browserProperties["isUseWideViewPort"];
payload["userAgentString"] = browserProperties["userAgentString"];
payload["mixedContentMode"] = browserProperties["mixedContentMode"];
}
}
break; break;
case androidOperationConstants["KIOSK_APPS_CODE"]: case androidOperationConstants["KIOSK_APPS_CODE"]:
payload = { payload = {
@ -445,12 +479,16 @@ var androidOperationModule = function () {
case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]: case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"]; operationType = operationTypeConstants["PROFILE"];
payload = {}; payload = {};
operation = {}; var operation = {};
operation["cosuProfileRestrictionStartTime"] = operation["isDeviceRestrictOperationTimeEnabled"] =
operationData["cosuProfileOperationRestrictionStartTime"]; operationData["isDeviceRestrictOperationTimeEnabled"];
operation["cosuProfileRestrictionEndTime"] = operationData["cosuProfileOperationRestrictionEndTime"]; operation["isDeviceGlobalConfigEnabled"] = operationData["isDeviceGlobalConfigEnabled"];
if (operation["isDeviceRestrictOperationTimeEnabled"] === true) {
deviceGlobalConfigurations = {}; operation["cosuProfileRestrictionStartTime"] = operationData["cosuProfileRestrictionStartTime"];
operation["cosuProfileRestrictionEndTime"] = operationData["cosuProfileRestrictionEndTime"];
}
if (operationData["isDeviceGlobalConfigEnabled"] === true) {
var deviceGlobalConfigurations = {};
if (operationData["idleMediaURL"]) { if (operationData["idleMediaURL"]) {
deviceGlobalConfigurations["idleMediaURL"] = operationData["idleMediaURL"]; deviceGlobalConfigurations["idleMediaURL"] = operationData["idleMediaURL"];
} }
@ -468,11 +506,38 @@ var androidOperationModule = function () {
deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"]; deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"];
} }
deviceGlobalConfigurations["isMultiUserDevice"] = operationData["isMultiUserDevice"]; deviceGlobalConfigurations["isMultiUserDevice"] = operationData["isMultiUserDevice"];
deviceGlobalConfigurations["isLoginRequired"] = operationData["isLoginRequired"];
deviceGlobalConfigurations["displayOrientation"] = operationData["displayOrientation"]; deviceGlobalConfigurations["displayOrientation"] = operationData["displayOrientation"];
if (deviceGlobalConfigurations["isMultiUserDevice"] === true) {
browserProperties = {}; deviceGlobalConfigurations["isLoginRequired"] = operationData["isLoginRequired"];
if (operationData["primaryURL"]) { var storeApps = $("#cosu-profile-app-configs-storeapps").data("storeapps");
var primaryUserApps = {
"username" : "primaryUser",
"visibleAppList" : operationData["primaryUserApps"]
};
var userAppConfigurations = operationData["userAppConfigurations"];
userAppConfigurations.push(primaryUserApps);
var index;
for (index = 0; index < userAppConfigurations.length; index++) {
userAppConfigurations[index]["visibleAppList"] =
userAppConfigurations[index]["visibleAppList"].split(/,(?![^{]*})/)
.map(function (item) {
var packageName = item.trim();
if (packageName) {
var i;
for (i=0; i<storeApps.length; i++) {
if (packageName === storeApps[i]["packageName"]) {
packageName += ":" + storeApps[i]["webUrl"];
}
}
}
return packageName;
}).filter(Boolean);
}
operation["userAppConfigurations"] = operationData["userAppConfigurations"];
}
if (operationData["isBrowserPropertyEnabled"] === true) {
var browserProperties = {};
browserProperties["isBrowserPropertyEnabled"] = true;
browserProperties["primaryURL"] = operationData["primaryURL"]; browserProperties["primaryURL"] = operationData["primaryURL"];
browserProperties["isTopBarEnabled"] = operationData["isTopBarEnabled"]; browserProperties["isTopBarEnabled"] = operationData["isTopBarEnabled"];
browserProperties["isAddressBarEnabled"] = operationData["isAddressBarEnabled"]; browserProperties["isAddressBarEnabled"] = operationData["isAddressBarEnabled"];
@ -488,8 +553,10 @@ var androidOperationModule = function () {
browserProperties["isFormAutoFillEnabled"] = operationData["isFormAutoFillEnabled"]; browserProperties["isFormAutoFillEnabled"] = operationData["isFormAutoFillEnabled"];
browserProperties["isContentAccessEnabled"] = operationData["isContentAccessEnabled"]; browserProperties["isContentAccessEnabled"] = operationData["isContentAccessEnabled"];
browserProperties["isFileAccessAllowed"] = operationData["isFileAccessAllowed"]; browserProperties["isFileAccessAllowed"] = operationData["isFileAccessAllowed"];
browserProperties["isAllowedUniversalAccessFromFileURLs"] = operationData["isAllowedUniversalAccessFromFileURLs"]; browserProperties["isAllowedUniversalAccessFromFileURLs"] =
browserProperties["isAllowedFileAccessFromFileURLs"] = operationData["isAllowedFileAccessFromFileURLs"]; operationData["isAllowedUniversalAccessFromFileURLs"];
browserProperties["isAllowedFileAccessFromFileURLs"] =
operationData["isAllowedFileAccessFromFileURLs"];
browserProperties["isAppCacheEnabled"] = operationData["isAppCacheEnabled"]; browserProperties["isAppCacheEnabled"] = operationData["isAppCacheEnabled"];
if (operationData["isAppCacheEnabled"] && operationData["appCachePath"]) { if (operationData["isAppCacheEnabled"] && operationData["appCachePath"]) {
browserProperties["appCachePath"] = operationData["appCachePath"]; browserProperties["appCachePath"] = operationData["appCachePath"];
@ -512,8 +579,10 @@ var androidOperationModule = function () {
browserProperties["isDatabaseEnabled"] = operationData["isDatabaseEnabled"]; browserProperties["isDatabaseEnabled"] = operationData["isDatabaseEnabled"];
browserProperties["isDomStorageEnabled"] = operationData["isDomStorageEnabled"]; browserProperties["isDomStorageEnabled"] = operationData["isDomStorageEnabled"];
browserProperties["geolocationEnabled"] = operationData["geolocationEnabled"]; browserProperties["geolocationEnabled"] = operationData["geolocationEnabled"];
browserProperties["isJavaScriptCanOpenWindowsAutomatically"] = operationData["isJavaScriptCanOpenWindowsAutomatically"]; browserProperties["isJavaScriptCanOpenWindowsAutomatically"] =
browserProperties["isMediaPlaybackRequiresUserGesture"] = operationData["isMediaPlaybackRequiresUserGesture"]; operationData["isJavaScriptCanOpenWindowsAutomatically"];
browserProperties["isMediaPlaybackRequiresUserGesture"] =
operationData["isMediaPlaybackRequiresUserGesture"];
browserProperties["isSafeBrowsingEnabled"] = operationData["isSafeBrowsingEnabled"]; browserProperties["isSafeBrowsingEnabled"] = operationData["isSafeBrowsingEnabled"];
browserProperties["isUseWideViewPort"] = operationData["isUseWideViewPort"]; browserProperties["isUseWideViewPort"] = operationData["isUseWideViewPort"];
if (operationData["userAgentString"]) { if (operationData["userAgentString"]) {
@ -523,8 +592,8 @@ var androidOperationModule = function () {
deviceGlobalConfigurations.browserProperties = browserProperties; deviceGlobalConfigurations.browserProperties = browserProperties;
} }
operation.deviceGlobalConfigurations = deviceGlobalConfigurations; operation.deviceGlobalConfigurations = deviceGlobalConfigurations;
}
payload.operation = operation; payload.operation = operation;
break; break;
case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]: case androidOperationConstants["SYSTEM_UPDATE_POLICY_CODE"]:
operationType = operationTypeConstants["PROFILE"]; operationType = operationTypeConstants["PROFILE"];
@ -793,6 +862,7 @@ var androidOperationModule = function () {
operationDataObj.val(value); operationDataObj.val(value);
} else if (operationDataObj.is(":checkbox")) { } else if (operationDataObj.is(":checkbox")) {
operationDataObj.prop("checked", value); operationDataObj.prop("checked", value);
operationDataObj.trigger("change");
} else if (operationDataObj.is(":radio")) { } else if (operationDataObj.is(":radio")) {
if (operationDataObj.val() == uiPayload[key]) { if (operationDataObj.val() == uiPayload[key]) {
operationDataObj.attr("checked", true); operationDataObj.attr("checked", true);
@ -917,6 +987,7 @@ var androidOperationModule = function () {
var multiColumnKeyValuePair = value[multiColumnKeyValuePairArrayIndex]; var multiColumnKeyValuePair = value[multiColumnKeyValuePairArrayIndex];
var childInputKey = childInput.data("child-key"); var childInputKey = childInput.data("child-key");
var childInputValue = multiColumnKeyValuePair[childInputKey]; var childInputValue = multiColumnKeyValuePair[childInputKey];
// populating extracted value in the UI according to the input type // populating extracted value in the UI according to the input type
if (childInput.is(":text") || if (childInput.is(":text") ||
childInput.is("textarea") || childInput.is("textarea") ||

@ -274,6 +274,18 @@ var validatePolicyProfile = function () {
operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"]; operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"];
var continueToCheckNextInputs = true; var continueToCheckNextInputs = true;
var isDeviceGlobalConfigChecked = $("input#cosu-profile-device-global-config").is(":checked");
var isDeviceRestrictOperationChecked = $("input#cosu-profile-device-restrict-operation-time").is(":checked");
if (isDeviceGlobalConfigChecked === false && isDeviceRestrictOperationChecked === false) {
validationStatus = {
"error": true,
"subErrorMsg": "COSU Profile Configuration is empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
var backgroundImage = $("input#cosu-global-config-kiosk-background-image").val(); var backgroundImage = $("input#cosu-global-config-kiosk-background-image").val();
if (backgroundImage && !(backgroundImage.endsWith("jpg") || backgroundImage.endsWith("jpeg") if (backgroundImage && !(backgroundImage.endsWith("jpg") || backgroundImage.endsWith("jpeg")
@ -353,6 +365,69 @@ var validatePolicyProfile = function () {
} }
} }
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
var primaryUserApps = $("input#cosu-user-app-config-primary-user").val();
if (!primaryUserApps) {
validationStatus = {
"error": true,
"subErrorMsg": "Primary user apps are not configured.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
if (continueToCheckNextInputs) {
var isEmptyInputValue = false;
var cosuUserAppConfig = $("#cosu-user-app-config .child-input");
if ($(cosuUserAppConfig).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Users and apps are not configured for multi users.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} else {
var childInputCount = 0;
var userInputArray = [];
var appInputArray = [];
$(cosuUserAppConfig).each(function () {
childInputCount++;
var childInputValue = $(this).val();
if (!childInputValue) {
isEmptyInputValue = true;
return false;
}
if (childInputCount % 2 === 0) {
appInputArray.push(childInputValue);
} else {
userInputArray.push(childInputValue);
}
});
var uniqueUserInputArray = userInputArray.filter(function (value, index, self) {
return self.indexOf(value) === index;
});
if (userInputArray.length !== uniqueUserInputArray.length) {
validationStatus = {
"error": true,
"subErrorMsg": "Duplicate values exist for username in multi user app configuration.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
if (isEmptyInputValue === true) {
validationStatus = {
"error": true,
"subErrorMsg": "One or more multi user app configurations are empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
}
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
validationStatus = { validationStatus = {
"error": false, "error": false,
@ -830,17 +905,41 @@ var changeAndroidWifiPolicyEAP = function (select, superSelect) {
*/ */
var changeDivVisibility = function (divId, checkbox) { var changeDivVisibility = function (divId, checkbox) {
if (checkbox.checked) { if (checkbox.checked) {
document.getElementById(divId).style.display= "block" document.getElementById(divId).style.display= "block";
} else { } else {
document.getElementById(divId).style.display= "none"
inputs = document.getElementById(divId).getElementsByTagName('input'); document.getElementById(divId).style.display= "none";
for (index = 0; index < inputs.length; ++index) { $("#" + divId + " input").each(
if (inputs[index].type == "text") { function () {
inputs[index].value = inputs[index].defaultValue; if ($(this).is("input:text")) {
} else if (inputs[index].type == "checkbox") { $(this).val(this.defaultValue);
inputs[index].checked = inputs[index].defaultChecked; } else if ($(this).is("input:checkbox")) {
$(this).prop("checked", this.defaultChecked);
} }
} }
);
$("#" + divId + " select").each(
function () {
$(this).val($(this).data("default"));
}
);
$("#" + divId + " .grouped-array-input").each(
function () {
var gridInputs = $(this).find("[data-add-form-clone]");
if (gridInputs.length > 0) {
gridInputs.remove();
}
var helpTexts = $(this).find("[data-help-text=add-form]");
if (helpTexts.length > 0) {
helpTexts.show();
}
}
);
$("#" + divId + " .collapse-config").each(
function() {
this.style.display = "none";
}
);
} }
}; };

@ -1511,28 +1511,33 @@
This policy can be used to configure the profile of COSU Devices. This policy can be used to configure the profile of COSU Devices.
</div> </div>
</div> </div>
<div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse" <div id="cosu-profile-configuration-body" class="panel-collapse panel-body collapse" role="tabpanel"
role="tabpanel"
aria-labelledby="cosu-profile-configuration-body"> aria-labelledby="cosu-profile-configuration-body">
<hr/> <hr/>
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert"> <div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden"
role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div id="cosu-profile-restrict-device-operation-time-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<div class="col-sm-12 form-inline"> <h2 class="sub-title panel-title"
<label class="control-label">Restrict device operation time</label> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
<label class="switch"> Restrict Device Operation Time
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-restrict-operation-time" > <input id="cosu-profile-device-restrict-operation-time" type="checkbox"
class="non-advance-operation operationDataKeys"
data-key="isDeviceRestrictOperationTimeEnabled"
onchange="changeDivVisibility('cosu-profile-restrict-operation-time', this)"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</div> </h2>
</div> </div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse" <div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel"> role="tabpanel">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="cosu-profile-configuration-start-time"> <label class="wr-input-label">
Start Time Start Time
<span class="helper" title="Start time for the device"> <span class="helper" title="Start time for the device">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -1540,7 +1545,7 @@
</label> </label>
<select id="cosu-profile-configuration-start-time" <select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime"> data-key="cosuProfileRestrictionStartTime" data-default="480">
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1557,7 +1562,7 @@
<option value="390">6:30 AM</option> <option value="390">6:30 AM</option>
<option value="420">7:00 AM</option> <option value="420">7:00 AM</option>
<option value="450">7:30 AM</option> <option value="450">7:30 AM</option>
<option value="480">8:00 AM</option> <option value="480" selected="selected">8:00 AM</option>
<option value="510">8:30 AM</option> <option value="510">8:30 AM</option>
<option value="540">9:00 AM</option> <option value="540">9:00 AM</option>
<option value="570">9:30 AM</option> <option value="570">9:30 AM</option>
@ -1600,7 +1605,7 @@
</label> </label>
<select id="cosu-profile-configuration-end-time" <select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0"> data-key="cosuProfileRestrictionEndTime" data-default="1020">
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1635,7 +1640,7 @@
<option value="930">3:30 PM</option> <option value="930">3:30 PM</option>
<option value="960">4:00 PM</option> <option value="960">4:00 PM</option>
<option value="990">4:30 PM</option> <option value="990">4:30 PM</option>
<option value="1020">5:00 PM</option> <option value="1020" selected="selected">5:00 PM</option>
<option value="1050">5:30 PM</option> <option value="1050">5:30 PM</option>
<option value="1080">6:00 PM</option> <option value="1080">6:00 PM</option>
<option value="1110">6:30 PM</option> <option value="1110">6:30 PM</option>
@ -1661,14 +1666,18 @@
</div> </div>
</div> </div>
</form> </form>
</div>
<div id="cosu-profile-device-global-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<h2 class="sub-title panel-title" <h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;"> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration Device Global Configuration
<label class="wr-input-control switch" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-device-global-operation"> <input id="cosu-profile-device-global-config" type="checkbox"
<input type="checkbox" class="non-advance-operation" /> class="non-advance-operation operationDataKeys"
data-key="isDeviceGlobalConfigEnabled"
onchange="changeDivVisibility('cosu-profile-device-global-operation', this)"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
@ -1677,17 +1686,18 @@
<div id="cosu-profile-device-global-operation" class="panel-collapse panel-body collapse" <div id="cosu-profile-device-global-operation" class="panel-collapse panel-body collapse"
role="tabpanel"> role="tabpanel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Launcher background image Launcher background image
<span class="helper" title="This is the image that will be displayed in kiosk background."> <span class="helper"
title="This is the image that will be displayed in kiosk background.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<input id="cosu-global-config-kiosk-background-image" type="text" <input id="cosu-global-config-kiosk-background-image" type="text"
class="form-control operationDataKeys" data-key="kioskBackgroundImage" class="form-control operationDataKeys" data-key="kioskBackgroundImage"
maxlength="100" placeholder="[ Should be a valid URL of jpg or jpeg or png]"/> maxlength="100"
placeholder="[ Should be a valid URL of jpg or jpeg or png ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1698,8 +1708,8 @@
</label> </label>
<input id="cosu-global-config-kiosk-logo-image" type="text" <input id="cosu-global-config-kiosk-logo-image" type="text"
class="form-control operationDataKeys" data-key="kioskLogoImage" class="form-control operationDataKeys" data-key="kioskLogoImage"
maxlength="100" placeholder="[ Should be a valid URL ending with .jpg, .png, maxlength="100"
.jpeg"/> placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1712,18 +1722,22 @@
class="form-control operationDataKeys" data-key="kioskAppName" class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/> maxlength="100" placeholder="Name to appear on the agent"/>
</div> </div>
<div class="wr-input-control"> <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;">
Is idle media enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is idle media enabled"></span>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-idle-graphics-enabled" type="checkbox" <input id="cosu-global-config-is-idle-graphics-enabled" type="checkbox"
class="form-control operationDataKeys" data-key="isIdleGraphicsEnabled" class="form-control operationDataKeys"
data-key="isIdleGraphicsEnabled"
onchange="changeDivVisibility('idle-properties', this)"/> onchange="changeDivVisibility('idle-properties', this)"/>
<span class="helper" title="Is idle media enabled"> <span class="helper"></span>
Is idle media enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label> </label>
</div> </div>
<div id="idle-properties"> <div id="idle-properties"class="panel-collapse panel-body collapse-config"
role="tabpanel" style="display: none;" >
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Media to display while idle Media to display while idle
@ -1733,9 +1747,9 @@
</label> </label>
<input id="cosu-global-config-idle-media-url" type="text" <input id="cosu-global-config-idle-media-url" type="text"
class="form-control operationDataKeys" data-key="idleMediaURL" class="form-control operationDataKeys" data-key="idleMediaURL"
maxlength="100" placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg, .mp4, .3gp, .wmv, .mkv ]"/> maxlength="100"
placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg, .mp4, .3gp, .wmv, .mkv ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Idle graphic begin after(seconds) Idle graphic begin after(seconds)
@ -1748,38 +1762,132 @@
maxlength="100" placeholder="[ Idle timeout in seconds ]"/> maxlength="100" placeholder="[ Idle timeout in seconds ]"/>
</div> </div>
</div> </div>
<div class="wr-input-control"> </div>
<!--COSU profile user app configuration-->
<div id="cosu-profile-user-app-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">
Is multi-user device
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is multi-user device"></span>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-multi-user-device" type="checkbox" <input id="cosu-global-config-is-multi-user-device" type="checkbox"
class="form-control operationDataKeys" data-key="isMultiUserDevice" class="form-control operationDataKeys cosu-profile-config"
onchange="changeDivVisibility('cosu-global-config-is-is-login-required-div', this)"/> data-key="isMultiUserDevice"
<span class="helper" title="Is multi-user device"> onchange="changeDivVisibility('cosu-global-config-multi-user-enabled', this)"/>
Is multi-user device <span class="helper"></span>
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label> </label>
</div> </div>
<div id="cosu-global-config-is-is-login-required-div"> <div id="cosu-global-config-multi-user-enabled"
class="panel-collapse panel-body collapse-config specific-cosu-global-config-multi-user-enabled"
role="tabpanel" style="display: none;">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-is-login-required" type="checkbox" <input id="cosu-global-config-is-is-login-required" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isLoginRequired"/> data-key="isLoginRequired" checked="checked"/>
<span class="helper" title="Is login needed for user switch"> <span class="helper" title="Is login needed for user switch.">
Is login needed for user switch Is login needed for user switch
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
</div>
<div> <div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-user-app-configuration-msg">
Provide comma separated package name or web clip details for applications.<br/>
eg: com.google.android.apps.maps, {"identity":"http:entgra.io/","title":"entgra-webclip"}
</a>
</ul>
</div>
<br>
<div class="wr-input-control">
<label class="wr-input-label">
Primary User Apps
<span class="helper">
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Primary User is the user to which the device is enrolled."></span>
</span>
</label>
<input id="cosu-user-app-config-primary-user" type="text"
class="form-control operationDataKeys"
data-key="primaryUserApps" placeholder="[ Applications ]"/>
</div>
<a href="#cosu-global-config-multi-user-app-config-grid"
class="btn btn-secondary grid-input-add"
data-click-event="add-form">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Add User Apps
</a>
<div id="cosu-user-app-config"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="userAppConfigurations" data-column-count="2">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>User</th>
<th>Applications</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#cosu-global-config-multi-user-app-config-grid">
<tr data-help-text="add-form">
<td colspan="4">
No entries added yet.
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#cosu-global-config-multi-user-app-config-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="User">
<input type="text" class="form-control grid-input-text"
data-child-key="username"
maxlength="100" placeholder="[ username ]"/>
</td>
<td data-title="Applications">
<input type="text" class="form-control grid-input-text"
rows="2" data-child-key="visibleAppList"
title="visibleAppList">
</td>
<td>
<span class="list-group-item-actions">
<a href="#cosu-global-config-multi-user-app-config-grid"
class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<span id="cosu-profile-app-configs-storeapps"
data-storeapps="{{json storeapps}}" hidden></span>
</div>
</div>
<!--COSU profile user app configuration-->
<div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Device display orientation Device display orientation
<span class="helper" title="Device display orientation"> <span class="helper" title="Device display orientation">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="cosu-profile-orientation" <select id="cosu-profile-display-orientation"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="displayOrientation" data-default="auto"> data-key="displayOrientation" data-default="auto">
<option value="auto">Auto</option> <option value="auto">Auto</option>
@ -1787,20 +1895,21 @@
<option value="landscape">Landscape</option> <option value="landscape">Landscape</option>
</select> </select>
</div> </div>
<br><br> <div id="cosu-profile-browser-property-configurations" class="panel">
<div class="form-group"> <div class="wr-input-control sub-title panel-title"
<h2 class="col-sm-12 form-inline sub-title panel-title" style="padding: 0px; padding-right:15px; font-size:15px;">
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;"> Enable Browser Properties
Browser Properties <span class="wr-help-tip glyphicon glyphicon-question-sign"
<label class="wr-input-control switch" data-toggle="collapse" title="Browser Properties"></span>
data-target="#cosu-browser-property"> <label class="wr-input-control checkbox">
<input type="checkbox" /> <input type="checkbox"
onchange="changeDivVisibility('cosu-browser-property', this)"
data-key="isBrowserPropertyEnabled"
class="form-control operationDataKeys"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</h2>
</div> </div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse" <div id="cosu-browser-property" class="panel-collapse panel-body collapse collapse-config"
role="tabpanel"> role="tabpanel">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1818,7 +1927,8 @@
<input id="cosu-browser-property-top-bar-enabled" type="checkbox" <input id="cosu-browser-property-top-bar-enabled" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isTopBarEnabled"/> data-key="isTopBarEnabled"/>
<span class="helper" title="Enabled top control bar that displays all the controllers such as address bar, home button and forwards controllers"> <span class="helper"
title="Enabled top control bar that displays all the controllers such as address bar, home button and forwards controllers">
Enabled top control bar Enabled top control bar
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
@ -1886,7 +1996,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-lock-to-primary-url" type="checkbox" <input id="cosu-browser-property-lock-to-primary-url" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="lockToPrimaryURL"/> data-key="lockToPrimaryURL" checked />
<span class="helper" title="Only allowed to visit the pirmary url."> <span class="helper" title="Only allowed to visit the pirmary url.">
Only allowed to visit the pirmary url Only allowed to visit the pirmary url
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -1898,7 +2008,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-javascript-enabled" type="checkbox" <input id="cosu-browser-property-is-javascript-enabled" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isJavascriptEnabled"/> data-key="isJavascriptEnabled" checked />
<span class="helper" title="Is javascript enabled."> <span class="helper" title="Is javascript enabled.">
Is javascript enabled Is javascript enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2034,7 +2144,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-loads-images-automatically" type="checkbox" <input id="cosu-browser-property-is-loads-images-automatically" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isLoadsImagesAutomatically"/> data-key="isLoadsImagesAutomatically" checked />
<span class="helper" title="Sets whether the browser should load image resources(through network and cached). Note that this method controls loading of all images, including those embedded using the data URI scheme."> <span class="helper" title="Sets whether the browser should load image resources(through network and cached). Note that this method controls loading of all images, including those embedded using the data URI scheme.">
Should load images Should load images
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2067,7 +2177,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-support-zoom-enabled" type="checkbox" <input id="cosu-browser-property-is-support-zoom-enabled" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isSupportZoomEnabled"/> data-key="isSupportZoomEnabled" checked />
<span class="helper" title="Sets whether the browser should support zooming using its on-screen zoom controls and gestures."> <span class="helper" title="Sets whether the browser should support zooming using its on-screen zoom controls and gestures.">
Support zooming Support zooming
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2168,7 +2278,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-media-playback-requires-user-gesture" type="checkbox" <input id="cosu-browser-property-is-media-playback-requires-user-gesture" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isMediaPlaybackRequiresUserGesture"/> data-key="isMediaPlaybackRequiresUserGesture" checked/>
<span class="helper" title="Sets whether the browser requires a user gesture to play media. If false, the browser can play media without user consent"> <span class="helper" title="Sets whether the browser requires a user gesture to play media. If false, the browser can play media without user consent">
Does media playback requires user consent Does media playback requires user consent
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2179,7 +2289,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-safe-browsing-enabled" type="checkbox" <input id="cosu-browser-property-is-safe-browsing-enabled" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isSafeBrowsingEnabled"/> data-key="isSafeBrowsingEnabled" checked/>
<span class="helper" title="Sets whether safe browsing is enabled. Safe browsing allows browser to protect against malware and phishing attacks by verifying the links."> <span class="helper" title="Sets whether safe browsing is enabled. Safe browsing allows browser to protect against malware and phishing attacks by verifying the links.">
Is safe browsing enabled Is safe browsing enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2190,7 +2300,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-browser-property-is-use-wide-view-port" type="checkbox" <input id="cosu-browser-property-is-use-wide-view-port" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isUseWideViewPort"/> data-key="isUseWideViewPort" checked />
<span class="helper" title="Sets whether the browser should enable support for the viewport HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the browser control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used."> <span class="helper" title="Sets whether the browser should enable support for the viewport HTML meta tag or should use a wide viewport. When the value of the setting is false, the layout width is always set to the width of the browser control in device-independent (CSS) pixels. When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used.">
Use wide view port Use wide view port
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
@ -2226,8 +2336,8 @@
</select> </select>
</div> </div>
</div> </div>
</div>
</form> </form>
<br/>
<div> <div>
<ul class="message message-info"> <ul class="message message-info">
<i class="icon fw fw-info"></i> <i class="icon fw fw-info"></i>
@ -2241,7 +2351,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!--COSU profile configuration--> <!--COSU profile configuration-->
<!-- cosu-system-update-policy --> <!-- cosu-system-update-policy -->

@ -198,6 +198,48 @@ var switchPaneAgainstValueSetForRadioButtons = function (selectElement, paneIdPr
}; };
// End of HTML embedded invoke methods // End of HTML embedded invoke methods
/**
* Pass a div Id and a check box to view or hide div content based on checkbox value
*/
var changeDivVisibility = function (divId, checkbox) {
if (checkbox.checked) {
document.getElementById(divId).style.display= "block";
} else {
document.getElementById(divId).style.display= "none";
$("#" + divId + " input").each(
function () {
if ($(this).is("input:text")) {
$(this).val(this.defaultValue);
} else if ($(this).is("input:checkbox")) {
$(this).prop("checked", this.defaultChecked);
}
}
);
$("#" + divId + " select").each(
function () {
$(this).val($(this).data("default"));
}
);
$("#" + divId + " .grouped-array-input").each(
function () {
var gridInputs = $(this).find("[data-add-form-clone]");
if (gridInputs.length > 0) {
gridInputs.remove();
}
var helpTexts = $(this).find("[data-help-text=add-form]");
if (helpTexts.length > 0) {
helpTexts.show();
}
}
);
$("#" + divId + " .collapse-config").each(
function() {
this.style.display = "none";
}
);
}
};
/** /**
* This method will display appropriate fields based on wifi type * This method will display appropriate fields based on wifi type
* @param {object} wifi type select object * @param {object} wifi type select object
@ -254,4 +296,53 @@ $(document).ready(function () {
} }
} }
}); });
// add form entry click function for grid inputs
$(advanceOperations).on("click", "[data-click-event=add-form]", function () {
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
var clonedForm = $("[data-add-form=" + $(this).attr("href") + "]").clone().find("[data-add-form-element=clone]")
.attr("data-add-form-clone", $(this).attr("href"));
// adding class .child-input to capture text-input-array-values
$("input, select", clonedForm).addClass("child-input");
$(addFormContainer).append(clonedForm);
setId(addFormContainer);
showHideHelpText(addFormContainer);
});
// remove form entry click function for grid inputs
$(advanceOperations).on("click", "[data-click-event=remove-form]", function () {
var addFormContainer = $("[data-add-form-container=" + $(this).attr("href") + "]");
$(this).closest("[data-add-form-element=clone]").remove();
setId(addFormContainer);
showHideHelpText(addFormContainer);
});
}); });
/**
* Method to set count id to cloned elements.
* @param {object} addFormContainer
*/
var setId = function (addFormContainer) {
$(addFormContainer).find("[data-add-form-clone]").each(function (i) {
$(this).attr("id", $(this).attr("data-add-form-clone").slice(1) + "-" + (i + 1));
if ($(this).find(".index").length > 0) {
$(this).find(".index").html(i + 1);
}
});
};
/**
* Method to set count id to cloned elements.
* @param {object} addFormContainer
*/
var showHideHelpText = function (addFormContainer) {
var helpText = "[data-help-text=add-form]";
if ($(addFormContainer).find("[data-add-form-clone]").length > 0) {
$(addFormContainer).find(helpText).hide();
} else {
$(addFormContainer).find(helpText).show();
}
};

@ -1119,19 +1119,26 @@
role="tabpanel" role="tabpanel"
aria-labelledby="cosu-profile-configuration-body"> aria-labelledby="cosu-profile-configuration-body">
<hr/> <hr/>
<div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden" role="alert"> <div id="cosu-profile-configuration-feature-error-msg" class="alert alert-danger hidden"
role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div id="cosu-profile-restrict-device-operation-time-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group" > <div class="form-group">
<div class="col-sm-12 form-inline"> <h2 class="sub-title panel-title"
<label class="control-label">Restrict device operation time</label> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
<label class="switch"> Restrict Device Operation Time
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-restrict-operation-time" > <input id="cosu-profile-device-restrict-operation-time" type="checkbox"
class="non-advance-operation operationDataKeys"
data-key="isDeviceRestrictOperationTimeEnabled"
onchange="changeDivVisibility('cosu-profile-restrict-operation-time', this)"
disabled/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</div> </h2>
</div> </div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse" <div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel"> role="tabpanel">
@ -1144,7 +1151,7 @@
</label> </label>
<select id="cosu-profile-configuration-start-time" <select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime" disabled> data-key="cosuProfileRestrictionStartTime" data-default="480" disabled>
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1204,7 +1211,7 @@
</label> </label>
<select id="cosu-profile-configuration-end-time" <select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0" disabled> data-key="cosuProfileRestrictionEndTime" data-default="1020" disabled>
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1265,14 +1272,19 @@
</div> </div>
</div> </div>
</form> </form>
</div>
<div id="cosu-profile-device-global-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<h2 class="sub-title panel-title" <h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;"> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration Device Global Configuration
<label class="wr-input-control switch hidden" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-device-global-operation"> <input id="cosu-profile-device-global-config" type="checkbox"
<input type="checkbox" class="non-advance-operation" /> class="non-advance-operation operationDataKeys"
data-key="isDeviceGlobalConfigEnabled"
onchange="changeDivVisibility('cosu-profile-device-global-operation', this)"
disabled/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
@ -1316,16 +1328,23 @@
maxlength="100" placeholder="Name to appear on the agent" disabled/> maxlength="100" placeholder="Name to appear on the agent" disabled/>
</div> </div>
<div class="wr-input-control"> <div id="cosu-profile-idle-media-configuration" class="panel">
<label class="wr-input-control checkbox"> <div class="wr-input-control sub-title panel-title"
<input id="cosu-global-config-is-idle-graphics-enabled" type="checkbox" style="padding: 0px; padding-right:15px; font-size:15px;">
class="form-control operationDataKeys" data-key="isIdleGraphicsEnabled" disabled/>
<span class="helper" title="Is idle media enabled">
Is idle media enabled Is idle media enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"
</span> title="Is idle media enabled"></span>
<label class="wr-input-control checkbox">
<input id="cosu-global-config-is-idle-graphics-enabled"
type="checkbox" class="form-control operationDataKeys"
data-key="isIdleGraphicsEnabled"
onchange="changeDivVisibility('idle-properties', this)"
disabled/>
<span class="helper"></span>
</label> </label>
</div> </div>
<div id="idle-properties"class="panel-collapse panel-body collapse-config"
role="tabpanel" style="display: none;" >
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Media to display while idle Media to display while idle
@ -1335,7 +1354,7 @@
</label> </label>
<input id="cosu-global-config-idle-media-url" type="text" <input id="cosu-global-config-idle-media-url" type="text"
class="form-control operationDataKeys" data-key="idleMediaURL" class="form-control operationDataKeys" data-key="idleMediaURL"
maxlength="100" placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg, .mp4, .3gp, .wmv, .mkv ]" disabled/> maxlength="100" placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg, .mp4, .3gp, .wmv, .mkv ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1346,38 +1365,135 @@
</label> </label>
<input id="cosu-browser-property-idle-timeout" type="text" <input id="cosu-browser-property-idle-timeout" type="text"
class="form-control operationDataKeys" data-key="idleTimeout" class="form-control operationDataKeys" data-key="idleTimeout"
maxlength="100" placeholder="[ Idle timeout in seconds ]" disabled/> maxlength="100" placeholder="[ Idle timeout in seconds ]"/>
</div> </div>
</div>
<div class="wr-input-control"> </div>
<!--COSU profile user app configuration-->
<div id="cosu-profile-user-app-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">
Is multi-user device
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is multi-user device"></span>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-multi-user-device" type="checkbox" <input id="cosu-global-config-is-multi-user-device" type="checkbox"
class="form-control operationDataKeys" data-key="isMultiUserDevice" disabled/> class="form-control operationDataKeys cosu-profile-config"
<span class="helper" title="Is multi-user device"> data-key="isMultiUserDevice"
Is multi-user device onchange="changeDivVisibility('cosu-global-config-multi-user-enabled', this)"
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> disabled/>
</span> <span class="helper"></span>
</label> </label>
</div> </div>
<div id="cosu-global-config-multi-user-enabled"
class="panel-collapse panel-body collapse-config"
role="tabpanel" style="display: none;">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-is-login-required" type="checkbox" <input id="cosu-global-config-is-is-login-required" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isLoginRequired" disabled/> data-key="isLoginRequired" checked="checked" disabled/>
<span class="helper" title="Is re-login required to switch between users."> <span class="helper" title="Is login needed for user switch.">
Is Login Required Ror User Switch Is login needed for user switch
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
<div> <div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-user-app-configuration-msg">
Provide comma separated package name or web clip details for applications.<br/>
eg: com.google.android.apps.maps, {"identity":"http:entgra.io/","title":"entgra-webclip"}
</a>
</ul>
</div>
<br>
<div class="wr-input-control">
<label class="wr-input-label">
Primary User Apps
<span class="helper">
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Primary User is the user to which the device is enrolled."></span>
</span>
</label>
<input id="cosu-user-app-config-primary-user" type="text"
class="form-control operationDataKeys"
data-key="primaryUserApps" placeholder="[ Applications ]" disabled/>
</div>
<a href="#cosu-global-config-multi-user-app-config-grid"
class="btn btn-secondary grid-input-add"
data-click-event="add-form" style="display: none;">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Add User Apps
</a>
<div id="cosu-user-app-config"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="userAppConfigurations" data-column-count="2">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>User</th>
<th>Applications</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#cosu-global-config-multi-user-app-config-grid">
<tr data-help-text="add-form">
<td colspan="4">
No entries added yet.
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#cosu-global-config-multi-user-app-config-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="User">
<input type="text" class="form-control grid-input-text"
data-child-key="username"
maxlength="100" placeholder="[ username ]"
disabled/>
</td>
<td data-title="Applications">
<input type="text" class="form-control grid-input-text" rows="2"
data-child-key="visibleAppList"
title="visibleAppList" disabled>
</td>
<td>
<span class="list-group-item-actions" hidden>
<a href="#cosu-global-config-multi-user-app-config-grid"
class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--COSU profile user app configuration-->
<div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Device display orientation Device display orientation
<span class="helper" title="Device display orientation"> <span class="helper" title="Device display orientation">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="cosu-profile-configuration-end-time" <select id="cosu-profile-display-orientation"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="displayOrientation" data-default="auto" disabled> data-key="displayOrientation" data-default="auto" disabled>
<option value="auto">Auto</option> <option value="auto">Auto</option>
@ -1385,18 +1501,19 @@
<option value="landscape">Landscape</option> <option value="landscape">Landscape</option>
</select> </select>
</div> </div>
<br><br> <div id="cosu-profile-browser-property-configurations" class="panel">
<div class="form-group"> <div class="wr-input-control sub-title panel-title"
<h2 class="col-sm-12 form-inline sub-title panel-title" style="padding: 0px; padding-right:15px; font-size:15px;">
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;"> Enable Browser Properties
Browser Properties <span class="wr-help-tip glyphicon glyphicon-question-sign"
<label class="wr-input-control switch hidden" data-toggle="collapse" title="Browser Properties"></span>
data-target="#cosu-browser-property"> <label class="wr-input-control checkbox">
<input type="checkbox" /> <input type="checkbox"
onchange="changeDivVisibility('cosu-browser-property', this)"
data-key="isBrowserPropertyEnabled"
class="form-control operationDataKeys" disabled/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</h2>
</div> </div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse" <div id="cosu-browser-property" class="panel-collapse panel-body collapse"
role="tabpanel"> role="tabpanel">
@ -1825,6 +1942,7 @@
</select> </select>
</div> </div>
</div> </div>
</div>
</form> </form>
<br/> <br/>
<div> <div>
@ -1840,6 +1958,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!--COSU profile configuration--> <!--COSU profile configuration-->
<!--app-restriction--> <!--app-restriction-->

@ -217,6 +217,18 @@ var validatePolicyProfile = function () {
operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"]; operation = androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION"];
var continueToCheckNextInputs = true; var continueToCheckNextInputs = true;
var isDeviceGlobalConfigChecked = $("input#cosu-profile-device-global-config").is(":checked");
var isDeviceRestrictOperationChecked = $("input#cosu-profile-device-restrict-operation-time").is(":checked");
if (isDeviceGlobalConfigChecked === false && isDeviceRestrictOperationChecked === false) {
validationStatus = {
"error": true,
"subErrorMsg": "COSU Profile Configuration is empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
var backgroundImage = $("input#cosu-global-config-kiosk-background-image").val(); var backgroundImage = $("input#cosu-global-config-kiosk-background-image").val();
if (backgroundImage && !(backgroundImage.endsWith("jpg") || backgroundImage.endsWith("jpeg") if (backgroundImage && !(backgroundImage.endsWith("jpg") || backgroundImage.endsWith("jpeg")
@ -296,6 +308,69 @@ var validatePolicyProfile = function () {
} }
} }
if (continueToCheckNextInputs) {
var isMultiUser = $("input#cosu-global-config-is-multi-user-device").is(":checked");
if (isMultiUser === true) {
var primaryUserApps = $("input#cosu-user-app-config-primary-user").val();
if (!primaryUserApps) {
validationStatus = {
"error": true,
"subErrorMsg": "Primary user apps are not configured.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
if (continueToCheckNextInputs) {
var isEmptyInputValue = false;
var cosuUserAppConfig = $("#cosu-user-app-config .child-input");
if ($(cosuUserAppConfig).length === 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Users and apps are not configured for multi users.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} else {
var childInputCount = 0;
var userInputArray = [];
var appInputArray = [];
$(cosuUserAppConfig).each(function () {
childInputCount++;
var childInputValue = $(this).val();
if (!childInputValue) {
isEmptyInputValue = true;
return false;
}
if (childInputCount % 2 === 0) {
appInputArray.push(childInputValue);
} else {
userInputArray.push(childInputValue);
}
});
var uniqueUserInputArray = userInputArray.filter(function (value, index, self) {
return self.indexOf(value) === index;
});
if (userInputArray.length !== uniqueUserInputArray.length) {
validationStatus = {
"error": true,
"subErrorMsg": "Duplicate values exist for username in multi user app configuration.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
if (isEmptyInputValue === true) {
validationStatus = {
"error": true,
"subErrorMsg": "One or more multi user app configurations are empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
}
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
validationStatus = { validationStatus = {
"error": false, "error": false,
@ -807,17 +882,40 @@ var changeAndroidWifiPolicyEAP = function (select, superSelect) {
*/ */
var changeDivVisibility = function (divId, checkbox) { var changeDivVisibility = function (divId, checkbox) {
if (checkbox.checked) { if (checkbox.checked) {
document.getElementById(divId).style.display= "block" document.getElementById(divId).style.display= "block";
} else { } else {
document.getElementById(divId).style.display= "none" document.getElementById(divId).style.display= "none";
inputs = document.getElementById(divId).getElementsByTagName('input'); $("#" + divId + " input").each(
for (index = 0; index < inputs.length; ++index) { function () {
if (inputs[index].type == "text") { if ($(this).is("input:text")) {
inputs[index].value = inputs[index].defaultValue; $(this).val(this.defaultValue);
} else if (inputs[index].type == "checkbox") { } else if ($(this).is("input:checkbox")) {
inputs[index].checked = inputs[index].defaultChecked; $(this).prop("checked", this.defaultChecked);
} }
} }
);
$("#" + divId + " select").each(
function () {
$(this).val($(this).data("default"));
}
);
$("#" + divId + " .grouped-array-input").each(
function () {
var gridInputs = $(this).find("[data-add-form-clone]");
if (gridInputs.length > 0) {
gridInputs.remove();
}
var helpTexts = $(this).find("[data-help-text=add-form]");
if (helpTexts.length > 0) {
helpTexts.show();
}
}
);
$("#" + divId + " .collapse-config").each(
function() {
this.style.display = "none";
}
);
} }
}; };

@ -195,7 +195,7 @@
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="passcode-policy-allow-simple" type="checkbox" <input id="passcode-policy-allow-simple" type="checkbox"
class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple"
checked="checked"/> checked/>
<span class="helper" <span class="helper"
title="Permits repeating, ascending and descending character sequences"> title="Permits repeating, ascending and descending character sequences">
Allow simple value Allow simple value
@ -1249,16 +1249,21 @@
role="alert"> role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div id="cosu-profile-restrict-device-operation-time-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<div class="col-sm-12 form-inline"> <h2 class="sub-title panel-title"
<label class="control-label">Restrict device operation time</label> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
<label class="switch"> Restrict Device Operation Time
<input type="checkbox" id="gridGuideToggle" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-restrict-operation-time"> <input id="cosu-profile-device-restrict-operation-time" type="checkbox"
class="non-advance-operation operationDataKeys"
data-key="isDeviceRestrictOperationTimeEnabled"
onchange="changeDivVisibility('cosu-profile-restrict-operation-time', this)"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</div> </h2>
</div> </div>
<div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse" <div id="cosu-profile-restrict-operation-time" class="panel-collapse panel-body collapse"
role="tabpanel"> role="tabpanel">
@ -1271,7 +1276,7 @@
</label> </label>
<select id="cosu-profile-configuration-start-time" <select id="cosu-profile-configuration-start-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionStartTime" data-default="0"> data-key="cosuProfileRestrictionStartTime" data-default="480">
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1331,7 +1336,7 @@
</label> </label>
<select id="cosu-profile-configuration-end-time" <select id="cosu-profile-configuration-end-time"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="cosuProfileOperationRestrictionEndTime" data-default="0"> data-key="cosuProfileRestrictionEndTime" data-default="1020">
<option value="1440">12:00 Midnight</option> <option value="1440">12:00 Midnight</option>
<option value="30">12:30 AM</option> <option value="30">12:30 AM</option>
<option value="60">1:00 AM</option> <option value="60">1:00 AM</option>
@ -1392,14 +1397,18 @@
</div> </div>
</div> </div>
</form> </form>
</div>
<div id="cosu-profile-device-global-configuration" class="panel">
<form class="form-horizontal"> <form class="form-horizontal">
<div class="form-group"> <div class="form-group">
<h2 class="sub-title panel-title" <h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;"> style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration Device Global Configuration
<label class="wr-input-control switch" data-toggle="collapse" <label class="wr-input-control checkbox">
data-target="#cosu-profile-device-global-operation"> <input id="cosu-profile-device-global-config" type="checkbox"
<input type="checkbox" class="non-advance-operation" /> class="non-advance-operation operationDataKeys"
data-key="isDeviceGlobalConfigEnabled"
onchange="changeDivVisibility('cosu-profile-device-global-operation', this)"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
@ -1411,13 +1420,15 @@
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Launcher background image Launcher background image
<span class="helper" title="This is the image that will be displayed in kiosk background."> <span class="helper"
title="This is the image that will be displayed in kiosk background.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<input id="cosu-global-config-kiosk-background-image" type="text" <input id="cosu-global-config-kiosk-background-image" type="text"
class="form-control operationDataKeys" data-key="kioskBackgroundImage" class="form-control operationDataKeys" data-key="kioskBackgroundImage"
maxlength="100" placeholder="[ Should be a valid URL of jpg or jpeg or png ]"/> maxlength="100"
placeholder="[ Should be a valid URL of jpg or jpeg or png ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1428,8 +1439,8 @@
</label> </label>
<input id="cosu-global-config-kiosk-logo-image" type="text" <input id="cosu-global-config-kiosk-logo-image" type="text"
class="form-control operationDataKeys" data-key="kioskLogoImage" class="form-control operationDataKeys" data-key="kioskLogoImage"
maxlength="100" placeholder="[ Should be a valid URL ending with .jpg, .png, maxlength="100"
.jpeg ]"/> placeholder="[ Should be a valid URL ending with .jpg, .png, .jpeg ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1442,19 +1453,22 @@
class="form-control operationDataKeys" data-key="kioskAppName" class="form-control operationDataKeys" data-key="kioskAppName"
maxlength="100" placeholder="Name to appear on the agent"/> maxlength="100" placeholder="Name to appear on the agent"/>
</div> </div>
<div id="cosu-profile-idle-media-configuration" class="panel">
<div class="wr-input-control"> <div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">
Is idle media enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is idle media enabled"></span>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-idle-graphics-enabled" type="checkbox" <input id="cosu-global-config-is-idle-graphics-enabled" type="checkbox"
class="form-control operationDataKeys" data-key="isIdleGraphicsEnabled" class="form-control operationDataKeys"
data-key="isIdleGraphicsEnabled"
onchange="changeDivVisibility('idle-properties', this)"/> onchange="changeDivVisibility('idle-properties', this)"/>
<span class="helper" title="Is idle media enabled"> <span class="helper"></span>
Is idle media enabled
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label> </label>
</div> </div>
<div id="idle-properties"> <div id="idle-properties"class="panel-collapse panel-body collapse-config"
role="tabpanel" style="display: none;" >
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Media to display while idle Media to display while idle
@ -1478,38 +1492,131 @@
maxlength="100" placeholder="[ Idle timeout in seconds ]"/> maxlength="100" placeholder="[ Idle timeout in seconds ]"/>
</div> </div>
</div> </div>
<div class="wr-input-control"> </div>
<!--COSU profile user app configuration-->
<div id="cosu-profile-user-app-configuration" class="panel">
<div class="wr-input-control sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px;">
Is multi-user device
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Is multi-user device"></span>
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-multi-user-device" type="checkbox" <input id="cosu-global-config-is-multi-user-device" type="checkbox"
class="form-control operationDataKeys" data-key="isMultiUserDevice" class="form-control operationDataKeys cosu-profile-config"
onchange="changeDivVisibility('cosu-global-config-is-is-login-required-div', this)"/>/> data-key="isMultiUserDevice"
<span class="helper" title="Is multi-user device"> onchange="changeDivVisibility('cosu-global-config-multi-user-enabled', this)"/>
Is multi-user device <span class="helper"></span>
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label> </label>
</div> </div>
<div id="cosu-global-config-is-is-login-required-div"> <div id="cosu-global-config-multi-user-enabled"
class="panel-collapse panel-body collapse-config specific-cosu-global-config-multi-user-enabled" role="tabpanel" style="display: none;">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="cosu-global-config-is-is-login-required" type="checkbox" <input id="cosu-global-config-is-is-login-required" type="checkbox"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="isLoginRequired" checked/> data-key="isLoginRequired" checked="checked"/>
<span class="helper" title="Is login needed for user switch."> <span class="helper" title="Is login needed for user switch.">
Is login needed for user switch Is login needed for user switch
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
</div>
<div> <div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-user-app-configuration-msg">
Provide comma separated package name or web clip details for applications.<br/>
eg: com.google.android.apps.maps, {"identity":"http:entgra.io/","title":"entgra-webclip"}
</a>
</ul>
</div>
<br>
<div class="wr-input-control">
<label class="wr-input-label">
Primary User Apps
<span class="helper">
<span class="wr-help-tip glyphicon glyphicon-question-sign"
title="Primary User is the user to which the device is enrolled."></span>
</span>
</label>
<input id="cosu-user-app-config-primary-user" type="text"
class="form-control operationDataKeys"
data-key="primaryUserApps" placeholder="[ Applications ]"/>
</div>
<a href="#cosu-global-config-multi-user-app-config-grid"
class="btn btn-secondary grid-input-add"
data-click-event="add-form">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Add User Apps
</a>
<div id="cosu-user-app-config"
class="operationDataKeys grouped-array-input multi-column-key-value-pair-array"
data-key="userAppConfigurations" data-column-count="2">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>User</th>
<th>Applications</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#cosu-global-config-multi-user-app-config-grid">
<tr data-help-text="add-form">
<td colspan="4">
No entries added yet.
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#cosu-global-config-multi-user-app-config-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="User">
<input type="text" class="form-control grid-input-text"
data-child-key="username"
maxlength="100" placeholder="[ Username ]"/>
</td>
<td data-title="Applications">
<input type="text" class="form-control grid-input-text"
rows="2" data-child-key="visibleAppList"
title="visibleAppList" placeholder="[ Applications ]">
</td>
<td>
<span class="list-group-item-actions">
<a href="#cosu-global-config-multi-user-app-config-grid"
class="grid-input-remove"
data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<span id="cosu-profile-app-configs-storeapps"
data-storeapps="{{json storeapps}}" hidden></span>
</div>
</div>
<!--COSU profile user app configuration-->
<div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
Device display orientation Device display orientation
<span class="helper" title="Device display orientation"> <span class="helper" title="Device display orientation">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="cosu-profile-configuration-end-time" <select id="cosu-profile-display-orientation"
class="form-control operationDataKeys" class="form-control operationDataKeys"
data-key="displayOrientation" data-default="auto"> data-key="displayOrientation" data-default="auto">
<option value="auto">Auto</option> <option value="auto">Auto</option>
@ -1517,20 +1624,21 @@
<option value="landscape">Landscape</option> <option value="landscape">Landscape</option>
</select> </select>
</div> </div>
<br><br> <div id="cosu-profile-browser-property-configurations" class="panel">
<div class="form-group"> <div class="wr-input-control sub-title panel-title"
<h2 class="col-sm-12 form-inline sub-title panel-title" style="padding: 0px; padding-right:15px; font-size:15px;">
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;"> Enable Browser Properties
Browser Properties <span class="wr-help-tip glyphicon glyphicon-question-sign"
<label class="wr-input-control switch" data-toggle="collapse" title="Browser Properties"></span>
data-target="#cosu-browser-property"> <label class="wr-input-control checkbox">
<input type="checkbox" /> <input type="checkbox"
onchange="changeDivVisibility('cosu-browser-property', this)"
data-key="isBrowserPropertyEnabled"
class="form-control operationDataKeys"/>
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span>
</label> </label>
</h2>
</div> </div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse" <div id="cosu-browser-property" class="panel-collapse panel-body collapse collapse-config"
role="tabpanel"> role="tabpanel">
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label"> <label class="wr-input-label">
@ -1956,8 +2064,8 @@
</select> </select>
</div> </div>
</div> </div>
</div>
</form> </form>
<br/>
<div> <div>
<ul class="message message-info"> <ul class="message message-info">
<i class="icon fw fw-info"></i> <i class="icon fw fw-info"></i>
@ -1971,6 +2079,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!--COSU profile configuration--> <!--COSU profile configuration-->
<!-- VPN --> <!-- VPN -->

Loading…
Cancel
Save