Ab sofort ist der Login auf der Weboberfläche von git.fh-muenster.de bevorzugt über FH Muenster SSO möglich.

Commit 551e226d authored by Bruno Burke's avatar Bruno Burke 😁

fix button class in devcards

parent c1e2374c
......@@ -53,13 +53,13 @@
:result @checked
:on-change #(onchange %)}]
(when (not-empty @answer)
[:a.btn {:on-click #(do (reset! answer nil)
[:a.button {:on-click #(do (reset! answer nil)
(reset! checked nil))}
"Reset Answer!"])
(when @checked
[:a.btn {:on-click #(reset! checked nil)}
[:a.button {:on-click #(reset! checked nil)}
"Reset Check!"])
(when (not-empty @answer)
[:a.btn {:on-click #(reset! checked (check-answer @exercise-data @answer js/console.log))}
[:a.button {:on-click #(reset! checked (check-answer @exercise-data @answer js/console.log))}
"Check!"])
])))
......@@ -54,7 +54,7 @@
(defcard-rg show-prog-exercise
(fn []
[:div
[:button.btn {:on-click #(swap! switch not)} "Toggle result"]
[:button.button {:on-click #(swap! switch not)} "Toggle result"]
[content-manager/show @exercise-data
{;;{:points 3 :points-max 6 :correct true}
:answer @answer
......@@ -65,7 +65,7 @@
(defcard-rg prog-exercise
(fn []
[:div
[:button.btn {:on-click #(swap! switch not)} "Toggle result"]
[:button.button {:on-click #(swap! switch not)} "Toggle result"]
[exercise/render-exercise @exercise-data
{;;{:points 3 :points-max 6 :correct true}
:answer @answer
......
......@@ -50,13 +50,13 @@
:result @checked
:on-change #(onchange %)}]
(when (not-empty @answer)
[:a.btn {:on-click #(do (reset! answer nil)
[:a.button {:on-click #(do (reset! answer nil)
(reset! checked nil))}
"Reset Answer!"])
(when @checked
[:a.btn {:on-click #(reset! checked nil)}
[:a.button {:on-click #(reset! checked nil)}
"Reset Check!"])
(when (not-empty @answer)
[:a.btn {:on-click #(reset! checked (check-answer @exercise-data @answer js/console.log))}
[:a.button {:on-click #(reset! checked (check-answer @exercise-data @answer js/console.log))}
"Check!"])
])))
......@@ -36,7 +36,7 @@
}))
(def actions (fn [id]
[:a.btn "Button für " id]
[:a.button "Button für " id]
))
......@@ -44,10 +44,12 @@
(defcard-rg paging-table-card
(fn []
[ui/table
{:head
[{:id :human-id :label "Human-Id" :sortable true}
{:id :title :label "Title" :sortable true}
{:id :type :label "Typ" :sortable true}
{:id :actions :label "" :sortable false}]
:data
(for [[id {:keys [human-id type title]}] @atoms]
{:id id
:human-id human-id
......@@ -57,16 +59,18 @@
(actions id))
})
:paging true
:items-per-page 3]))
:items-per-page 3}]))
(defcard-rg table-card
(fn []
[ui/table
{:head
[{:id :human-id :label "Human-Id" :sortable true}
{:id :title :label "Title" :sortable true}
{:id :type :label "Typ" :sortable true}
{:id :date :label "Datum" :sortable true}
{:id :actions :label "" :sortable false}]
:data
(for [[id {:keys [human-id type title date]}] @atoms]
{:id id
:human-id human-id
......@@ -75,5 +79,5 @@
:date date
:actions (when actions
(actions id))
})]
})}]
))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment