DHTML progress bar for glacial rate adding and editing, closes: Bug#1100
[freeside.git] / httemplate / elements / qlib / boxctrl.js
diff --git a/httemplate/elements/qlib/boxctrl.js b/httemplate/elements/qlib/boxctrl.js
new file mode 100644 (file)
index 0000000..417b204
--- /dev/null
@@ -0,0 +1,48 @@
+/**\r
+ * QLIB 1.0 Box Abstraction\r
+ * Copyright (C) 2002 2003, Quazzle.com Serge Dolgov\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ * http://qlib.quazzle.com\r
+ */\r
+\r
+function QBoxCtrl_content() {\r
+    with (this) {\r
+        if (res) {\r
+            this.cwidth = width - res.L - res.R - 8;\r
+            this.cheight = height && (height - res.T - res.B - 8);\r
+            var ec = '"><table border="0" cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td>';\r
+            document.write('<table class="qbox" border="0" cellspacing="0" cellpadding="0" width="' +\r
+                (width - 8) + (height != null ? '" height="' + (height - 8) : '') + '"><tr><td width="' +\r
+                res.L + '" height="' + res.T + '"><img src="' + res.TL.src + '" border="0" width="' +\r
+                res.L + '" height="' + res.T + '"></td><td width="' + cwidth + '" height="' + res.T +\r
+                '" background="' + res.TC.src + ec + '<td width="' + res.R + '" height="' + res.T +\r
+                '"><img src="' + res.TR.src + '" border="0" width="' + res.R + '" height="' + res.T +\r
+                '"></td></tr><tr><td width="' + res.L + (cheight != null ? '" height="' + cheight : '') +\r
+                '" background="' + res.ML.src + ec + '<td width="' + cwidth + '" bgcolor="' + res.bgcolor +\r
+                (cheight != null ? '" height="' + cheight : '') + (res.bgtile ? '" background="' +\r
+                res.bgtile.src : '') + '" align="left" valign="top" class="body" unselectable="on">');\r
+                if (typeof(body) == "function") {\r
+                    this.body();\r
+                } else {\r
+                    document.write(body);\r
+                }\r
+            document.write('</td><td width="' + res.R + (cheight != null ? '" height="' + cheight : '') +\r
+                '" background="' + res.MR.src + ec + '</tr><tr><td width="' + res.L + '" height="' + res.B +\r
+                '"><img src="' + res.BL.src + '" border="0" width="' + res.L + '" height="' + res.B +\r
+                '"></td><td width="' + cwidth + '" height="' + res.B + '" background="' + res.BC.src + ec +\r
+                '<td width="' + res.R + '" height="' + res.B + '"><img src="' + res.BR.src +\r
+                '" border="0" width="' + res.R + '" height="' + res.B + '"></td></tr></table><br>');\r
+        }\r
+    }\r
+}\r
+\r
+function QBoxCtrl() {\r
+    this.res = false;\r
+    this.body = "&nbsp;";\r
+    this.cwidth = this.cheight = 0;\r
+    this.content = QBoxCtrl_content;\r
+}\r
+QBoxCtrl.prototype = new QWndCtrl();\r