Sha256: 90a22d571b78129be724e7bff922d6ced7fa93a6c6ec15e5495aff026f4b14c2

Contents?: true

Size: 950 Bytes

Versions: 47

Compression:

Stored size: 950 Bytes

Contents

- id = "tab_menu_"  + rand(1000).to_s unless defined? id and not id.nil?
- active = false unless defined? active and not active.nil?
- active = headers.first if TrueClass === active
.ui.top.attached.tabular.stackable.menu(id=id)
  - headers.each do |header|
    - code = codes[header] || Misc.digest(header)
    - tab_active = (active and active == header) ? 'active' : ''
    .ui.item(data-tab=code class=tab_active)= header

- headers.each do |header|
  - code = codes[header] || Misc.digest(header)
  - next if content[header].nil?
  - tab_active = (active and active == header) ? 'active' : ''
  .ui.tab.bottom.attached.segment.content(data-tab=code class=tab_active)
    = content[header]

:deferjs
  $("##{id} > .item[data-tab]").tab()

  $('##{id} > .item[data-tab=close]').click(function(item){
    var tool = $(this).parents('.cytoscape_tool').first()
    tool.find('.tab.active, .item.active').removeClass('active')
    return false
  })

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
rbbt-rest-1.8.93 share/views/partials/tabs.haml
rbbt-rest-1.8.92 share/views/partials/tabs.haml
rbbt-rest-1.8.91 share/views/partials/tabs.haml
rbbt-rest-1.8.90 share/views/partials/tabs.haml
rbbt-rest-1.8.89 share/views/partials/tabs.haml
rbbt-rest-1.8.88 share/views/partials/tabs.haml
rbbt-rest-1.8.87 share/views/partials/tabs.haml
rbbt-rest-1.8.86 share/views/partials/tabs.haml
rbbt-rest-1.8.85 share/views/partials/tabs.haml
rbbt-rest-1.8.84 share/views/partials/tabs.haml
rbbt-rest-1.8.83 share/views/partials/tabs.haml
rbbt-rest-1.8.82 share/views/partials/tabs.haml
rbbt-rest-1.8.81 share/views/partials/tabs.haml
rbbt-rest-1.8.80 share/views/partials/tabs.haml
rbbt-rest-1.8.79 share/views/partials/tabs.haml
rbbt-rest-1.8.78 share/views/partials/tabs.haml
rbbt-rest-1.8.77 share/views/partials/tabs.haml
rbbt-rest-1.8.76 share/views/partials/tabs.haml
rbbt-rest-1.8.75 share/views/partials/tabs.haml
rbbt-rest-1.8.74 share/views/partials/tabs.haml