Sha256: 8465bf06864189831c0fa658fa24fe9257a6fcc407fcb44436702d74663b14db

Contents?: true

Size: 297 Bytes

Versions: 14

Compression:

Stored size: 297 Bytes

Contents

import Rails from '@rails/ujs';

const toggleMenu = function(event) {
  const parent = this.parentNode
  if (!("open" in parent.dataset)) {
    parent.dataset.open = ""
  } else {
    delete parent.dataset.open
  }
}

Rails.delegate(document, "#main-menu [data-menu-button]", "click", toggleMenu)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
activeadmin-4.0.0.beta14 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta13 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta12 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta11 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta10 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta9 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta8 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta7 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta6 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta5 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta4 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta3 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta2 app/javascript/active_admin/features/main_menu.js
activeadmin-4.0.0.beta1 app/javascript/active_admin/features/main_menu.js