mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fixx
This commit is contained in:
parent
a12bae3e87
commit
ae968dc4a2
21 changed files with 5701 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
'require ui';
|
||||
'require view';
|
||||
|
||||
return view.extend({
|
||||
render: function() {
|
||||
var form = document.querySelector('form'),
|
||||
btn = document.querySelector('button');
|
||||
|
||||
var dlg = ui.showModal(
|
||||
_('Authorization Required'),
|
||||
[].slice.call(document.querySelectorAll('section > *')),
|
||||
'login'
|
||||
);
|
||||
|
||||
form.addEventListener('keypress', function(ev) {
|
||||
if (ev.key == 'Enter')
|
||||
btn.click();
|
||||
});
|
||||
|
||||
btn.addEventListener('click', function() {
|
||||
dlg.querySelectorAll('*').forEach(function(node) { node.style.display = 'none' });
|
||||
dlg.appendChild(E('div', { 'class': 'spinning' }, _('Logging in…')));
|
||||
|
||||
form.submit()
|
||||
});
|
||||
|
||||
document.querySelector('input[type="password"]').focus();
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
addFooter: function() {}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue