mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
141 lines
4.5 KiB
HTML
Executable File
141 lines
4.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>AngularJS</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/angular.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example" ng-app="KendoDemos">
|
|
<div ng-controller="MyCtrl">
|
|
<kendo-grid options="mainGridOptions">
|
|
<div k-detail-template>
|
|
<kendo-tabstrip>
|
|
<ul>
|
|
<li class="k-state-active">Orders</li>
|
|
<li>Contact information</li>
|
|
</ul>
|
|
<div>
|
|
<div kendo-grid k-options="detailGridOptions(dataItem)"></div>
|
|
</div>
|
|
<div>
|
|
<ul class="contact-info-form">
|
|
<li><label>Country:</label> <input class="k-textbox" ng-model="dataItem.Country" /></li>
|
|
<li><label>City:</label> <input class="k-textbox" ng-model="dataItem.City" /></li>
|
|
<li><label>Address:</label> {{dataItem.Address}}</li>
|
|
<li><label>Home phone:</label> {{dataItem.HomePhone}}</li>
|
|
</ul>
|
|
</div>
|
|
</kendo-tabstrip>
|
|
</div>
|
|
</kendo-grid>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.contact-info-form {
|
|
list-style-type: none;
|
|
margin: 30px 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.contact-info-form li {
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.contact-info-form label {
|
|
display: inline-block;
|
|
width: 100px;
|
|
text-align: right;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
angular.module("KendoDemos", [ "kendo.directives" ])
|
|
.controller("MyCtrl", function($scope){
|
|
$scope.mainGridOptions = {
|
|
dataSource: {
|
|
type: "odata",
|
|
transport: {
|
|
read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Employees"
|
|
},
|
|
pageSize: 5,
|
|
serverPaging: true,
|
|
serverSorting: true
|
|
},
|
|
sortable: true,
|
|
pageable: true,
|
|
dataBound: function() {
|
|
this.expandRow(this.tbody.find("tr.k-master-row").first());
|
|
},
|
|
columns: [{
|
|
field: "FirstName",
|
|
title: "First Name",
|
|
width: "120px"
|
|
},{
|
|
field: "LastName",
|
|
title: "Last Name",
|
|
width: "120px"
|
|
},{
|
|
field: "Country",
|
|
width: "120px"
|
|
},{
|
|
field: "City",
|
|
width: "120px"
|
|
},{
|
|
field: "Title"
|
|
}]
|
|
};
|
|
|
|
$scope.detailGridOptions = function(dataItem) {
|
|
return {
|
|
dataSource: {
|
|
type: "odata",
|
|
transport: {
|
|
read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
|
|
},
|
|
serverPaging: true,
|
|
serverSorting: true,
|
|
serverFiltering: true,
|
|
pageSize: 5,
|
|
filter: { field: "EmployeeID", operator: "eq", value: dataItem.EmployeeID }
|
|
},
|
|
scrollable: false,
|
|
sortable: true,
|
|
pageable: true,
|
|
columns: [
|
|
{ field: "OrderID", title:"ID", width: "56px" },
|
|
{ field: "ShipCountry", title:"Ship Country", width: "110px" },
|
|
{ field: "ShipAddress", title:"Ship Address" },
|
|
{ field: "ShipName", title: "Ship Name", width: "190px" }
|
|
]
|
|
};
|
|
};
|
|
})
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|