[missions] allow to load missions from portals other than the selected one (doesn't need to be loaded)
This commit is contained in:
parent
5746989095
commit
96a8a94d48
@ -117,22 +117,17 @@ window.plugin.missions = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
openPortalMissions: function() {
|
openPortalMissions: function() {
|
||||||
var me = this,
|
|
||||||
portal = window.portals[window.selectedPortal];
|
|
||||||
if (!portal) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.loadPortalMissions(window.selectedPortal, function(missions) {
|
this.loadPortalMissions(window.selectedPortal, function(missions) {
|
||||||
if (!missions.length) {
|
if (!missions.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (missions.length === 1) {
|
if (missions.length === 1) {
|
||||||
me.loadMission(missions[0].guid, me.showMissionDialog.bind(me));
|
this.loadMission(missions[0].guid, this.showMissionDialog.bind(this));
|
||||||
} else {
|
} else {
|
||||||
me.showMissionListDialog(missions);
|
this.showMissionListDialog(missions);
|
||||||
}
|
}
|
||||||
});
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
openMission: function(guid) {
|
openMission: function(guid) {
|
||||||
@ -274,7 +269,7 @@ window.plugin.missions = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
window.postAjax('getTopMissionsForPortal', {
|
window.postAjax('getTopMissionsForPortal', {
|
||||||
guid: window.selectedPortal
|
guid: guid,
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
var missions = data.result.map(decodeMissionSummary);
|
var missions = data.result.map(decodeMissionSummary);
|
||||||
if (!missions) {
|
if (!missions) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user