diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js index d594af0766..d74cce8f99 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js @@ -70,7 +70,7 @@ $(document).ready(function () { deviceListing = $("#device-listing"); currentUser = deviceListing.data("current-user"); - + groupId = getParameterByName("groupId"); /* Adding selected class for selected devices */ @@ -80,11 +80,11 @@ $(document).ready(function () { /* for device list sorting drop down */ $(".ctrl-filter-type-switcher").popover({ - html: true, - content: function () { - return $("#content-filter-types").html(); - } - }); + html: true, + content: function () { + return $("#content-filter-types").html(); + } + }); }); /* @@ -247,7 +247,7 @@ function loadDevices(searchType, searchParam) { class: 'remove-padding icon-only content-fill viewEnabledIcon', render: function (data, type, row, meta) { return '
'; + + getDeviceTypeThumb(row.deviceType) + '"/>'; } }, { @@ -325,47 +325,47 @@ function loadDevices(searchType, searchParam) { if (analyticsEnabled(row.deviceType)) { html += '' + - '' + - ' '; + deviceIdentifier + '&deviceName=' + row.name + '" ' + 'data-click-event="remove-form"' + + ' class="btn padding-reduce-on-grid-view" data-placement="top" data-toggle="tooltip" data-original-title="Analytics">' + + '' + + ' '; } if (!groupId && groupingEnabled(row.deviceType)) { html += - '' + - '' + - ' '; + '' + + '' + + ' '; } -// html += -// '' -// + '' -// + '' -// + ' '; + html += + '' + + '' + + '' + + ' '; var groupOwner = $('#group_owner').text(); if (groupId && groupOwner != "wso2.system.user") { html += - '' - + '' - + '' - + ' '; + '' + + '' + + '' + + ' '; } else { html += - '' - + '' - + '' - + ' '; + '' + + '' + + '' + + ' '; } } return html; @@ -417,7 +417,7 @@ function loadDevices(searchType, searchParam) { }); }; - function htmlspecialchars(text){ + function htmlspecialchars(text) { return jQuery('').text(text).html(); } @@ -427,16 +427,16 @@ function loadDevices(searchType, searchParam) { $(data.devices).each(function (index) { objects.push( - { - model: getPropertyValue(data.devices[index].properties, "DEVICE_MODEL"), - vendor: getPropertyValue(data.devices[index].properties, "VENDOR"), - user: data.devices[index].enrolmentInfo.owner, - status: data.devices[index].enrolmentInfo.status, - ownership: data.devices[index].enrolmentInfo.ownership, - deviceType: data.devices[index].type, - deviceIdentifier: data.devices[index].deviceIdentifier, - name: data.devices[index].name - } + { + model: getPropertyValue(data.devices[index].properties, "DEVICE_MODEL"), + vendor: getPropertyValue(data.devices[index].properties, "VENDOR"), + user: data.devices[index].enrolmentInfo.owner, + status: data.devices[index].enrolmentInfo.status, + ownership: data.devices[index].enrolmentInfo.ownership, + deviceType: data.devices[index].type, + deviceIdentifier: data.devices[index].deviceIdentifier, + name: data.devices[index].name + } ); }); @@ -449,28 +449,28 @@ function loadDevices(searchType, searchParam) { }; $('#device-grid').datatables_extended_serverside_paging( - null, - serviceURL, - dataFilter, - columns, - fnCreatedRow, - function () { - $(".icon .text").res_text(0.2); - $('#device-grid').removeClass('hidden'); - $("#loading-content").remove(); - attachDeviceEvents(); - - - if($('.advance-search').length < 1){ - $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') - .after('Advance Search'); - } - - }, { - "placeholder": "Search By Device Name", - "searchKey": "name" + null, + serviceURL, + dataFilter, + columns, + fnCreatedRow, + function () { + $(".icon .text").res_text(0.2); + $('#device-grid').removeClass('hidden'); + $("#loading-content").remove(); + attachDeviceEvents(); + + + if ($('.advance-search').length < 1) { + $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') + .after('Advance Search'); } + + }, { + "placeholder": "Search By Device Name", + "searchKey": "name" + } ); $(deviceCheckbox).click(function () { @@ -507,11 +507,11 @@ $(document).ready(function () { /* for device list sorting drop down */ $(".ctrl-filter-type-switcher").popover({ - html: true, - content: function () { - return $("#content-filter-types").html(); - } - }); + html: true, + content: function () { + return $("#content-filter-types").html(); + } + }); /* for data tables*/ $('[data-toggle="tooltip"]').tooltip(); @@ -519,17 +519,17 @@ $(document).ready(function () { $("[data-toggle=popover]").popover(); $(".ctrl-filter-type-switcher").popover({ - html: true, - content: function () { - return $('#content-filter-types').html(); - } - }); + html: true, + content: function () { + return $('#content-filter-types').html(); + } + }); $('#nav').affix({ - offset: { - top: $('header').height() - } - }); + offset: { + top: $('header').height() + } + }); }); @@ -583,9 +583,9 @@ function markAlreadyAssignedGroups(deviceId, deviceType) { }; invokerUtil.get("/api/device-mgt/v1.0/groups/device?deviceId=" + deviceId + "&deviceType=" + deviceType, - successCallback, function (message) { - displayErrors(message); - }); + successCallback, function (message) { + displayErrors(message); + }); } /** @@ -604,7 +604,7 @@ function attachDeviceEvents() { var deviceType = $(this).data("devicetype"); $(modalPopupContent).html($('#group-device-modal-content').html()); $('#user-groups').html( - ''); + ''); $("a#group-device-update-link").hide(); showPopup(); @@ -629,9 +629,9 @@ function attachDeviceEvents() { } if (hasGroups) { html = 'Add Role
-By Role Name | diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs index e9c4527578..979b5c1450 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs @@ -19,11 +19,11 @@
---|