Skip to content

Commit

Permalink
gui id udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
asmercrof committed Apr 10, 2014
1 parent 48aedb1 commit b137a17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions static/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="outline">
<table id="overview-wallet" class="outline" ng-repeat="wallet in wallets">
<tr class="dark-row">
<td><div id="overview-wallet-title">Wallet {{$index}}: {{wallet.name}}</div></td><td><!--<i class="fa fa-align-justify"></i>--></td>
<td><div id="overview-wallet-title">Wallet {{wallet.id}}: {{wallet.name}}</div></td><td><!--<i class="fa fa-align-justify"></i>--></td>
</tr>
<tr>
<td><div id="overview-wallet-balance">Addresses: </div></td>
Expand All @@ -46,7 +46,7 @@
{{wallet.entries[0].address}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li ng-repeat="entry in wallet.entries">{{entry.address}}</li>
<li ng-repeat="entry in wallet.entries" ng-click="spend.address = entry.address">{{entry.address}}</li>
<li class="divider"></li>
<li><a href="#">All</a></li>
</ul>
Expand All @@ -57,7 +57,7 @@
</tr>
<tr>
<td colspan="2">
<a href="#"><i class="fa fa-qrcode"></i> <a ng-click="openQR(address)">QR Code</a>
<a href="#"><i class="fa fa-qrcode"></i> <a ng-click="openQR(wallet)">QR Code</a>
<a href="#" ng-click="sendTab()"><i class="fa fa-cloud-upload"></i> Send </a>
<!--<a href="#"><i class="fa fa-pencil"></i> Edit</a>-->
</td>
Expand Down Expand Up @@ -88,7 +88,7 @@

<table id="send-table">
<tr>
<td class="send-pay-col1"><label for="send_pay_to">Pay to</label></td><td><input ng-disabled="readyDisable" id="send_pay_to" type="text" ng-model="spend.address" /></td>
<td class="send-pay-col1"><label for="send_pay_to">Pay to</label></td><td><input ng-disabled="readyDisable" id="send_pay_to" type="text" ng-model="spend.id" /></td>
</tr>
<!--<tr>
<td class="send-pay-col1"><label for="send_label">Label</label></td><td><input ng-disabled="sendDisable" id="send_label" type="text" ng-model="spend.label" /></td>
Expand Down
20 changes: 10 additions & 10 deletions static/app/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ angular.module('skycoin.controllers', [])
console.log('localStorage.history')
console.dir(JSON.parse(localStorage.getItem('historyTable')))

$scope.spend = function(addr){
$scope.spend = function(wallet){
$scope.sendDisable = true;
$scope.readyDisable = true;
$timeout($scope.clearSend, 1000);
$scope.pendingTable.push(addr);
var xsrf = {id:addr.address,
coins:addr.amount*1000000,
var xsrf = {id:wallet.id,
coins:wallet.amount*1000000,
fee:1,
hours:1}
$scope.historyTable.push({address:addr.address,amount:addr.amount});
Expand Down Expand Up @@ -170,14 +170,14 @@ angular.module('skycoin.controllers', [])

}

$scope.openQR = function (address) {
$scope.openQR = function (wallet) {

var modalInstance = $modal.open({
templateUrl: 'qrModalContent.html',
controller: "qrInstanceCtrl",
resolve: {
address: function () {
return address;
wallet: function () {
return wallet;
}
}
});
Expand All @@ -191,12 +191,12 @@ angular.module('skycoin.controllers', [])
}])


.controller('qrInstanceCtrl', ['$http', '$scope', '$modalInstance', 'address',
function($http, $scope, $modalInstance, address) {
.controller('qrInstanceCtrl', ['$http', '$scope', '$modalInstance', 'wallet',
function($http, $scope, $modalInstance, wallet) {

$scope.address = address;
$scope.address = wallet.entries[0].address;
$scope.qro = {};
$scope.qro.fm = address;
$scope.qro.fm = wallet.entries[0].address;

$scope.$watch('qro.label', function() {
$scope.qro.new = 'skycoin:' + $scope.address.address;// + '?' + 'label=' + $scope.qro.label; //+ '&message=' + $scope.qro.message;
Expand Down

0 comments on commit b137a17

Please sign in to comment.