added a 'Loading...' test to the textarea, which disappears later
This commit is contained in:
+4
-1
@@ -19,7 +19,10 @@
|
|||||||
(anim ($ :body) {:scrollTop ((js->clj (.offset $id)) "top")} 500))
|
(anim ($ :body) {:scrollTop ((js->clj (.offset $id)) "top")} 500))
|
||||||
|
|
||||||
; set focus to the draft textarea (if there is one)
|
; set focus to the draft textarea (if there is one)
|
||||||
(.focus $draft)
|
(when $draft
|
||||||
|
(do
|
||||||
|
(val $draft "")
|
||||||
|
(.focus $draft)))
|
||||||
|
|
||||||
; show the preview & publish buttons as soon as the user starts typing.
|
; show the preview & publish buttons as soon as the user starts typing.
|
||||||
(.keypress $draft
|
(.keypress $draft
|
||||||
|
|||||||
@@ -63,10 +63,13 @@
|
|||||||
(form-to [:post "/post-note"]
|
(form-to [:post "/post-note"]
|
||||||
(hidden-field :session-key (get-flash-key))
|
(hidden-field :session-key (get-flash-key))
|
||||||
(hidden-field {:id :session-value} :session-value)
|
(hidden-field {:id :session-value} :session-value)
|
||||||
(text-area {:class :max-width} :draft)
|
(text-area {:class :max-width} :draft "Loading...")
|
||||||
[:div#buttons.hidden
|
[:div#buttons.hidden
|
||||||
(submit-button {:style "float: left" :class :button :id :publish-button} "Publish")
|
(submit-button {:style "float: left"
|
||||||
[:button#preview-button.button {:type :button :style "float: right"} "Preview"]])]
|
:class :button
|
||||||
|
:id :publish-button} "Publish")
|
||||||
|
[:button#preview-button.button {:type :button
|
||||||
|
:style "float: right"} "Preview"]])]
|
||||||
[:div#preview-start-line.hidden]
|
[:div#preview-start-line.hidden]
|
||||||
[:article#preview]))
|
[:article#preview]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user