[freeside-commits] branch master updated. 8304269447c99cf0257da59f34046fc89c8e5caf

Ivan ivan at 420.am
Sun Aug 25 16:23:33 PDT 2013


The branch, master has been updated
       via  8304269447c99cf0257da59f34046fc89c8e5caf (commit)
      from  c14b35ce12141287e201bba8489b202a1b34b38f (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 8304269447c99cf0257da59f34046fc89c8e5caf
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Aug 25 16:23:30 2013 -0700

    only define function once

diff --git a/httemplate/elements/rs_init_object.html b/httemplate/elements/rs_init_object.html
index 3bb0b42..ec44d43 100644
--- a/httemplate/elements/rs_init_object.html
+++ b/httemplate/elements/rs_init_object.html
@@ -1,10 +1,19 @@
 <%doc>
 
+The rs_init_object javascript function defined by this include instantiates and
+returns a new object for XMLHTTP communication: on Microsoft browsers, an
+ActiveXObject ("Msxml2.XMLHTTP" or "Microsoft.XMLHTTP"), or on other browsers,
+an XMLHttpRequest object.
+
 Example:
 
-  include( '/elements/rs_init_object.html' );
+  <& /elements/rs_init_object.html &>
 
 </%doc>
+<%shared>
+my $initialized = 0; #won't work if component is "preloaded"... so don't do that
+</%shared>
+% if ( ! $initialized++ ) {
 <SCRIPT TYPE="text/javascript">
 
   function rs_init_object() {
@@ -27,3 +36,4 @@ Example:
   }
 
 </SCRIPT>
+% }

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

Summary of changes:
 httemplate/elements/rs_init_object.html |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list