diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js
index 969329eb62..7ef8360ee0 100644
--- a/dashboard-ui/scripts/sync.js
+++ b/dashboard-ui/scripts/sync.js
@@ -121,11 +121,7 @@
if (result.Options.indexOf('Quality') != -1) {
html += '
';
html += '
';
- html += '
';
@@ -180,7 +176,11 @@
$(this).off("panelclose").remove();
});
- $('#selectQuality', elem).val('High').selectmenu('refresh');
+ $('#selectSyncTarget', elem).on('change', function () {
+
+ loadQualityOptions(elem, this.value);
+
+ }).trigger('change');
$('form', elem).on('submit', function () {
@@ -190,6 +190,25 @@
});
}
+ function loadQualityOptions(panel, targetId) {
+
+ ApiClient.getJSON(ApiClient.getUrl('Sync/QualityOptions', {
+
+ targetId: targetId
+
+ })).done(function (options) {
+
+ $('#selectQuality', panel).html(options.map(function (o) {
+
+ var selectedAttribute = o.IsDefault ? ' selected="selected"' : '';
+ return '';
+
+ }).join('')).selectmenu('refresh');
+
+ });
+
+ }
+
function isAvailable(item, user) {
return item.SupportsSync;