diff --git a/source/clog-helpers.lisp b/source/clog-helpers.lisp index f9db6f8..0dd610d 100644 --- a/source/clog-helpers.lisp +++ b/source/clog-helpers.lisp @@ -15,7 +15,11 @@ (defpackage #:clog-tools (:use #:cl #:clog #:clog-gui #:clog-web) - (:export :clog-builder :clog-db-admin :clog-new-app)) + (:export :clog-builder + :add-supported-controls + :control-info + :clog-db-admin + :clog-new-app)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Implementation - CLOG Utilities diff --git a/tools/clog-builder-settings.lisp b/tools/clog-builder-settings.lisp index f596aa2..1802911 100644 --- a/tools/clog-builder-settings.lisp +++ b/tools/clog-builder-settings.lisp @@ -154,14 +154,14 @@ (defparameter *props-form-values* `((:name "value" :setf clog:value) + (:name "default value" + :prop "defaultValue") + (:name "place holder" + :prop "placeholder") (:name "name on form" :setf clog:name) (:name "size" :prop "size") - (:name "place holder" - :prop "placeholder") - (:name "default value" - :prop "defaultValue") (:name "image url" :prop "src") (:name "image alt" diff --git a/tools/clog-builder.lisp b/tools/clog-builder.lisp index 59e453b..b081555 100644 --- a/tools/clog-builder.lisp +++ b/tools/clog-builder.lisp @@ -240,7 +240,7 @@ create-div's" ;; Control utilities (defun control-info (control-type-name) - "Return control informaton record for CONTROL-TYPE-NAME from the *supported-controls* list." + "Return the control-record for CONTROL-TYPE-NAME from supported controls." (if (equal control-type-name "clog-data") `(:name "clog-data" :description "Panel Properties" @@ -257,6 +257,10 @@ create-div's" :get ,(lambda (control) (height control))))) (find-if (lambda (x) (equal (getf x :name) control-type-name)) *supported-controls*))) +(defun add-supported-controls (control-records) + "Add a list of control-records to builder's supported controls." + (alexandria:appendf *supported-controls* control-records)) + (defun create-control (parent content control-record uid &key custom-query) "Return a new control based on CONTROL-RECORD as a child of PARENT" (let* ((create-type (getf control-record :create-type)) @@ -1499,6 +1503,10 @@ of controls and double click to select control." (lambda (obj) (declare (ignore obj)) (open-window (window body) "https://rabbibotton.github.io/clog/clog-manual.html"))) + (create-gui-menu-item help :content "CLOG Tutorials" :on-click + (lambda (obj) + (declare (ignore obj)) + (open-window (window body) "https://github.com/rabbibotton/clog/blob/main/LEARN.md"))) (create-gui-menu-item help :content "Lisp in Y Minutes" :on-click (lambda (obj) (declare (ignore obj))