Fix for device view consistancy problems

merge-requests/1/head
kamidu 8 years ago
parent 22ec7aa695
commit 7431654f25

@ -21,9 +21,9 @@
* when a user clicks on the list item * when a user clicks on the list item
* initial mode and with out select mode. * initial mode and with out select mode.
*/ */
function InitiateViewOption(url) { function InitiateViewOption() {
if ($(".select-enable-btn").text() == "Select") { 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') { if (row.status != 'REMOVED') {
url = "device/" + deviceType + "?id=" + deviceIdentifier; url = "device/" + deviceType + "?id=" + deviceIdentifier;
} }
return '<div onclick="javascript:InitiateViewOption(\'' + url + '\')" class="thumbnail icon">' + return '<div class=" viewEnabledIcon thumbnail icon" data-url="' + url + '">' +
'<i class="square-element text fw fw-mobile"></i>' + '<i class="square-element text fw fw-mobile"></i>' +
'</div>' '</div>'
} }
}, },

@ -110,7 +110,7 @@
</table> </table>
{{/defineZone}} {{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px"> <div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Operations {{deviceView.isNotWindows}} Operations
</div> </div>
<div class="add-margin-top-4x"> <div class="add-margin-top-4x">
{{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}} {{unit "mdm.unit.device.operation-bar" deviceType=deviceView.deviceType ownership=deviceView.ownership}}

@ -50,6 +50,10 @@ function onRequest(context) {
if (filteredDeviceData["enrolmentInfo"]) { if (filteredDeviceData["enrolmentInfo"]) {
if (filteredDeviceData["enrolmentInfo"]["status"]) { if (filteredDeviceData["enrolmentInfo"]["status"]) {
viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"]; viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"];
viewModel.isActive = false ;
if (filteredDeviceData["enrolmentInfo"]["status"]== "ACTIVE") {
viewModel.isActive = true ;
}
} }
if (filteredDeviceData["enrolmentInfo"]["owner"]) { if (filteredDeviceData["enrolmentInfo"]["owner"]) {
viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"]; viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"];
@ -200,6 +204,5 @@ function onRequest(context) {
} else { } else {
deviceViewData["deviceFound"] = false; deviceViewData["deviceFound"] = false;
} }
log.error(stringify(deviceViewData));
return deviceViewData; return deviceViewData;
} }
Loading…
Cancel
Save