'use strict';
'require fs';
+'require ui';
return L.view.extend({
load: function() {
return fs.write('/etc/firewall.user', value).then(function(rc) {
document.querySelector('textarea').value = value;
- L.ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
+ ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
fs.exec('/etc/init.d/firewall', ['restart']);
}).catch(function(e) {
- L.ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
+ ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
});
},
'use strict';
'require fs';
+'require ui';
'require uci';
'require form';
'require network';
'require tools.widgets as widgets';
function count_changes(section_id) {
- var changes = L.ui.changes.changes, n = 0;
+ var changes = ui.changes.changes, n = 0;
if (!L.isObject(changes))
return n;
_('Error'), errors ? errors[4] : null,
null, changecount ? E('a', {
href: '#',
- click: L.bind(L.ui.changes.displayChanges, L.ui.changes)
+ click: L.bind(ui.changes.displayChanges, ui.changes)
}, _('Interface has %d pending changes').format(changecount)) : null
]);
}
Array.isArray(info.inbound_interfaces) &&
info.inbound_interfaces.filter(function(i) { return i == id })[0]) {
- L.ui.showModal(_('Confirm disconnect'), [
+ ui.showModal(_('Confirm disconnect'), [
E('p', _('You appear to be currently connected to the device via the "%h" interface. Do you really want to shut down the interface?').format(id)),
E('div', { 'class': 'right' }, [
E('button', {
btns[1].disabled = false;
btns[0].disabled = false;
- L.ui.hideModal();
+ ui.hideModal();
}
}, _('Cancel')),
' ',
dsc.setAttribute('disconnect', '');
L.dom.content(dsc, E('em', _('Interface is shutting down...')));
- L.ui.hideModal();
+ ui.hideModal();
}
}, _('Disconnect'))
])
E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Setup DHCP Server'),
- 'click': L.ui.createHandlerFn(this, function(section_id, ev) {
+ 'click': ui.createHandlerFn(this, function(section_id, ev) {
this.map.save(function() {
uci.add('dhcp', 'dhcp', section_id);
uci.set('dhcp', section_id, 'interface', section_id);
}
m2.render().then(L.bind(function(nodes) {
- L.ui.showModal(_('Add new interface...'), [
+ ui.showModal(_('Add new interface...'), [
nodes,
E('div', { 'class': 'right' }, [
E('button', {
'class': 'btn',
- 'click': L.ui.hideModal
+ 'click': ui.hideModal
}, _('Cancel')), ' ',
E('button', {
'class': 'cbi-button cbi-button-positive important',
- 'click': L.ui.createHandlerFn(this, function(ev) {
+ 'click': ui.createHandlerFn(this, function(ev) {
var nameval = name.isValid('_new_') ? name.formvalue('_new_') : null,
protoval = proto.isValid('_new_') ? proto.formvalue('_new_') : null;
if (dsc.getAttribute('reconnect') == '') {
dsc.setAttribute('reconnect', '1');
tasks.push(fs.exec('/sbin/ifup', [section_ids[i]]).catch(function(e) {
- L.ui.addNotification(null, E('p', e.message));
+ ui.addNotification(null, E('p', e.message));
}));
}
else if (dsc.getAttribute('disconnect') == '') {
dsc.setAttribute('disconnect', '1');
tasks.push(fs.exec('/sbin/ifdown', [section_ids[i]]).catch(function(e) {
- L.ui.addNotification(null, E('p', e.message));
+ ui.addNotification(null, E('p', e.message));
}));
}
else if (dsc.getAttribute('reconnect') == '1') {
'use strict';
+'require ui';
'require rpc';
'require uci';
'require form';
if (changed) {
uci.set('network', interfaces[i]['.name'], 'ifname', new_ifnames.join(' '));
- L.ui.addNotification(null, E('p', _('Interface %q device auto-migrated from %q to %q.')
+ ui.addNotification(null, E('p', _('Interface %q device auto-migrated from %q to %q.')
.replace(/%q/g, '"%s"').format(interfaces[i]['.name'], old_ifname, new_ifname)));
}
}
topology = topologies[switch_name];
if (!topology) {
- L.ui.addNotification(null, _('Switch %q has an unknown topology - the VLAN settings might not be accurate.').replace(/%q/, switch_name));
+ ui.addNotification(null, _('Switch %q has an unknown topology - the VLAN settings might not be accurate.').replace(/%q/, switch_name));
topology = {
features: {},
'use strict';
'require fs';
+'require ui';
'require rpc';
'require uci';
'require form';
'require tools.widgets as widgets';
function count_changes(section_id) {
- var changes = L.ui.changes.changes, n = 0;
+ var changes = ui.changes.changes, n = 0;
if (!L.isObject(changes))
return n;
if (changecount)
status_text = E('a', {
href: '#',
- click: L.bind(L.ui.changes.displayChanges, L.ui.changes)
+ click: L.bind(ui.changes.displayChanges, ui.changes)
}, _('Interface has %d pending changes').format(changecount));
else if (!is_assoc)
status_text = E('em', disabled ? _('Wireless is disabled') : _('Wireless is not associated'));
}
return map.save().then(function() {
- L.ui.changes.apply()
+ ui.changes.apply()
});
}
}
return Promise.all(tasks)
- .then(L.bind(L.ui.changes.init, L.ui.changes))
- .then(L.bind(L.ui.changes.apply, L.ui.changes));
+ .then(L.bind(ui.changes.init, ui.changes))
+ .then(L.bind(ui.changes.apply, ui.changes));
},
renderMigration: function() {
- L.ui.showModal(_('Wireless configuration migration'), [
+ ui.showModal(_('Wireless configuration migration'), [
E('p', _('The existing wireless configuration needs to be changed for LuCI to function properly.')),
E('p', _('Upon pressing "Continue", anonymous "wifi-iface" sections will be assigned with a name in the form <em>wifinet#</em> and the network will be restarted to apply the updated configuration.')),
E('div', { 'class': 'right' },
E('button', {
'class': 'btn cbi-button-action important',
- 'click': L.ui.createHandlerFn(this, 'handleMigration')
+ 'click': ui.createHandlerFn(this, 'handleMigration')
}, _('Continue')))
]);
},
E('button', {
'class': 'cbi-button cbi-button-neutral',
'title': _('Restart radio interface'),
- 'click': L.ui.createHandlerFn(this, radio_restart, section_id)
+ 'click': ui.createHandlerFn(this, radio_restart, section_id)
}, _('Restart')),
E('button', {
'class': 'cbi-button cbi-button-action important',
'title': _('Find and join network'),
- 'click': L.ui.createHandlerFn(this, 'handleScan', inst)
+ 'click': ui.createHandlerFn(this, 'handleScan', inst)
}, _('Scan')),
E('button', {
'class': 'cbi-button cbi-button-add',
'title': _('Provide new network'),
- 'click': L.ui.createHandlerFn(this, 'handleAdd', inst)
+ 'click': ui.createHandlerFn(this, 'handleAdd', inst)
}, _('Add'))
];
}
E('button', {
'class': 'cbi-button cbi-button-neutral enable-disable',
'title': isDisabled ? _('Enable this network') : _('Disable this network'),
- 'click': L.ui.createHandlerFn(this, network_updown, section_id, this.map)
+ 'click': ui.createHandlerFn(this, network_updown, section_id, this.map)
}, isDisabled ? _('Enable') : _('Disable')),
E('button', {
'class': 'cbi-button cbi-button-action important',
'title': _('Edit this network'),
- 'click': L.ui.createHandlerFn(this, 'renderMoreOptionsModal', section_id)
+ 'click': ui.createHandlerFn(this, 'renderMoreOptionsModal', section_id)
}, _('Edit')),
E('button', {
'class': 'cbi-button cbi-button-negative remove',
'title': _('Delete this network'),
- 'click': L.ui.createHandlerFn(this, 'handleRemove', section_id)
+ 'click': ui.createHandlerFn(this, 'handleRemove', section_id)
}, _('Remove'))
];
}
o = ss.taboption('general', form.Button, '_toggle', isDisabled ? _('Wireless network is disabled') : _('Wireless network is enabled'));
o.inputstyle = isDisabled ? 'apply' : 'reset';
o.inputtitle = isDisabled ? _('Enable') : _('Disable');
- o.onclick = L.ui.createHandlerFn(s, network_updown, s.section, s.map);
+ o.onclick = ui.createHandlerFn(s, network_updown, s.section, s.map);
o = ss.taboption('general', CBIWifiFrequencyValue, '_freq', '<br />' + _('Operating frequency'));
o.ucisection = s.section;
cbi_update_table(table, [], E('em', { class: 'spinning' }, _('Starting wireless scan...')));
- var md = L.ui.showModal(_('Join Network: Wireless Scan'), [
+ var md = ui.showModal(_('Join Network: Wireless Scan'), [
table,
E('div', { 'class': 'right' },
E('button', {
md.style.maxHeight = '';
}
- L.ui.hideModal();
+ ui.hideModal();
L.Poll.remove(this.pollFn);
this.pollFn = null;
zone.default = 'wan';
return m2.render().then(L.bind(function(nodes) {
- L.ui.showModal(_('Joining Network: %q').replace(/%q/, '"%h"'.format(bss.ssid)), [
+ ui.showModal(_('Joining Network: %q').replace(/%q/, '"%h"'.format(bss.ssid)), [
nodes,
E('div', { 'class': 'right' }, [
E('button', {
'class': 'btn',
- 'click': L.ui.hideModal
+ 'click': ui.hideModal
}, _('Cancel')), ' ',
E('button', {
'class': 'cbi-button cbi-button-positive important',
- 'click': L.ui.createHandlerFn(this, 'handleJoinConfirm', radioDev, bss, m2)
+ 'click': ui.createHandlerFn(this, 'handleJoinConfirm', radioDev, bss, m2)
}, _('Submit'))
])
], 'cbi-modal').querySelector('[id="%s"] input[class][type]'.format((passphrase || name).cbid('_new_'))).focus();
if (dsc.getAttribute('restart') == '') {
dsc.setAttribute('restart', '1');
tasks.push(fs.exec('/sbin/wifi', ['up', section_ids[i]]).catch(function(e) {
- L.ui.addNotification(null, E('p', e.message));
+ ui.addNotification(null, E('p', e.message));
}));
}
else if (dsc.getAttribute('restart') == '1') {
'use strict';
+'require ui';
'require rpc';
'require network';
});
}
- L.ui.tabs.initTabGroup(v.firstElementChild.childNodes);
+ ui.tabs.initTabGroup(v.firstElementChild.childNodes);
this.pollData();
'use strict';
+'require ui';
'require rpc';
'require network';
});
}
- L.ui.tabs.initTabGroup(v.firstElementChild.childNodes);
+ ui.tabs.initTabGroup(v.firstElementChild.childNodes);
this.pollData();
'use strict';
'require fs';
+'require ui';
return L.view.extend({
load: function() {
return fs.write('/etc/crontabs/root', value).then(function(rc) {
document.querySelector('textarea').value = value;
- L.ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
+ ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
}).catch(function(e) {
- L.ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
+ ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
});
},
'require form';
'require rpc';
'require fs';
+'require ui';
var callSystemValidateFirmwareImage = rpc.declare({
object: 'system',
if (!confirm(_('Do you really want to erase all settings?')))
return;
- L.ui.showModal(_('Erasing...'), [
+ ui.showModal(_('Erasing...'), [
E('p', { 'class': 'spinning' }, _('The system is erasing the configuration partition now and will reboot itself when finished.'))
]);
/* Currently the sysupgrade rpc call will not return, hence no promise handling */
fs.exec('/sbin/firstboot', [ '-r', '-y' ]);
- L.ui.awaitReconnect('192.168.1.1', 'openwrt.lan');
+ ui.awaitReconnect('192.168.1.1', 'openwrt.lan');
},
handleRestore: function(ev) {
- return L.ui.uploadFile('/tmp/backup.tar.gz', ev.target)
+ return ui.uploadFile('/tmp/backup.tar.gz', ev.target)
.then(L.bind(function(btn, res) {
btn.firstChild.data = _('Checking archive…');
return fs.exec('/bin/tar', [ '-tzf', '/tmp/backup.tar.gz' ]);
}, this, ev.target))
.then(L.bind(function(btn, res) {
if (res.code != 0) {
- L.ui.addNotification(null, E('p', _('The uploaded backup archive is not readable')));
+ ui.addNotification(null, E('p', _('The uploaded backup archive is not readable')));
return fs.remove('/tmp/backup.tar.gz');
}
- L.ui.showModal(_('Apply backup?'), [
+ ui.showModal(_('Apply backup?'), [
E('p', _('The uploaded backup archive appears to be valid and contains the files listed below. Press "Continue" to restore the backup and reboot, or "Cancel" to abort the operation.')),
E('pre', {}, [ res.stdout ]),
E('div', { 'class': 'right' }, [
E('button', {
'class': 'btn',
- 'click': L.ui.createHandlerFn(this, function(ev) {
- return fs.remove('/tmp/backup.tar.gz').finally(L.ui.hideModal);
+ 'click': ui.createHandlerFn(this, function(ev) {
+ return fs.remove('/tmp/backup.tar.gz').finally(ui.hideModal);
})
}, [ _('Cancel') ]), ' ',
E('button', {
'class': 'btn cbi-button-action important',
- 'click': L.ui.createHandlerFn(this, 'handleRestoreConfirm', btn)
+ 'click': ui.createHandlerFn(this, 'handleRestoreConfirm', btn)
}, [ _('Continue') ])
])
]);
}, this, ev.target))
- .catch(function(e) { L.ui.addNotification(null, E('p', e.message)) })
+ .catch(function(e) { ui.addNotification(null, E('p', e.message)) })
.finally(L.bind(function(btn, input) {
btn.firstChild.data = _('Upload archive...');
}, this, ev.target));
return fs.exec('/sbin/sysupgrade', [ '--restore-backup', '/tmp/backup.tar.gz' ])
.then(L.bind(function(btn, res) {
if (res.code != 0) {
- L.ui.addNotification(null, [
+ ui.addNotification(null, [
E('p', _('The restore command failed with code %d').format(res.code)),
res.stderr ? E('pre', {}, [ res.stderr ]) : ''
]);
}, this, ev.target))
.then(L.bind(function(res) {
if (res.code != 0) {
- L.ui.addNotification(null, E('p', _('The reboot command failed with code %d').format(res.code)));
+ ui.addNotification(null, E('p', _('The reboot command failed with code %d').format(res.code)));
L.raise('Error', 'Reboot failed');
}
- L.ui.showModal(_('Rebooting…'), [
+ ui.showModal(_('Rebooting…'), [
E('p', { 'class': 'spinning' }, _('The system is rebooting now. If the restored configuration changed the current LAN IP address, you might need to reconnect manually.'))
]);
- L.ui.awaitReconnect(window.location.host, '192.168.1.1', 'openwrt.lan');
+ ui.awaitReconnect(window.location.host, '192.168.1.1', 'openwrt.lan');
}, this))
- .catch(function(e) { L.ui.addNotification(null, E('p', e.message)) })
+ .catch(function(e) { ui.addNotification(null, E('p', e.message)) })
.finally(function() { btn.firstChild.data = _('Upload archive...') });
},
},
handleSysupgrade: function(storage_size, ev) {
- return L.ui.uploadFile('/tmp/firmware.bin', ev.target.firstChild)
+ return ui.uploadFile('/tmp/firmware.bin', ev.target.firstChild)
.then(L.bind(function(btn, reply) {
btn.firstChild.data = _('Checking image…');
- L.ui.showModal(_('Checking image…'), [
+ ui.showModal(_('Checking image…'), [
E('span', { 'class': 'spinning' }, _('Verifying the uploaded image file.'))
]);
var cntbtn = E('button', {
'class': 'btn cbi-button-action important',
- 'click': L.ui.createHandlerFn(this, 'handleSysupgradeConfirm', btn, keep, force),
+ 'click': ui.createHandlerFn(this, 'handleSysupgradeConfirm', btn, keep, force),
'disabled': (!is_valid || is_too_big) ? true : null
}, [ _('Continue') ]);
body.push(E('div', { 'class': 'right' }, [
E('button', {
'class': 'btn',
- 'click': L.ui.createHandlerFn(this, function(ev) {
- return fs.remove('/tmp/firmware.bin').finally(L.ui.hideModal);
+ 'click': ui.createHandlerFn(this, function(ev) {
+ return fs.remove('/tmp/firmware.bin').finally(ui.hideModal);
})
}, [ _('Cancel') ]), ' ', cntbtn
]));
cntbtn.disabled = !ev.target.checked;
});
- L.ui.showModal(_('Flash image?'), body);
+ ui.showModal(_('Flash image?'), body);
}, this, ev.target))
- .catch(function(e) { L.ui.addNotification(null, E('p', e.message)) })
+ .catch(function(e) { ui.addNotification(null, E('p', e.message)) })
.finally(L.bind(function(btn) {
btn.firstChild.data = _('Flash image...');
}, this, ev.target));
handleSysupgradeConfirm: function(btn, keep, force, ev) {
btn.firstChild.data = _('Flashing…');
- L.ui.showModal(_('Flashing…'), [
+ ui.showModal(_('Flashing…'), [
E('p', { 'class': 'spinning' }, _('The system is flashing now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings.'))
]);
fs.exec('/sbin/sysupgrade', opts);
if (keep.checked)
- L.ui.awaitReconnect(window.location.host);
+ ui.awaitReconnect(window.location.host);
else
- L.ui.awaitReconnect('192.168.1.1', 'openwrt.lan');
+ ui.awaitReconnect('192.168.1.1', 'openwrt.lan');
},
handleBackupList: function(ev) {
return fs.exec('/sbin/sysupgrade', [ '--list-backup' ]).then(function(res) {
if (res.code != 0) {
- L.ui.addNotification(null, [
+ ui.addNotification(null, [
E('p', _('The sysupgrade command failed with code %d').format(res.code)),
res.stderr ? E('pre', {}, [ res.stderr ]) : ''
]);
L.raise('Error', 'Sysupgrade failed');
}
- L.ui.showModal(_('Backup file list'), [
+ ui.showModal(_('Backup file list'), [
E('p', _('Below is the determined list of files to backup. It consists of changed configuration files marked by opkg, essential base files and the user defined backup patterns.')),
E('ul', {}, (res.stdout || '').trim().split(/\n/).map(function(ln) { return E('li', {}, ln) })),
E('div', { 'class': 'right' }, [
E('button', {
'class': 'btn',
- 'click': L.ui.hideModal
+ 'click': ui.hideModal
}, [ _('Dismiss') ])
])
], 'cbi-modal');
return m.save(function() {
return fs.write('/etc/sysupgrade.conf', mapdata.config.editlist.trim().replace(/\r\n/g, '\n') + '\n');
}).then(function() {
- L.ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
+ ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
}).catch(function(e) {
- L.ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e)));
+ ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e)));
});
},
node.appendChild(E('div', { 'class': 'cbi-page-actions' }, [
E('button', {
'class': 'cbi-button cbi-button-save',
- 'click': L.ui.createHandlerFn(view, 'handleBackupSave', this.map)
+ 'click': ui.createHandlerFn(view, 'handleBackupSave', this.map)
}, [ _('Save') ])
]));
'use strict';
'require fs';
+'require ui';
'require uci';
'require rpc';
'require form';
return fs.exec('/sbin/block', ['mount'])
.then(function(res) {
if (res.code != 0)
- L.ui.addNotification(null, E('p', _('The <em>block mount</em> command failed with code %d').format(res.code)));
+ ui.addNotification(null, E('p', _('The <em>block mount</em> command failed with code %d').format(res.code)));
})
.then(L.bind(uci.unload, uci, 'fstab'))
.then(L.bind(m.render, m));
return fs.exec('/bin/umount', [path])
.then(L.bind(uci.unload, uci, 'fstab'))
.then(L.bind(m.render, m))
- .catch(function(e) { L.ui.addNotification(null, E('p', e.message)) });
+ .catch(function(e) { ui.addNotification(null, E('p', e.message)) });
},
load: function() {
'%.2f%% (%1024.2mB)'.format(100 / this.mounts[i].size * used, used),
umount ? E('button', {
'class': 'btn cbi-button-remove',
- 'click': L.ui.createHandlerFn(view, 'handleUmount', m, this.mounts[i].mount)
+ 'click': ui.createHandlerFn(view, 'handleUmount', m, this.mounts[i].mount)
}, [ _('Unmount') ]) : '-'
]);
}
'use strict';
+'require ui';
'require form';
'require rpc';
return;
if (formData.password.pw1 != formData.password.pw2) {
- L.ui.addNotification(null, E('p', _('Given password confirmation did not match, password not changed!')), 'danger');
+ ui.addNotification(null, E('p', _('Given password confirmation did not match, password not changed!')), 'danger');
return;
}
return callSetPassword('root', formData.password.pw1).then(function(success) {
if (success)
- L.ui.addNotification(null, E('p', _('The system password has been successfully changed.')), 'info');
+ ui.addNotification(null, E('p', _('The system password has been successfully changed.')), 'info');
else
- L.ui.addNotification(null, E('p', _('Failed to change the system password.')), 'danger');
+ ui.addNotification(null, E('p', _('Failed to change the system password.')), 'danger');
formData.password.pw1 = null;
formData.password.pw2 = null;
'use strict';
'require rpc';
'require fs';
+'require ui';
return L.view.extend({
callInitList: rpc.declare({
return true;
}).catch(function(e) {
- L.ui.addNotification(null, E('p', _('Failed to execute "/etc/init.d/%s %s" action: %s').format(name, action, e)));
+ ui.addNotification(null, E('p', _('Failed to execute "/etc/init.d/%s %s" action: %s').format(name, action, e)));
});
},
return fs.write('/etc/rc.local', value).then(function() {
document.querySelector('textarea').value = value;
- L.ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
+ ui.addNotification(null, E('p', _('Contents have been saved.')), 'info');
}).catch(function(e) {
- L.ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
+ ui.addNotification(null, E('p', _('Unable to save contents: %s').format(e.message)));
});
},
renderEnableDisable: function(init) {
return E('button', {
class: 'btn cbi-button-%s'.format(init.enabled ? 'positive' : 'negative'),
- click: L.ui.createHandlerFn(this, 'handleEnableDisable', init.name, init.enabled)
+ click: ui.createHandlerFn(this, 'handleEnableDisable', init.name, init.enabled)
}, init.enabled ? _('Enabled') : _('Disabled'));
},
'%02d'.format(list[i].index),
list[i].name,
this.renderEnableDisable(list[i]),
- E('button', { 'class': 'btn cbi-button-action', 'click': L.ui.createHandlerFn(this, 'handleAction', list[i].name, 'start') }, _('Start')),
- E('button', { 'class': 'btn cbi-button-action', 'click': L.ui.createHandlerFn(this, 'handleAction', list[i].name, 'restart') }, _('Restart')),
- E('button', { 'class': 'btn cbi-button-action', 'click': L.ui.createHandlerFn(this, 'handleAction', list[i].name, 'stop') }, _('Stop'))
+ E('button', { 'class': 'btn cbi-button-action', 'click': ui.createHandlerFn(this, 'handleAction', list[i].name, 'start') }, _('Start')),
+ E('button', { 'class': 'btn cbi-button-action', 'click': ui.createHandlerFn(this, 'handleAction', list[i].name, 'restart') }, _('Restart')),
+ E('button', { 'class': 'btn cbi-button-action', 'click': ui.createHandlerFn(this, 'handleAction', list[i].name, 'stop') }, _('Stop'))
]);
}
E('div', { 'class': 'cbi-page-actions' }, [
E('button', {
'class': 'btn cbi-button-save',
- 'click': L.ui.createHandlerFn(this, 'handleRcLocalSave')
+ 'click': ui.createHandlerFn(this, 'handleRcLocalSave')
}, _('Save'))
])
])
])
]);
- L.ui.tabs.initTabGroup(view.lastElementChild.childNodes);
+ ui.tabs.initTabGroup(view.lastElementChild.childNodes);
return view;
},
'use strict';
+'require ui';
'require uci';
'require rpc';
'require form';
' ',
E('button', {
'class': 'cbi-button cbi-button-apply',
- 'click': L.ui.createHandlerFn(this, function() {
+ 'click': ui.createHandlerFn(this, function() {
return callSetLocaltime(Math.floor(Date.now() / 1000));
})
}, _('Sync with browser')),
' ',
this.ntpd_support ? E('button', {
'class': 'cbi-button cbi-button-apply',
- 'click': L.ui.createHandlerFn(this, function() {
+ 'click': ui.createHandlerFn(this, function() {
return callInitAction('sysntpd', 'restart');
})
}, _('Sync with NTP-Server')) : ''