Compare commits

...

6 commits

Author SHA1 Message Date
David Botton
4bac089b18
Merge pull request #398 from infinae/main
Add DETACH-FROM-DOM method to CLOG-ELEMENT
2025-01-25 21:40:38 -05:00
David Botton
c90db02d9a
Merge pull request #399 from VisenDev/fix-typos
Typo fixes
2025-01-25 21:39:59 -05:00
David Botton
4359d00e8a
Merge pull request #406 from mikeivanov/fix-dialog-jquery
Use direct DOM calls to make dialog methods work
2025-01-25 21:38:44 -05:00
Mike Ivanov
c1a6635251 Use direct DOM calls to make dialog methods work 2025-01-24 16:16:08 -08:00
Robert Burnett
074ef2c2e5 fixed 'turtorial' type 2024-12-04 18:33:17 -06:00
Infinae
5e55dfcd65
Add DETACH-FROM-DOM method to CLOG-ELEMENT 2024-12-03 08:09:52 +11:00
26 changed files with 38 additions and 24 deletions

View file

@ -307,12 +307,12 @@ firefox and dialog does not work at all on IE."))
;;;;;;;;;;;;;;;;;
(defgeneric show-dialog (clog-dialog &key modal)
(:documentation "Close dialog."))
(:documentation "Show dialog."))
(defmethod show-dialog ((obj clog-dialog) &key (modal nil))
(if modal
(jquery-execute obj (format nil "showModal()"))
(jquery-execute obj (format nil "show()"))))
(jquery-execute obj (format nil "get(0).showModal()"))
(jquery-execute obj (format nil "get(0).show()"))))
;;;;;;;;;;;;;;;;;;
;; close-dialog ;;
@ -322,7 +322,7 @@ firefox and dialog does not work at all on IE."))
(:documentation "Close dialog."))
(defmethod close-dialog ((obj clog-dialog))
(jquery-execute obj (format nil "close()")))
(jquery-execute obj (format nil "get(0).close()")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-hr

View file

@ -2354,6 +2354,16 @@ is not stored in connection-data will become subject to browser-gc requests."))
(defmethod remove-from-dom ((obj clog-element))
(jquery-execute obj "remove()"))
;;;;;;;;;;;;;;;;;;;;;
;; detach-from-dom ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric detach-from-dom (clog-element)
(:documentation "Detach CLOG-Element from the DOM."))
(defmethod detach-from-dom ((obj clog-element))
(jquery-execute obj "detach()"))
;;;;;;;;;;;;;;;;;;;;;;
;; remove-from-clog ;;
;;;;;;;;;;;;;;;;;;;;;;

View file

@ -17,6 +17,6 @@
'my-on-click))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -20,6 +20,6 @@
(create-section body :h1 :content "I change")))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -31,6 +31,6 @@
'my-on-click))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -79,6 +79,6 @@
(format t "Lost connection.~%~%~A" c))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -84,6 +84,6 @@
(set-on-pointer-down div3 'on-mouse-down :cancel-event t :capture-pointer t)))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -172,6 +172,6 @@
(setf (editablep panel3) t))) ; turn panel 3 into an editable area
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -33,6 +33,6 @@
(put-image-data cx dat 30 200)))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -98,7 +98,7 @@
content))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
;; Setup the default route / to on-main
;; :boot-function allows us to add or modify our boot-files content
;; for search engine optimization. We choose long-polling-first so

View file

@ -52,6 +52,6 @@ Changes made to a local key will fire an event and print below:<br>"
(storage-element (window body) :session "my-session-key"))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -28,6 +28,6 @@
(set-on-time-update aud (lambda (obj)(declare (ignore obj))(setf (value alc) (media-position aud))))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -72,7 +72,7 @@
(declare (ignore l1) (ignore l2) (ignore l3) (ignore l4) (ignore jname))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-index)
(set-on-new-window 'on-page2 :path "/page2")
(open-browser))

View file

@ -266,6 +266,6 @@
"")))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -50,6 +50,6 @@
:one-time t))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -102,6 +102,6 @@
(open-browser))")))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -64,6 +64,6 @@
(set-height))))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -96,7 +96,7 @@
(setf (box-width image) "100%")))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
;; We would probably set :host to my IP and :port 80 here if running a live site
(initialize 'on-new-window)
;; In real life, if we openning a browser here it would likely be

View file

@ -52,5 +52,6 @@
(center-children (bottom-panel console) :horizontal nil)))
(defun start-tutorial ()
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -62,5 +62,6 @@
(return))))))
(defun start-tutorial ()
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -61,6 +61,7 @@
;; Start the webserver
(defun start-tutorial ()
"Start tutorial."
;; Initialize CLOG and the / url path (since / in our menu could just be nil)
(initialize 'on-main
;; Use long polling technique so pages are crawled by google

View file

@ -33,6 +33,7 @@
"Setup website menu")
(defun start-tutorial ()
"Start tutorial."
;; Setup authorizations between roles and actions
(add-authorization '(:guest) '(:login :signup :main))
(add-authorization '(:member) '(:logout :main))

View file

@ -42,6 +42,7 @@
"Setup website menu")
(defun start-tutorial ()
"Start tutorial."
;; Here we add authorizations for content and editting content, not just
;; access to pages.
(add-authorization '(:guest :member) '(:content-show-comments))

View file

@ -12,7 +12,6 @@
(:export start-tutorial))
(in-package :clog-tut-33)
(defun on-new-window (body)
(setf (title (html-document body)) "Tutorial 33")
(with-connection-cache (body)
@ -172,6 +171,6 @@
(select-tab p3))))))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -73,6 +73,6 @@ void main() {
(draw-arrays gl :TRIANGLES 0 3)))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))

View file

@ -182,6 +182,6 @@
(draw-scene))))
(defun start-tutorial ()
"Start turtorial."
"Start tutorial."
(initialize 'on-new-window)
(open-browser))