|
|
@ -179,27 +179,27 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
|
|
|
|
$("#policy-profile-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
|
|
|
|
$("#policy-profile-page-wizard-title").text("EDIT " + policy["platform"] + " POLICY - " + policy["name"]);
|
|
|
|
|
|
|
|
|
|
|
|
var deviceType = policy["platform"];
|
|
|
|
var deviceType = policy["platform"];
|
|
|
|
var policyOperationsTemplateSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
|
|
|
|
var policyOperations = $("#policy-operations");
|
|
|
|
'.policy-edit/templates/' + deviceType + '-policy-edit.hbs';
|
|
|
|
var policyEditTemplateSrc = $(policyOperations).data("template");
|
|
|
|
var policyOperationsScriptSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
|
|
|
|
var policyEditScriptSrc = $(policyOperations).data("script");
|
|
|
|
'.policy-edit/js/' + deviceType + '-policy-edit.js';
|
|
|
|
var policyEditStylesSrc = $(policyOperations).data("style");
|
|
|
|
var policyOperationsStylesSrc = context + '/public/cdmf.unit.device.type.' + deviceType +
|
|
|
|
var policyEditTemplateCacheKey = deviceType + '-policy-edit';
|
|
|
|
'.policy-edit/css/' + deviceType + '-policy-edit.css';
|
|
|
|
|
|
|
|
var policyOperationsTemplateCacheKey = deviceType + '-policy-operations';
|
|
|
|
if (policyEditTemplateSrc) {
|
|
|
|
|
|
|
|
if (policyEditScriptSrc) {
|
|
|
|
$.isResourceExists(policyOperationsTemplateSrc, function (status) {
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
|
|
$.template(policyOperationsTemplateCacheKey, policyOperationsTemplateSrc, function (template) {
|
|
|
|
|
|
|
|
var content = template();
|
|
|
|
|
|
|
|
$("#device-type-policy-operations").html(content).removeClass("hidden");
|
|
|
|
|
|
|
|
$(".policy-platform").addClass("hidden");
|
|
|
|
|
|
|
|
$.isResourceExists(policyOperationsScriptSrc, function (status) {
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
|
|
|
|
hasPolicyProfileScript = true;
|
|
|
|
|
|
|
|
var script = document.createElement('script');
|
|
|
|
var script = document.createElement('script');
|
|
|
|
script.type = 'text/javascript';
|
|
|
|
script.type = 'text/javascript';
|
|
|
|
script.src = policyOperationsScriptSrc;
|
|
|
|
script.src = context + policyEditScriptSrc;
|
|
|
|
$(".wr-advance-operations").prepend(script);
|
|
|
|
$(".wr-advance-operations").prepend(script);
|
|
|
|
|
|
|
|
hasPolicyProfileScript = true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
hasPolicyProfileScript = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$.template(policyEditTemplateCacheKey, context + policyEditTemplateSrc, function (template) {
|
|
|
|
|
|
|
|
var content = template();
|
|
|
|
|
|
|
|
$("#device-type-policy-operations").html(content).removeClass("hidden");
|
|
|
|
|
|
|
|
$(".policy-platform").addClass("hidden");
|
|
|
|
|
|
|
|
if (hasPolicyProfileScript) {
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
This method should be implemented in the relevant plugin side and should include the logic to
|
|
|
|
This method should be implemented in the relevant plugin side and should include the logic to
|
|
|
|
populate the policy profile in the plugin specific UI.
|
|
|
|
populate the policy profile in the plugin specific UI.
|
|
|
@ -207,22 +207,17 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
|
|
|
|
polulateProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]);
|
|
|
|
polulateProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#generic-policy-operations").removeClass("hidden");
|
|
|
|
$.isResourceExists(policyOperationsStylesSrc, function (status) {
|
|
|
|
}
|
|
|
|
if (status) {
|
|
|
|
if (policyEditStylesSrc) {
|
|
|
|
var style = document.createElement('link');
|
|
|
|
var style = document.createElement('link');
|
|
|
|
style.type = 'text/css';
|
|
|
|
style.type = 'text/css';
|
|
|
|
style.rel = 'stylesheet';
|
|
|
|
style.rel = 'stylesheet';
|
|
|
|
style.href = policyOperationsStylesSrc;
|
|
|
|
style.href = context + policyEditStylesSrc;
|
|
|
|
$(".wr-advance-operations").prepend(style);
|
|
|
|
$(".wr-advance-operations").prepend(style);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#generic-policy-operations").removeClass("hidden");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$(".wr-advance-operations-init").addClass("hidden");
|
|
|
|
$(".wr-advance-operations-init").addClass("hidden");
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!hasPolicyProfileScript) {
|
|
|
|
if (!hasPolicyProfileScript) {
|
|
|
|
populateGenericProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]);
|
|
|
|
populateGenericProfileOperations(policyPayloadObj["profile"]["profileFeaturesList"]);
|
|
|
|