Release 0.7.1 to fix the in-place loading of the template editor

This commit is contained in:
Matt Good
2012-05-18 18:20:28 -07:00
parent 913c4130b6
commit 80eb747816
4 changed files with 19 additions and 12 deletions

View File

@@ -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));

View File

@@ -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>