live saving on the metadata pages

This commit is contained in:
LukePulverenti
2013-03-11 10:54:08 -04:00
parent f010d032ed
commit 39020714f7
7 changed files with 108 additions and 98 deletions

View File

@@ -33,7 +33,7 @@
var checkedAttribute = configuration.InternetProviderExcludeTypes.indexOf(type) != -1 ? ' checked="checked"' : '';
html += '<input' + checkedAttribute + ' class="chkItemType" data-itemtype="' + type + '" type="checkbox" name="' + id + '" id="' + id + '" />';
html += '<input' + checkedAttribute + ' class="chkItemType" data-itemtype="' + type + '" type="checkbox" name="' + id + '" id="' + id + '" onchange="AdvancedMetadataConfigurationPage.submit();" />';
html += '<label for="' + id + '">' + type + '</label>';
}
@@ -42,6 +42,12 @@
$('#divItemTypes', page).html(html).trigger("create");
},
submit: function () {
$('.btnSubmit', $.mobile.activePage)[0].click();
},
onSubmit: function () {
Dashboard.showLoadingMsg();
@@ -54,7 +60,7 @@
return currentCheckbox.getAttribute('data-itemtype');
});
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
ApiClient.updateServerConfiguration(config);
});
// Disable default form submission