Merge branch 'kiosk-policy-ui' into 'master'

Kiosk browser properties policy config UI

See merge request entgra/carbon-device-mgt-plugins!16
revert-dabc3590
Milan Harindu 6 years ago
commit 972a859113

@ -200,8 +200,12 @@ var androidOperationModule = function () {
case androidOperationConstants["COSU_PROFILE_CONFIGURATION_OPERATION_CODE"]:
payload = {
"cosuProfileRestrictionStartTime": operationPayload["cosuProfileOperationRestrictionEndTime"],
"cosuProfileRestrictionEndTime": operationPayload["cosuProfileOperationRestrictionEndTime"]
}
"cosuProfileRestrictionEndTime": operationPayload["cosuProfileOperationRestrictionEndTime"],
"primaryURL": operationPayload["deviceGlobalConfigurations"]["browserProperties"]["primaryURL"],
"isAddressBarEnabled": operationPayload["deviceGlobalConfigurations"]["browserProperties"]
["isAddressBarEnabled"]
};
break;
case androidOperationConstants["KIOSK_APPS_CODE"]:
payload = {
"cosuWhitelistedApplications": operationPayload["whitelistedApplications"]
@ -401,7 +405,13 @@ var androidOperationModule = function () {
payload = {
"operation": {
"cosuProfileRestrictionStartTime": operationData["cosuProfileOperationRestrictionStartTime"],
"cosuProfileRestrictionEndTime": operationData["cosuProfileOperationRestrictionEndTime"]
"cosuProfileRestrictionEndTime": operationData["cosuProfileOperationRestrictionEndTime"],
"deviceGlobalConfigurations" : {
"browserProperties": {
"primaryURL": operationData["primaryURL"],
"isAddressBarEnabled": operationData["isAddressBarEnabled"]
}
}
}
};
break;

@ -919,6 +919,8 @@ $(document).ready(function () {
var operationDataWrapper = $(this).data("target");
// prevents event bubbling by figuring out what element it's being called from.
if (event.target.tagName == "INPUT") {
var isNonAdvanceOperation = $("input[type='checkbox']", this).hasClass("non-advance-operation");
if (!isNonAdvanceOperation) {
var featureConfiguredIcon;
if ($("input[type='checkbox']", this).is(":checked")) {
configuredOperations.push(operationCode);
@ -1004,6 +1006,7 @@ $(document).ready(function () {
);
}
}
}
});
// <start - fixing feature-configuring switch double-click issue>

@ -1683,6 +1683,71 @@
</div>
</div>
</form>
<form class="form-horizontal">
<div class="form-group">
<h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-profile-device-global-operation">
<input type="checkbox" class="non-advance-operation" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-profile-device-global-operation" class="panel-collapse panel-body collapse"
role="tabpanel">
<form class="form-horizontal">
<div class="form-group">
<h2 class="col-sm-12 form-inline sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;">
Browser Properties
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-browser-property">
<input type="checkbox" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label">
Primary URL
<span class="helper" title="Primary URL">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<input id="cosu-browser-property-primary-url" type="text"
class="form-control operationDataKeys" data-key="primaryURL"
maxlength="100" placeholder="[ Should be a valid URL ]"/>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-browser-property-address-bar-enabled" type="checkbox"
class="form-control operationDataKeys"
data-key="isAddressBarEnabled"/>
<span class="helper" title="Enables address bar of the browser.">
Enable browser address bar
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
</div>
</div>
</form>
<br/>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Global configurations related to device.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>

@ -241,6 +241,8 @@ $(document).ready(function () {
var operation = $(this).parents(".operation-data").data("operation");
// prevents event bubbling by figuring out what element it's being called from.
if (event.target.tagName == "INPUT") {
var isNonAdvanceOperation = $("input[type='checkbox']", this).hasClass("non-advance-operation");
if (!isNonAdvanceOperation) {
var featureConfiguredIcon;
if ($("input[type='checkbox']", this).is(":checked")) {
// add configured-state-icon to the feature
@ -250,5 +252,6 @@ $(document).ready(function () {
}
}
}
}
});
});

@ -1265,6 +1265,71 @@
</div>
</div>
</form>
<form class="form-horizontal">
<div class="form-group">
<h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration
<label class="wr-input-control switch hidden" data-toggle="collapse"
data-target="#cosu-profile-device-global-operation">
<input type="checkbox" class="non-advance-operation" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-profile-device-global-operation" class="panel-collapse panel-body collapse"
role="tabpanel">
<form class="form-horizontal">
<div class="form-group">
<h2 class="col-sm-12 form-inline sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;">
Browser Properties
<label class="wr-input-control switch hidden" data-toggle="collapse"
data-target="#cosu-browser-property">
<input type="checkbox" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label">
Primary URL
<span class="helper" title="Primary URL">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<input id="cosu-browser-property-primary-url" type="text"
class="form-control operationDataKeys" data-key="primaryURL"
maxlength="100" placeholder="[ Should be a valid URL ]" disabled/>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-browser-property-address-bar-enabled" type="checkbox"
class="form-control operationDataKeys"
data-key="isAddressBarEnabled" disabled/>
<span class="helper" title="Enables address bar of the browser.">
Enable browser address bar
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
</div>
</div>
</form>
<br/>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Global configurations related to device.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>

@ -884,6 +884,8 @@ $(document).ready(function () {
var operationDataWrapper = $(this).data("target");
// prevents event bubbling by figuring out what element it's being called from.
if (event.target.tagName == "INPUT") {
var isNonAdvanceOperation = $("input[type='checkbox']", this).hasClass("non-advance-operation");
if (!isNonAdvanceOperation) {
var featureConfiguredIcon;
if ($("input[type='checkbox']", this).is(":checked")) {
configuredOperations.push(operationCode);
@ -969,6 +971,7 @@ $(document).ready(function () {
);
}
}
}
});
// <start - fixing feature-configuring switch double-click issue>

@ -1392,6 +1392,71 @@
</div>
</div>
</form>
<form class="form-horizontal">
<div class="form-group">
<h2 class="sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:15px; margin-left:15px;">
Device Global Configuration
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-profile-device-global-operation">
<input type="checkbox" class="non-advance-operation" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-profile-device-global-operation" class="panel-collapse panel-body collapse"
role="tabpanel">
<form class="form-horizontal">
<div class="form-group">
<h2 class="col-sm-12 form-inline sub-title panel-title"
style="padding: 0px; padding-right:15px; font-size:13px; margin-left:10px;">
Browser Properties
<label class="wr-input-control switch" data-toggle="collapse"
data-target="#cosu-browser-property">
<input type="checkbox" />
<span class="helper"></span>
<span class="text"></span>
</label>
</h2>
</div>
<div id="cosu-browser-property" class="panel-collapse panel-body collapse"
role="tabpanel">
<div class="wr-input-control">
<label class="wr-input-label">
Primary URL
<span class="helper" title="Primary URL">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
<input id="cosu-browser-property-primary-url" type="text"
class="form-control operationDataKeys" data-key="primaryURL"
maxlength="100" placeholder="[ Should be a valid URL ]"/>
</div>
<div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="cosu-browser-property-address-bar-enabled" type="checkbox"
class="form-control operationDataKeys"
data-key="isAddressBarEnabled"/>
<span class="helper" title="Enables address bar of the browser.">
Enable browser address bar
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
</label>
</div>
</div>
</form>
<br/>
<div>
<ul class="message message-info">
<i class="icon fw fw-info"></i>
<a id="cosu-profile-configuration-select-msg">
Global configurations related to device.
</a>
</ul>
</div>
</div>
</form>
</div>
</div>
</div>

Loading…
Cancel
Save