add select-text

This commit is contained in:
David Botton 2022-03-02 13:46:36 -05:00
parent 956cca8fa9
commit 9bdba6c136
2 changed files with 12 additions and 0 deletions

View file

@ -1067,6 +1067,17 @@ optionally fill in with contents of data-list."))
(escape-string content))
:clog-type 'clog-element :auto-place t))
;;;;;;;;;;;;;;;;;
;; select-text ;;
;;;;;;;;;;;;;;;;;
(defgeneric select-text (clog-obj)
(:documentation "Returns the text of selected item."))
(defmethod select-text ((obj clog-obj))
(clog-connection:query (connection-id obj)
(format nil "$('#~A option:selected').text()" (html-id obj))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-option
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -684,6 +684,7 @@ embedded in a native template application.)"
(add-select-option generic-function)
(add-select-options generic-function)
(add-select-optgroup generic-function)
(select-text generic-function)
"CLOG-Data-List - Class for CLOG Option Data Lists"
(clog-data-list class)