refactoring, renaming and simplification

This commit is contained in:
Gwenhael Le Moine 2014-11-09 09:20:14 +01:00
parent f7b99f228e
commit 956ba06f1b
6 changed files with 11 additions and 27 deletions

View file

@ -29,9 +29,8 @@
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]--> <![endif]-->
<div ui-view="navbar"></div> <div class="main" role="main" tabindex="-1" layout-fill="" layout="vertical"
ui-view="main"></div>
<div class="main" ui-view="main"></div>
<!-- In production use: <!-- In production use:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
@ -57,8 +56,7 @@
<script src="/js/app.js"></script> <script src="/js/app.js"></script>
<script src="/js/state.js"></script> <script src="/js/state.js"></script>
<script src="/js/services/API.js"></script> <script src="/js/services/API.js"></script>
<script src="/js/controllers/AppCtrl.js"></script> <script src="/js/controllers/DashboardCtrl.js"></script>
<script src="/js/controllers/BalanceCtrl.js"></script>
</body> </body>
</html> </html>

View file

@ -1,5 +0,0 @@
app.controller( 'AppCtrl',
[ '$scope',
function ( $scope ) {
} ] );

View file

@ -1,4 +1,4 @@
app.controller( 'BalanceCtrl', app.controller( 'DashboardCtrl',
[ '$scope', '$filter', 'API', [ '$scope', '$filter', 'API',
function ( $scope, $filter, API ) { function ( $scope, $filter, API ) {
$scope.xFunction = function () { $scope.xFunction = function () {

View file

@ -1,27 +1,19 @@
// Sub-application/main Level State // Sub-application/main Level State
app.config( [ '$stateProvider', '$urlRouterProvider', app.config( [ '$stateProvider', '$urlRouterProvider',
function ( $stateProvider, $urlRouterProvider ) { function ( $stateProvider, $urlRouterProvider ) {
$urlRouterProvider.when( '', '/balance' );
$stateProvider $stateProvider
.state( 'app.balance', {
url: '/balance',
templateUrl: 'js/templates/balance.tpl.html',
controller: 'BalanceCtrl'
} )
.state( 'app', { .state( 'app', {
url: '', url: '',
controller: 'AppCtrl',
views: { views: {
'main': { 'main': {
templateUrl: 'js/templates/main.tpl.html' templateUrl: 'js/templates/dashboard.html',
controller: 'DashboardCtrl'
} }
} }
} ) } )
.state( '404', { .state( '404', {
url: '/404', url: '/404',
templateUrl: 'js/templates/404.tpl.html', templateUrl: 'js/templates/404.html'
controller: 'AppCtrl'
} ); } );
} }

View file

@ -1,6 +1,6 @@
<div layout="vertical" layout-padding> <div layout="vertical" layout-padding>
<div class="date"> <div class="date" class="md-whiteframe-z1">
<md-toolbar> <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>
@ -22,7 +22,7 @@
</div> </div>
<div layout="vertical" layout-md="horizontal" layout-padding> <div layout="vertical" layout-md="horizontal" layout-padding>
<div flex="50"> <div flex="50" class="md-whiteframe-z1">
<table class="table" style="width: 100%"> <table class="table" style="width: 100%">
<thead> <thead>
<tr> <tr>
@ -67,7 +67,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div flex="50"> <div flex="50" class="md-whiteframe-z1">
<table class="table" style="width: 100%"> <table class="table" style="width: 100%">
<thead> <thead>
<tr> <tr>
@ -103,7 +103,7 @@
</div> </div>
<div layout="vertical" layout-md="horizontal" layout-padding> <div layout="vertical" layout-md="horizontal" layout-padding>
<div flex="50" layout="vertical" <div flex="50" layout="vertical" class="md-whiteframe-z1"
data-ng-repeat="bucket in balance.buckets"> data-ng-repeat="bucket in balance.buckets">
<md-toolbar layout="vertical" layout-padding> <md-toolbar layout="vertical" layout-padding>
<h3>{{bucket.categories}}, total = {{bucket.total | number:2}} €</h3> <h3>{{bucket.categories}}, total = {{bucket.total | number:2}} €</h3>

View file

@ -1 +0,0 @@
<div ui-view></div>