luci-mod-system: disable redundant page actions in crontab, startup views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
f878b21c8c
commit
a67175cab1
2 changed files with 14 additions and 13 deletions
|
@ -40,13 +40,10 @@ return L.view.extend({
|
||||||
E('p', {},
|
E('p', {},
|
||||||
_('This is the system crontab in which scheduled tasks can be defined.') +
|
_('This is the system crontab in which scheduled tasks can be defined.') +
|
||||||
_('<br/>Note: you need to manually restart the cron service if the crontab file was empty before editing.')),
|
_('<br/>Note: you need to manually restart the cron service if the crontab file was empty before editing.')),
|
||||||
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, crontab != null ? crontab : '')),
|
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, crontab != null ? crontab : ''))
|
||||||
E('div', { 'class': 'right' }, [
|
|
||||||
E('button', {
|
|
||||||
'class': 'btn cbi-button-positive important',
|
|
||||||
'click': L.ui.createHandlerFn(this, 'handleSave')
|
|
||||||
}, _('Save'))
|
|
||||||
])
|
|
||||||
]);
|
]);
|
||||||
}
|
},
|
||||||
|
|
||||||
|
handleSaveApply: null,
|
||||||
|
handleReset: null
|
||||||
});
|
});
|
||||||
|
|
|
@ -55,7 +55,7 @@ return L.view.extend({
|
||||||
}, this, name, !isEnabled, ev.currentTarget.parentNode));
|
}, this, name, !isEnabled, ev.currentTarget.parentNode));
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSave: function(ev) {
|
handleRcLocalSave: function(ev) {
|
||||||
var value = (document.querySelector('textarea').value || '').trim().replace(/\r\n/g, '\n') + '\n';
|
var value = (document.querySelector('textarea').value || '').trim().replace(/\r\n/g, '\n') + '\n';
|
||||||
|
|
||||||
return this.callFileWrite('/etc/rc.local', value).then(function(rc) {
|
return this.callFileWrite('/etc/rc.local', value).then(function(rc) {
|
||||||
|
@ -126,10 +126,10 @@ return L.view.extend({
|
||||||
E('div', { 'data-tab': 'rc', 'data-tab-title': _('Local Startup') }, [
|
E('div', { 'data-tab': 'rc', 'data-tab-title': _('Local Startup') }, [
|
||||||
E('p', {}, _('This is the content of /etc/rc.local. Insert your own commands here (in front of \'exit 0\') to execute them at the end of the boot process.')),
|
E('p', {}, _('This is the content of /etc/rc.local. Insert your own commands here (in front of \'exit 0\') to execute them at the end of the boot process.')),
|
||||||
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 20 }, rcLocal != null ? rcLocal : '')),
|
E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 20 }, rcLocal != null ? rcLocal : '')),
|
||||||
E('div', { 'class': 'right' }, [
|
E('div', { 'class': 'cbi-page-actions' }, [
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn cbi-button-positive important',
|
'class': 'btn cbi-button-save',
|
||||||
'click': L.ui.createHandlerFn(this, 'handleSave')
|
'click': L.ui.createHandlerFn(this, 'handleRcLocalSave')
|
||||||
}, _('Save'))
|
}, _('Save'))
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
@ -139,5 +139,9 @@ return L.view.extend({
|
||||||
L.ui.tabs.initTabGroup(view.lastElementChild.childNodes);
|
L.ui.tabs.initTabGroup(view.lastElementChild.childNodes);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
handleSaveApply: null,
|
||||||
|
handleSave: null,
|
||||||
|
handleReset: null
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue