mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Remove erroneous onload javascript
If a page needs to run javascript on load, it is easy to do so by attaching onload handlers or by using corresponing jQuery utilities. There is no need to mess with templating.
This commit is contained in:
parent
d2a6e2332d
commit
218fc37e8f
@ -51,13 +51,8 @@
|
||||
<script type="text/javascript" src="{{ basehref }}/static/theme/js/plinth.js"></script>
|
||||
{{ main_menu_js|safe }}
|
||||
{{ sub_menu_js|safe }}
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
{{ onload|safe }}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body onload="javascript:onload_handler();">
|
||||
<body>
|
||||
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://mozilla.org/firefox">Upgrade to a modern version of Firefox</a> to experience this site.</p><![endif]-->
|
||||
<div class="navbar navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
|
||||
4
util.py
4
util.py
@ -63,8 +63,8 @@ class Message():
|
||||
|
||||
|
||||
def render_template(template='login_nav', **kwargs):
|
||||
for key in ['sidebar_left', 'sidebar_right', 'main', 'js', 'onload', 'nav',
|
||||
'css', 'title', 'basehref']:
|
||||
for key in ['sidebar_left', 'sidebar_right', 'main', 'js', 'nav', 'css',
|
||||
'title', 'basehref']:
|
||||
if not key in kwargs:
|
||||
kwargs[key] = ''
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user