From 6a67f251acc042519a419013b40da6a1bc21cd7f Mon Sep 17 00:00:00 2001 From: kamidu Date: Fri, 17 Feb 2017 16:29:11 +0530 Subject: [PATCH 1/2] cloud related ui fixs --- .../jaggeryapps/devicemgt/app/conf/config.json | 2 +- .../user-menu.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 4c385b0123..4a75088a26 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -1,6 +1,6 @@ { "appContext": "/devicemgt/", - "isCloud": false, + "isCloud": true, "cloudConfig": { "upgradeNowURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/payment-plans.jag?cloud-type=device_cloud", "monetizationURL": "https://cloudmgt.clouddev.wso2.com/cloudmgt/site/pages/monetization-dashboard.jag", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js index 03d61cad53..c5aa26981e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.cloud.user-menu/user-menu.js @@ -18,6 +18,7 @@ function onRequest(context) { var constants = require("/app/modules/constants.js"); + var mdmProps = require("/app/modules/conf-reader/main.js")["conf"]; var user = context.user; var isSuperTenant = false; if (user.tenantId == -1234){ @@ -26,5 +27,19 @@ function onRequest(context) { var viewModal = {}; viewModal.isSuperTenant = isSuperTenant; viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]); + viewModal.isCloud = mdmProps.isCloud; + viewModal.contactUsURL = mdmProps.cloudConfig.contactUsURL; + viewModal.apiCloudDocURL = mdmProps.cloudConfig.apiCloudDocURL; + viewModal.appCloudDocURL = mdmProps.cloudConfig.appCloudDocURL; + viewModal.deviceCloudDocURL = mdmProps.cloudConfig.deviceCloudDocURL; + viewModal.apiCloudWalkthroughURL = mdmProps.cloudConfig.apiCloudWalkthroughURL; + viewModal.profileURL = mdmProps.cloudConfig.profileURL; + viewModal.changePasswordURL = mdmProps.cloudConfig.changePasswordURL; + viewModal.logoutURL = mdmProps.cloudConfig.logoutURL; + viewModal.apiCloudURL = mdmProps.cloudConfig.apiCloudURL; + viewModal.appCloudURL = mdmProps.cloudConfig.appCloudURL; + viewModal.deviceCloudURL = mdmProps.cloudConfig.deviceCloudURL; + viewModal.oraganizationURL = mdmProps.cloudConfig.oraganizationURL; + viewModal.membersURL = mdmProps.cloudConfig.membersURL; return viewModal; } From 7480ccaa157740f90704810c00edc5638818db88 Mon Sep 17 00:00:00 2001 From: kamidu Date: Fri, 17 Feb 2017 17:56:29 +0530 Subject: [PATCH 2/2] fixing datatable issues --- .../js/dataTables.extended.serversidepaging.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 bedc54b4bd..c3e8fd5d00 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,14 +61,6 @@ $.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) { @@ -111,6 +103,14 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter fnCreatedRow: fnCreatedRow, "fnDrawCallback": fnDrawCallback, initComplete: function () { + + //loading tooltips + if (typeof $.fn.tooltip == 'function') { + $('[data-toggle="tooltip"]').tooltip(); + } else { + console.warn('Warning : Dependency missing - Bootstrap Tooltip Library'); + } + this.api().columns().every(function () { var column = this;