diff options
author | Christian Franke <nobody@nowhere.ws> | 2012-01-09 20:38:56 +0100 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2012-01-09 20:39:26 +0100 |
commit | 4404d7751deb3d907eb8121f622be8f5b912dc51 (patch) | |
tree | 32b16ac9a2fc0f967a9add2496b91f8e9eadffb8 /sublab_project/preview_admin/static/admin/js/preview.js | |
parent | f8eced917dbd4d01d39a881a0ba948a575452a0d (diff) |
admin preview works now (somewhat)
Diffstat (limited to 'sublab_project/preview_admin/static/admin/js/preview.js')
-rw-r--r-- | sublab_project/preview_admin/static/admin/js/preview.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sublab_project/preview_admin/static/admin/js/preview.js b/sublab_project/preview_admin/static/admin/js/preview.js new file mode 100644 index 0000000..c42ef1c --- /dev/null +++ b/sublab_project/preview_admin/static/admin/js/preview.js @@ -0,0 +1,11 @@ +function preview_admin(field, preview_url) { + $.ajax({ + type: 'GET', + url: preview_url, + data: { data: $('#id_' + field).val() }, + success: function (data, textStatus, jhr) { + $('#preview-' + field).html(data).show('fast'); + } + }); +} + |