diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-22 21:51:22 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-22 21:51:22 -0700 |
commit | 58d5624e401f1c369cbbf913008775bc5a165570 (patch) | |
tree | d2b67c7db5314c21636ae9663f451b018221a3bb /modules/digibug/js | |
parent | a8a366e3398ef15dcc67f70c25f7a34d99757e12 (diff) |
This commit moves a little further along the path:
1) moves the print button from the quick pane to thumb_bottom
2) Creates an entry into the proxy table
Diffstat (limited to 'modules/digibug/js')
-rw-r--r-- | modules/digibug/js/digibug.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js new file mode 100644 index 00000000..f30678c0 --- /dev/null +++ b/modules/digibug/js/digibug.js @@ -0,0 +1,24 @@ +$(document).ready(function() { + $(".gDigibugPrintButton a").click(function(e) { + e.preventDefault(); + queue_print(e); + }); +}); + +function queue_print(e) { + var parent = e.currentTarget.parentNode; + $(parent).addClass("gLoadingLarge"); + $.ajax({ + type: "GET", + url: e.currentTarget.href, + dataType: "json", + success: function(data) { + $(parent).removeClass("gLoadingLarge"); + if (data.location) { + window.location = data.location; + } else if (data.reload) { + window.location.reload(); + } + } + }); +}; |