Hide/show inventory toolbar when editable

This commit is contained in:
Andrew Miner
2015-01-10 12:40:28 -08:00
parent 1b2552a20a
commit 26a5e028a6
@@ -116,13 +116,15 @@ module.exports = class InventoryController extends BaseController
@$quantityField = @$('input[name="quantity"]') @$quantityField = @$('input[name="quantity"]')
@$scrollbox = @$('.scrollbox') @$scrollbox = @$('.scrollbox')
@$table = @$('table') @$table = @$('table')
@$toolbar = @$('.toolbar')
@$title = @$('.title') @$title = @$('.title')
super super
refresh: -> refresh: ->
display = if @editable then 'block' else 'none' display = if @editable then 'block' else 'none'
@$clearButton.css display:(if @editable then 'block' else 'none')
@$editPanel.css display:(if @editable then 'table-row' else 'none') @$editPanel.css display:(if @editable then 'table-row' else 'none')
@$toolbar.css display:(if @editable then 'block' else 'none')
@$scrollbox.css bottom:(if @editable then @$toolbar.height() else '0')
@$icon.attr 'src', @icon @$icon.attr 'src', @icon
@$title.html @title @$title.html @title