(function () { function cancelJob(page, id) { $('.jobMenu', page).on("popupafterclose.deleteuser", function () { $(this).off('popupafterclose.deleteuser'); var msg = Globalize.translate('CancelSyncJobConfirmation'); Dashboard.confirm(msg, Globalize.translate('HeaderCancelSyncJob'), function (result) { if (result) { Dashboard.showLoadingMsg(); ApiClient.ajax({ url: ApiClient.getUrl('Sync/Jobs/' + id), type: 'DELETE' }).done(function () { reloadData(page); }); } }); }).popup('close'); } function getSyncTargetName(targets, id) { var target = targets.filter(function (t) { return t.Id == id; })[0]; return target ? target.Name : 'Unknown Device'; } function getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage) { var html = ''; html += "