X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=luci2%2Fhtdocs%2Fluci2%2Fview%2Fsystem.cron.js;h=aae4ce4bcbcecbfd8bf61dba88b78d3db2845077;hb=fa4ee5bd4d909dd54c86de3c0608036697747ac6;hp=895f2cbc70d82fd12ffffef740891cdbde56ae61;hpb=2f0e65dd27549ef4fde5b18588083968a59b66bd;p=project%2Fluci2%2Fui.git diff --git a/luci2/htdocs/luci2/view/system.cron.js b/luci2/htdocs/luci2/view/system.cron.js index 895f2cb..aae4ce4 100644 --- a/luci2/htdocs/luci2/view/system.cron.js +++ b/luci2/htdocs/luci2/view/system.cron.js @@ -4,12 +4,12 @@ L.ui.view.extend({ execute: function() { var allow_write = this.options.acls.cron; - return L.system.getCrontab(function(data) { + return L.system.getCrontab().then(function(data) { $('textarea').val(data).attr('disabled', !allow_write); $('input.cbi-button-save').attr('disabled', !allow_write).click(function() { var data = ($('textarea').val() || '').replace(/\r/g, '').replace(/\n?$/, '\n'); L.ui.loading(true); - L.system.setCrontab(data, function() { + L.system.setCrontab(data).then(function() { $('textarea').val(data); L.ui.loading(false); });