From 056f6d2f4ef77ec42e8d781e4540f66863a4c5e6 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 27 Sep 2016 04:49:07 +0530 Subject: [PATCH] Adding proper error message when no device type is avaialble --- .../public/js/listing.js | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/public/js/listing.js index 82f54ad056..ea45adaf37 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.types.listing/public/js/listing.js @@ -41,11 +41,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(); + } + }); $(".ast-container").on("click", ".claim-btn", function(e){ e.stopPropagation(); @@ -142,7 +142,13 @@ function loadDevices(searchType, searchParam){ } } else { $('#device-grid').addClass('hidden'); - $('#device-listing-status-msg').text('No device is available to be displayed.'); + $('#device-listing-status-msg').html( + '

' + + '

No device type is available to be displayed.

' + + '' + + ' ' + + '  Quick Startup Guide
'); } $(".icon .text").res_text(0.2); @@ -197,11 +203,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(); + } + }); $(".ast-container").on("click", ".claim-btn", function(e){ e.stopPropagation(); @@ -223,17 +229,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() + } + }); $(document).on("click", "tr.clickable-row", function(){ window.document.location = $(this).data('href');