Allow stack views to link to the items they show

This commit is contained in:
Andrew Miner
2015-02-09 21:15:09 -08:00
parent 618cbd7aea
commit 100fb5834a
3 changed files with 12 additions and 4 deletions
+8 -1
View File
@@ -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')
+1 -1
View File
@@ -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