summaryrefslogtreecommitdiffstats
path: root/web/static
diff options
context:
space:
mode:
authorraylu <raylu@gridium.com>2013-10-22 23:56:11 -0700
committerraylu <raylu@gridium.com>2013-10-22 23:56:11 -0700
commit719c83e23485ef7caefbc574c23ba91a2e661ce8 (patch)
tree89c989d7968ff279c7e9936878029a5735dabf5b /web/static
parent29d0528ec6ff9cf61af3bab2feb71dcb3625240a (diff)
downloadykill-719c83e23485ef7caefbc574c23ba91a2e661ce8.tar.xz
whelp.gg, footer, firefox format_isk fix
Diffstat (limited to 'web/static')
-rw-r--r--web/static/css/base.ccss5
-rw-r--r--web/static/css/home.ccss4
-rw-r--r--web/static/js/common.js46
3 files changed, 37 insertions, 18 deletions
diff --git a/web/static/css/base.ccss b/web/static/css/base.ccss
index a7e130b..3097284 100644
--- a/web/static/css/base.ccss
+++ b/web/static/css/base.ccss
@@ -64,3 +64,8 @@ table:
width: 900px
margin: 0 auto 50px
background: #111
+
+footer:
+ width: 900px
+ margin: 50px auto
+ text-align: center
diff --git a/web/static/css/home.ccss b/web/static/css/home.ccss
index ecb8d24..b4e327d 100644
--- a/web/static/css/home.ccss
+++ b/web/static/css/home.ccss
@@ -4,5 +4,9 @@
#expensive:
margin: 0 auto
+ td:nth-child(3):
+ text-align: right
+ padding-right: 3px
+
caption, tr:nth-child(odd):
background-color: #181818
diff --git a/web/static/js/common.js b/web/static/js/common.js
index e7a4e75..6ea91e3 100644
--- a/web/static/js/common.js
+++ b/web/static/js/common.js
@@ -1,20 +1,30 @@
-Object.append(window.ykill, {
- 'api': function(path, cb) {
- new Request.JSON({
- 'url': ykill.api_host + path,
- 'onSuccess': cb,
- }).get();
- },
+(function() {
+ var locale_options = false;
+ try {
+ (0).toLocaleString('i');
+ } catch (e) { // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString#Example:_Checking_for_support_for_locales_and_options_arguments
+ locale_options = e.name == 'RangeError';
+ }
+ Object.append(window.ykill, {
+ 'api': function(path, cb) {
+ new Request.JSON({
+ 'url': ykill.api_host + path,
+ 'onSuccess': cb,
+ }).get();
+ },
- 'portrait': function(id, text, img_dir, img_suffix) {
- var img = new Element('img', {
- 'src': '//image.eveonline.com/' + img_dir + '/' + id + img_suffix,
- 'alt': text,
- });
- return img;
- },
+ 'portrait': function(id, text, img_dir, img_suffix) {
+ var img = new Element('img', {
+ 'src': '//image.eveonline.com/' + img_dir + '/' + id + img_suffix,
+ 'alt': text,
+ });
+ return img;
+ },
- 'format_isk': function(isk) {
- return isk.toLocaleString('en-US', {'minimumFractionDigits': 2, 'maximumFractionDigits': 2});
- },
-});
+ 'format_isk': function(isk) {
+ if (!locale_options)
+ return parseFloat(isk.toFixed(2)).toLocaleString();
+ return isk.toLocaleString('en-US', {'minimumFractionDigits': 2, 'maximumFractionDigits': 2});
+ },
+ });
+})();