mirror of
https://github.com/pallets-eco/flask-debugtoolbar.git
synced 2026-01-06 05:30:12 -06:00
Release 0.7.1 to fix the in-place loading of the template editor
This commit is contained in:
@@ -175,10 +175,19 @@
|
||||
var uarr = String.fromCharCode(0x25b6);
|
||||
var darr = String.fromCharCode(0x25bc);
|
||||
elem.html(elem.html() == uarr ? darr : uarr);
|
||||
},
|
||||
load_href: function(href) {
|
||||
$.get(href, function(data, status, xhr) {
|
||||
document.open();
|
||||
document.write(xhr.responseText);
|
||||
document.close();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
$(document).ready(function() {
|
||||
fldt.init();
|
||||
});
|
||||
window.fldt = fldt;
|
||||
|
||||
})(jQuery.noConflict(true));
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
{% if templates %}
|
||||
{% if editable %}
|
||||
<script>
|
||||
function loadHref() {
|
||||
$.get(this.href, function(data, status, xhr) {
|
||||
document.open();
|
||||
document.write(xhr.responseText);
|
||||
document.close();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<a href="/_debug_toolbar/views/template/{{ key }}" onclick="return loadHref.apply(this);">Edit templates</a>
|
||||
<a href="/_debug_toolbar/views/template/{{ key }}" onclick="return fldt.load_href(this.href);">Edit templates</a>
|
||||
{% endif %}
|
||||
{% for template in templates %}
|
||||
<h4>{{ template.template.name }}</h4>
|
||||
|
||||
Reference in New Issue
Block a user