Fix for device view consistancy problems

revert-dabc3590
kamidu 8 years ago
parent 22ec7aa695
commit 7431654f25

@ -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,7 +148,7 @@ function loadDevices() {
if (row.status != 'REMOVED') {
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>' +
'</div>'
}

@ -110,7 +110,7 @@
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
Operations {{deviceView.isNotWindows}}
Operations
</div>
<div class="add-margin-top-4x">
{{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"]["status"]) {
viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"];
viewModel.isActive = false ;
if (filteredDeviceData["enrolmentInfo"]["status"]== "ACTIVE") {
viewModel.isActive = true ;
}
}
if (filteredDeviceData["enrolmentInfo"]["owner"]) {
viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"];
@ -200,6 +204,5 @@ function onRequest(context) {
} else {
deviceViewData["deviceFound"] = false;
}
log.error(stringify(deviceViewData));
return deviceViewData;
}
Loading…
Cancel
Save