fixed inbox entries and toggle button

This commit is contained in:
nilsding 2015-01-28 06:49:17 +01:00
parent 9c2b0951bf
commit a7fbc5b366
2 changed files with 5 additions and 3 deletions

View File

@ -122,10 +122,11 @@ $(document).on "click", "button[name=ib-destroy]", ->
btn.button "reset" btn.button "reset"
$("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly" $("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly"
# Toggle button # Toggle button
$(document).on "click", "button[name=ib-options]", -> $(document).on "click", "button[name=ib-options]", ->
btn = $(this) btn = $(this)
ibid = btn[0].dataset.ib_id ibid = btn[0].dataset.ibId
state = btn[0].dataset.state state = btn[0].dataset.state
optionBox = $("#ib-options-#{ibid}") optionBox = $("#ib-options-#{ibid}")

View File

@ -24,10 +24,11 @@
%button.btn.btn-danger{name: 'ib-destroy', data: { ib_id: i.id }} %button.btn.btn-danger{name: 'ib-destroy', data: { ib_id: i.id }}
Delete Delete
%button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }} %button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }}
Options %i.fa.fa-cog
%span.sr-only Options
.panel-footer{id: "ib-options-#{i.id}", style: 'display: none'} .panel-footer{id: "ib-options-#{i.id}", style: 'display: none'}
%h4 Sharing %h4 Sharing
- if @services.count > 0 - if current_user.services.count > 0
.row .row
- current_user.services.each do |service| - current_user.services.each do |service|
.col-md-2.col-sm-4.col-xs-6 .col-md-2.col-sm-4.col-xs-6