diff options
author | Andrew Dolgov <[email protected]> | 2018-12-03 09:33:44 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-03 09:33:44 +0300 |
commit | 84affc7b1d71769038dfd25d74e40d6bf744e5fb (patch) | |
tree | 97751786520bb686276a0791edc7e646f1822a91 /include/login_form.php | |
parent | e905ce7ea983e425de85282ce7d24fb9f64402d4 (diff) |
rework dojo singleton modules to better work with phpstorm completion (ugh) - declare() is not needed there anyway
remove event.observe from login form (not needed)
load pluginhost via amd
Diffstat (limited to 'include/login_form.php')
-rw-r--r-- | include/login_form.php | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/include/login_form.php b/include/login_form.php index 844314d5e..1eb5d26d4 100644 --- a/include/login_form.php +++ b/include/login_form.php @@ -19,30 +19,27 @@ <script type="text/javascript"> require({cache:{}}); - Event.observe(window, 'load', function() { - init(); - }); </script> </head> <body class="claro ttrss_main ttrss_login"> <script type="text/javascript"> -function init() { - - require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form', - 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser){ - parser.parse(); - //show tooltip node only after this widget is instaniated. - dojo.query('div[dojoType="dijit.Tooltip"]').style({ - display:'' - }); - fetchProfiles(); - dijit.byId("bw_limit").attr("checked", Cookie.get("ttrss_bwlimit") == 'true'); - document.forms.loginForm.login.focus(); - }); - -} +require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox','dijit/form/Form', + 'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser, ready){ + ready(function() { + parser.parse(); + + //show tooltip node only after this widget is instaniated. + dojo.query('div[dojoType="dijit.Tooltip"]').style({ + display:'' + }); + + fetchProfiles(); + dijit.byId("bw_limit").attr("checked", Cookie.get("ttrss_bwlimit") == 'true'); + document.forms.loginForm.login.focus(); + }); +}); function fetchProfiles() { try { |