From bcfb8731ca342bf3d5b8da0024c273c7adb7c1cb Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Wed, 10 Feb 2016 18:48:57 -0800 Subject: fix sending category as array --- public/js/script.js | 5 +++++ views/layout.php | 12 ++++++------ views/new-bookmark.php | 8 ++++---- views/new-itinerary.php | 3 +-- views/new-post.php | 10 ++++------ 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 399af05..ea86931 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -5,6 +5,7 @@ var minutes = zero_pad(Math.floor(seconds / 60) % 60); return (seconds < 0 ? '-' : '+') + hours + ":" + minutes; } + function zero_pad(num) { num = "" + num; if(num.length == 1) { @@ -13,6 +14,10 @@ return num; } + function csv_to_array(val) { + return val.split(/[, ]+/); + } + $(function(){ diff --git a/views/layout.php b/views/layout.php index 10bf9a2..a791a69 100644 --- a/views/layout.php +++ b/views/layout.php @@ -4,8 +4,8 @@ <?= $this->title ?> - - + +