mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 07:26:49 +00:00
Early buy-orders work
Will implement ui-grid for tables. Way better at handling data
This commit is contained in:
@@ -11,6 +11,7 @@ angular.module('myApp', [
|
||||
'myApp.buy',
|
||||
'myApp.sell',
|
||||
'myApp.enabledExchanges',
|
||||
'myApp.buyOrders',
|
||||
'myApp.stringUtils'
|
||||
]).
|
||||
config(['$locationProvider', '$routeProvider', 'NotificationProvider', function($locationProvider, $routeProvider, NotificationProvider) {
|
||||
|
||||
20
web/app/components/buy-orders/buy-orders.html
Normal file
20
web/app/components/buy-orders/buy-orders.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<th>{{currencyOne}}</th>
|
||||
<th>{{currencyTwo}}</th>
|
||||
<th>Sum({{currencyTwo}})</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="buyOrder in buyOrders">
|
||||
<td>{{buyOrder.price}}</td>
|
||||
<td>{{buyOrder.currencyOneAmount}}</td>
|
||||
<td>{{buyOrder.currencyTwoAmount}}</td>
|
||||
<td>{{buyOrder.sum}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
47
web/app/components/buy-orders/buy-orders.js
Normal file
47
web/app/components/buy-orders/buy-orders.js
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
angular.module('myApp.buyOrders',[]).component('buyorders', {
|
||||
templateUrl: '/components/buy-orders/buy-orders.html',
|
||||
controller:'BuyOrdersController',
|
||||
controller: function ($scope, $http, Notification, $rootScope) {
|
||||
$scope.currency = {};
|
||||
$scope.exchange = {};
|
||||
|
||||
$rootScope.$on('CurrencyChanged', function (event, args) {
|
||||
$scope.currency = args.Currency;
|
||||
$scope.exchange = args.Exchange;
|
||||
$scope.currencyOne = $scope.currency.FirstCurrency;
|
||||
$scope.currencyTwo = $scope.currency.SecondCurrency;
|
||||
$scope.doTheThing();
|
||||
});
|
||||
|
||||
$scope.doTheThing = function() {
|
||||
$scope.buyOrders = [
|
||||
{price:12,currencyOneAmount:12,currencyTwoAmount:13,sum:1111},
|
||||
{price:13,currencyOneAmount:15,currencyTwoAmount:13,sum:11231},
|
||||
{price:14,currencyOneAmount:232,currencyTwoAmount:13,sum:4511},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
{price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311},
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
|
||||
<nav class="navbar navbar-default navbar-fixed-top navbar" role="navigation">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="navbar-header">
|
||||
@@ -60,6 +60,8 @@
|
||||
<script src="/bower_components/angular/angular.js"></script>
|
||||
<script src="/bower_components/angular-ui-notification/dist/angular-ui-notification.min.js"></script>
|
||||
<script src="/bower_components/angular-route/angular-route.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="node_modules/angular-ui-grid/ui-grid.min.css" />
|
||||
<script src="node_modules/angular-ui-grid/ui-grid.min.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
<script src="/views/settings/settings.js"></script>
|
||||
<script src="/views/home/home.js"></script>
|
||||
@@ -68,6 +70,7 @@
|
||||
<script src="/components/sell/sell.js"></script>
|
||||
<script src="/components/enabled-exchanges/enabled-exchanges.js"></script>
|
||||
<script src="/components/version/version.js"></script>
|
||||
<script src="/components/buy-orders/buy-orders.js"></script>
|
||||
<script src="/components/version/version-directive.js"></script>
|
||||
<script src="/components/version/interpolate-filter.js"></script>
|
||||
<script src="/components/helpers/stringUtils.js"></script>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</div>
|
||||
<div class="col-md-6" style=" height: 300px;">
|
||||
<h3>Buy orders</h3>
|
||||
<buyorders></buyorders>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12" style=" height: 300px;">
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
"protractor": "^3.2.2",
|
||||
"express": "latest",
|
||||
"requestify": "latest",
|
||||
"body-parser": "latest"
|
||||
"body-parser": "latest",
|
||||
"ui-grid":"latest"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "bower install",
|
||||
|
||||
Reference in New Issue
Block a user