OLD | NEW |
1 #import('dart:html'); | 1 #import('dart:html'); |
2 #source('realviews.dart'); | 2 #source('realviews.dart'); |
3 | 3 |
4 class Division { | 4 class Division { |
5 String name; | 5 String name; |
6 int id; | 6 int id; |
7 List<Product> products; | 7 List<Product> products; |
8 | 8 |
9 Division(this.name, this.id, this.products); | 9 Division(this.name, this.id, this.products); |
10 } | 10 } |
(...skipping 11 matching lines...) Expand all Loading... |
22 int yearly; | 22 int yearly; |
23 String country; | 23 String country; |
24 | 24 |
25 YTD_Sales(this.yearly, this.country); | 25 YTD_Sales(this.yearly, this.country); |
26 } | 26 } |
27 | 27 |
28 // TODO(terry): Remove use for debug only. | 28 // TODO(terry): Remove use for debug only. |
29 void debug() { | 29 void debug() { |
30 try { | 30 try { |
31 throw "DEBUG"; | 31 throw "DEBUG"; |
32 } catch (var e) { | 32 } catch (e) { |
33 print("DEBUGBREAK"); | 33 print("DEBUGBREAK"); |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 void main() { | 37 void main() { |
38 List<Division> divisions = []; | 38 List<Division> divisions = []; |
39 List<Product> products; | 39 List<Product> products; |
40 List<YTD_Sales> sales; | 40 List<YTD_Sales> sales; |
41 | 41 |
42 products = []; | 42 products = []; |
43 sales = []; | 43 sales = []; |
44 sales.add(new YTD_Sales(52000000, "USA")); | 44 sales.add(new YTD_Sales(52000000, "USA")); |
45 sales.add(new YTD_Sales(550000, "China")); | 45 sales.add(new YTD_Sales(550000, "China")); |
46 sales.add(new YTD_Sales(56000000, "EU")); | 46 sales.add(new YTD_Sales(56000000, "EU")); |
47 sales.add(new YTD_Sales(510000, "Canada")); | 47 sales.add(new YTD_Sales(510000, "Canada")); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 expandCollapseElem.innerHTML = showSales ? "▶": "▼"; | 99 expandCollapseElem.innerHTML = showSales ? "▶": "▼"; |
100 expandCollapseElem.classes.remove(showSales ? DivisionSales.expand : Divis
ionSales.collapse); | 100 expandCollapseElem.classes.remove(showSales ? DivisionSales.expand : Divis
ionSales.collapse); |
101 expandCollapseElem.classes.add(showSales ? DivisionSales.collapse : Divisi
onSales.expand); | 101 expandCollapseElem.classes.add(showSales ? DivisionSales.collapse : Divisi
onSales.expand); |
102 | 102 |
103 salesDiv.classes.clear(); | 103 salesDiv.classes.clear(); |
104 salesDiv.classes.add(showSales ? DivisionSales.hideSales : DivisionSales.s
howSales); | 104 salesDiv.classes.add(showSales ? DivisionSales.hideSales : DivisionSales.s
howSales); |
105 }); | 105 }); |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
OLD | NEW |