django-pdfformfiller/templates/admin/pdfformfiller/document/preview.html
Mark Riedesel 9d2d000e48 Document model appears to fetch mostly properly
Can fetch Documents, and then get pages triggers page retrieval and
related field retrieval.
2013-11-14 00:54:32 -06:00

57 lines
1.2 KiB
HTML

{% extends "admin/base_site.html" %}
{% load i18n admin_static admin_modify %}
{% load admin_urls %}
{% block extrahead %}{{ block.super }}
{{ media }}
{% endblock %}
{% block content %}
<style type="text/css">
.clearfix:after { content: " "; display: block; height: 0; clear:both, visiblity: hidden; }
.clearfix { display: inline-block; _height: 1%; clear: both; }
.clearfix { display: block; clear: both; }
#pff { max-width: 100%; }
.pff-field {
text-indent: -9999px;
white-space: nowrap;
}
.pff-field:hover {
}
.pff-field-t {
background: rgba(0,255,0,0.2);
}
.pff-field-b {
background: rgba(0,0,255,0.2);
}
</style>
<script type="text/javascript">
$(function($) {
/*
var page = new PDFFormFiller.Page(),
preview = new PDFFormFiller.PagePreviewView({
el: $('#pff'),
model: page
});
page.url = '{% url "pdfformfiller_api_document_detail" id=document.id %}';
page.fetch();
*/
var doc = new PDFFormFiller.Document({id: {{ document.id }}});
doc.url = "{% url 'pdfformfiller_api_document_detail' id=document.id %}";
window.doc = doc;
})
</script>
{% url "pdfformfiller_api_document_detail" id=document.id %}
<div id="content-main">
<div id="pff"></div>
</div>
{% endblock %}