Skip to content

Commit 904a44f

Browse files
committed
Updated samples with the new time column
1 parent 48b5bc8 commit 904a44f

7 files changed

Lines changed: 7041 additions & 7005 deletions

File tree

HTMLSamples/grid/advanced-filtering.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
</head>
1818
<body>
1919
<h3 id="gridAdvancedFilteringLabel">$$(GridAdvancedFiltering_label)</h3>
20-
<!-- Target element for the Simple Filtering igGrid -->
20+
<!-- Target element for the Simple Filtering igGrid -->
2121
<table id="gridAdvancedFiltering"></table>
22-
<br>
23-
24-
<!--Sample JSON Data-->
25-
<script src="../../../../data-files/employee-data-allDatatypes.js"></script>
22+
<br>
23+
24+
<!--Sample JSON Data-->
25+
<script src="../../../../data-files/employee-data-allDatatypes.js"></script>
2626

2727
<script>
2828
$(function () {
@@ -39,7 +39,8 @@ <h3 id="gridAdvancedFilteringLabel">$$(GridAdvancedFiltering_label)</h3>
3939
{ headerText: "$$(table_lbl_register_date)", key: "RegistererDate", dataType: "date" },
4040
{ headerText: "$$(table_lbl_country)", key: "Country", dataType: "string" },
4141
{ headerText: "$$(table_lbl_age)", key: "Age", dataType: "number" },
42-
{ headerText: "$$(table_lbl_isActive)", key: "IsActive", dataType: "bool" }
42+
{ headerText: "$$(table_lbl_isActive)", key: "IsActive", dataType: "bool" },
43+
{ headerText: "$$(table_lbl_register_time)", key: "RegistererTime", dataType: "time" }
4344
],
4445
dataSource: employees,
4546
renderCheckboxes: true,

HTMLSamples/grid/grouping-customization.html

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
{ headerText: "$$(AdventureWorks_Products_ProductID)", key: "ProductID", dataType: "number", width: "20%" },
2929
{ headerText: "$$(AdventureWorks_Products_Name)", key: "Name", dataType: "string", width: "30%" },
3030
{ headerText: "$$(AdventureWorks_Products_ProductNumber)", key: "ProductNumber", dataType: "string", width: "20%" },
31-
{ headerText: "$$(AdventureWorks_Products_MakeFlag)", key: "MakeFlag", dataType: "bool", width: "25%" }
31+
{ headerText: "$$(AdventureWorks_Products_MakeFlag)", key: "MakeFlag", dataType: "bool", width: "25%" },
32+
{ headerText: "$$(AdventureWorks_Products_Time)", key: "ModifiedDate", dataType: "time", width: "25%" }
3233
],
3334
dataSource: adventureWorks,
3435
features: [
@@ -39,23 +40,34 @@
3940
columnKey: "Name",
4041
isGroupBy: true,
4142
compareFunc: groupByFirstLetter,
42-
groupLabelFormatter: function (val) {
43-
val = val || "";
44-
return val.substring(0, 1);
45-
}
43+
groupLabelFormatter: function (val) {
44+
val = val || "";
45+
return val.substring(0, 1);
46+
}
47+
},
48+
{
49+
columnKey: "ModifiedDate",
50+
isGroupBy: false,
51+
compareFunc: function (val1, val2, recordsData) {
52+
var d1 = new Date(val1), d2 = new Date(val2);
53+
if (d1.getHours() === d2.getHours() && d1.getMinutes() === d2.getMinutes()) {
54+
return 0;
55+
}
56+
return Math.sign(val1 - val2);
57+
}
4658
}
4759
]
4860
}
4961
]
5062
});
5163
});
5264
function groupByFirstLetter(val1, val2) {
53-
val1 = val1 || "";
54-
val2 = val2 || "";
55-
val1 = val1.substring(0, 1);
56-
val2 = val2.substring(0, 1);
57-
return val1 > val2 ? 1 : val1 < val2 ? -1 : 0;
65+
val1 = val1 || "";
66+
val2 = val2 || "";
67+
val1 = val1.substring(0, 1);
68+
val2 = val2.substring(0, 1);
69+
return val1 > val2 ? 1 : val1 < val2 ? -1 : 0;
5870
}
5971
</script>
6072
</body>
61-
</html>
73+
</html>

