From 66e9baf1629a413ec0001dae57d40189dafe4f2f Mon Sep 17 00:00:00 2001 From: raylu Date: Sat, 6 Aug 2011 04:32:48 -0700 Subject: re-id section, canvas. change listen to local-only --- main.go | 4 ++-- static/script.js | 6 +++--- templates/p.html | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 3220da6..c139b99 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ type Playlist struct { } var templates map[string]*template.Template -const debug = true +const debug = false var db *mysql.Client // given an id ('abcd1234'), return the pid (1) @@ -176,7 +176,7 @@ func main() { http.HandleFunc("/p/", playlist) http.HandleFunc("/add/", add) http.HandleFunc("/remove/", remove) - err = http.ListenAndServe(":8000", nil) + err = http.ListenAndServe("localhost:8000", nil) if err != nil { fmt.Println(err) os.Exit(1) diff --git a/static/script.js b/static/script.js index 354e030..c9d3c40 100644 --- a/static/script.js +++ b/static/script.js @@ -14,7 +14,7 @@ $(document).ready(function () { }); function drawBar(id) { - var canvas = document.getElementById(id); + var canvas = document.getElementById('c_' + id); canvas.height = canvas.height; //clear var context = canvas.getContext("2d"); @@ -151,7 +151,7 @@ function add(id, title) { if (data != 1) return; $('article').append('\ -
\ +
\ \ @@ -161,7 +161,7 @@ function add(id, title) {
\ ' + id + '\
\ - \ + \
\ Play\ Pause\ diff --git a/templates/p.html b/templates/p.html index b595377..8f7557f 100644 --- a/templates/p.html +++ b/templates/p.html @@ -23,7 +23,7 @@
{{range .Songs}} -
+
@@ -35,7 +35,7 @@
{{.Yid}}
- +
Play Pause -- cgit v1.2.3