[freeside-commits] branch FREESIDE_2_3_BRANCH updated. e2c0189bf2deb08a5423226a5adc4d245e64bf4f

Ivan ivan at 420.am
Thu Jan 23 14:41:25 PST 2014


The branch, FREESIDE_2_3_BRANCH has been updated
       via  e2c0189bf2deb08a5423226a5adc4d245e64bf4f (commit)
      from  1e1224053f37a836fa3638bacc7c410d7eaf66c7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e2c0189bf2deb08a5423226a5adc4d245e64bf4f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 23 14:41:20 2014 -0800

    add onload.js to 2.3 branch, for mac addresses, RT#27190, RT#26013

diff --git a/httemplate/elements/onload.js b/httemplate/elements/onload.js
new file mode 100644
index 0000000..c7bbbb2
--- /dev/null
+++ b/httemplate/elements/onload.js
@@ -0,0 +1,23 @@
+<%doc>
+Filter component to attach a window.onload handler.
+
+Usage:
+  <script>
+  <&| elements/onload.js &>
+    if ( the_stars_are_right ) {
+      run_this_function();
+    }
+  </&>
+  </script>
+
+</%doc>
+(function() {
+  var myonload = function() {
+<% $m->content %>
+  }
+  if ( window.addEventListener ) {
+    window.addEventListener('load', myonload);
+  } else if ( window.attachEvent ) {
+    window.attachEvent('onload', myonload);
+  }
+})();

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/onload.js |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 httemplate/elements/onload.js




More information about the freeside-commits mailing list