sync updates

This commit is contained in:
Luke Pulverenti 2015-02-04 14:13:00 -05:00
parent c47d52a8b7
commit 6e731da12a
3 changed files with 20 additions and 1 deletions

View File

@ -116,6 +116,7 @@
html += '<option value="Medium">' + Globalize.translate('OptionMedium') + '</option>'; html += '<option value="Medium">' + Globalize.translate('OptionMedium') + '</option>';
html += '<option value="Low">' + Globalize.translate('OptionLow') + '</option>'; html += '<option value="Low">' + Globalize.translate('OptionLow') + '</option>';
html += '</select>'; html += '</select>';
html += '<div class="fieldDescription">' + Globalize.translate('LabelSyncQualityHelp') + '</div>';
html += '</div>'; html += '</div>';
} }

View File

@ -93,7 +93,10 @@
else if (job.Status == 'Queued') { else if (job.Status == 'Queued') {
background = 'rgba(51, 136, 204, ' + opacity + ')'; background = 'rgba(51, 136, 204, ' + opacity + ')';
} }
else if (job.Status == 'InProgress') { else if (job.Status == 'Transferring') {
background = 'rgba(72, 0, 255, ' + opacity + ')';
}
else if (job.Status == 'Converting') {
background = 'rgba(72, 0, 255, ' + opacity + ')'; background = 'rgba(72, 0, 255, ' + opacity + ')';
} }
@ -268,6 +271,18 @@
}); });
} }
function onWebSocketMessage(e, msg) {
var page = $.mobile.activePage;
if (msg.MessageType == "SyncJobCreated") {
reloadData(page);
}
else if (msg.MessageType == "SyncJobCancelled") {
reloadData(page);
}
}
$(document).on('pageshow', ".syncActivityPage", function () { $(document).on('pageshow', ".syncActivityPage", function () {
var page = this; var page = this;
@ -290,6 +305,7 @@
taskKey: 'SyncPrepare' taskKey: 'SyncPrepare'
}); });
$(ApiClient).on("websocketmessage.syncactivity", onWebSocketMessage);
}).on('pagehide', ".syncActivityPage", function () { }).on('pagehide', ".syncActivityPage", function () {
@ -300,6 +316,7 @@
mode: 'off' mode: 'off'
}); });
$(ApiClient).off(".syncactivity");
}); });
})(); })();

View File

@ -29,6 +29,7 @@
html += '<option value="Medium">' + Globalize.translate('OptionMedium') + '</option>'; html += '<option value="Medium">' + Globalize.translate('OptionMedium') + '</option>';
html += '<option value="Low">' + Globalize.translate('OptionLow') + '</option>'; html += '<option value="Low">' + Globalize.translate('OptionLow') + '</option>';
html += '</select>'; html += '</select>';
html += '<div class="fieldDescription">' + Globalize.translate('LabelSyncQualityHelp') + '</div>';
html += '</div>'; html += '</div>';
} }