Luke Plant avatar Luke Plant committed 554dbbf

Small Javascript corrections

Comments (0)

Files changed (2)

autocomplete/static/js/jquery_autocomplete.js

                 parsed[parsed.length] = {
                     id: data[i][0],
                     value: data[i][1],
-                    label: data[i][1],
+                    label: data[i][1]
                 };
             }
             response(parsed);
         this.input.autocomplete({
             // minLength: 2,
             source: jQuery.proxy(this.source, this),
-            select: jQuery.proxy(this.select, this),
+            select: jQuery.proxy(this.select, this)
         });
         this.input.closest("form").submit(jQuery.proxy(function () {
             if ((!this.input.val()) || (this.hidden_input.val() != this.input.val()

autocomplete/static/js/yui_autocomplete.js

             this.selected_item = args[2];
             hidden.value = this.selected_item.id;
         });
-        form = document.getElementsByTagName("form")[0];
+        var form = document.getElementsByTagName("form")[0];
         YAHOO.util.Event.addListener(form, "submit", function (event, form) {
             if ((!input.value) || (this.selected_item.label != input.value && !force_selection))
                 hidden.value = input.value;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.