Merge branch 'master' into ab-fetch-last-coin-balance-records

pull/2538/head
Victor Baranov 5 years ago committed by GitHub
commit a81dc4ff07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 27
      apps/block_scout_web/assets/js/lib/token_transfers_toggle.js

@ -3,6 +3,7 @@
### Features ### Features
### Fixes ### Fixes
- [#2563](https://github.com/poanetwork/blockscout/pull/2563) - Fix view less transfers button
- [#2538](https://github.com/poanetwork/blockscout/pull/2538) - fetch the last not empty coin balance records - [#2538](https://github.com/poanetwork/blockscout/pull/2538) - fetch the last not empty coin balance records
### Chore ### Chore

@ -1,20 +1,17 @@
import $ from 'jquery' import $ from 'jquery'
const tokenTransferToggle = (element) => { $(document.body).on('click', '[data-selector="token-transfer-open"]', event => {
const $element = $(element) const $tokenTransferOpen = event.target
const $tokenTransferClose = $element.find("[data-selector='token-transfer-close']") const $parent = $tokenTransferOpen.parentElement
const $tokenTransferOpen = $element.find("[data-selector='token-transfer-open']") const $tokenTransferClose = $parent.querySelector("[data-selector='token-transfer-close']")
$tokenTransferOpen.classList.add('d-none')
$element.on('show.bs.collapse', () => { $tokenTransferClose.classList.remove('d-none')
$tokenTransferOpen.addClass('d-none')
$tokenTransferClose.removeClass('d-none')
}) })
$element.on('hide.bs.collapse', () => { $(document.body).on('click', '[data-selector="token-transfer-close"]', event => {
$tokenTransferClose.addClass('d-none') const $tokenTransferClose = event.target
$tokenTransferOpen.removeClass('d-none') const $parent = $tokenTransferClose.parentElement
const $tokenTransferOpen = $parent.querySelector("[data-selector='token-transfer-open']")
$tokenTransferClose.classList.add('d-none')
$tokenTransferOpen.classList.remove('d-none')
}) })
}
// Initialize the script scoped for each card.
$("[data-selector='token-transfers-toggle']").each((_index, element) => tokenTransferToggle(element))

Loading…
Cancel
Save