summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-09-18 07:23:01 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-18 07:23:01 +0200
commita67175cab1f441b23c0b12091e10710d7dfc69b3 (patch)
treecef4d0962ce0cd176567cba45a046c3cd9e256c3 /modules/luci-mod-system
parentf878b21c8c4ef9444a9de6bc02b58ed4f91b0b2d (diff)
luci-mod-system: disable redundant page actions in crontab, startup views
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system')
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js13
-rw-r--r--modules/luci-mod-system/htdocs/luci-static/resources/view/system/startup.js14
2 files changed, 14 insertions, 13 deletions
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js
index c8baa4722..286155790 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/crontab.js
@@ -40,13 +40,10 @@ return L.view.extend({
E('p', {},
_('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.')),
- 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'))
- ])
+ E('p', {}, E('textarea', { 'style': 'width:100%', 'rows': 10 }, crontab != null ? crontab : ''))
]);
- }
+ },
+
+ handleSaveApply: null,
+ handleReset: null
});
diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/startup.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/startup.js
index 3c026e088..365e6c8ed 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/startup.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/startup.js
@@ -55,7 +55,7 @@ return L.view.extend({
}, 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';
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('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('div', { 'class': 'right' }, [
+ E('div', { 'class': 'cbi-page-actions' }, [
E('button', {
- 'class': 'btn cbi-button-positive important',
- 'click': L.ui.createHandlerFn(this, 'handleSave')
+ 'class': 'btn cbi-button-save',
+ 'click': L.ui.createHandlerFn(this, 'handleRcLocalSave')
}, _('Save'))
])
])
@@ -139,5 +139,9 @@ return L.view.extend({
L.ui.tabs.initTabGroup(view.lastElementChild.childNodes);
return view;
- }
+ },
+
+ handleSaveApply: null,
+ handleSave: null,
+ handleReset: null
});