Skip to content

Commit

Permalink
link pamatches for the units
Browse files Browse the repository at this point in the history
  • Loading branch information
ColaColin committed Dec 23, 2013
1 parent f88a82d commit edf40df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/webapp/static/js/armycomposition.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ $(document).ready(function() {

var start = /[^\/]*$/; // ^ : start , \/ : '/', $ : end // as wildcard: /*.json
var end = /[.]json$/;
function ArmyUnit(spc, cnt) {
var self = this;

self.spec = ko.observable(spc);
self.name = ko.computed(function() {return self.spec().substring(self.spec().search(start), self.spec().search(end))});
self.icon = ko.computed(function() {return imageBaseUrl +"units/"+ self.name() +".png"});
self.linkToPaDb = ko.computed(function() {return "http://pa-db.com/unit/"+self.name()});
self.linkToPaDb = ko.computed(function() {
var link = /([^\/]+?\/[^\/]+?\/)(?=[^\/]*\.json)/.exec(self.spec());
return "http://pamatches.com/units/"+link[0];
});
self.count = ko.observable(cnt);
self.visible = ko.computed(function() {return self.count() > 0;});
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ <h1>Changelog</h1>
<div>Here I will present you with the most recent updates to PA Stats :)</div>
<div>Note that you can find the latest issues on Github: <a href="https://github.com/pamods/PA-Stats-Server/issues?labels=&milestone=&page=1&state=open">LINK</a></div>
<br/>
<h4>v14.1.1</h4>
<ul>
<li>The units in the Army composition display now link to the PA Matches <a href="Wiki"></a>.</li>
</ul>
<h4>v14.1.0</h4>
<ul>
<li>Fixed APM Charts</li>
Expand Down

0 comments on commit edf40df

Please sign in to comment.