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;
|
display: inline;
|
||||||
font-size: $font-size-normal;
|
font-size: $font-size-normal;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-active-hover;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
td.action {
|
td.action {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ module.exports = class StackController extends BaseController
|
|||||||
onDidRender: ->
|
onDidRender: ->
|
||||||
@$action = @$('.action')
|
@$action = @$('.action')
|
||||||
@$image = @$('.icon img')
|
@$image = @$('.icon img')
|
||||||
@$nameField = @$('.name p')
|
@$nameLink = @$('.name a')
|
||||||
@$quantityField = @$('.quantity p')
|
@$quantityField = @$('.quantity p')
|
||||||
@$removeButton = @$('button.remove')
|
@$removeButton = @$('button.remove')
|
||||||
super
|
super
|
||||||
@@ -46,7 +46,8 @@ module.exports = class StackController extends BaseController
|
|||||||
display = @modPack.findItemDisplay @model.slug
|
display = @modPack.findItemDisplay @model.slug
|
||||||
|
|
||||||
@_imageLoader.load display.iconUrl, @$image
|
@_imageLoader.load display.iconUrl, @$image
|
||||||
@$nameField.html display.itemName
|
@$nameLink.html display.itemName
|
||||||
|
@$nameLink.attr 'href', display.itemUrl
|
||||||
@$quantityField.html @model.quantity
|
@$quantityField.html @model.quantity
|
||||||
@$removeButton.css display:(if @editable then 'inherit' else 'none')
|
@$removeButton.css display:(if @editable then 'inherit' else 'none')
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
tr.view__stack
|
tr.view__stack
|
||||||
td.quantity: p
|
td.quantity: p
|
||||||
td.icon: img(src='')
|
td.icon: img(src='')
|
||||||
td.name(width='*'): p
|
td.name(width='*'): a
|
||||||
td.action
|
td.action
|
||||||
button.remove
|
button.remove
|
||||||
|
|||||||
Reference in New Issue
Block a user