diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js index 87c93b949c6..b02c10102b8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js @@ -92,6 +92,7 @@ $(document).ready(function () { $("a#save-policy-priorities-success-link").click(function () { hidePopup(); }); + $(applyChangesBtn).prop("disabled", false); } }, // on error diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/sortable-list.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/sortable-list.js index c436e2ac56d..8ecd63f0661 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/sortable-list.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/sortable-list.js @@ -22,6 +22,7 @@ var sortableListFunction = (function () { var sortableElem = '.wr-sortable', sortUpdateBtn = '#sortUpdateBtn', + applyChangesBtn = '#applyChangesBtn', sortableElemList = [], sortedIDs, currentElemId, @@ -103,6 +104,7 @@ var sortableListFunction = (function () { insertBefore('span[place="place_' + newValue + '"]'); } $(sortUpdateBtn).prop('disabled', false); + $(applyChangesBtn).prop('disabled', true); sortedIDs = $(sortableElem).sortable('toArray'); addSortableIndexNumbers(); } @@ -126,6 +128,7 @@ var sortableListFunction = (function () { sortedIDs = $(this).sortable('toArray'); addSortableIndexNumbers(); $(sortUpdateBtn).prop('disabled', false); + $(applyChangesBtn).prop('disabled', true); } }); $(sortableElem).disableSelection();