diff --git a/dailybread.html b/dailybread.html
index 7b3d193..347f5a6 100644
--- a/dailybread.html
+++ b/dailybread.html
@@ -5,6 +5,7 @@
+
중앙 정부에서 사용한 소득세 내역과 지방 정부에서 사용한 지방소득세 내역을 선택하세요.
@@ -82,6 +83,7 @@ 지방소득세(종합소득세액/10)
+
@@ -124,8 +126,7 @@ 지방소득세(종합소득세액/10)
yepnope({
load: [
'/js/lib/base64.js',
- '/js/lib/raphael-min.js',
- '/js/lib/underscore.js'
+ '/js/lib/raphael-min.js'
],
complete: function () { jQuery(function ($) { db_init() } );}
});
diff --git a/img/btn-central-active.png b/img/btn-central-active.png
index 71688a6..28192e4 100644
Binary files a/img/btn-central-active.png and b/img/btn-central-active.png differ
diff --git a/img/btn-central.png b/img/btn-central.png
index 84d75a5..28e5c91 100644
Binary files a/img/btn-central.png and b/img/btn-central.png differ
diff --git a/img/btn-local-active.png b/img/btn-local-active.png
index e890a80..aa7b411 100644
Binary files a/img/btn-local-active.png and b/img/btn-local-active.png differ
diff --git a/img/btn-local.png b/img/btn-local.png
index 7e195f0..e9d46b0 100644
Binary files a/img/btn-local.png and b/img/btn-local.png differ
diff --git a/img/functions/100/102.svg b/img/functions/100/102.svg
index 7049836..d53ea9f 100644
--- a/img/functions/100/102.svg
+++ b/img/functions/100/102.svg
@@ -2,11 +2,11 @@
diff --git a/img/functions/central/broadcasting.svg b/img/functions/central/broadcasting.svg
deleted file mode 100644
index dc424d6..0000000
--- a/img/functions/central/broadcasting.svg
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/conscription_administration.svg b/img/functions/central/conscription_administration.svg
deleted file mode 100644
index 2f500ea..0000000
--- a/img/functions/central/conscription_administration.svg
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/correspondence.svg b/img/functions/central/correspondence.svg
deleted file mode 100644
index d5969c6..0000000
--- a/img/functions/central/correspondence.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/court.svg b/img/functions/central/court.svg
deleted file mode 100644
index add8cf6..0000000
--- a/img/functions/central/court.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/diplomacy.svg b/img/functions/central/diplomacy.svg
deleted file mode 100644
index e28998e..0000000
--- a/img/functions/central/diplomacy.svg
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/diplomacy_and_reunification.svg b/img/functions/central/diplomacy_and_reunification.svg
deleted file mode 100644
index 3ff4d81..0000000
--- a/img/functions/central/diplomacy_and_reunification.svg
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/food_industry.svg b/img/functions/central/food_industry.svg
deleted file mode 100644
index 4618d72..0000000
--- a/img/functions/central/food_industry.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/governance.svg b/img/functions/central/governance.svg
deleted file mode 100644
index 137ad18..0000000
--- a/img/functions/central/governance.svg
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/government_recource.svg b/img/functions/central/government_recource.svg
deleted file mode 100644
index a9a34eb..0000000
--- a/img/functions/central/government_recource.svg
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/health_insurance.svg b/img/functions/central/health_insurance.svg
deleted file mode 100644
index bb65e5c..0000000
--- a/img/functions/central/health_insurance.svg
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/improve_defense_capacity.svg b/img/functions/central/improve_defense_capacity.svg
deleted file mode 100644
index 04eabd2..0000000
--- a/img/functions/central/improve_defense_capacity.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/judicial_affairs.svg b/img/functions/central/judicial_affairs.svg
deleted file mode 100644
index c6e7c9e..0000000
--- a/img/functions/central/judicial_affairs.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/maintenance_war_potential.svg b/img/functions/central/maintenance_war_potential.svg
deleted file mode 100644
index 439a4db..0000000
--- a/img/functions/central/maintenance_war_potential.svg
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/marine.svg b/img/functions/central/marine.svg
deleted file mode 100644
index c35a95b..0000000
--- a/img/functions/central/marine.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/military_strength_operation.svg b/img/functions/central/military_strength_operation.svg
deleted file mode 100644
index 784e1c1..0000000
--- a/img/functions/central/military_strength_operation.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/national_defense.svg b/img/functions/central/national_defense.svg
deleted file mode 100644
index d0124fc..0000000
--- a/img/functions/central/national_defense.svg
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/post.svg b/img/functions/central/post.svg
deleted file mode 100644
index e45fef8..0000000
--- a/img/functions/central/post.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/public_annuity.svg b/img/functions/central/public_annuity.svg
deleted file mode 100644
index c3443c7..0000000
--- a/img/functions/central/public_annuity.svg
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
diff --git a/img/functions/central/tec_development.svg b/img/functions/central/tec_development.svg
deleted file mode 100644
index 5a98493..0000000
--- a/img/functions/central/tec_development.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
diff --git a/js/dailybread/dailybread.js b/js/dailybread/dailybread.js
index 59b9df9..c49442c 100644
--- a/js/dailybread/dailybread.js
+++ b/js/dailybread/dailybread.js
@@ -1,6 +1,6 @@
OpenSpending = "OpenSpending" in window ? OpenSpending : {};
-(function ($) {
+(function ($, _) {
TAXMAN_URL = 'http://taxman.codenamu.org';
@@ -102,17 +102,17 @@ OpenSpending.DailyBread = function (elem, opts) {
handleChildren = function(node, absolute) {
return _.map(
_.filter(node.children, function(child) {
- // console.log("data: ");
- // console.log(data);
- // console.log("child: " );
- // console.log(child);
- // console.log("skip: " );
- // console.log(skip);
return _.indexOf(skip, child.name);
}),
function(child) {
var daily = (child.amount / node.amount);
if (absolute) daily = daily / 365.0;
+
+ // Labeling(Remove the Id of child)
+ if (child.label.slice(0, 1) == 0 || child.label.slice(0, 1) == 1) {
+ child.label = child.label.slice(5);
+ }
+
return [child.name, child.label, daily, handleChildren(child, false)];
});
}
@@ -136,7 +136,11 @@ OpenSpending.DailyBread = function (elem, opts) {
rq.then(function (data) {
// 종합소득세/10 = 지방소비세
- self.taxVal = parseInt(data.calculation.total/10);
+ if (String(self.opts.region) == String('local')) {
+ self.taxVal = parseInt(data.calculation.total/10);
+ } else {
+ self.taxVal = parseInt(data.calculation.total);
+ }
})
return rq;
@@ -223,7 +227,12 @@ OpenSpending.DailyBread = function (elem, opts) {
return null
}
}
- console.log(data);
+
+ // sort by the amount
+ data = data.sort(function (a, b) {
+ return b[2] - a[2];
+ });
+
return [tax, data]
}
@@ -257,4 +266,4 @@ OpenSpending.DailyBread = function (elem, opts) {
return this
}
-})(jQuery)
+})(jQuery, _)