summaryrefslogtreecommitdiffstats
path: root/web/static/js/search.js
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-20 03:07:32 -0700
committerraylu <raylu@gridium.com>2013-10-20 03:19:40 -0700
commit031daa32bbe11417d0dfb968dfbf888f0dc65d86 (patch)
tree33491f786aa8edf5b6548b1d5e518a2834e4c0a9 /web/static/js/search.js
parent585ad90d3cc59ad7d4fd306170b710699e48efda (diff)
downloadykill-031daa32bbe11417d0dfb968dfbf888f0dc65d86.tar.xz
rewrite as api
Diffstat (limited to 'web/static/js/search.js')
-rw-r--r--web/static/js/search.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/static/js/search.js b/web/static/js/search.js
new file mode 100644
index 0000000..faeb8fe
--- /dev/null
+++ b/web/static/js/search.js
@@ -0,0 +1,11 @@
+window.addEvent('domready', function() {
+ ykill.api('/search' + document.location.search, function(results) {
+ var corps = $('corps');
+ results.corporations.each(function(corp) {
+ corps.grab(new Element('a', {
+ 'html': corp.corporation_name,
+ 'href': '/corporation/' + corp.corporation_id,
+ }));
+ });
+ });
+});