-
-
Save sgrove/ad13e5d068b32a6349c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns zenbox.main | |
(:require ...)) | |
(def controls (atom [])) | |
(defn build-drop-down-menu [menu-node service menu-data] | |
"Given a root dom element MENU-NODE, will render template named \"menus/{{service}}_menu\" with supplied MENU-DATA, create a document fragment and append it to MENU-NODE. Finally, it takes care of turning MENU-NODE into a drop-down menu" | |
(let [menu-button (goog.ui.MenuButton.)] | |
(swap! controls into [menu-button]))) | |
(defn destroy-widget! [] | |
(map #(do (.exitDocument %) (.dispose %)) @controls) | |
; reset/empty controls | |
(swap! controls (fn [& args] [])) | |
(.log js/console "post-Controls:") | |
(.log js/console @controls)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment