Browse Source

Merge branch '1254-faction-panel-changes' into 'master'

Resolve "Faction panel resets when viewed faction's reputation changes"

Closes #1254

See merge request Isleward/isleward!412
tags/v0.4^2
Big Bad Waffle 4 years ago
parent
commit
261c508f24
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/client/ui/templates/reputation/reputation.js

+ 5
- 3
src/client/ui/templates/reputation/reputation.js View File

@@ -25,7 +25,7 @@ define([

build: function () {
let list = this.list;
this.find('.info .heading-bottom').html('');
this.find('.info .description').html('');
this.find('.bar-outer').hide();
@@ -83,14 +83,16 @@ define([

onGetReputations: function (list) {
this.list = list;

this.list.sort(function (a, b) {
if (a.name[0] < b.name[0])
return -1;
return 1;
});

if (this.el.is(':visible'))
this.build();
let selElement = this.find('.selected');
if (this.el.is(':visible') && selElement.index() !== -1)
this.onSelectFaction(selElement, list[selElement.index() + 1]);
},

toggle: function () {


Loading…
Cancel
Save