diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js index 4ad5d5341..a179701e5 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js @@ -227,11 +227,8 @@ $(document).ready(function () { addConfigAPI, addConfigFormData, function (data, textStatus, jqXHR) { - data = JSON.parse(data); - if (jqXHR.status == 201) { - $("#config-save-form").addClass("hidden"); - $("#record-created-msg").removeClass("hidden"); - } + $("#config-save-form").addClass("hidden"); + $("#record-created-msg").removeClass("hidden"); }, function (data) { if (data.status == 500) { diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js index fbc60b3a1..5bcc4c3bd 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/mdm.page.devices/public/js/device-listing.js @@ -21,9 +21,9 @@ * when a user clicks on the list item * initial mode and with out select mode. */ -function InitiateViewOption(url) { +function InitiateViewOption() { if ($(".select-enable-btn").text() == "Select") { - $(location).attr('href', url); + $(location).attr('href', $(this).data("url")); } } @@ -148,8 +148,8 @@ function loadDevices() { if (row.status != 'REMOVED') { url = "device/" + deviceType + "?id=" + deviceIdentifier; } - return '
' + - '' + + return '
' + + '' + '
' } }, diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js index f56ba9556..65b3fe27d 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js @@ -25,12 +25,13 @@ var InitiateViewOption = null; var ownership = deviceId.data("ownership"); var operationTable; + positionArrow($(".media .list-group-item.active"),"#device_details_tab"); $(".media.tab-responsive [data-toggle=tab]").on("shown.bs.tab", function (e) { var activeTabPane = $(e.target).attr("href"); var activeListGroupItem = $(".media .list-group-item.active"); $(activeTabPane).removeClass("visible-xs-block"); $(activeTabPane).siblings().not(".arrow-left").addClass("visible-xs-block"); - positionArrow(activeListGroupItem); + positionArrow(activeListGroupItem,activeTabPane); }); $(".media.tab-responsive .tab-content").on("shown.bs.collapse", function (e) { @@ -50,7 +51,7 @@ var InitiateViewOption = null; } }); - function positionArrow(selectedTab) { + function positionArrow(selectedTab,activeTabPane) { var selectedTabHeight = $(selectedTab).innerHeight(); var arrowPosition = 0; var totalHeight = 0; @@ -75,6 +76,12 @@ var InitiateViewOption = null; } $(arrow).css("top", arrowPosition - 10); + + var listHeight = $(".tab-responsive .media-left ul").height(); + var paneHeight = $(activeTabPane).height(); + if(listHeight > paneHeight){ + $(activeTabPane).height(listHeight); + } } function loadOperationsLog(update) { @@ -185,17 +192,17 @@ var InitiateViewOption = null; $("#applications-list-container").html(content); } else { $("#applications-list-container"). - html("

No applications found.

" + - "

Please try refreshing the list in a while.

"); + html("

No applications found.

" + + "

Please try refreshing the list in a while.

"); } } }, // error-callback function () { $("#applications-list-container"). - html("

 Loading application list " + - "was not successful. please try refreshing the list in a while.

"); - }); + html("

 Loading application list " + + "was not successful. please try refreshing the list in a while.

"); + }); }); } @@ -251,50 +258,50 @@ var InitiateViewOption = null; // error-callback function () { $("#policy-list-container"). - html("
" + - "

" + - "" + - "Loading policy compliance related data " + - "was not successful. please try refreshing in a while." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "Loading policy compliance related data " + + "was not successful. please try refreshing in a while." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } ); } } else if ((jqXHR.status == 200 && !data)) { $("#policy-spinner").addClass("hidden"); $("#policy-list-container"). - html("
" + - "

" + - "" + - "There is currently no effective policy applied for this device." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "There is currently no effective policy applied for this device." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } }, // error-callback function () { $("#policy-spinner").addClass("hidden"); $("#policy-list-container"). - html("
" + - "

" + - "" + - "Loading policy compliance related data " + - "was not successful. please try refreshing in a while." + - "

" + - "
" + - "

" + - "

" + - "

" - ); + html("
" + + "

" + + "" + + "Loading policy compliance related data " + + "was not successful. please try refreshing in a while." + + "

" + + "
" + + "

" + + "

" + + "

" + ); } ); } @@ -309,6 +316,10 @@ var InitiateViewOption = null; loadApplicationsList(); loadPolicyCompliance(); + if ($("#device_details_tab").length == 0) { + $(".device-detail-body").addClass("hidden"); + } + $("#refresh-policy").click(function () { $("#policy-spinner").removeClass("hidden"); loadPolicyCompliance(); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/templates/policy-compliance.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/templates/policy-compliance.hbs index a97ce7518..673806e89 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/templates/policy-compliance.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/templates/policy-compliance.hbs @@ -1,7 +1,7 @@
-
+
{{#equal deviceType "android"}} @@ -18,7 +18,7 @@ {{deviceType}}
-
+
@@ -48,7 +48,7 @@
-
+
- - - - + + + + {{#each complianceFeatures}} diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs index d44d94957..fe0163522 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.hbs @@ -6,7 +6,8 @@ {{#if deviceFound}} {{#if isAuthorized}}

+ data-deviceid="{{deviceView.deviceIdentifier}}" data-type="{{deviceView.deviceType}}" + data-ownership="{{deviceView.ownership}}"> Device {{deviceView.name}} {{#if deviceView.model}} @@ -15,413 +16,463 @@ {{/if}}

-
-
-
-
-
-
Device Overview
- {{#defineZone "device-detail-properties"}} -
FeatureCompliance
FeatureCompliance
- - {{#if deviceView.deviceIdentifier}} - - - - - {{/if}} - {{#if deviceView.name}} - - - - - {{/if}} - {{#if deviceView.vendor}} - {{#if deviceView.model}} +
+
+
+
+
+
Device + Overview +
+ {{#defineZone "device-detail-properties"}} +
Device ID{{deviceView.deviceIdentifier}}
Name{{deviceView.name}}
+ + {{#if deviceView.deviceIdentifier}} - - + + {{/if}} - {{/if}} - {{#if deviceView.status}} - - - - - {{/if}} - {{#if deviceView.owner}} - - - - - {{/if}} - {{#if deviceView.ownership}} - - - - - {{/if}} - {{#if deviceView.imei}} - - - - - {{/if}} - {{#if deviceView.udid}} - - - - - {{/if}} - {{#if deviceView.osBuildDate}} - - - - - {{/if}} - {{#if deviceView.phoneNumber}} - - - - - {{/if}} - {{#if deviceView.lastUpdatedTime}} - - - - - {{/if}} - -
Model{{deviceView.vendor}} {{deviceView.model}}Device ID{{deviceView.deviceIdentifier}}
Status - {{#equal deviceView.status "ACTIVE"}}  Active{{/equal}} - {{#equal deviceView.status "INACTIVE"}}  Inactive{{/equal}} - {{#equal deviceView.status "BLOCKED"}}  Blocked{{/equal}} - {{#equal deviceView.status "REMOVED"}}  Removed{{/equal}} -
Owner{{deviceView.owner}}
Ownership{{deviceView.ownership}}
IMEI{{deviceView.imei}}
UDID{{deviceView.udid}}
Firmware Build Date{{deviceView.osBuildDate}}
Phone Number{{deviceView.phoneNumber}}
Last Update{{deviceView.lastUpdatedTime}}
- {{/defineZone}} -
Operations
-
- {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}} -
-
-
-
- - {{#defineZone "device-detail-properties"}} -
-
- - -
- - -
-
-
- - {{#equal deviceView.deviceType "windows"}} -
-

Not available yet

-
- {{/equal}} - {{#if deviceView.deviceInfoAvailable}} - {{#if deviceView.BatteryLevel}} -
-
-
-
BATTERY
-
-
-
- {{deviceView.BatteryLevel.value}} % -
-
-
-
-
- {{/if}} - - - - - - - - - - - - - - - - {{#if deviceView.ramUsage}} -
-
-
-
RAM Usage
-
-
-
- {{deviceView.ramUsage.value}} % -
-
-
-
-
- {{/if}} - {{#if deviceView.internalMemory}} -
-
-
-
Local Storage
-
-
-
- {{deviceView.internalMemory.usage}} % - - TOTAL OF {{deviceView.internalMemory.total}} GB - -
-
-
-
-
- {{/if}} - {{#if deviceView.externalMemory}} -
-
-
-
External Storage
-
-
-
- {{deviceView.externalMemory.usage}} % - - TOTAL OF {{deviceView.externalMemory.total}} GB - -
-
-
-
-
- {{/if}} - {{else}} -
-

- - Battery, RAM and Storage related information are not available yet. -

-
+ {{#if deviceView.name}} + + Name + {{deviceView.name}} + {{/if}} -
+ {{#if deviceView.vendor}} + {{#if deviceView.model}} + + Model + {{deviceView.vendor}} {{deviceView.model}} + + {{/if}} + {{/if}} + {{#if deviceView.status}} + + Status + + {{#equal deviceView.status "ACTIVE"}}  Active{{/equal}} + {{#equal deviceView.status "INACTIVE"}}  Inactive{{/equal}} + {{#equal deviceView.status "BLOCKED"}}  Blocked{{/equal}} + {{#equal deviceView.status "REMOVED"}}  Removed{{/equal}} + + + {{/if}} + {{#if deviceView.owner}} + + Owner + {{deviceView.owner}} + + {{/if}} + {{#if deviceView.ownership}} + + Ownership + {{deviceView.ownership}} + + {{/if}} + {{#if deviceView.imei}} + + IMEI + {{deviceView.imei}} + + {{/if}} + {{#if deviceView.udid}} + + UDID + {{deviceView.udid}} + + {{/if}} + {{#if deviceView.osBuildDate}} + + Firmware Build + Date + + {{deviceView.osBuildDate}} + + {{/if}} + {{#if deviceView.phoneNumber}} + + Phone Number + {{deviceView.phoneNumber}} + + {{/if}} + {{#if deviceView.lastUpdatedTime}} + + Last Update + {{deviceView.lastUpdatedTime}} + + {{/if}} + + + {{/defineZone}} +
+ Operations +
+
+ {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}
-
-