HTMLSamples/grid/strings-en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"AdventureWorks_Products_ReorderPoint": "Reorder Point",
99
"AdventureWorks_Products_SellStartDate": "Sell Start Date",
1010
"AdventureWorks_Products_StandardCost": "Standard Cost",
11+
"AdventureWorks_Products_Time": "Time",
1112
"americana_variety": "Americana Variety - Mix of 6 flavors",
1213
"AppendRowsOnDemand_Auto_Caption": "Load on Demand - loadTrigger: auto",
1314
"AppendRowsOnDemand_Button_Caption": "Load on Demand - loadTrigger: button",
@@ -168,6 +169,7 @@
168169
"table_lbl_number": "Number",
169170
"table_lbl_postCode": "Postal Code",
170171
"table_lbl_register_date": "Register Date",
172+
"table_lbl_register_time": "Register Time",
171173
"table_lbl_title": "Title",
172174
"Title_advanced-filtering": "Advanced Filtering",
173175
"Title_angular": "AngularJS",

HTMLSamples/grid/strings-ja.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"AdventureWorks_Products_ReorderPoint": "再注文",
99
"AdventureWorks_Products_SellStartDate": "販売の開始日付",
1010
"AdventureWorks_Products_StandardCost": "標準の原価",
11+
"AdventureWorks_Products_Time": "Time",
1112
"americana_variety": "アメリカン バラエティ - 6 つのフレーバー",
1213
"AppendRowsOnDemand_Auto_Caption": "ロードオンデマンド - loadTrigger: auto",
1314
"AppendRowsOnDemand_Button_Caption": "ロードオンデマンド - loadTrigger: button",
@@ -168,6 +169,7 @@
168169
"table_lbl_number": "数値",
169170
"table_lbl_postCode": "郵便番号",
170171
"table_lbl_register_date": "登録日付",
172+
"table_lbl_register_time": "Register Time",
171173
"table_lbl_title": "役職",
172174
"Title_advanced-filtering": "高度なフィルタリング",
173175
"Title_angular": "AngularJS との連携",

HTMLSamples/grid/summaries.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<html>
3+
34
<head>
45
<title>$$(Title_summaries)</title>
56

@@ -15,6 +16,7 @@
1516
<script src="%%ignite-ui%%/js/infragistics.core.js"></script>
1617
<script src="%%ignite-ui%%/js/infragistics.lob.js"></script>
1718
</head>
19+
1820
<body>
1921
<table id="grid"></table>
2022
<script src="../../../../data-files/adventureworks.min.js"></script>
@@ -28,7 +30,8 @@
2830
{ headerText: "$$(AdventureWorks_Products_Name)", key: "Name", dataType: "string", width: "40%" },
2931
{ headerText: "$$(AdventureWorks_Products_ProductNumber)", key: "ProductNumber", dataType: "string", width: "20%" },
3032
{ headerText: "$$(AdventureWorks_Products_ListPrice)", key: "ListPrice", dataType: "number", width: "20%" },
31-
{ headerText: "$$(AdventureWorks_Products_StandardCost)", key: "StandardCost", dataType: "number", width: "20%" }
33+
{ headerText: "$$(AdventureWorks_Products_StandardCost)", key: "StandardCost", dataType: "number", width: "20%" },
34+
{ headerText: "$$(AdventureWorks_Products_Time)", key: "ModifiedDate", dataType: "time", width: "20%" },
3235
],
3336
dataSource: adventureWorks,
3437
features: [
@@ -40,4 +43,5 @@
4043
});
4144
</script>
4245
</body>
43-
</html>
46+
47+
</html>

0 commit comments

Comments
 (0)