|
|
|
@ -164,6 +164,9 @@ function loadDevices() {
|
|
|
|
|
} else {
|
|
|
|
|
groups = data.data;
|
|
|
|
|
}
|
|
|
|
|
if (groups.length == 1 && groups[0].id == 0) {
|
|
|
|
|
$("#ast-container-parent").html($("#no-devices-div-content").html());
|
|
|
|
|
} else {
|
|
|
|
|
viewModel.groups = groups;
|
|
|
|
|
var content = template(viewModel);
|
|
|
|
|
$("#ast-container-parent").html(content);
|
|
|
|
@ -180,8 +183,6 @@ function loadDevices() {
|
|
|
|
|
} else {
|
|
|
|
|
if (groupId && groupId != "0") {
|
|
|
|
|
content = $("#no-grouped-devices-div-content").html();
|
|
|
|
|
} else if (groups[g].id == 0 && g == 0) {
|
|
|
|
|
content = $("#no-devices-div-content").html();
|
|
|
|
|
} else {
|
|
|
|
|
content = $("#no-devices-in-group-div-content").html();
|
|
|
|
|
}
|
|
|
|
@ -194,9 +195,11 @@ function loadDevices() {
|
|
|
|
|
$(deviceCheckbox).click(function () {
|
|
|
|
|
addDeviceSelectedClass(this);
|
|
|
|
|
});
|
|
|
|
|
attachEvents();
|
|
|
|
|
attachGroupEvents();
|
|
|
|
|
attachDeviceEvents();
|
|
|
|
|
formatDates();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
invokerUtil.get(serviceURL,
|
|
|
|
|
successCallback, function (message) {
|
|
|
|
@ -260,7 +263,7 @@ function hidePopup() {
|
|
|
|
|
/**
|
|
|
|
|
* Following functions should be triggered after AJAX request is made.
|
|
|
|
|
*/
|
|
|
|
|
function attachEvents() {
|
|
|
|
|
function attachDeviceEvents() {
|
|
|
|
|
/**
|
|
|
|
|
* Following click function would execute
|
|
|
|
|
* when a user clicks on "Remove" link
|
|
|
|
@ -535,7 +538,7 @@ function attachGroupAdding() {
|
|
|
|
|
/**
|
|
|
|
|
* Following functions should be triggered after AJAX request is made.
|
|
|
|
|
*/
|
|
|
|
|
function attachEvents() {
|
|
|
|
|
function attachGroupEvents() {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Following click function would execute
|
|
|
|
|