Hide/show inventory toolbar when editable
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user