Errata:
0. I got the videos mixed up. The vimeo's the commentary version and
the youtube is the silent.
1. When I said that in the flash uploader "hunchentoot is not
involved" that is incorrect. I meant that Weblocks is not involved,
instead, a utility fn. sets up a hunchentoot handler.
Leslie modified hunchentoot to deal with the non-standard way the
Adobe Flash UA does multipart mime. The upload button is included in a
very simple way (shown below).
The upload widget is inserted into the form (this snippet is from a
let binding), and everything follows from that. The gray box you see
around upload buttons is because I run SafariBlock,
which blocks flash embeds until they're clicked on by the user.
(upload-button (make-instance 'history-flow-upload
:multi-upload :div-style
:upload-handler (curry #'lagru-claim-
trampoline.multiple-uploader a-claim history)
:name "lagru-docupload"
:file-types *claim-history-types*
:button-message "Allega"
:datatable-container-id "for-yui-table"
:parent-container (dom-id
widget)
:claim a-claim
:upload-complete-js (make-action-string
(f_%
(mark-dirty documents-widget)))))
The sequence of functions called by the trampoline/uploader is at
paste.lisp.org http://paste.lisp.org/+2EAI
Since the trampoline/uploader is called outside of weblocks, using
something like (authenticatedp) inside the trampoline, or anything
called from it, leads to an error.
2. When I say "nothing is done with javascript" I mean of course, that
the `DSL' we write in does not include javascript, but behind the
scenes javascript is certainly in use. And, using parenscript,
one can easily embed the javascript DSL within lisp anyway.
For example, the delete buttons are created as follows:
(:td :align "center"
(unless (is-state widget :readonly)
(render-icon-link
(f_% (setf (brokr-of (brokerage-of co)) nil)
(mark-dirty widget))
"delete"
"Rimuova intermediario")))
And a clickable number value that turns into an input field:
(:div :class "percentage-value two"
(render-widget
(make-instance 'enter-clicker
:width 1.8 :input-class
"percentage-input"
:suffix " %"
:text (premium-%-of brokr)
:clicker-parent widget
:change-fn
(lambda (newtext)
(let ((prem-%
(string->currency-number newtext)))
(setf (premium-%-of brokr) prem-%)
(mark-dirty widget)
prem-%)))))
Both the above are from the table titled "Riassunto contabile".
Other than CSS, pretty much everything else is within lisp, and
frankly, though it may be bad practice, adding a :style attribute
inside cl-who/lisp is the fastest and most reliable
way to achieve almost anything CSS related. Next time we're going to
use Haml/Sass or similar for sure.
--
You received this message because you are subscribed to the Google Groups
"weblocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/weblocks?hl=en.