Skip to content

Update material #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add Angular Material
  • Loading branch information
IvanBisultanov authored and IvanBisultanov committed Dec 30, 2015
commit 5f2f9600426a1ca8770c6fa6d728b352d6e130d8
67 changes: 20 additions & 47 deletions demo/demo.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*, *:before, *:after {
box-sizing: border-box; }

:focus {
outline: none; }

body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }

Expand Down Expand Up @@ -62,63 +65,33 @@ h1 {
th.sortable {
line-height: 24px;
position: relative; }
th.sortable.sort-descent:before {
th.sortable.sort-descent:before, th.sortable.sort-descent:after, th.sortable.sort-ascent:before, th.sortable.sort-ascent:after {
content: '';
position: absolute;
margin: auto 0; }
th.sortable.sort-descent:before, th.sortable.sort-ascent:before {
left: 12px;
width: 2px;
background: #333;
height: 12px;
top: 0;
bottom: 0;
margin: auto 0; }
th.sortable.sort-descent:after {
content: '';
position: absolute;
height: 12px; }
th.sortable.sort-descent:after, th.sortable.sort-ascent:after {
left: 9px;
border-top: 2px solid #333;
border-left: 2px solid #333;
transform-origin: center;
transform: rotate(-135deg);
height: 8px;
width: 8px;
top: 6px;
bottom: 0;
margin: auto 0; }
width: 8px; }
th.sortable.sort-descent:before, th.sortable.sort-descent:after {
bottom: 0; }
th.sortable.sort-descent:before {
top: 0; }
th.sortable.sort-descent:after {
transform: rotate(-135deg);
top: 6px; }
th.sortable.sort-ascent:before, th.sortable.sort-ascent:after {
top: 0; }
th.sortable.sort-ascent:before {
content: '';
position: absolute;
left: 12px;
width: 2px;
background: #333;
height: 12px;
top: 0;
bottom: 0;
margin: auto 0; }
bottom: 0; }
th.sortable.sort-ascent:after {
content: '';
position: absolute;
left: 9px;
border-top: 2px solid #333;
border-left: 2px solid #333;
transform-origin: center;
transform: rotate(45deg);
height: 8px;
width: 8px;
top: 0;
bottom: 6px;
margin: auto 0; }

