WIP
This commit is contained in:
@@ -28,7 +28,6 @@ module.exports = class BrowsePageController extends PageController
|
||||
@_tileControllers = []
|
||||
|
||||
@_client.on c.event.change, => @tryRefresh()
|
||||
@_modPack.on c.event.change, => @tryRefresh()
|
||||
|
||||
# Property Methods #############################################################################
|
||||
|
||||
@@ -81,7 +80,7 @@ module.exports = class BrowsePageController extends PageController
|
||||
|
||||
_refreshModTiles: ->
|
||||
index = 0
|
||||
mods = @_modPack.getAllMods()
|
||||
mods = (mod for modId, mod of @_modPack.mods)
|
||||
for mod in mods
|
||||
controller = @_tileControllers[index]
|
||||
if not controller
|
||||
|
||||
@@ -29,12 +29,12 @@ module.exports = class ModTileController extends BaseController
|
||||
super
|
||||
|
||||
refresh: ->
|
||||
@$link.attr 'href', c.url.mod modSlug:@model.slug
|
||||
@$logoImage.attr 'src', c.url.modIcon modSlug:@model.slug
|
||||
@$title.text @model.name
|
||||
@$link.attr 'href', c.url.mod modId:@model.id
|
||||
@$logoImage.attr 'src', c.url.modIcon modId:@model.id
|
||||
@$title.text @model.displayName
|
||||
@$description.text @model.description
|
||||
|
||||
if @model.enabled
|
||||
if @model.isEnabled
|
||||
@$el.removeClass 'disabled'
|
||||
else
|
||||
@$el.addClass 'disabled'
|
||||
|
||||
Reference in New Issue
Block a user