Fix various small issues from animation changes
This commit is contained in:
@@ -13,8 +13,9 @@ BaseController = require './base_controller'
|
|||||||
module.exports = class AdsenseController extends BaseController
|
module.exports = class AdsenseController extends BaseController
|
||||||
|
|
||||||
constructor: (options={})->
|
constructor: (options={})->
|
||||||
options.model ?= 'skyscraper_sidebar'
|
options.model ?= 'skyscraper_sidebar'
|
||||||
options.templateName = "adsense_#{options.model}"
|
options.tagName = 'ins'
|
||||||
|
options.templateName = "adsense_#{options.model}"
|
||||||
super options
|
super options
|
||||||
|
|
||||||
@_adsEnabled = global.env in ProductionEnvs
|
@_adsEnabled = global.env in ProductionEnvs
|
||||||
|
|||||||
@@ -118,14 +118,17 @@ module.exports = class InventoryTableController extends BaseController
|
|||||||
super
|
super
|
||||||
|
|
||||||
refresh: ->
|
refresh: ->
|
||||||
@$editPanel.css display:(if @editable then 'table-row' else 'none')
|
if @editable
|
||||||
@$toolbar.css display:(if @editable then 'block' else 'none')
|
@show @$editPanel
|
||||||
@$scrollbox.css bottom:(if @editable then @$toolbar.height() else '0')
|
@show @$toolbar, =>
|
||||||
|
@$scrollbox.css bottom:@$toolbar.height()
|
||||||
|
else
|
||||||
|
@hide @$editPanel
|
||||||
|
@hide @$toolbar
|
||||||
|
@$scrollbox.css bottom:0
|
||||||
|
|
||||||
if _.isEmpty(@$quantityField.val()) then @$quantityField.val '1'
|
if _.isEmpty(@$quantityField.val()) then @$quantityField.val '1'
|
||||||
|
|
||||||
@$table.find('tr:not(:last-child)').remove()
|
|
||||||
|
|
||||||
@_refreshNameAutocomplete()
|
@_refreshNameAutocomplete()
|
||||||
@_refreshButtonState()
|
@_refreshButtonState()
|
||||||
@_refreshStacks()
|
@_refreshStacks()
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ module.exports = class ItemPageController extends PageController
|
|||||||
|
|
||||||
craftingPlanButtonClicked: ->
|
craftingPlanButtonClicked: ->
|
||||||
display = @modPack.findItemDisplay @model.item.slug
|
display = @modPack.findItemDisplay @model.item.slug
|
||||||
logger.debug "button clicked, going to: #{display.craftingUrl}"
|
|
||||||
router.navigate display.craftingUrl, trigger:true
|
router.navigate display.craftingUrl, trigger:true
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
|||||||
@@ -170,24 +170,26 @@ module.exports = class ModPageController extends PageController
|
|||||||
|
|
||||||
@show @$tutorialsSection
|
@show @$tutorialsSection
|
||||||
else
|
else
|
||||||
@hide @tutorialsSection
|
@hide @$tutorialsSection
|
||||||
|
|
||||||
_refreshVersions: ->
|
_refreshVersions: ->
|
||||||
@$versionSelector.empty()
|
@$versionSelector.empty()
|
||||||
return unless @model?
|
|
||||||
|
|
||||||
@$versionSelector.removeClass 'hiding'
|
if @model?
|
||||||
|
effectiveModVersion = @effectiveModVersion
|
||||||
|
versionCount = 0
|
||||||
|
@model.eachModVersion (modVersion)=>
|
||||||
|
option = $("<option value=\"#{modVersion.version}\">#{modVersion.version}</option>")
|
||||||
|
if modVersion is effectiveModVersion
|
||||||
|
option.attr 'selected', 'selected'
|
||||||
|
@$versionSelector.append option
|
||||||
|
versionCount++
|
||||||
|
|
||||||
effectiveModVersion = @effectiveModVersion
|
if versionCount <= 1
|
||||||
versionCount = 0
|
@$versionSelector.attr 'disabled', 'disabled'
|
||||||
@model.eachModVersion (modVersion)=>
|
else
|
||||||
option = $("<option value=\"#{modVersion.version}\">#{modVersion.version}</option>")
|
@$versionSelector.removeAttr 'disabled'
|
||||||
if modVersion is effectiveModVersion
|
|
||||||
option.attr 'selected', 'selected'
|
|
||||||
@$versionSelector.append option
|
|
||||||
versionCount++
|
|
||||||
|
|
||||||
if versionCount <= 1
|
@show @$versionSelector
|
||||||
@$versionSelector.attr 'disabled', 'disabled'
|
|
||||||
else
|
else
|
||||||
@$versionSelector.removeAttr 'disabled'
|
@hide @$versionSelector
|
||||||
|
|||||||
@@ -164,9 +164,8 @@ module.exports = class CraftingGuideRouter extends Backbone.Router
|
|||||||
|
|
||||||
showDuration = Duration.normal
|
showDuration = Duration.normal
|
||||||
switchToNextController = (event)=>
|
switchToNextController = (event)=>
|
||||||
logger.debug "show called: #{event}"
|
|
||||||
@_resetGlobals()
|
|
||||||
@_controller.unrender() if @_controller?
|
@_controller.unrender() if @_controller?
|
||||||
|
@_resetGlobals()
|
||||||
|
|
||||||
@_page = page
|
@_page = page
|
||||||
@_controller = controller
|
@_controller = controller
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.view__browse_page
|
.view__browse_page
|
||||||
.sidebar
|
.sidebar
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.mainBody
|
.mainBody
|
||||||
h2: p Active Mods
|
h2: p Active Mods
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.view__configure_page
|
.view__configure_page
|
||||||
.sidebar
|
.sidebar
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.mainBody
|
.mainBody
|
||||||
.view__mod_pack
|
.view__mod_pack
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.view__home_page
|
.view__home_page
|
||||||
.sidebar
|
.sidebar
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.titleImage <a href="/browse/minecraft/"><img src="/browse/minecraft/icon.png"></a>
|
.titleImage <a href="/browse/minecraft/"><img src="/browse/minecraft/icon.png"></a>
|
||||||
.titleImage <a href="/browse/buildcraft/"><img src="/browse/buildcraft/icon.png"></a>
|
.titleImage <a href="/browse/buildcraft/"><img src="/browse/buildcraft/icon.png"></a>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
.view__inventory_table
|
.view__inventory_table
|
||||||
table
|
table
|
||||||
tr.edit
|
tr.edit.hideable.hidden
|
||||||
td.quantity: input(name="quantity")
|
td.quantity: input(name="quantity")
|
||||||
td.icon: img(src="/images/unknown.png")
|
td.icon: img(src="/images/unknown.png")
|
||||||
td.name(width="*"): input(name="name")
|
td.name(width="*"): input(name="name")
|
||||||
td.action: button(name="add") add
|
td.action: button(name="add") add
|
||||||
.toolbar
|
.toolbar.hideable.hidden
|
||||||
button(name="clear") clear
|
button(name="clear") clear
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
button.large.craftingPlan See Crafting Plan
|
button.large.craftingPlan See Crafting Plan
|
||||||
|
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.mainBody
|
.mainBody
|
||||||
h1.name
|
h1.name
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
a.documentation.externalLink.hideable.hidden(target="new"): p Documentation
|
a.documentation.externalLink.hideable.hidden(target="new"): p Documentation
|
||||||
a.download.externalLink.hideable.hidden(target="new"): p Download
|
a.download.externalLink.hideable.hidden(target="new"): p Download
|
||||||
|
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.mainBody
|
.mainBody
|
||||||
h1.name
|
h1.name
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
.titleImage: a: img
|
.titleImage: a: img
|
||||||
a.officialPage.externalLink.hideable.hidden(target="new"): p Offical Documentation
|
a.officialPage.externalLink.hideable.hidden(target="new"): p Offical Documentation
|
||||||
|
|
||||||
.view__adsense
|
ins.view__adsense
|
||||||
|
|
||||||
.mainBody
|
.mainBody
|
||||||
h1.name
|
h1.name
|
||||||
|
|||||||
Reference in New Issue
Block a user