Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gendl
gendl
Commits
9cbdb657
Commit
9cbdb657
authored
Nov 28, 2015
by
Dave Cooper
Browse files
added null-event and on-show even
parent
4471372c
Changes
3
Hide whitespace changes
Inline
Side-by-side
apps/timer/source/assembly.lisp
View file @
9cbdb657
...
...
@@ -47,12 +47,25 @@
:input-slots
((
timer-minutes-default
0
)
(
timer-seconds-default
3
))
:computed-slots
((
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() {
timerStart();
// 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
)))
...
...
base/rest/source/vanilla-mixin.lisp
View file @
9cbdb657
...
...
@@ -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
)
)
:computed-slots
...
...
@@ -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
)
#\#
)
...
...
gwl/source/remote-object.lisp
View file @
9cbdb657
...
...
@@ -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
(
encode-plist-args
(
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
))
))
(
string-downcase
(
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 @@
(
send
(
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
))))
(
multiple-value-bind
(
result
length
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment