qutebrowser/qutebrowser/html/settings.html
Brian Jackson 9cfb4b3431 Fix problem with qutesettings scope in pages
Fix to make sure the js bridge code is only enabled when qute: pages are shown.
Previously it would only be available to the first page (and before that it
was available to all pages).
2014-11-25 14:29:20 -06:00

40 lines
1.1 KiB
HTML

{% extends "base.html" %}
{% block script %}
var win_id = {{ win_id }};
var cset = function(section, option, el) {
value = el.value;
window.qute.set(win_id, section, option, value);
}
{% endblock %}
{% block style %}
table { border: 1px solid grey; border-collapse: collapse; }
pre { margin: 2px; }
th, td { border: 1px solid grey; padding: 0px 5px; }
th { background: lightgrey; }
th pre { color: grey; text-align: left; }
{% endblock %}
{% block content %}
<noscript><h1>View Only</h1><p>Changing settings requires javascript to be enabled</p></noscript>
<header><h1>{{ title }}</h1></header>
<table>
{% for section in config.DATA %}
<tr><th colspan="2"><h3>{{ section }}</h3><pre>{{ config.SECTION_DESC.get(section)|wordwrap(width=120) }}</pre></th></tr>
{% for d, e in config.DATA.get(section).items() %}
<tr>
<td>{{ d }} (Current: {{ e.value()|truncate(100) }})</td>
<td>
<input type="input"
onblur="cset('{{ section }}', '{{ d }}', this)"
value="{{ e.value() }}">
</input>
</td>
</tr>
{% endfor %}
{% endfor %}
</table>
{% endblock %}