A bit of frontend changes.
This commit is contained in:
parent
dd9e39861a
commit
4888987971
@ -27,7 +27,9 @@
|
||||
(create-div (create-web-content (create-web-main canvas))))
|
||||
|
||||
(defmethod display-chapter-or-book (canvas (chapter chapter))
|
||||
(chapter-to-clog chapter (book/chapter-window canvas)))
|
||||
(let ((div (book/chapter-window canvas)))
|
||||
(chapter-to-clog chapter div)
|
||||
div))
|
||||
|
||||
(defmethod load-chapter (canvas (book string) (chapter string))
|
||||
(let* ((bk (s:find-book d:*bible* book))
|
||||
|
45
clog.lisp
45
clog.lisp
@ -3,6 +3,7 @@
|
||||
(in-package #:cl-bible.clog)
|
||||
|
||||
(defvar *body*)
|
||||
(defvar *text* nil)
|
||||
|
||||
(defun lift-search-window (body search)
|
||||
(let ((result (mapcar #'car (l:lift-search search))))
|
||||
@ -32,27 +33,29 @@
|
||||
(v:verse-to-string verse)))
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(ch:load-chapter canvas
|
||||
(v:bname verse)
|
||||
(v:chapter verse)))))
|
||||
results)))
|
||||
(when *text* (destroy *text*))
|
||||
(setf *text* (ch:load-chapter canvas
|
||||
(v:bname verse)
|
||||
(v:chapter verse))))))
|
||||
results)
|
||||
content))
|
||||
|
||||
(defun reload (window)
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(let ((dialog (clog-web-form window "Which bible do you want?"
|
||||
'(("Bible" "bible" :select (("Menge" :mng)
|
||||
("King James Version" :kjv)
|
||||
("Vulgata" :vul)
|
||||
("Greek Bible" :grb)
|
||||
("Elberfelder Übersetzung 1871" :elb1871)
|
||||
("NEÜ" :neue)
|
||||
("Luther 1545" :luth1545)
|
||||
("Luther 1912" :luth1912)
|
||||
("Schlachter 1951" :sch1951)
|
||||
("Ukrainische Version" :ukr))))
|
||||
(lambda (results)
|
||||
(d:update-bible (form-result results "bible")))))))))
|
||||
'(("Bible" "bible" :select (("Menge" :mng)
|
||||
("King James Version" :kjv)
|
||||
("Vulgata" :vul)
|
||||
("Greek Bible" :grb)
|
||||
("Elberfelder Übersetzung 1871" :elb1871)
|
||||
("NEÜ" :neue)
|
||||
("Luther 1545" :luth1545)
|
||||
("Luther 1912" :luth1912)
|
||||
("Schlachter 1951" :sch1951)
|
||||
("Ukrainische Version" :ukr))))
|
||||
(lambda (results)
|
||||
(d:update-bible (form-result results "bible")))))))))
|
||||
|
||||
(defun load-book-or-chapter (canvas)
|
||||
(lambda (data)
|
||||
@ -63,8 +66,8 @@
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(clog-web-form body "Which passage do you want?"
|
||||
'(("" "pos" :text))
|
||||
(load-book-or-chapter body))))
|
||||
'(("" "pos" :text))
|
||||
(load-book-or-chapter body))))
|
||||
|
||||
(defun setup-menu-bar (body)
|
||||
(let* ((form-space (create-web-content body))
|
||||
@ -85,12 +88,14 @@
|
||||
(set-on-submit form1
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(ch:load-position body (value passage))))
|
||||
(when *text* (destroy *text*))
|
||||
(setf *text* (ch:load-position body (value passage)))))
|
||||
(create-form-element form3 :submit :value "Search phrase")
|
||||
(set-on-submit form3
|
||||
(lambda (obj)
|
||||
(declare (ignore obj))
|
||||
(search-in-bible (value search) d:*bible* body)))))
|
||||
(when *text* (destroy *text*))
|
||||
(setf *text* (search-in-bible (value search) d:*bible* body))))))
|
||||
|
||||
(defun on-new-window (body)
|
||||
(setf *body* body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user