   (with-retry
     (.focus (.getElementById js/document "transaction-date"))))
 
-(defn- account-header
-  [{:keys [account transaction] :as context}]
-  [:section
-   [:div.pull-right
-    [:button.btn.btn-primary {:type :button
-                              :data-toggle :dropdown
-                              :aria-haspopup true
-                              :aria-expanded false
-                              :disabled (not (nil? @transaction))}
+(defn- account-buttons
+  [{:keys [transaction] :as context}]
+  [:div
+   [:div.btn-group.dropup
+    [:button {:type :button
+              :class ["btn"
+                      "btn-primary"
+                      "dropdown-toggle"]
+              :data-toggle :dropdown
+              :aria-haspopup true
+              :aria-expanded false
+              :disabled (not (nil? @transaction))}
      [:span.glyphicon.glyphicon-plus]
      (util/space)
      "New"

                    :icon :remove
                    :title "Click here to cancel this transaction"})]]))

(defn- show-account
  [id]
  (let [context {:account (r/atom nil)
                 :transaction (r/atom nil)
                 :items (r/atom nil)}]
    (load-accounts)
    (accounts/get-one id
                      (fn [a]

         [account-header context]]]
       [:div.row
        [:div.col-md-6
         [:div.panel.panel-default
          [:div.panel-heading
           [:h2.panel-title "Transaction Items"]]
          [:div.panel-body {:style {:height "40em" :overflow "auto"}}
           [items-table context]]]
         [account-buttons context]]
        [:div.col-md-6
         [transaction-form context]]]])))

(secretary/defroute new-account-path "/accounts/new" []
  (r/render [new-account] (app-element)))
