From bc59ac6819deea8a90e8bec03e376b5bb0c3b827 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Thu, 19 Jan 2017 14:08:59 +0530 Subject: [PATCH 1/4] Adding action buttons to listing views --- .../app/pages/cdmf.page.device.view/view.hbs | 39 +++++++++++++++++++ .../app/pages/cdmf.page.devices/devices.hbs | 27 +++++++++++++ .../app/pages/cdmf.page.user.view/view.hbs | 30 ++++++++++++++ 3 files changed, 96 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs index 1a583604098..689881c493b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs @@ -38,6 +38,45 @@ {{/zone}} +{{#zone "navbarActions"}} +
  • + + + + + + View Analytics + +
  • +
  • + + + + + + Device Grouping + +
  • +
  • + + + + + + Edit + +
  • +
  • + + + + + + Delete + +
  • +{{/zone}} + {{#zone "content"}} {{unit deviceViewUnitName}} {{unit "cdmf.unit.lib.data-table"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs index b5f0f939542..37fb95a8098 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs @@ -66,6 +66,33 @@ View Analytics +
  • + + + + + + Group Sharing + +
  • +
  • + + + + + + Edit + +
  • +
  • + + + + + + Delete + +
  • {{else}} {{#if permissions.enroll}}
  • diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs index 01acd48ffaf..72590d7d87b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs @@ -35,6 +35,36 @@
  • {{/zone}} +{{#zone "navbarActions"}} +
  • + + + + + + Reset password + +
  • +
  • + + + + + + Edit + +
  • +
  • + + + + + + Delete + +
  • +{{/zone}} + {{#zone "content"}} {{#if canView}} {{#zone "contentTitle"}} From 9f262c1afb3508c59c9b7b104e8e5236247db5bc Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 20 Jan 2017 11:50:39 +0530 Subject: [PATCH 2/4] Message container markup fix for advance search --- .../app/pages/cdmf.page.device.search/search.hbs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs index 3a80726bc2a..0bb38a94923 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.search/search.hbs @@ -50,9 +50,9 @@

    Advanced Device Search


    - From a5d1f70c9355c486d48942dcaed5ee4c973c7187 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 20 Jan 2017 15:08:27 +0530 Subject: [PATCH 3/4] git status --- .../app/pages/cdmf.page.device.view/view.hbs | 39 ------------------- .../app/pages/cdmf.page.devices/devices.hbs | 27 ------------- .../app/pages/cdmf.page.user.view/view.hbs | 30 -------------- 3 files changed, 96 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs index 689881c493b..1a583604098 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.device.view/view.hbs @@ -38,45 +38,6 @@ {{/zone}} -{{#zone "navbarActions"}} -
  • - - - - - - View Analytics - -
  • -
  • - - - - - - Device Grouping - -
  • -
  • - - - - - - Edit - -
  • -
  • - - - - - - Delete - -
  • -{{/zone}} - {{#zone "content"}} {{unit deviceViewUnitName}} {{unit "cdmf.unit.lib.data-table"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs index 37fb95a8098..b5f0f939542 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/devices.hbs @@ -66,33 +66,6 @@ View Analytics -
  • - - - - - - Group Sharing - -
  • -
  • - - - - - - Edit - -
  • -
  • - - - - - - Delete - -
  • {{else}} {{#if permissions.enroll}}
  • diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs index 72590d7d87b..01acd48ffaf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.view/view.hbs @@ -35,36 +35,6 @@
  • {{/zone}} -{{#zone "navbarActions"}} -
  • - - - - - - Reset password - -
  • -
  • - - - - - - Edit - -
  • -
  • - - - - - - Delete - -
  • -{{/zone}} - {{#zone "content"}} {{#if canView}} {{#zone "contentTitle"}} From 3983780f7f7c2f561e62e63f1b45152d8f9c1040 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 20 Jan 2017 15:09:00 +0530 Subject: [PATCH 4/4] Fix for multiple advance search element --- .../app/pages/cdmf.page.devices/public/js/listing.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 cbd7a519119..a65de8a6daf 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 @@ -460,8 +460,12 @@ function loadDevices(searchType, searchParam) { $("#loading-content").remove(); attachDeviceEvents(); - $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') - .after('Advance Search') + if($('.advance-search').length < 1){ + $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') + .after('Advance Search'); + } + }, { "placeholder": "Search By Device Name", "searchKey": "name"