Skip to content

Commit

Permalink
fix dropdown menu on venues#index
Browse files Browse the repository at this point in the history
  • Loading branch information
branch14 committed Sep 18, 2017
1 parent 9c270d2 commit 3af891a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions lib/vrng/src/vrng/venues/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,8 @@

;; more actions

(defn close-menu-action []
(swap! page-state assoc :dropdown-menu-open false))

(defn open-menu-action []
(swap! page-state assoc :dropdown-menu-open (not (:dropdown-menu-open @page-state)))
(defn toggle-menu-action []
(swap! page-state update :dropdown-menu-open not)
false)

(defn toggle-help-text-action []
Expand Down Expand Up @@ -521,9 +518,7 @@
"Logout"]]]]))

(defn navbar-comp []
[:div#navbar.row.expanded {:on-click close-menu-action
:class
(if (@page-state :nopush) "nopush")}
[:div#navbar.row.expanded {:class (if (@page-state :nopush) "nopush")}
[:div#back-arrow.small-2.medium-3.columns
[:a
{:href "/venues"}
Expand All @@ -534,7 +529,7 @@
[:div#dropdown.small-2.medium-3.columns.text-right
[:a.avatar.float-right
{:href "#"
:on-click open-menu-action
:on-click toggle-menu-action
:style {:background (str "url(" (user-image-url) ")")
:background-size "cover"}}]
[:div#help-link [:a.float-right.button
Expand Down Expand Up @@ -806,7 +801,7 @@
[stream-base-ring-comp]
;;show the button if it's available
(if (and (venue-in-state ["available"])
(not (:launched @page-state)))
(not (:launched @page-state)))
[server-launch-button-comp])

(if (and (venue-in-state ["connected"])
Expand Down

0 comments on commit 3af891a

Please sign in to comment.