Start editing after login needed for editing

When a user isn't logged in, click the "Edit" button on an item
description will initiate the login process.  After it is complete,
the user is placed back on the page where they started.  However,
the edit box remains closed.  So, after all the activity which
resulted in trying to edit, they user still has to click the edit
button one more time to actually start editing.

This change makes it so that the user returning from the login
process is placed directly into edit mode without having to click the
button a second time.

fixes #237
This commit is contained in:
Andrew Miner
2016-05-07 08:12:39 -07:00
parent 6fa18c764b
commit 5eae2bb488
4 changed files with 21 additions and 12 deletions
@@ -41,6 +41,7 @@ module.exports = class ItemPageController extends PageController
@_itemSlug = options.itemSlug
@_modPack = options.modPack
@_router = options.router
@_triggerEditing = options.login
@_modPack.on c.event.change, =>
@tryRefresh()
@@ -138,6 +139,10 @@ module.exports = class ItemPageController extends PageController
else
@hide @$craftingPlanButton
if @_triggerEditing
@_triggerEditing = false
@_descriptionController.onEditClicked {}
@show()
else
@hide()