summaryrefslogtreecommitdiff
path: root/modules/digibug/js/digibug.js
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-22 21:51:22 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-22 21:51:22 -0700
commit58d5624e401f1c369cbbf913008775bc5a165570 (patch)
treed2b67c7db5314c21636ae9663f451b018221a3bb /modules/digibug/js/digibug.js
parenta8a366e3398ef15dcc67f70c25f7a34d99757e12 (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/digibug.js')
-rw-r--r--modules/digibug/js/digibug.js24
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();
+ }
+ }
+ });
+};