]> Cypherpunks repositories - gostls13.git/commitdiff
dashboard: use jQuery Autocomplete plugin from Google AJAX Libs API
authorAndrew Gerrand <adg@golang.org>
Tue, 13 Jul 2010 00:21:08 +0000 (10:21 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 13 Jul 2010 00:21:08 +0000 (10:21 +1000)
R=rsc
CC=golang-dev
https://golang.org/cl/1677053

misc/dashboard/godashboard/project-edit.html

index 5f1ca3b1189d6d49b316e76968b894995b40f83e..ce18fb3fbd8fb6b850c9f08050498d167aa02e2e 100644 (file)
@@ -1,11 +1,11 @@
 <html>
 <head>
+<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
 <script>
 google.load("jquery", "1");
+google.load("jqueryui", "1.8.2");
 </script>
-<script type="text/javascript" src="/static/jquery.autocomplete.min.js"></script>
-<link rel="stylesheet" type="text/css" href="/static/jquery.autocomplete.css" />
 </head>
 <body>
 <form action="/project/edit?orig_name={{p.name}}" method="POST">
@@ -38,8 +38,10 @@ var cats = [
 {% endfor %}
 ];
 
-$('#tags').autocomplete(tags);
-$('#cats').autocomplete(cats);
+google.setOnLoadCallback(function() {
+       $('#tags').autocomplete({source:tags});
+       $('#cats').autocomplete({source:cats});
+});
 </script>
 </body>
 </html>