From 1f0e39fddf31e905f2b800d7e0affcdddd345fc1 Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 10 Oct 2016 14:16:29 +0530 Subject: [PATCH] Fix for EMM-1601 ad EMM-1708 --- .../public/js/device-listing.js | 20 +++++++++---------- .../public/js/policy-list.js | 9 ++++++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js index 5bcc4c3bd..bdd66f49a 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js @@ -35,7 +35,7 @@ function InitiateViewOption() { device.owner = validateAndReturn(device.owner); device.ownership = validateAndReturn(device.ownership); var arr = device.properties; - if (arr){ + if (arr) { device.properties = arr.reduce(function (total, current) { total[current.name] = validateAndReturn(current.value); return total; @@ -67,7 +67,7 @@ function loadDevices() { function getPropertyValue(deviceProperties, propertyName) { var property; - for (var i =0; i < deviceProperties.length; i++) { + for (var i = 0; i < deviceProperties.length; i++) { property = deviceProperties[i]; if (property.name == propertyName) { return property.value; @@ -114,7 +114,7 @@ function loadDevices() { ownership: data.devices[index].enrolmentInfo.ownership, type: data.devices[index].type, deviceIdentifier: data.devices[index].deviceIdentifier, - name : data.devices[index].name + name: data.devices[index].name } ); }); @@ -139,8 +139,8 @@ function loadDevices() { var columns = [ { - class : 'remove-padding icon-only content-fill viewEnabledIcon', - data : null, + class: 'remove-padding icon-only content-fill viewEnabledIcon', + data: null, render: function (data, type, row) { var deviceType = row.type; var deviceIdentifier = row.deviceIdentifier; @@ -212,7 +212,7 @@ function loadDevices() { ]; $('#device-grid').datatables_extended_serverside_paging( - null, + {"sorting": false}, "/api/device-mgt/v1.0/devices", dataFilter, columns, @@ -221,8 +221,8 @@ function loadDevices() { $(".icon .text").res_text(0.2); $('#device-grid').removeClass('hidden'); }, { - "placeholder" : "Search By Device Name", - "searchKey" : "name" + "placeholder": "Search By Device Name", + "searchKey": "name" }); $(deviceCheckbox).click(function () { @@ -257,8 +257,8 @@ $(document).ready(function () { /* for device list sorting drop down */ $(".ctrl-filter-type-switcher").popover({ - html : true, - content : function () { + html: true, + content: function () { return $("#content-filter-types").html(); } }); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/public/js/policy-list.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/public/js/policy-list.js index e6eb9bf04..29671d333 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/public/js/policy-list.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.policies/public/js/policy-list.js @@ -20,7 +20,10 @@ var sortUpdateBtn = "#sortUpdateBtn"; // var sortedIDs; // var dataTableSelection = ".DTTT_selected"; -$('#policy-grid').datatables_extended(); +var settings = { + "sorting": false +}; +$('#policy-grid').datatables_extended(settings); // $(".icon .text").res_text(0.2); var saveNewPrioritiesButton = "#save-new-priorities-button"; @@ -90,7 +93,7 @@ function showPopup() { function hidePopup() { $(modalPopupContent).html(''); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right','0px'); + $('body').removeClass('modal-open').css('padding-right', '0px'); $('.modal-backdrop').remove(); } @@ -143,7 +146,7 @@ $(document).ready(function () { * ******************************************** */ - // [1] logic for running apply-changes-for-devices use-case + // [1] logic for running apply-changes-for-devices use-case var applyChangesButtonId = "#appbar-btn-apply-changes";