google-code-export / game-golem

Automatically exported from code.google.com/p/game-golem
0 stars 0 forks source link

Typo introduced in 1179 generals #363

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Causes priority arrows to not show up correctly on generals dashboard. Extra 
quotes and + sign:

Was:
// priority/charge
        vv = '';
        if (isNumber(v = p.priority)) {
            if (v !== 1) {
                vv += '<a class="golem-moveup" name="'+v+'">&uarr;</a> ';
            }
            vv += v;
            if (v !== this.runtime.max_priority) {
                vv += + ' <a class="golem-movedown" name="'+v+'">&darr;</a>';
            }
        } else if (isNumber(v = p.charge)) {
            if (v > now) {
                vv = makeTime(v, 'g:i a');
            } else {
                vv = 'Now';
            }
        }
        td(output, vv);

Fixed:

        // priority/charge
        vv = '';
        if (isNumber(v = p.priority)) {
            if (v !== 1) {
                vv += '<a class="golem-moveup" name='+v+'>&uarr;</a> ';
            }
            vv += v;
            if (v !== this.runtime.max_priority) {
                vv += ' <a class="golem-movedown" name='+v+'>&darr;</a>';
            }
        } else if (isNumber(v = p.charge)) {
            if (v > now) {
                vv = makeTime(v, 'g:i a');
            } else {
                vv = 'Now';
            }
        }
        td(output, vv);

Original issue reported on code.google.com by ke...@sillygreenmonkey.com on 10 Mar 2012 at 11:44

GoogleCodeExporter commented 9 years ago
Thanks, I fixed that plus sign in r1183, so it should be good now. Current is 
r1194 as of this post.

Original comment by lur...@hotmail.com on 16 Mar 2012 at 4:55