From 6f0b7cb5b729a595fc3836f80a9b1cb35ab28c35 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Wed, 19 Oct 2016 15:37:27 +0530 Subject: [PATCH 1/3] Remove blank line space - AFW COSU --- .../public/js/policy-create.js | 9 --- .../templates/hidden-operations-android.hbs | 7 +-- .../mdm.unit.policy.edit/public/js/edit.js | 6 -- .../hidden-operations-android-edit.hbs | 53 ++++++++--------- .../mdm.unit.policy.view/public/js/view.js | 2 - .../hidden-operations-android-view.hbs | 57 ++++++++----------- 6 files changed, 50 insertions(+), 84 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js index 7778f71bb..c839877f0 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js @@ -535,16 +535,13 @@ validateStep["policy-profile"] = function () { // Updating validationStatusArray with validationStatus validationStatusArray.push(validationStatus); - } if ($.inArray(androidOperationConstants["KIOSK_APPS_CODE"], configuredOperations) != -1) { //If COSU whitelisting applications configured operation = androidOperationConstants["KIOSK_APPS"]; // Initializing continueToCheckNextInputs to true continueToCheckNextInputs = true; - var whitelistedApplicationsGridChildInputs = "div#cosu-whitelisted-applications .child-input"; - if (continueToCheckNextInputs) { if ($(whitelistedApplicationsGridChildInputs).length == 0) { validationStatus = { @@ -609,20 +606,16 @@ validateStep["policy-profile"] = function () { }; continueToCheckNextInputs = false; } - } } - if (continueToCheckNextInputs) { validationStatus = { "error": false, "okFeature": operation }; } - // Updating validationStatusArray with validationStatus validationStatusArray.push(validationStatus); - } } } @@ -2550,14 +2543,12 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var selectedValueOnChange = selectElement.value; - var i, slideDownVotes = 0; for (i = 0; i < valueSet.length; i++) { if (selectedValueOnChange == valueSet[i]) { slideDownVotes++; } } - var paneSelector = "#" + paneID; if(slideDownVotes > 0) { $(paneSelector).removeClass("hidden"); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs index be99f83a9..adf9008d4 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/templates/hidden-operations-android.hbs @@ -1201,14 +1201,12 @@ to modify these settings on their devices. -

-
- -
@@ -1352,7 +1348,6 @@ to modify these settings on their devices. -

@@ -1391,7 +1386,7 @@ - No entries added yet . + No entries added yet. diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js index a054588f3..23df93491 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js @@ -515,9 +515,7 @@ validateStep["policy-profile"] = function () { operation = androidOperationConstants["KIOSK_APPS"]; // Initializing continueToCheckNextInputs to true continueToCheckNextInputs = true; - var whitelistedApplicationsGridChildInputs = "div#cosu-whitelisted-applications .child-input"; - if (continueToCheckNextInputs) { if ($(whitelistedApplicationsGridChildInputs).length == 0) { validationStatus = { @@ -582,20 +580,16 @@ validateStep["policy-profile"] = function () { }; continueToCheckNextInputs = false; } - } } - if (continueToCheckNextInputs) { validationStatus = { "error": false, "okFeature": operation }; } - // Updating validationStatusArray with validationStatus validationStatusArray.push(validationStatus); - } } } if (policy["platform"] == platformTypeConstants["WINDOWS"]) { diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android-edit.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android-edit.hbs index 21a720d80..510e70a29 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android-edit.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/templates/hidden-operations-android-edit.hbs @@ -1334,14 +1334,12 @@
-
-
- -
-
diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js index 41eda65b1..ad6651977 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/js/view.js @@ -1954,14 +1954,12 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) { var selectedValueOnChange = selectElement.value; - var i, slideDownVotes = 0; for (i = 0; i < valueSet.length; i++) { if (selectedValueOnChange == valueSet[i]) { slideDownVotes++; } } - var paneSelector = "#" + paneID; if(slideDownVotes > 0) { $(paneSelector).removeClass("hidden"); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/templates/hidden-operations-android-view.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/templates/hidden-operations-android-view.hbs index 201787094..b8e6ede04 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/templates/hidden-operations-android-view.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.view/public/templates/hidden-operations-android-view.hbs @@ -1260,14 +1260,11 @@
-
- -
- -
@@ -1412,14 +1407,12 @@ -
-
From b3d89e38eb930e8c9f890f4399bd830db01682f3 Mon Sep 17 00:00:00 2001 From: Vishanth Date: Wed, 19 Oct 2016 17:28:23 +0530 Subject: [PATCH 2/3] fixing the ios wifi payload --- .../mdm.unit.device.operation-mod/public/js/operation-mod.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js index d54f38bcf..a3b6161f6 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js @@ -298,7 +298,7 @@ var operationModule = function () { case iosOperationConstants["WIFI_OPERATION_CODE"]: payload = { "wifiHiddenNetwork": operationPayload["hiddenNetwork"], - "wifiSSID": operationPayload["ssid"], + "wifiSSID": operationPayload["SSID"], "wifiAutoJoin": operationPayload["autoJoin"], "wifiProxyType": operationPayload["proxyType"], "wifiEncryptionType": operationPayload["encryptionType"], @@ -441,7 +441,7 @@ var operationModule = function () { operationType = operationTypeConstants["PROFILE"]; payload = { "operation": { - "ssid": operationData["wifiSSID"], + "SSID": operationData["wifiSSID"], "hiddenNetwork": operationData["wifiHiddenNetwork"], "autoJoin": operationData["wifiAutoJoin"], "proxyType": operationData["wifiProxyType"], From 67d660ef1f8cd39e47f032513d45a5d04b169744 Mon Sep 17 00:00:00 2001 From: dilanua Date: Wed, 19 Oct 2016 19:08:34 +0530 Subject: [PATCH 3/3] Fixing JIRA: EMM-1765 --- .../public/js/policy-create.js | 20 ++++++++++++++++ .../mdm.unit.policy.edit/public/js/edit.js | 24 +++++++++++-------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js index c839877f0..1c1eefcfd 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js @@ -2790,6 +2790,26 @@ $(document).ready(function () { } }); + // + $(advanceOperations).on('hidden.bs.collapse', function (event) { + var collapsedFeatureBody = event.target.id; + var featureConfiguringSwitch = "#" + collapsedFeatureBody. + substr(0, collapsedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + if ($(featureConfiguringSwitch).prop("checked") == true) { + $(featureConfiguringSwitch).prop("checked", false); + } + }); + + $(advanceOperations).on('shown.bs.collapse', function (event) { + var expandedFeatureBody = event.target.id; + var featureConfiguringSwitch = "#" + expandedFeatureBody. + substr(0, expandedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + if ($(featureConfiguringSwitch).prop("checked") == false) { + $(featureConfiguringSwitch).prop("checked", true); + } + }); + // + // adding support for cloning multiple profiles per feature with cloneable class definitions $(advanceOperations).on("click", ".multi-view.add.enabled", function () { // get a copy of .cloneable and create new .cloned div element diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js index 23df93491..7c899b3cb 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js @@ -2553,21 +2553,25 @@ $(document).ready(function () { } }); - - $(advanceOperations).on('hidden.bs.collapse', function () { - if($(this).find('input').prop('checked')){ - $(this).find('input').prop('checked',false); + // + $(advanceOperations).on('hidden.bs.collapse', function (event) { + var collapsedFeatureBody = event.target.id; + var featureConfiguringSwitch = "#" + collapsedFeatureBody. + substr(0, collapsedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + if ($(featureConfiguringSwitch).prop("checked") == true) { + $(featureConfiguringSwitch).prop("checked", false); } }); - - $(advanceOperations).on('shown.bs.collapse', function () { - if($(this).find('input').prop('checked') == false){ - $(this).find('input').prop('checked',true); + $(advanceOperations).on('shown.bs.collapse', function (event) { + var expandedFeatureBody = event.target.id; + var featureConfiguringSwitch = "#" + expandedFeatureBody. + substr(0, expandedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + if ($(featureConfiguringSwitch).prop("checked") == false) { + $(featureConfiguringSwitch).prop("checked", true); } }); - - + // // adding support for cloning multiple profiles per feature with cloneable class definitions $(advanceOperations).on("click", ".multi-view.add.enabled", function () {