|
@@ -94,7 +94,7 @@
|
|
|
(getf data :styles)))))
|
|
(getf data :styles)))))
|
|
|
(:body
|
|
(:body
|
|
|
(who:str (getf data :menu))
|
|
(who:str (getf data :menu))
|
|
|
- (:div :class "container"
|
|
|
|
|
|
|
+ (:div :class "container-fluid"
|
|
|
(who:str (getf data :content)))
|
|
(who:str (getf data :content)))
|
|
|
(:div :id "modal" :class "modal fade" :tabindex "-1" :role "dialog" :aria-hidden "true")
|
|
(:div :id "modal" :class "modal fade" :tabindex "-1" :role "dialog" :aria-hidden "true")
|
|
|
(who:str (apply #'scripts (list* "jquery.min.js"
|
|
(who:str (apply #'scripts (list* "jquery.min.js"
|
|
@@ -164,12 +164,14 @@
|
|
|
(:div :class "col-sm-12"
|
|
(:div :class "col-sm-12"
|
|
|
(:div :id "paginator")))
|
|
(:div :id "paginator")))
|
|
|
(:div :class "row"
|
|
(:div :class "row"
|
|
|
- (:div :class "col-sm-6"
|
|
|
|
|
|
|
+ (:div :class "col-sm-4"
|
|
|
(:div :id "events" :class "list-group"
|
|
(:div :id "events" :class "list-group"
|
|
|
(:a :class "list-group-item"
|
|
(:a :class "list-group-item"
|
|
|
"Loading")))
|
|
"Loading")))
|
|
|
- (:div :class "col-sm-6"
|
|
|
|
|
- (:div :id "map"))))
|
|
|
|
|
|
|
+ (:div :class "col-sm-4"
|
|
|
|
|
+ (:div :id "map"))
|
|
|
|
|
+ (:div :class "col-sm-4"
|
|
|
|
|
+ (:div :id "details"))))
|
|
|
:inline-scripts
|
|
:inline-scripts
|
|
|
(tag/script
|
|
(tag/script
|
|
|
(ps ($ (lambda () (chain *timeliner (start (lisp (getf data :date)))))))))))
|
|
(ps ($ (lambda () (chain *timeliner (start (lisp (getf data :date)))))))))))
|
|
@@ -210,8 +212,8 @@
|
|
|
(defparameter +timeliner.css+
|
|
(defparameter +timeliner.css+
|
|
|
(css-lite:css
|
|
(css-lite:css
|
|
|
(("body") (:padding-top "70px" :padding-bottom "30px"))
|
|
(("body") (:padding-top "70px" :padding-bottom "30px"))
|
|
|
- (("#map") (:height "600px" :border-radius "6px"))
|
|
|
|
|
- (("#events") (:height "600px" :overflow-y "scroll"))
|
|
|
|
|
|
|
+ (("#map") (:height "750px" :border-radius "6px"))
|
|
|
|
|
+ (("#events") (:height "750px" :overflow-y "scroll"))
|
|
|
(("#paginator") (:margin-bottom "10px"))))
|
|
(("#paginator") (:margin-bottom "10px"))))
|
|
|
|
|
|
|
|
(restas:define-route static/css ("css/:file" :content-type "text/css")
|
|
(restas:define-route static/css ("css/:file" :content-type "text/css")
|
|
@@ -219,6 +221,9 @@
|
|
|
((equal file "timeliner.css") +timeliner.css+)
|
|
((equal file "timeliner.css") +timeliner.css+)
|
|
|
(t (merge-pathnames (format nil "css/~A" file) *resources*))))
|
|
(t (merge-pathnames (format nil "css/~A" file) *resources*))))
|
|
|
|
|
|
|
|
|
|
+(restas:define-route static ("static/")
|
|
|
|
|
+ (pathname (hunchentoot:get-parameter "p")))
|
|
|
|
|
+
|
|
|
;;; parenscript macros
|
|
;;; parenscript macros
|
|
|
(defpsmacro ! (&rest method-calls)
|
|
(defpsmacro ! (&rest method-calls)
|
|
|
`(chain ,@method-calls))
|
|
`(chain ,@method-calls))
|
|
@@ -247,6 +252,9 @@
|
|
|
(new ((@ *timeliner *views *map)
|
|
(new ((@ *timeliner *views *map)
|
|
|
(create :el "#map"
|
|
(create :el "#map"
|
|
|
:collection events)))
|
|
:collection events)))
|
|
|
|
|
+ (new ((@ *timeliner *views *details)
|
|
|
|
|
+ (create :el "#details"
|
|
|
|
|
+ :collection events)))
|
|
|
|
|
|
|
|
(! router (on "route:home"
|
|
(! router (on "route:home"
|
|
|
(lambda ()
|
|
(lambda ()
|
|
@@ -367,7 +375,8 @@
|
|
|
(:place "glyphicon glyphicon-map-marker")
|
|
(:place "glyphicon glyphicon-map-marker")
|
|
|
(:finance "glyphicon glyphicon-usd")
|
|
(:finance "glyphicon glyphicon-usd")
|
|
|
(:checkin "glyphicon glyphicon-ok-circle")
|
|
(:checkin "glyphicon glyphicon-ok-circle")
|
|
|
- (:twitter "glyphicon glyphicon-pencil")))
|
|
|
|
|
|
|
+ (:twitter "glyphicon glyphicon-pencil")
|
|
|
|
|
+ (:photo "glyphicon glyphicon-picture")))
|
|
|
render (lambda ()
|
|
render (lambda ()
|
|
|
(! this $el (attr (create
|
|
(! this $el (attr (create
|
|
|
:href "#"
|
|
:href "#"
|
|
@@ -417,6 +426,44 @@
|
|
|
(! this $el (append (who-ps-html (:li :class "list-group-item"
|
|
(! this $el (append (who-ps-html (:li :class "list-group-item"
|
|
|
"No data")))))
|
|
"No data")))))
|
|
|
this)))))
|
|
this)))))
|
|
|
|
|
+ ;; ** Details
|
|
|
|
|
+ (setf
|
|
|
|
|
+ (@ *timeliner *views *details)
|
|
|
|
|
+ (! *backbone *view
|
|
|
|
|
+ (extend
|
|
|
|
|
+ (create
|
|
|
|
|
+ initialize (lambda ()
|
|
|
|
|
+ (! this (listen-to (@ *timeliner dispatcher) "event:selected"
|
|
|
|
|
+ (@ this highlight))))
|
|
|
|
|
+ highlight (lambda (event)
|
|
|
|
|
+ (var item (@ *timeliner *views *detail-views
|
|
|
|
|
+ (! event (get :type))))
|
|
|
|
|
+ (setf (! this child)
|
|
|
|
|
+ (if item
|
|
|
|
|
+ (new (item (create :model event)))
|
|
|
|
|
+ nil))
|
|
|
|
|
+ (! this (render)))
|
|
|
|
|
+ render (lambda ()
|
|
|
|
|
+ (! this $el (empty))
|
|
|
|
|
+ (when (@ this child)
|
|
|
|
|
+ (! this child (render))
|
|
|
|
|
+ (! this $el (append (@ this child $el))))
|
|
|
|
|
+ this)))))
|
|
|
|
|
+ (setf (! *timeliner *views *detail-views) (create))
|
|
|
|
|
+ (setf
|
|
|
|
|
+ (! *timeliner *views *detail-views :photo)
|
|
|
|
|
+ (! *backbone *view
|
|
|
|
|
+ (extend
|
|
|
|
|
+ (create
|
|
|
|
|
+ render (lambda ()
|
|
|
|
|
+ (! this $el (html
|
|
|
|
|
+ (who-ps-html
|
|
|
|
|
+ (:img :class "photo img-responsive"
|
|
|
|
|
+ :src (concatenate 'string
|
|
|
|
|
+ (lisp (restas:genurl 'static))
|
|
|
|
|
+ "?p="
|
|
|
|
|
+ (! this model (get :photo) path))))))
|
|
|
|
|
+ this)))))
|
|
|
;; ** Paginator
|
|
;; ** Paginator
|
|
|
(setf (@ *timeliner *views *paginator)
|
|
(setf (@ *timeliner *views *paginator)
|
|
|
(! *backbone *view
|
|
(! *backbone *view
|