.col-wrap {
font-size: 0;
padding: 25px 0; }
.col-wrap .col2 {
vertical-align: top;
display: inline-block;
width: 50%;
padding: 0 15px; }
.col-wrap .col3 {
vertical-align: top;
display: inline-block;
width: 33.33%;
padding: 0 15px; }
bottom: 6px; }
4 changes: 2 additions & 2 deletions demo/demoApp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
angular.module('myApp', ['dataGrid', 'pagination'])
angular
.module('myApp', ['dataGrid', 'pagination', 'ngMaterial'])
.controller('myAppController', ['$scope', 'myAppFactory', function ($scope, myAppFactory) {

$scope.gridOptions = {
Expand All @@ -10,7 +11,6 @@ angular.module('myApp', ['dataGrid', 'pagination'])
.factory('myAppFactory', function () {
return {
getData: function () {
//return $http.get(root + '/posts', {});
return [{
"total": {
"currencyIso": "USD",
Expand Down
140 changes: 69 additions & 71 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head lang="en">
<meta charset="UTF-8">
<title>Flat JSON format for data tables</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="../dist/material.css">
</head>
Expand All @@ -15,64 +16,51 @@ <h1>Angular Data Grid</h1>
<span class="b-change-theme__link _active">Material Design</span>
</div>
<div>
<div class="col-wrap">
<div class="col3">
<div class="form-group">
<input type="text"
id="sort"
class="form-control order-search-box"
ng-change="gridActions.filter()"
ng-model="code"
filter-by="code"
filter-type="text">
<label for="sort" class="input-label">Search By Order #</label>
</div>
</div>
<div class="col3">
<div class="form-group">
<div class="input-group datepicker">
<input type="text"
id="dateFrom"
class="form-control"
is-open="dateFromOpened"
ng-click="dateFromOpened = true"
datepicker-popup="shortDate"
filter-by="placed"
filter-type="dateFrom"
ng-model="dateFrom"
ng-blur="gridActions.filter()"
ng-focus="gridActions.filter()"
max-date="dateTo"
show-weeks="false"
close-text="Close"/>
<label for="dateFrom" class="input-label">From</label>
</div>
</div>
<div ng-show="dateTo || dateFrom" class="buttons-right">
<a href="" ng-click="dateTo = ''; dateFrom = ''; reloadGrid();">Clear Dates</a>
</div>
</div>
<div class="col3">
<div class="form-group">
<div class="input-group datepicker">
<input type="text"
id="dateTo"
class="form-control"
is-open="dateToOpened"
ng-click="dateToOpened = true"
min-date="dateFrom"
datepicker-popup="shortDate"
filter-by="placed"
filter-type="dateTo"
ng-model="dateTo"
ng-blur="gridActions.filter()"
ng-focus="gridActions.filter()"
show-weeks="false"
close-text="Close"/>
<label for="dateTo" class="input-label">To</label>
</div>
</div>
</div>
<div layout-gt-sm="row" class="layout-gt-sm-row">
<md-input-container class="md-block flex-gt-sm md-input-has-value" flex-gt-sm="">
<label for="order">Search By Order #</label>
<input ng-model="code"
class="md-input"
ng-change="gridActions.filter()"
id="order"
filter-by="code"
filter-type="text"
aria-invalid="false">
</md-input-container>
<md-input-container class="md-block flex-gt-sm md-input-has-value" flex-gt-sm="">
<label for="dateFrom">From</label>
<input ng-model="dateFrom"
datepicker-popup="shortDate"
is-open="dateFromOpened"
ng-click="dateFromOpened = true"
class="md-input"
filter-by="placed"
filter-type="dateFrom"
ng-model="dateFrom"
id="dateFrom"
ng-blur="gridActions.filter()"
ng-focus="gridActions.filter()"
max-date="dateTo"
show-weeks="false"
close-text="Close">
</md-input-container>
<md-input-container class="md-block flex-gt-sm md-input-has-value" flex-gt-sm="">
<label for="dateTo">To</label>
<input type="text"
id="dateTo"
class="md-input"
is-open="dateToOpened"
ng-click="dateToOpened = true"
min-date="dateFrom"
datepicker-popup="shortDate"
filter-by="placed"
filter-type="dateTo"
ng-model="dateTo"
ng-blur="gridActions.filter()"
ng-focus="gridActions.filter()"
show-weeks="false"
close-text="Close"/>
</md-input-container>
</div>
<div grid-data id='test' grid-options="gridOptions" grid-actions="gridActions">
<div>
Expand Down Expand Up @@ -101,13 +89,20 @@ <h1>Angular Data Grid</h1>
Purchase Order #
</th>
<th class="st-sort-disable th-dropdown">
<select class="form-control width-15"
filter-by="statusDisplay"
filter-type="select"
ng-model="status"
ng-change="filter()">
<option value="">All Statuses</option>
</select>

<md-input-container>
<label>State</label>
<md-select filter-by="statusDisplay"
filter-type="select"
ng-model="status"
ng-change="filter()">
<md-option value="">All Statuses</md-option>
<md-option ng-repeat="option in statusOptions track by option.value"
value="{{option.value}}">
{{option.text}}
</md-option>
</md-select>
</md-input-container>
</th>
<th sortable='total.value' class="sortable">
Total
Expand All @@ -133,8 +128,8 @@ <h1>Angular Data Grid</h1>
</tr>
</tbody>
</table>
<div class="col-wrap">
<div class="col2">
<div layout-gt-sm="row" class="layout-gt-sm-row">
<md-input-container class="md-block flex-gt-sm" flex-gt-sm="">
<pagination max-size="5"
boundary-links="true"
class="pagination-sm"
Expand All @@ -143,10 +138,10 @@ <h1>Angular Data Grid</h1>
ng-model="paginationOptions.currentPage"
ng-change="reloadGrid()"
items-per-page="paginationOptions.itemsPerPage"></pagination>
</div>
<div class="col2">
</md-input-container>
<md-input-container class="md-block flex-gt-sm" flex-gt-sm="">
<div grid-item-per-page="10, 25, 50, 75" class="pagination-sm"></div>
</div>
</md-input-container>
</div>
</div>
</div>
Expand All @@ -155,8 +150,11 @@ <h1>Angular Data Grid</h1>
</div>
</body>

<!--<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<script src="../dist/pagination.min.js"></script>
<script src="../dist/dataGrid.min.js"></script>
<script src="demoApp.js"></script>
Expand Down
Loading