Author: jablko
Date: Tue Sep 29 10:45:12 2009
New Revision: 3587

Log:
Avoid use of var [...] =, which Safari doesn't like -- force

Modified:
   trunk/web/js/autocomplete.js

Modified: trunk/web/js/autocomplete.js
==============================================================================
--- trunk/web/js/autocomplete.js        Tue Sep 29 10:24:30 2009        (r3586)
+++ trunk/web/js/autocomplete.js        Tue Sep 29 10:45:12 2009        (r3587)
@@ -72,9 +72,9 @@
               if (value)
               {
                 // Split into URI and selector like jQuery load()
-                var [src, selector] = value.split(' ', 2);
+                var components = value.split(' ', 2);
 
-                var dataSource = new YAHOO.util.XHRDataSource(src);
+                var dataSource = new YAHOO.util.XHRDataSource(components[0]);
 
                 // Cache at least one query so autocomplete items are only
                 // requested if the value of the autocomplete <input> changes
@@ -285,7 +285,7 @@
               if (value)
               {
                 // Split into URI and selector like jQuery load()
-                var [src, selector] = value.split(' ', 2);
+                var components = value.split(' ', 2);
 
                 // The following is for single <select>, it could be wrapped
                 // in, if (!$(select).attr('multiple')) ...
@@ -297,7 +297,7 @@
                 //
                 // Append to <body> instead of insert after <select> to avoid
                 // interfering with tabbing between inputs
-                var iframe = $('<iframe src="' + src + '"/>')
+                var iframe = $('<iframe src="' + components[0] + '"/>')
                   .width(0)
                   .height(0)
                   .css('border', 0)
@@ -323,7 +323,7 @@
                   // Apply selector to <iframe> contents, update value of
                   // selected element with value of the autocomplete <input>,
                   // and submit selected element's form
-                  $($(selector, 
iframe.contentDocument).val($(input).val())[0].form).submit();
+                  $($(components[1], 
iframe.contentDocument).val($(input).val())[0].form).submit();
                 }
 
                 // Selecting existing item cancels addition of a new choice
@@ -351,7 +351,7 @@
                         }
 
                         // Add hidden <iframe> for each new choice
-                        var iframe = $('<iframe src="' + src + '"/>')
+                        var iframe = $('<iframe src="' + components[0] + '"/>')
                           .width(0)
                           .height(0)
                           .css('border', 0)
@@ -379,7 +379,7 @@
                           // Apply selector to <iframe> contents, update value
                           // of selected element with text of the new choice,
                           // and submit selected element's form
-                          $($(selector, 
iframe.contentDocument).val($(clone).val())[0].form).submit();
+                          $($(components[1], 
iframe.contentDocument).val($(clone).val())[0].form).submit();
                         }
 
                         // Make <li>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to