 ;; Init
 ;;------------------------------------------------------------------------------
 
+(def events-added? (atom false))
+
+(defn- add-events!
+  "Add events that are outside the react.js event system.
+   NOTE: this is a run-once function"
+  []
+  (when-not @events-added?
+    ;; TODO: we may not even use this
+    (reset! events-added? true)))
+
 (defn init! []
+  (add-events!)
   ;; trigger the initial render
   (swap! state identity))
    (zero? num-selected-builds) [:i.fa.fa-square-o]
    :else [:i.fa.fa-minus-square-o]))

(defn- click-compile-options [prj-key]
  (swap! state update-in [:projects prj-key :compile-menu-showing?] not))

(defn- toggle-auto-compile [prj-key]

    [:div.builds-selections-642a3
      (map-indexed #(build-option %1 %2 prj-key) (:builds prj))]])

(sablono/defhtml idle-buttons [prj-key prj]
  ;(start-auto-btn prj-key num-selected-builds)
  ;(build-once-btn prj-key num-selected-builds)
