From b8a1b945bb17ff8219e151066b0588ca3db7f9d6 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 15 Feb 2017 13:47:59 +0530 Subject: [PATCH] Adding tooltips --- .../app/pages/cdmf.page.devices/public/js/listing.js | 10 +++++----- .../app/pages/cdmf.page.groups/public/js/listing.js | 9 +++++---- .../app/pages/cdmf.page.users/public/js/listing.js | 6 +++--- .../public/js/dataTables.extended.serversidepaging.js | 8 ++++++++ 4 files changed, 21 insertions(+), 12 deletions(-) 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 a65de8a6da..c58f718566 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 @@ -326,7 +326,7 @@ function loadDevices(searchType, searchParam) { if (analyticsEnabled(row.deviceType)) { html += '' + + ' class="btn padding-reduce-on-grid-view" data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics">' + '' + ''; } @@ -337,7 +337,7 @@ function loadDevices(searchType, searchParam) { + 'data-deviceid="' + deviceIdentifier + '" data-devicetype="' + deviceType + '" data-devicename="' + - row.name + '">' + + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Group">' + '' + ''; } @@ -345,7 +345,7 @@ function loadDevices(searchType, searchParam) { html += '' + + '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit">' + '' + '' + ''; @@ -354,7 +354,7 @@ function loadDevices(searchType, searchParam) { html += '' + + '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Remove from group">' + '' + '' + ''; @@ -362,7 +362,7 @@ function loadDevices(searchType, searchParam) { html += '' + + '" data-devicename="' + row.name + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Delete">' + '' + '' + ''; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js index 6566078bf9..a3a49418b9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js @@ -185,7 +185,8 @@ function loadGroups() { var html = ''; if ($.hasPermission("VIEW_GROUP_DEVICES")) { html += '' + + + '/analytics" data-click-event="remove-form" class="btn padding-reduce-on-grid-view" ' + + 'data-placement="bottom" data-toggle="tooltip" data-original-title="Analytics">' + '' + ''; @@ -196,7 +197,7 @@ function loadGroups() { '' + + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Share">' + ''; } @@ -206,7 +207,7 @@ function loadGroups() { + row.name + '" ' + 'data-group-owner="' + row.owner + '" data-group-description="' + row.description + '" data-group-id="' + row.groupId - + '">' + + + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit">' + ''; } if ($.hasPermission("REMOVE_GROUP")) { @@ -214,7 +215,7 @@ function loadGroups() { '' + + '" data-placement="bottom" data-toggle="tooltip" data-original-title="Delete">' + ''; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index ce89b335f5..8c8689f651 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -343,7 +343,7 @@ function loadUsers() { var editbtn = ' ' + + 'class="btn padding-reduce-on-grid-view edit-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Edit"> ' + ' ' + '' + '' + @@ -352,7 +352,7 @@ function loadUsers() { var resetPasswordbtn = '' + + 'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Reset Password">' + '' + '' + '' + @@ -361,7 +361,7 @@ function loadUsers() { var removebtn = '' + + 'class="btn padding-reduce-on-grid-view remove-user-link" data-placement="bottom" data-toggle="tooltip" data-original-title="Remove">' + '' + '' + '' + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js index 9ca788dc43..bedc54b4bd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js @@ -61,6 +61,14 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter ordering: false, filter: false, bSortCellsTop: true, + fnInitComplete: function(){ + //loading tooltips + if (typeof $.fn.tooltip == 'function') { + $('[data-toggle="tooltip"]').tooltip(); + } else { + console.warn('Warning : Dependency missing - Bootstrap Tooltip Library'); + } + }, ajax: { url: context + "/api/data-tables/invoker", data: function (params) {