From 26a5e028a6e177a02209ef355202b677eb12beee Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Sat, 10 Jan 2015 12:40:28 -0800 Subject: [PATCH] Hide/show inventory toolbar when editable --- src/scripts/controllers/inventory_controller.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/controllers/inventory_controller.coffee b/src/scripts/controllers/inventory_controller.coffee index 4806af667..345e640b9 100644 --- a/src/scripts/controllers/inventory_controller.coffee +++ b/src/scripts/controllers/inventory_controller.coffee @@ -116,13 +116,15 @@ module.exports = class InventoryController extends BaseController @$quantityField = @$('input[name="quantity"]') @$scrollbox = @$('.scrollbox') @$table = @$('table') + @$toolbar = @$('.toolbar') @$title = @$('.title') super refresh: -> 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') + @$toolbar.css display:(if @editable then 'block' else 'none') + @$scrollbox.css bottom:(if @editable then @$toolbar.height() else '0') @$icon.attr 'src', @icon @$title.html @title