style warning corrections

This commit is contained in:
David Botton 2021-02-02 01:29:28 -05:00
parent f4b0abe422
commit c2789b85e2
11 changed files with 84 additions and 98 deletions

View file

@ -58,6 +58,7 @@
(o5 (create-option og1 :content "five"))
(tmp (create-form-element f2 :submit :value "OK"))
(tmp (create-form-element f2 :reset :value "Start Again")))
(declare (ignore tmp))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Panel 1 contents
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -74,6 +75,7 @@
"#ff00ff"))
(set-on-submit f1
(lambda (obj)
(declare (ignore obj))
(setf (title (html-document body)) (value fe1))
(setf (background-color p1) (value fe2))
(setf (hiddenp f1) t)
@ -108,10 +110,12 @@
"four"
"five"))
(set-on-change sl3 (lambda (obj)
(declare (ignore obj))
(when (selectedp o5)
(alert (window body) "Selected 5"))))
(set-on-submit f2
(lambda (obj)
(declare (ignore obj))
(setf (hiddenp f2) t)
(create-span p2 :content
(format nil "<br><b>Your form has been submitted:</b>

View file

@ -41,6 +41,7 @@
(good-button (attach-as-child body "button1id"))
(scary-button (attach-as-child body "button2id")))
(flet ((on-click-good (obj)
(declare (ignore obj))
(let ((alert-div (create-div body)))
(place-before form alert-div)
(setf (hiddenp form) t)
@ -59,9 +60,10 @@
(radio-value form "radios")
(name-value form "textinput")))))
(on-click-scary (obj)
(declare (ignore obj))
(reset form)))
;; We need to overide the boostrap default to submit the form html style
(set-on-submit form (lambda (obj)()))
(set-on-submit form (lambda (obj)(declare (ignore obj))()))
(set-on-click good-button #'on-click-good)
(set-on-click scary-button #'on-click-scary))
(run body)))

View file

@ -59,6 +59,7 @@
(good-button (attach-as-child body "button1id"))
(scary-button (attach-as-child body "button2id")))
(flet ((on-click-good (obj)
(declare (ignore obj))
(let ((alert-div (create-div body)))
(place-before form alert-div)
(setf (hiddenp form) t)
@ -71,9 +72,10 @@
(radio-value form "radios")
(name-value form "textinput")))))
(on-click-scary (obj)
(declare (ignore obj))
(reset form)))
;; We need to overide the boostrap default to submit the form html style
(set-on-submit form (lambda (obj)()))
(set-on-submit form (lambda (obj)(declare (ignore obj))()))
(set-on-click good-button #'on-click-good)
(set-on-click scary-button #'on-click-scary))
(run body)))

View file

@ -7,16 +7,19 @@
(defun on-new-window (body)
(set-on-click (create-button body :content "Set Local Key")
(lambda (obj)
(declare (ignore obj))
(setf (storage-element (window body) :local "my-local-key")
(get-universal-time))
(reload (location body))))
(set-on-click (create-button body :content "Set Session Key")
(lambda (obj)
(declare (ignore obj))
(setf (storage-element (window body) :session "my-session-key")
(get-universal-time))
(reload (location body))))
(set-on-storage (window body)
(lambda (obj data)
(declare (ignore obj))
(create-div body :content
(format nil "<br>~A : ~A => ~A<br>"
(getf data ':key)

View file

@ -40,15 +40,16 @@
(col3 (create-div row :class "col-sm-4"))
(tmp (create-section col3 :h3 :content "Column 3"))
(tmp (create-p col3 :content "Lorem ipsum dolor..")))
(set-on-click l1 (lambda (obj)(alert (window body) "Clicked link1")))
(set-on-click l1 (lambda (obj)(declare (ignore obj))(alert (window body) "Clicked link1")))
(set-on-click l2 (lambda (obj)
(declare (ignore obj))
(let* ((alert (create-div body :class "alert alert-warning alert-dismissible fade show"))
(tmp (create-phrase alert :strong :content "Wow! You clicked link 2"))
(btn (create-button alert :class "close" :content "<span>&times;</span>")))
(setf (attribute alert "role") "alert")
(setf (attribute btn "data-dismiss") "alert")
(place-after nav alert))))
(set-on-click l3 (lambda (obj)(setf (color jname) (rgb 128 128 0)))))
(set-on-click l3 (lambda (obj)(declare (ignore obj))(setf (color jname) (rgb 128 128 0)))))
(run body))
(defun on-page2 (body)

View file

@ -56,6 +56,7 @@
(set-on-click fsubmit3
(lambda (obj)
(declare (ignore obj))
(setf (hiddenp data-area) t)
(place-before footer
(create-div body

View file

@ -29,8 +29,7 @@
(defgeneric create-toggler (clog-obj &key content class auto-place)
(:documentation "Create a toggler with CONTENT as the top of tree."))
(defmethod create-toggler ((obj clog-obj) &key (content "")
(class nil)
(defmethod create-toggler ((obj clog-obj) &key (class nil)
(html-id nil)
(auto-place t))
(let ((new-obj (create-unordered-list obj :class class