Commit 9cbdb657 authored by Dave Cooper's avatar Dave Cooper
Browse files

added null-event and on-show even

parent 4471372c
......@@ -47,12 +47,25 @@
:input-slots ((timer-minutes-default 0) (timer-seconds-default 3))
((current-journal-entry nil :settable) (timer-paused? nil :settable)
((use-jquery? t)
(current-journal-entry nil :settable) (timer-paused? nil :settable)
(title "Genworks Timer and Journaler")
(main-sheet-body (with-cl-who-string ()
(when gwl:*developing?* (str (the development-links)))
((:script :type "text/javascript")
"$(window).focus(function() {
// console.log('welcome (back)');
$(window).blur(function() {
console.log('bye bye');
((:div :id "content")
(str (the ajax-scripts-section main-div))
(str (the imported-scripts))
......@@ -61,7 +74,12 @@
(str (the journal-form main-div))
((:ul :id "journal")
(str (the journal-entries-display main-div))))))
(additional-header-content (the imported-css))
(imported-css (with-cl-who-string ()
(:link :href "/timer-static/style/styles.css"
......@@ -123,7 +141,8 @@
:inner-html (with-cl-who-string ()
((:script :type "text/javascript")
(fmt "function startTimerAjax () {~a}"
(the (gdl-ajax-call
(the (gdl-ajax-call
:null-event? t
:form-controls (list (the timer-form-min)
(the timer-form-sec))
:function-key :start-timer-tasks)))
......@@ -69,7 +69,10 @@ nil "~a~a~a" (the :name-for-display)
root (if (the :parent) (the :parent :root) self))
("Boolean. Indicates whether the object should effectively be a hidden-object even if specified in :objects. Default is nil."
hidden? nil))
hidden? nil)
(display-controls nil)
......@@ -276,7 +279,7 @@ the <tt>follow-root-path</tt> GDL function to return the actual instance."
;;(finalization #'vanilla-finalization)
(display-controls nil)
(color-hex (let ((color-symbol (getf (the display-controls) :color)))
(when color-symbol (if (eql (aref (format nil "~a" color-symbol) 0) #\#)
......@@ -21,6 +21,11 @@
(in-package :gwl)
(defvar *agile-debug?* nil)
(defparameter *send-plist* nil)
(defparameter *make-object-plist* nil)
(defun encode64-downcase (item)
(let ((*print-case* :downcase))
......@@ -36,10 +41,17 @@
(remote-id (read-safe-string
(let* ((current-id (the previous-id))
(encoded-args (encode64-downcase
(append (list :current-id current-id)
(the remote-object-args))))))
(plist (append (list :current-id current-id) (the remote-object-args)))
(encoded-args (encode64-downcase (encode-plist-args plist))))
(when *agile-debug?* (setq *make-object-plist* (append (remove-plist-keys plist (list :parent-form :name))
(list :name (string (getf plist :name)))
(list :parent-form (let ((parent-plist (rest (getf plist :parent-form))))
(mapcan #'(lambda(key value)
(list key (if (and value (symbolp value)) (format nil "~s" value) value)))
(plist-keys parent-plist)
(plist-values parent-plist)))))))
(let ((new-id
(read-safe-string (net.aserve.client:do-http-request
......@@ -55,12 +67,13 @@
(package-name (symbol-package (the remote-type)) ))
(symbol-name (the remote-type))))
:package *package*
:host (the host)
:package (encode-for-http *package*)
;;:host (the host)
:name (the %name%)
:index (the index)
:parent-form (the parent-form)
:port (the port))
(the input-parameters)))
;;(remote-object-args-json (cl-json: ) ;; FLAG -- fill in!
......@@ -99,7 +112,7 @@
(declare (ignore length))
(print-variables result)
;;(print-variables result)
(if (consp result)
......@@ -125,14 +138,21 @@
(message &rest args)
(let ((encoded-args (encode64-downcase
(encode-plist-args (list :message (make-keyword message)
:notify-cons (encode-for-http gdl::*notify-cons*)
:args args
:remote-id (the remote-id)
:remote-root-path (the remote-root-path)
:package *package*)))))
(let* ((encoded-plist (encode-plist-args (list :message (make-keyword message)
:notify-cons (encode-for-http gdl::*notify-cons*)
:args args
:remote-id (the remote-id)
:remote-root-path (the remote-root-path)
:package *package*)))
(encoded-args (encode64-downcase encoded-plist)))
;; FLAG -- make the stringification of symbols be recursive.
(when *agile-debug?* (setq *send-plist* (mapcan #'(lambda(key val) (list key (if (and val (symbolp val)) (format nil "~s" val) val)))
(plist-keys encoded-plist)
(plist-values encoded-plist))))
(result length)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment