 (def *file* (atom {}))
 
 (defn display-image-preview [file title]
-  (let [reader (new (js* "FileReader"))]
+  (let [reader (FileReader.)]
     (set! (.-onload reader)
           (fn [e]
             (ui/render-template (dom/getElement "image-preview")

      (ui/display-error (dom/getElement "status-message")
                        could-not-save-document-err))))

(defn save-existing-document-click-callback [language feed-name e]
  (document/update-doc (.-value (dom/getElement "slug"))
                       save-existing-document-xhr-callback
                       (get-document-value-map! language feed-name)))

(defn save-existing-menu-document-click-callback [language feed-name e]
  (document/update-doc (.-value (dom/getElement "slug"))
                       save-existing-document-xhr-callback
                       (get-document-value-map!

      (ui/display-error (dom/getElement "status-message")
                        could-not-create-document-err))))

(defn save-new-document-click-callback [language feed-name & e]
  (let [doc (get-document-value-map! language feed-name)]
    (document/create-doc (:slug doc)
                         save-new-document-xhr-callback
                         doc)))

(defn save-new-menu-document-click-callback [language feed-name & _]
  (let [doc (get-document-value-map! language
                                     feed-name
                                     (render-menu-content-string!))]
