namespacing for tasks & rewards too

This commit is contained in:
Tyler Renelle 2013-03-05 15:52:47 -05:00
parent 8132dbfe05
commit bb82bcc62a
4 changed files with 41 additions and 41 deletions

View file

@ -1,9 +1,9 @@
<import: src="modals"> <import: src="modals">
<import: src="tasks" ns=""> <import: src="tasks">
<import: src="header"> <import: src="header">
<import: src="alerts"> <import: src="alerts">
<import: src="avatar"> <import: src="avatar">
<import: src="rewards" ns=""> <import: src="rewards">
<import: src="footer"> <import: src="footer">
<import: src="settings"> <import: src="settings">
<import: src="party"> <import: src="party">
@ -31,7 +31,7 @@
<div id=wrap class="container-fluid"> <div id=wrap class="container-fluid">
<app:alerts:alerts /> <app:alerts:alerts />
<div id=main class="row-fluid"> <div id=main class="row-fluid">
<app:taskLists /> <app:tasks:taskLists />
</div> </div>
</div> </div>

View file

@ -17,7 +17,7 @@
<!-- Re-Roll modal --> <!-- Re-Roll modal -->
<app:modals:modal modalId='reroll-modal' header="Reset Your Tasks"> <app:modals:modal modalId='reroll-modal' header="Reset Your Tasks">
<app:userTokens/> <app:rewards:userTokens/>
<p>Highly discouraged because red tasks provide good incentive to improve (<a target="_blank" href="https://github.com/lefnire/habitrpg#all-my-tasks-are-red-im-dying-too-fast">read more</a>). However, this becomes necessary after long bouts of bad habits.</p> <p>Highly discouraged because red tasks provide good incentive to improve (<a target="_blank" href="https://github.com/lefnire/habitrpg#all-my-tasks-are-red-im-dying-too-fast">read more</a>). However, this becomes necessary after long bouts of bad habits.</p>
<@footer> <@footer>
{#if lt(_user.balance,1)} {#if lt(_user.balance,1)}
@ -30,7 +30,7 @@
<!-- Buy more tokens modal --> <!-- Buy more tokens modal -->
<app:modals:modal modalId='more-tokens-modal' header="Out Of Tokens"> <app:modals:modal modalId='more-tokens-modal' header="Out Of Tokens">
<app:userTokens/> <app:rewards:userTokens/>
<p>You're out of tokens, which are used to buy pets and mounts.</p> <p>You're out of tokens, which are used to buy pets and mounts.</p>
<@footer> <@footer>
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Tokens</a><span class='token-cost'>Not enough tokens</span> <a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">Buy More Tokens</a><span class='token-cost'>Not enough tokens</span>

View file

@ -1,17 +1,17 @@
<rewardsTab:> <rewardsTab:>
<ul class='rewards'> <ul class='rewards'>
{#each _rewardList as :task}<app:task />{/} {#each _rewardList as :task}<app:tasks:task />{/}
</ul> </ul>
{#if _user.flags.itemsEnabled} {#if _user.flags.itemsEnabled}
<ul class='items'> <ul class='items'>
{#with _view.items.weapon as :item}<app:item />{/} {#with _view.items.weapon as :item}<app:rewards:item />{/}
{#with _view.items.armor as :item}<app:item />{/} {#with _view.items.armor as :item}<app:rewards:item />{/}
{#with _view.items.head as :item}<app:item />{/} {#with _view.items.head as :item}<app:rewards:item />{/}
{#with _view.items.shield as :item}<app:item />{/} {#with _view.items.shield as :item}<app:rewards:item />{/}
{#with _view.items.potion as :item}<app:item />{/} {#with _view.items.potion as :item}<app:rewards:item />{/}
{#with _view.items.reroll as :item}<app:item reroll=true />{/} {#with _view.items.reroll as :item}<app:rewards:item reroll=true />{/}
</ul> </ul>
{/} {/}

View file

@ -2,23 +2,23 @@
<!--helpTitle & helpContent moved to tour --> <!--helpTitle & helpContent moved to tour -->
<div class="task-column span3 habits"> <div class="task-column span3 habits">
<h2>Habits</h2> <h2>Habits</h2>
<app:newTask type="habit" inputValue="{_newHabit}" placeHolder="New Habit" /> <app:tasks:newTask type="habit" inputValue="{_newHabit}" placeHolder="New Habit" />
<ul class="habits">{#each _habitList as :task}<app:task />{/}</ul> <ul class="habits">{#each _habitList as :task}<app:tasks:task />{/}</ul>
</div> </div>
<div class="task-column span3 dailys"> <div class="task-column span3 dailys">
<h2>Daily</h2> <h2>Daily</h2>
<app:newTask type="daily" inputValue="{_newDaily}" placeHolder="New Daily" /> <app:tasks:newTask type="daily" inputValue="{_newDaily}" placeHolder="New Daily" />
<ul class='dailys'>{#each _dailyList as :task}<app:task />{/}</ul> <ul class='dailys'>{#each _dailyList as :task}<app:tasks:task />{/}</ul>
</div> </div>
<div class="task-column span3 todos context-enabled context-uncompleted tabbable tabs-below" id="todo-well"> <div class="task-column span3 todos context-enabled context-uncompleted tabbable tabs-below" id="todo-well">
<h2>Todos</h2> <h2>Todos</h2>
<div class="display-context-dependant show-for-uncompleted"> <div class="display-context-dependant show-for-uncompleted">
<app:newTask type="todo" inputValue="{_newTodo}" placeHolder="New Todo" /> <app:tasks:newTask type="todo" inputValue="{_newTodo}" placeHolder="New Todo" />
</div> </div>
<ul class='todos task-list'> <ul class='todos task-list'>
{#each _todoList as :task}<app:task />{/} {#each _todoList as :task}<app:tasks:task />{/}
</ul> </ul>
<div class="display-context-dependant show-for-completed"> <div class="display-context-dependant show-for-completed">
<a class='btn' x-bind=click:clearCompleted>Clear Completed</a> <a class='btn' x-bind=click:clearCompleted>Clear Completed</a>
@ -55,53 +55,53 @@
<td><div class='shop_copper' rel='tooltip' title='shop_copper'></div></td>--> <td><div class='shop_copper' rel='tooltip' title='shop_copper'></div></td>-->
</tr></table> </tr></table>
{else} {else}
<app:userTokens /> <app:rewards:userTokens />
{/} {/}
</div> </div>
</div> </div>
<app:newTask type="reward" inputValue="{_newReward}" placeHolder="New Reward" /> <app:tasks:newTask type="reward" inputValue="{_newReward}" placeHolder="New Reward" />
{#if _user.flags.petsEnabled} {#if _user.flags.petsEnabled}
<div class='tabbable tabs-below'> <div class='tabbable tabs-below'>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane active" id="rewards-tab"> <div class="tab-pane active" id="rewards-tab">
<app:rewardsTab /> <app:rewards:rewardsTab />
</div> </div>
<div class="tab-pane" id="pets-tab"> <div class="tab-pane" id="pets-tab">
{#with _view.items.pets as :pets} {#with _view.items.pets as :pets}
<div class="row-fluid"> <div class="row-fluid">
{#with :pets[0]}<app:pet />{/} {#with :pets[0]}<app:rewards:pet />{/}
{#with :pets[1]}<app:pet />{/} {#with :pets[1]}<app:rewards:pet />{/}
{#with :pets[2]}<app:pet />{/} {#with :pets[2]}<app:rewards:pet />{/}
{#with :pets[3]}<app:pet />{/} {#with :pets[3]}<app:rewards:pet />{/}
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
{#with :pets[4]}<app:pet />{/} {#with :pets[4]}<app:rewards:pet />{/}
{#with :pets[5]}<app:pet />{/} {#with :pets[5]}<app:rewards:pet />{/}
{#with :pets[6]}<app:pet />{/} {#with :pets[6]}<app:rewards:pet />{/}
{#with :pets[7]}<app:pet />{/} {#with :pets[7]}<app:rewards:pet />{/}
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
{#with :pets[8]}<app:pet />{/} {#with :pets[8]}<app:rewards:pet />{/}
{#with :pets[9]}<app:pet />{/} {#with :pets[9]}<app:rewards:pet />{/}
{#with :pets[10]}<app:pet />{/} {#with :pets[10]}<app:rewards:pet />{/}
{#with :pets[11]}<app:pet />{/} {#with :pets[11]}<app:rewards:pet />{/}
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
{#with :pets[12]}<app:pet />{/} {#with :pets[12]}<app:rewards:pet />{/}
{#with :pets[13]}<app:pet />{/} {#with :pets[13]}<app:rewards:pet />{/}
{#with :pets[14]}<app:pet />{/} {#with :pets[14]}<app:rewards:pet />{/}
{#with :pets[15]}<app:pet />{/} {#with :pets[15]}<app:rewards:pet />{/}
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
{#with :pets[16]}<app:pet />{/} {#with :pets[16]}<app:rewards:pet />{/}
</div> </div>
@ -113,12 +113,12 @@
<ul class="nav nav-tabs" id="rewardsTabs"> <ul class="nav nav-tabs" id="rewardsTabs">
<li class="active"><a href="#rewards-tab" data-toggle="tab" x-bind="click:activateRewardsTab">Rewards</a></li> <li class="active"><a href="#rewards-tab" data-toggle="tab" x-bind="click:activateRewardsTab">Rewards</a></li>
<li><a href="#pets-tab" id='pets-tab' data-toggle="tab" x-bind='click:activatePetsTab'>Pets</a></li> <li><a href="#pets-tab" data-toggle="tab" x-bind='click:activatePetsTab'>Pets</a></li>
<!--<li><a href="#mounts-tab" data-toggle="tab">Mounts</a></li>--> <!--<li><a href="#mounts-tab" data-toggle="tab">Mounts</a></li>-->
</ul> </ul>
</div> </div>
{else} {else}
<app:rewardsTab /> <app:rewards:rewardsTab />
{/} {/}
</div> </div>
@ -167,7 +167,7 @@
<div class="task-text">{:task.text}</div> <div class="task-text">{:task.text}</div>
<!-- edit/options dialog --> <!-- edit/options dialog -->
<app:taskMeta /> <app:tasks:taskMeta />
</li> </li>
<taskMeta:> <taskMeta:>