Allow stack views to link to the items they show
This commit is contained in:
@@ -34,9 +34,16 @@ All rights reserved.
|
||||
}
|
||||
}
|
||||
|
||||
td.name p {
|
||||
td.name a {
|
||||
color: $color-text;
|
||||
display: inline;
|
||||
font-size: $font-size-normal;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: $color-active-hover;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
td.action {
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = class StackController extends BaseController
|
||||
onDidRender: ->
|
||||
@$action = @$('.action')
|
||||
@$image = @$('.icon img')
|
||||
@$nameField = @$('.name p')
|
||||
@$nameLink = @$('.name a')
|
||||
@$quantityField = @$('.quantity p')
|
||||
@$removeButton = @$('button.remove')
|
||||
super
|
||||
@@ -46,7 +46,8 @@ module.exports = class StackController extends BaseController
|
||||
display = @modPack.findItemDisplay @model.slug
|
||||
|
||||
@_imageLoader.load display.iconUrl, @$image
|
||||
@$nameField.html display.itemName
|
||||
@$nameLink.html display.itemName
|
||||
@$nameLink.attr 'href', display.itemUrl
|
||||
@$quantityField.html @model.quantity
|
||||
@$removeButton.css display:(if @editable then 'inherit' else 'none')
|
||||
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
tr.view__stack
|
||||
td.quantity: p
|
||||
td.icon: img(src='')
|
||||
td.name(width='*'): p
|
||||
td.name(width='*'): a
|
||||
td.action
|
||||
button.remove
|
||||
|
||||
Reference in New Issue
Block a user