Unverified Commit 3adf2ec3 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1319 from ethereum/runTab

Switch arrows in Recorder card
parents 56a86d9d e6fa5caf
...@@ -80,10 +80,10 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) { ...@@ -80,10 +80,10 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
recorderCard.event.register('expandCollapseCard', (arrow, body, status) => { recorderCard.event.register('expandCollapseCard', (arrow, body, status) => {
body.innerHTML = '' body.innerHTML = ''
status.innerHTML = '' status.innerHTML = ''
if (arrow === 'up') { if (arrow === 'down') {
status.appendChild(self._view.collapsedView) status.appendChild(self._view.collapsedView)
body.appendChild(self._view.expandedView) body.appendChild(self._view.expandedView)
} else if (arrow === 'down') { } else if (arrow === 'up') {
status.appendChild(self._view.collapsedView) status.appendChild(self._view.collapsedView)
} }
}) })
......
...@@ -19,7 +19,7 @@ module.exports = class Card { ...@@ -19,7 +19,7 @@ module.exports = class Card {
if (self._view.el) return self._view.el if (self._view.el) return self._view.el
self._view.cardBody = yo`<div class=${css.cardBody}></div>` self._view.cardBody = yo`<div class=${css.cardBody}></div>`
self._view.arrow = yo`<i class="${css.arrow} fa fa-angle-up" self._view.arrow = yo`<i class="${css.arrow} fa fa-angle-down"
onclick=${(ev) => trigger(ev.target)}></i>` onclick=${(ev) => trigger(ev.target)}></i>`
self._view.expandCollapseButton = yo` self._view.expandCollapseButton = yo`
...@@ -39,8 +39,8 @@ module.exports = class Card { ...@@ -39,8 +39,8 @@ module.exports = class Card {
function trigger (el) { function trigger (el) {
var body = self._view.cardBody var body = self._view.cardBody
var status = self._view.statusBar var status = self._view.statusBar
el.classList.toggle('fa-angle-down') el.classList.toggle('fa-angle-up')
var arrow = el.classList.toggle('fa-angle-up') ? 'down' : 'up' var arrow = el.classList.toggle('fa-angle-down') ? 'up' : 'down'
self.event.trigger('expandCollapseCard', [arrow, body, status]) self.event.trigger('expandCollapseCard', [arrow, body, status])
} }
......
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