|
|
@ -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,86 +479,121 @@ 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"];
|
|
|
|
if (operationData["idleMediaURL"]) {
|
|
|
|
operation["cosuProfileRestrictionEndTime"] = operationData["cosuProfileRestrictionEndTime"];
|
|
|
|
deviceGlobalConfigurations["idleMediaURL"] = operationData["idleMediaURL"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (operationData["kioskBackgroundImage"]) {
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["kioskBackgroundImage"] = operationData["kioskBackgroundImage"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (operationData["kioskLogoImage"]) {
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["kioskLogoImage"] = operationData["kioskLogoImage"];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (operationData["kioskAppName"]) {
|
|
|
|
if (operationData["isDeviceGlobalConfigEnabled"] === true) {
|
|
|
|
deviceGlobalConfigurations["kioskAppName"] = operationData["kioskAppName"];
|
|
|
|
var deviceGlobalConfigurations = {};
|
|
|
|
}
|
|
|
|
if (operationData["idleMediaURL"]) {
|
|
|
|
deviceGlobalConfigurations["isIdleGraphicsEnabled"] = operationData["isIdleGraphicsEnabled"];
|
|
|
|
deviceGlobalConfigurations["idleMediaURL"] = operationData["idleMediaURL"];
|
|
|
|
if (operationData["idleTimeout"]) {
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["isMultiUserDevice"] = operationData["isMultiUserDevice"];
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["isLoginRequired"] = operationData["isLoginRequired"];
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["displayOrientation"] = operationData["displayOrientation"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
browserProperties = {};
|
|
|
|
|
|
|
|
if (operationData["primaryURL"]) {
|
|
|
|
|
|
|
|
browserProperties["primaryURL"] = operationData["primaryURL"];
|
|
|
|
|
|
|
|
browserProperties["isTopBarEnabled"] = operationData["isTopBarEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isAddressBarEnabled"] = operationData["isAddressBarEnabled"];
|
|
|
|
|
|
|
|
browserProperties["showBackController"] = operationData["showBackController"];
|
|
|
|
|
|
|
|
browserProperties["isForwardControllerEnabled"] = operationData["isForwardControllerEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isHomeButtonEnabled"] = operationData["isHomeButtonEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isReloadEnabled"] = operationData["isReloadEnabled"];
|
|
|
|
|
|
|
|
browserProperties["lockToPrimaryURL"] = operationData["lockToPrimaryURL"];
|
|
|
|
|
|
|
|
browserProperties["isJavascriptEnabled"] = operationData["isJavascriptEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isTextCopyEnabled"] = operationData["isTextCopyEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isDownloadsEnabled"] = operationData["isDownloadsEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isLockedToBrowser"] = operationData["isLockedToBrowser"];
|
|
|
|
|
|
|
|
browserProperties["isFormAutoFillEnabled"] = operationData["isFormAutoFillEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isContentAccessEnabled"] = operationData["isContentAccessEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isFileAccessAllowed"] = operationData["isFileAccessAllowed"];
|
|
|
|
|
|
|
|
browserProperties["isAllowedUniversalAccessFromFileURLs"] = operationData["isAllowedUniversalAccessFromFileURLs"];
|
|
|
|
|
|
|
|
browserProperties["isAllowedFileAccessFromFileURLs"] = operationData["isAllowedFileAccessFromFileURLs"];
|
|
|
|
|
|
|
|
browserProperties["isAppCacheEnabled"] = operationData["isAppCacheEnabled"];
|
|
|
|
|
|
|
|
if (operationData["isAppCacheEnabled"] && operationData["appCachePath"]) {
|
|
|
|
|
|
|
|
browserProperties["appCachePath"] = operationData["appCachePath"];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
browserProperties["cacheMode"] = operationData["cacheMode"];
|
|
|
|
if (operationData["kioskBackgroundImage"]) {
|
|
|
|
browserProperties["isLoadsImagesAutomatically"] = operationData["isLoadsImagesAutomatically"];
|
|
|
|
deviceGlobalConfigurations["kioskBackgroundImage"] = operationData["kioskBackgroundImage"];
|
|
|
|
browserProperties["isBlockNetworkImage"] = operationData["isBlockNetworkImage"];
|
|
|
|
|
|
|
|
browserProperties["isBlockNetworkLoads"] = operationData["isBlockNetworkLoads"];
|
|
|
|
|
|
|
|
browserProperties["isSupportZoomEnabled"] = operationData["isSupportZoomEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isDisplayZoomControls"] = operationData["isDisplayZoomControls"];
|
|
|
|
|
|
|
|
if (operationData["textZoom"]) {
|
|
|
|
|
|
|
|
browserProperties["textZoom"] = operationData["textZoom"];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (operationData["defaultFontSize"]) {
|
|
|
|
if (operationData["kioskLogoImage"]) {
|
|
|
|
browserProperties["defaultFontSize"] = operationData["defaultFontSize"];
|
|
|
|
deviceGlobalConfigurations["kioskLogoImage"] = operationData["kioskLogoImage"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (operationData["defaultTextEncodingName"]) {
|
|
|
|
if (operationData["kioskAppName"]) {
|
|
|
|
browserProperties["defaultTextEncodingName"] = operationData["defaultTextEncodingName"];
|
|
|
|
deviceGlobalConfigurations["kioskAppName"] = operationData["kioskAppName"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
browserProperties["isDatabaseEnabled"] = operationData["isDatabaseEnabled"];
|
|
|
|
deviceGlobalConfigurations["isIdleGraphicsEnabled"] = operationData["isIdleGraphicsEnabled"];
|
|
|
|
browserProperties["isDomStorageEnabled"] = operationData["isDomStorageEnabled"];
|
|
|
|
if (operationData["idleTimeout"]) {
|
|
|
|
browserProperties["geolocationEnabled"] = operationData["geolocationEnabled"];
|
|
|
|
deviceGlobalConfigurations["idleTimeout"] = operationData["idleTimeout"];
|
|
|
|
browserProperties["isJavaScriptCanOpenWindowsAutomatically"] = operationData["isJavaScriptCanOpenWindowsAutomatically"];
|
|
|
|
|
|
|
|
browserProperties["isMediaPlaybackRequiresUserGesture"] = operationData["isMediaPlaybackRequiresUserGesture"];
|
|
|
|
|
|
|
|
browserProperties["isSafeBrowsingEnabled"] = operationData["isSafeBrowsingEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isUseWideViewPort"] = operationData["isUseWideViewPort"];
|
|
|
|
|
|
|
|
if (operationData["userAgentString"]) {
|
|
|
|
|
|
|
|
browserProperties["userAgentString"] = operationData["userAgentString"];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
browserProperties["mixedContentMode"] = operationData["mixedContentMode"];
|
|
|
|
deviceGlobalConfigurations["isMultiUserDevice"] = operationData["isMultiUserDevice"];
|
|
|
|
deviceGlobalConfigurations.browserProperties = browserProperties;
|
|
|
|
deviceGlobalConfigurations["displayOrientation"] = operationData["displayOrientation"];
|
|
|
|
|
|
|
|
if (deviceGlobalConfigurations["isMultiUserDevice"] === true) {
|
|
|
|
|
|
|
|
deviceGlobalConfigurations["isLoginRequired"] = operationData["isLoginRequired"];
|
|
|
|
|
|
|
|
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["isTopBarEnabled"] = operationData["isTopBarEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isAddressBarEnabled"] = operationData["isAddressBarEnabled"];
|
|
|
|
|
|
|
|
browserProperties["showBackController"] = operationData["showBackController"];
|
|
|
|
|
|
|
|
browserProperties["isForwardControllerEnabled"] = operationData["isForwardControllerEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isHomeButtonEnabled"] = operationData["isHomeButtonEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isReloadEnabled"] = operationData["isReloadEnabled"];
|
|
|
|
|
|
|
|
browserProperties["lockToPrimaryURL"] = operationData["lockToPrimaryURL"];
|
|
|
|
|
|
|
|
browserProperties["isJavascriptEnabled"] = operationData["isJavascriptEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isTextCopyEnabled"] = operationData["isTextCopyEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isDownloadsEnabled"] = operationData["isDownloadsEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isLockedToBrowser"] = operationData["isLockedToBrowser"];
|
|
|
|
|
|
|
|
browserProperties["isFormAutoFillEnabled"] = operationData["isFormAutoFillEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isContentAccessEnabled"] = operationData["isContentAccessEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isFileAccessAllowed"] = operationData["isFileAccessAllowed"];
|
|
|
|
|
|
|
|
browserProperties["isAllowedUniversalAccessFromFileURLs"] =
|
|
|
|
|
|
|
|
operationData["isAllowedUniversalAccessFromFileURLs"];
|
|
|
|
|
|
|
|
browserProperties["isAllowedFileAccessFromFileURLs"] =
|
|
|
|
|
|
|
|
operationData["isAllowedFileAccessFromFileURLs"];
|
|
|
|
|
|
|
|
browserProperties["isAppCacheEnabled"] = operationData["isAppCacheEnabled"];
|
|
|
|
|
|
|
|
if (operationData["isAppCacheEnabled"] && operationData["appCachePath"]) {
|
|
|
|
|
|
|
|
browserProperties["appCachePath"] = operationData["appCachePath"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
browserProperties["cacheMode"] = operationData["cacheMode"];
|
|
|
|
|
|
|
|
browserProperties["isLoadsImagesAutomatically"] = operationData["isLoadsImagesAutomatically"];
|
|
|
|
|
|
|
|
browserProperties["isBlockNetworkImage"] = operationData["isBlockNetworkImage"];
|
|
|
|
|
|
|
|
browserProperties["isBlockNetworkLoads"] = operationData["isBlockNetworkLoads"];
|
|
|
|
|
|
|
|
browserProperties["isSupportZoomEnabled"] = operationData["isSupportZoomEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isDisplayZoomControls"] = operationData["isDisplayZoomControls"];
|
|
|
|
|
|
|
|
if (operationData["textZoom"]) {
|
|
|
|
|
|
|
|
browserProperties["textZoom"] = operationData["textZoom"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (operationData["defaultFontSize"]) {
|
|
|
|
|
|
|
|
browserProperties["defaultFontSize"] = operationData["defaultFontSize"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (operationData["defaultTextEncodingName"]) {
|
|
|
|
|
|
|
|
browserProperties["defaultTextEncodingName"] = operationData["defaultTextEncodingName"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
browserProperties["isDatabaseEnabled"] = operationData["isDatabaseEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isDomStorageEnabled"] = operationData["isDomStorageEnabled"];
|
|
|
|
|
|
|
|
browserProperties["geolocationEnabled"] = operationData["geolocationEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isJavaScriptCanOpenWindowsAutomatically"] =
|
|
|
|
|
|
|
|
operationData["isJavaScriptCanOpenWindowsAutomatically"];
|
|
|
|
|
|
|
|
browserProperties["isMediaPlaybackRequiresUserGesture"] =
|
|
|
|
|
|
|
|
operationData["isMediaPlaybackRequiresUserGesture"];
|
|
|
|
|
|
|
|
browserProperties["isSafeBrowsingEnabled"] = operationData["isSafeBrowsingEnabled"];
|
|
|
|
|
|
|
|
browserProperties["isUseWideViewPort"] = operationData["isUseWideViewPort"];
|
|
|
|
|
|
|
|
if (operationData["userAgentString"]) {
|
|
|
|
|
|
|
|
browserProperties["userAgentString"] = operationData["userAgentString"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
browserProperties["mixedContentMode"] = operationData["mixedContentMode"];
|
|
|
|
|
|
|
|
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") ||
|
|
|
|