From dc8647d6ae49b2eb977088070cec165b3e7f57cb Mon Sep 17 00:00:00 2001 From: hairlessbear Date: Wed, 27 May 2015 18:49:35 -0400 Subject: [PATCH] Changed all party.quest.key instances in quest invite modal to user.party.quest.key and changed invite modal check --- .../public/js/controllers/notificationCtrl.js | 3 +-- website/views/shared/modals/quests.jade | 20 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/website/public/js/controllers/notificationCtrl.js b/website/public/js/controllers/notificationCtrl.js index 053b781dac..f53a409e78 100644 --- a/website/public/js/controllers/notificationCtrl.js +++ b/website/public/js/controllers/notificationCtrl.js @@ -148,9 +148,8 @@ habitrpg.controller('NotificationCtrl', }); // Quest invitation modal - $rootScope.$watch('user.party.quest.RSVPNeeded == true', function(after, before){ + $rootScope.$watch('user.party.quest.RSVPNeeded', function(after, before){ if (after != true) return; - $rootScope.party.$get(); $rootScope.openModal('questInvitation'); }); diff --git a/website/views/shared/modals/quests.jade b/website/views/shared/modals/quests.jade index e36f5323d0..0a6692525f 100644 --- a/website/views/shared/modals/quests.jade +++ b/website/views/shared/modals/quests.jade @@ -67,23 +67,23 @@ script(type='text/ng-template', id='modals/buyQuest.html') script(type='text/ng-template', id='modals/questInvitation.html') .modal-header h4=env.t('questInvitation') - | {{::Content.quests[party.quest.key].text()}} + | {{::Content.quests[user.party.quest.key].text()}} .modal-body .pull-right-sm.text-center - .col-centered(class='quest_{{::Content.quests[party.quest.key].key}}') - div(ng-if='::Content.quests[party.quest.key].boss') - h4 {{::Content.quests[party.quest.key].boss.name()}} + .col-centered(class='quest_{{::Content.quests[user.party.quest.key].key}}') + div(ng-if='::Content.quests[user.party.quest.key].boss') + h4 {{::Content.quests[user.party.quest.key].boss.name()}} p strong=env.t('bossHP') + ': ' - | {{::Content.quests[party.quest.key].boss.hp}} + | {{::Content.quests[user.party.quest.key].boss.hp}} p strong=env.t('bossStrength') + ': ' - | {{::Content.quests[party.quest.key].boss.str}} - div(ng-if='::Content.quests[party.quest.key].collect') - p(ng-repeat='(k,v) in ::Content.quests[party.quest.key].collect') + | {{::Content.quests[user.party.quest.key].boss.str}} + div(ng-if='::Content.quests[user.party.quest.key].collect') + p(ng-repeat='(k,v) in ::Content.quests[user.party.quest.key].collect') strong=env.t('collect') + ': ' - | {{::Content.quests[party.quest.key].collect[k].count}} {{::Content.quests[party.quest.key].collect[k].text()}} - div(ng-bind-html='::Content.quests[party.quest.key].notes()') + | {{::Content.quests[user.party.quest.key].collect[k].count}} {{::Content.quests[user.party.quest.key].collect[k].text()}} + div(ng-bind-html='::Content.quests[user.party.quest.key].notes()') quest-rewards(key='{{::user.party.quest.key}}', header=env.t('rewards')) .modal-footer button.btn.btn-default(ng-click='questHold = true; $close()')=env.t('askLater')