HabitRPG/habitrpg — pull request #3319 by chrisdotcode (2014-04-20 23:12:40+00:00)
Title: Partial implementation of single challenge view.

So currently, when you click on a specific challenge from a guild/party, it takes you the the top of the list of challenges, as opposed to *just* the particular challenge you wanted. Hence, to find the challenge that you actually want, you have to scroll down to wherever it is. That's a pain.

----------
This pull request solves that by changing the behavior of `/#/options/challenges/:cid` (which I will hereafter call `singleChallPage` for brevity) by only display the selected challenge:

![snapshot5](https://cloud.githubusercontent.com/assets/1936426/2751572/45361204-c8d9-11e3-8934-477a06c6949f.png)

However, there are some breaking changes/unresolved issues that arise because of this, and I'm not sure why some of them happen:

- Can't save changes
- Can't delete challenges
- Can't join challenges
- Newly implemented "Back to Challenges" button doesn't work, neither does clicking on the 'Challenges' button (on the `singleChallPage`). These buttons do the same thing, but I thought it would be clearer with this bit of redundancy. It can always be removed if needed.

I'm not familiar with 100% of the codebase,, so if someone could give me some pointers, that would be cool :sunglasses:

----------
Also, as a side-effect, I'm certain this PR will reduce server load a *lot*, because now the entire challenge collection doesn't need to be pulled when requesting only a single challenge.