breaking changes of angular-material 0.5.1

This commit is contained in:
Gwenhael Le Moine 2014-11-06 17:05:31 +01:00
parent a0c621ab34
commit 65514534b7
2 changed files with 30 additions and 32 deletions

View file

@ -2,11 +2,11 @@
h3 { text-align: center; } h3 { text-align: center; }
material-button { padding: 0 3px; md-button { padding: 0 3px;
margin: 0 3px; } margin: 0 3px; }
material-content table { max-width: 99%; md-content table { max-width: 99%;
width: 99%; } width: 99%; }
.date, .date,
.panel-heading { text-align: center } .panel-heading { text-align: center }

View file

@ -1,46 +1,44 @@
<div layout="vertical" layout-padding> <div layout="vertical" layout-padding>
<div class="date"> <div class="date">
<material-toolbar class="material-theme-light"> <md-toolbar>
<h2> <h2>
From {{from_date | date:'longDate'}} <span data-ng-if="to_date">to {{to_date | date:'longDate'}}</span> From {{from_date | date:'longDate'}} <span data-ng-if="to_date">to {{to_date | date:'longDate'}}</span>
</h2> </h2>
<div layout="horizontal" layout-align="center center" layout-padding> <div layout="horizontal" layout-align="center center" layout-padding>
<material-button class="material-theme-green" <md-button data-ng-click="before()"
data-ng-click="before()" data-ng-class="{'disabled': period_offset == 0}">prev</span></md-button>
data-ng-class="{'disabled': period_offset == 0}">prev</span></material-button> <md-button data-ng-click="reset_offset()"
<material-button class="material-theme-light-blue" data-ng-class="{'disabled': period_offset == dates_salaries.length - 1}">Now</md-button>
data-ng-click="reset_offset()" <md-button data-ng-click="after()"
data-ng-class="{'disabled': period_offset == dates_salaries.length - 1}">Now</material-button> data-ng-class="{'disabled': period_offset == dates_salaries.length}">next</md-button>
<material-button class="material-theme-green"
data-ng-click="after()"
data-ng-class="{'disabled': period_offset == dates_salaries.length}">next</material-button>
</div> </div>
</material-toolbar> </md-toolbar>
<material-toolbar> <md-toolbar>
<h2 class="balance" data-ng-class="{'negative': balance.buckets[1].total - balance.buckets[0].total < 0, 'positive': balance.buckets[1].total - balance.buckets[0].total > 0}"> <h2 class="balance" data-ng-class="{'negative': balance.buckets[1].total - balance.buckets[0].total < 0, 'positive': balance.buckets[1].total - balance.buckets[0].total > 0}">
Balance: {{( balance.buckets[1].raw_total - balance.buckets[0].raw_total ) | number:2}} € Balance: {{( balance.buckets[1].raw_total - balance.buckets[0].raw_total ) | number:2}} €
</h2> </h2>
</material-toolbar> </md-toolbar>
</div> </div>
<div layout="vertical" layout-md="horizontal" layout-padding> <div layout="vertical" layout-md="horizontal" layout-padding>
<div flex data-ng-repeat="bucket in balance.buckets"> <div flex layout="vertical" layout-padding
<material-toolbar class="material-theme-light"> data-ng-repeat="bucket in balance.buckets">
<md-toolbar layout="vertical" layout-padding>
<h3>{{bucket.categories}}, total = {{bucket.total | number:2}} €</h3> <h3>{{bucket.categories}}, total = {{bucket.total | number:2}} €</h3>
<material-slider discrete <md-slider discrete
min="0" max="10" step="1" min="0" max="10" step="1"
data-ng-model="bucket.score_threshold" data-ng-model="bucket.score_threshold"
data-ng-change="select.score_higher_than( bucket, bucket.score_threshold ); filter_data()"> data-ng-change="select.score_higher_than( bucket, bucket.score_threshold ); filter_data()">
</material-slider> </md-slider>
<select multiple <select multiple
data-ng-model="bucket.accounts_selected" data-ng-model="bucket.accounts_selected"
data-ng-options="account.account for account in bucket.raw_data | orderBy:'account'" data-ng-options="account.account for account in bucket.raw_data | orderBy:'account'"
data-ng-change="filter_data()"> data-ng-change="filter_data()">
<option value=''>...</option> <option value=''>...</option>
</select> </select>
</material-toolbar> </md-toolbar>
<material-content> <md-content>
<nvd3-pie-chart data="bucket.data" <nvd3-pie-chart data="bucket.data"
x="xFunction()" x="xFunction()"
y="yFunction()" y="yFunction()"
@ -53,14 +51,14 @@
labelType="value"> labelType="value">
<svg></svg> <svg></svg>
</nvd3-pie-chart> </nvd3-pie-chart>
</material-content> </md-content>
<material-content> <md-content>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th><material-buton data-ng-click="bucket.order_by( 'account' )">account</material-buton></th> <th><md-buton data-ng-click="bucket.order_by( 'account' )">account</md-buton></th>
<th><material-buton data-ng-click="bucket.order_by( 'amount' )">amount</material-buton></th> <th><md-buton data-ng-click="bucket.order_by( 'amount' )">amount</md-buton></th>
<th><material-buton data-ng-click="bucket.order_by( 'score' )">score</material-buton></th> <th><md-buton data-ng-click="bucket.order_by( 'score' )">score</md-buton></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -79,7 +77,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</material-content> </md-content>
</div> </div>
</div> </div>