Sha256: aed5d188f5a7fe0c79924228f9a0f3526895a99177ef3ac73fe8b2ada7243d31

Contents?: true

Size: 1.02 KB

Versions: 19

Compression:

Stored size: 1.02 KB

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
.tabs(id=id)
  .ui.top.attached.tabular.stackable.menu
    - headers.each do |header|
      - code = codes[header] ||= Misc.digest([header, id]*"-")
      - tab_active = (active and active == header) ? 'active' : ''
      .ui.item(data-tab=code class=tab_active)= header

  - headers.each do |header|
    - code = codes[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} > .menu > .item[data-tab]").tab({"context": "##{id}"})

  $('##{id} > .menu > .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

19 entries across 19 versions & 1 rubygems

Version Path
rbbt-rest-1.9.1 share/views/partials/tabs.haml
rbbt-rest-1.9.0 share/views/partials/tabs.haml
rbbt-rest-1.8.157 share/views/partials/tabs.haml
rbbt-rest-1.8.156 share/views/partials/tabs.haml
rbbt-rest-1.8.155 share/views/partials/tabs.haml
rbbt-rest-1.8.154 share/views/partials/tabs.haml
rbbt-rest-1.8.152 share/views/partials/tabs.haml
rbbt-rest-1.8.151 share/views/partials/tabs.haml
rbbt-rest-1.8.150 share/views/partials/tabs.haml
rbbt-rest-1.8.148 share/views/partials/tabs.haml
rbbt-rest-1.8.147 share/views/partials/tabs.haml
rbbt-rest-1.8.146 share/views/partials/tabs.haml
rbbt-rest-1.8.145 share/views/partials/tabs.haml
rbbt-rest-1.8.144 share/views/partials/tabs.haml
rbbt-rest-1.8.143 share/views/partials/tabs.haml
rbbt-rest-1.8.142 share/views/partials/tabs.haml
rbbt-rest-1.8.140 share/views/partials/tabs.haml
rbbt-rest-1.8.139 share/views/partials/tabs.haml
rbbt-rest-1.8.138 share/views/partials/tabs.haml