Fix for EMM-1601 ad EMM-1708

revert-dabc3590
kamidu 8 years ago
parent 7b98bb0b73
commit 1f0e39fddf

@ -35,7 +35,7 @@ function InitiateViewOption() {
device.owner = validateAndReturn(device.owner); device.owner = validateAndReturn(device.owner);
device.ownership = validateAndReturn(device.ownership); device.ownership = validateAndReturn(device.ownership);
var arr = device.properties; var arr = device.properties;
if (arr){ if (arr) {
device.properties = arr.reduce(function (total, current) { device.properties = arr.reduce(function (total, current) {
total[current.name] = validateAndReturn(current.value); total[current.name] = validateAndReturn(current.value);
return total; return total;
@ -67,7 +67,7 @@ function loadDevices() {
function getPropertyValue(deviceProperties, propertyName) { function getPropertyValue(deviceProperties, propertyName) {
var property; var property;
for (var i =0; i < deviceProperties.length; i++) { for (var i = 0; i < deviceProperties.length; i++) {
property = deviceProperties[i]; property = deviceProperties[i];
if (property.name == propertyName) { if (property.name == propertyName) {
return property.value; return property.value;
@ -114,7 +114,7 @@ function loadDevices() {
ownership: data.devices[index].enrolmentInfo.ownership, ownership: data.devices[index].enrolmentInfo.ownership,
type: data.devices[index].type, type: data.devices[index].type,
deviceIdentifier: data.devices[index].deviceIdentifier, deviceIdentifier: data.devices[index].deviceIdentifier,
name : data.devices[index].name name: data.devices[index].name
} }
); );
}); });
@ -139,8 +139,8 @@ function loadDevices() {
var columns = [ var columns = [
{ {
class : 'remove-padding icon-only content-fill viewEnabledIcon', class: 'remove-padding icon-only content-fill viewEnabledIcon',
data : null, data: null,
render: function (data, type, row) { render: function (data, type, row) {
var deviceType = row.type; var deviceType = row.type;
var deviceIdentifier = row.deviceIdentifier; var deviceIdentifier = row.deviceIdentifier;
@ -212,7 +212,7 @@ function loadDevices() {
]; ];
$('#device-grid').datatables_extended_serverside_paging( $('#device-grid').datatables_extended_serverside_paging(
null, {"sorting": false},
"/api/device-mgt/v1.0/devices", "/api/device-mgt/v1.0/devices",
dataFilter, dataFilter,
columns, columns,
@ -221,8 +221,8 @@ function loadDevices() {
$(".icon .text").res_text(0.2); $(".icon .text").res_text(0.2);
$('#device-grid').removeClass('hidden'); $('#device-grid').removeClass('hidden');
}, { }, {
"placeholder" : "Search By Device Name", "placeholder": "Search By Device Name",
"searchKey" : "name" "searchKey": "name"
}); });
$(deviceCheckbox).click(function () { $(deviceCheckbox).click(function () {
@ -257,8 +257,8 @@ $(document).ready(function () {
/* for device list sorting drop down */ /* for device list sorting drop down */
$(".ctrl-filter-type-switcher").popover({ $(".ctrl-filter-type-switcher").popover({
html : true, html: true,
content : function () { content: function () {
return $("#content-filter-types").html(); return $("#content-filter-types").html();
} }
}); });

@ -20,7 +20,10 @@
var sortUpdateBtn = "#sortUpdateBtn"; var sortUpdateBtn = "#sortUpdateBtn";
// var sortedIDs; // var sortedIDs;
// var dataTableSelection = ".DTTT_selected"; // var dataTableSelection = ".DTTT_selected";
$('#policy-grid').datatables_extended(); var settings = {
"sorting": false
};
$('#policy-grid').datatables_extended(settings);
// $(".icon .text").res_text(0.2); // $(".icon .text").res_text(0.2);
var saveNewPrioritiesButton = "#save-new-priorities-button"; var saveNewPrioritiesButton = "#save-new-priorities-button";
@ -90,7 +93,7 @@ function showPopup() {
function hidePopup() { function hidePopup() {
$(modalPopupContent).html(''); $(modalPopupContent).html('');
$(modalPopup).modal('hide'); $(modalPopup).modal('hide');
$('body').removeClass('modal-open').css('padding-right','0px'); $('body').removeClass('modal-open').css('padding-right', '0px');
$('.modal-backdrop').remove(); $('.modal-backdrop').remove();
} }

Loading…
Cancel
Save