diff --git a/.gitignore b/.gitignore index a0990bd..58560ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /kdmvenv +*.pyc +/.idea diff --git a/static/javascript/kdm.js b/static/javascript/kdm.js index 6503f7b..8363347 100644 --- a/static/javascript/kdm.js +++ b/static/javascript/kdm.js @@ -53,6 +53,24 @@ $rootScope.deletetab = function(tabid) { deleteTab($rootScope, tabid); } + + $rootScope.inc = function(item, name="value") { + if(item[name] === undefined) { + item[name] = 0 + }else if(typeof item[name] === "string") { + item[name] = Number(item[name]) + } + item[name] += 1; + } + + $rootScope.dec = function(item, name="value") { + if(item[name] === undefined) { + item[name] = 0 + }else if(typeof item[name] === "string") { + item[name] = Number(item[name]) + } + item[name] -= 1; + } $rootScope.tabs = []; diff --git a/static/templates/char/armour.html b/static/templates/char/armour.html index c7b81cd..0f54389 100644 --- a/static/templates/char/armour.html +++ b/static/templates/char/armour.html @@ -1,13 +1,15 @@
-
+
+ +
-
+
diff --git a/static/templates/char/attributes.html b/static/templates/char/attributes.html index 3f8b35f..66391d7 100644 --- a/static/templates/char/attributes.html +++ b/static/templates/char/attributes.html @@ -2,7 +2,9 @@
+ +
diff --git a/static/templates/char/brain.html b/static/templates/char/brain.html index 2d03488..2c43660 100644 --- a/static/templates/char/brain.html +++ b/static/templates/char/brain.html @@ -1,9 +1,11 @@
-
+

+ +
@@ -13,7 +15,7 @@
-
+
Brain diff --git a/static/templates/char/survival.html b/static/templates/char/survival.html index 08f9e8c..291d9e0 100644 --- a/static/templates/char/survival.html +++ b/static/templates/char/survival.html @@ -1,10 +1,12 @@
-
+

+ +
-
+
Survival @@ -21,7 +23,7 @@
-
+
diff --git a/static/templates/settlement/name.html b/static/templates/settlement/name.html index cefb4a1..01adc19 100644 --- a/static/templates/settlement/name.html +++ b/static/templates/settlement/name.html @@ -1,6 +1,8 @@
+ Survival Limit +
diff --git a/static/templates/settlement/population.html b/static/templates/settlement/population.html index 52b25f5..0f81a16 100644 --- a/static/templates/settlement/population.html +++ b/static/templates/settlement/population.html @@ -1,6 +1,8 @@
-
+
+ +