diff options
author | Jochen Topf <jochen@topf.org> | 2010-10-24 12:14:51 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2010-10-24 12:14:51 +0200 |
commit | 19340b4165b9db3b91e0fbc9d1e6850c447042f8 (patch) | |
tree | f93845e0a6dee8854fd3ccdf9c139661ec93917f /web/public | |
parent | 5bf9f8996e5157f9b431bb44a2d04a2695eb143d (diff) | |
download | taginfo-19340b4165b9db3b91e0fbc9d1e6850c447042f8.tar taginfo-19340b4165b9db3b91e0fbc9d1e6850c447042f8.tar.gz |
cleanup and moved debug stuff to test dir
Diffstat (limited to 'web/public')
-rw-r--r-- | web/public/css/taginfo.css | 6 | ||||
-rw-r--r-- | web/public/js/taginfo.js | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/web/public/css/taginfo.css b/web/public/css/taginfo.css index 3db47b1..b28f132 100644 --- a/web/public/css/taginfo.css +++ b/web/public/css/taginfo.css @@ -336,3 +336,9 @@ div#canvas-values { background-color: #ffffff; } +div#canvas-keypairs { +// position: absolute; + border: 1px solid #cccccc; + background-color: #ffffff; +} + diff --git a/web/public/js/taginfo.js b/web/public/js/taginfo.js index b792bcd..15d10af 100644 --- a/web/public/js/taginfo.js +++ b/web/public/js/taginfo.js @@ -32,7 +32,7 @@ function print_tag_list(key, list) { } function print_value_with_percent(value, fraction) { - var v1 = value.print_with_ts(), + var v1 = print_with_ts(value), v2 = fraction.print_as_percent(); return '<div class="value">' + v1 + '</div><div class="fraction">' + v2 + '</div><div class="bar" style="width: ' + (fraction*100).toFixed() + 'px;"></div>'; } @@ -49,9 +49,13 @@ function print_image(type) { } // print a number with thousand separator -Number.prototype.print_with_ts = function() { - return this.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1 '); -}; +function print_with_ts(value) { + if (value === null) { + return '-'; + } else { + return value.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1 '); + } +} // print a number as percent value with two digits after the decimal point Number.prototype.print_as_percent = function() { |