var PluginUpdatesPage = {
onPageShow: function () {
Dashboard.showLoadingMsg();
$('.liPluginUpdate', this).remove();
ApiClient.getInstalledPlugins().done(PluginUpdatesPage.loadPlugins);
},
loadPlugins: function (plugins) {
var elem = $('#tbodyPluginUpdates', $.mobile.activePage).html('');
for (var i = 0, length = plugins.length; i < length; i++) {
PluginUpdatesPage.addPlugin(plugins[i], i, elem);
}
Dashboard.hideLoadingMsg();
},
addPlugin: function (plugin, fieldIndex, elem) {
var html = "";
html += "
";
html += "
" + plugin.Name + "
";
var fieldId = "liPluginUpdateFielda" + fieldIndex;
var options = PluginUpdatesPage.getHtmlOptions(["Off", "On"], (plugin.EnableAutoUpdate ? "On" : "Off"));
html += "