Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cl-/Expensify
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Feb 27, 2015
2 parents 7d347d2 + ea377e9 commit 8b93ebf
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 13 deletions.
9 changes: 9 additions & 0 deletions www/css/style.css
Expand Up @@ -57,6 +57,15 @@
text-align: center;
}

/*.circularSmall{
width: 100px;
height: 100px;
border-radius: 150px;
-webkit-border-radius: 150px;
-moz-border-radius: 150px;
background: url(img/loader-larger.gif) no-repeat;
background-size: 100px 100px;
}*/

//CSS for Recommendations ----------{}
html * {
Expand Down
Binary file added www/img/ajax-loader.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/img/bkg/Low-Poly_Backgrounds(3).JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/img/bkg/Low-Poly_Backgrounds(4).JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/img/loader-larger.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 17 additions & 3 deletions www/js/controllers.js
Expand Up @@ -215,7 +215,9 @@ angular.module('starter.controllers', [])

}])

.controller('BanksCtl', ["$scope", function($scope) {
.controller('BanksCtl', ["$scope", "$timeout", function($scope, $timeout) {
$scope.linkState_DBS = 0;
$scope.isLoadingDBSData = false;
$scope.banks = [
createBank("DBS Bank", "img/logo/logo_dbs.gif"),
createBank("Citi Bank", "img/logo/logo_citi.jpg"),
Expand All @@ -229,13 +231,25 @@ angular.module('starter.controllers', [])
"imgUrl": imgUrl,
"linked": false
};
}
};
$scope.showExpandedDBSCard = function(){
$scope.showExpandedDBS = true;
}
};
$scope.hideExpandedDBSCard = function(){
$scope.showExpandedDBS = false;
};
$scope.loadDBSData = function(){
$scope.linkState_DBS = 1; //$scope.isLoadingDBSData
$timeout(function(){
$scope.linkState_DBS = 2;
$scope.showExpandedDBS = false;
}, 2000);
}

$scope.unlinkDBS = function(){
$scope.linkState_DBS = 0; //$scope.isLoadingDBSData
}

}])

.controller('RecommendationsCtrl', function($scope) {
Expand Down
31 changes: 21 additions & 10 deletions www/templates/banks.html
Expand Up @@ -2,26 +2,31 @@
<ion-content>

<div class="list card">
<div class="item item-divider">Link to DBS</div>
<div class="item item-divider">Link to DBS/div>

<a ng-hide="showExpandedDBS" class="item item-thumbnail-left" ng-REPEAT="bank in banks.slice(0,1)" href="#">
<a ng-hide="showExpandedDBS && linkState_DBS<2" class="item item-thumbnail-left" ng-REPEAT="bank in banks.slice(0,1)" href="#">
<img ng-src="{{bank.imgUrl}}" style="border-radius:5px;">
<!-- <p>Description</p> -->
<p style="vertical-align:middle; margin:15px;">
<button on-touch="showExpandedDBSCard(true)" class="button button-positive floatRight">Expand</button>
<p style="vertical-align:middle;">
<button on-touch="showExpandedDBSCard(true)" ng-show="linkState_DBS<2" class="button button-positive floatRight" style="margin:15px;">Expand</button>

<p ng-show="linkState_DBS>=2">Andrew Pinter <br>S/N: 849-54820-6</p>
<div class="floatLeft">
<button on-touch="unlinkDBS()" ng-show="linkState_DBS>=2"class="button button-positive floatRight">Unlink Account</button>
</div>
</p>
</a>

<ion-item ng-show="showExpandedDBS" class="item item-body item-button-right">
<ion-item ng-show="showExpandedDBS && linkState_DBS<2" class="item item-body item-button-right">
<button on-touch="hideExpandedDBSCard()" class="button button-positive floatRight">Hide</button>

<div class="floatRight" style="margin-top:-30px;">
<div style="margin-top:-30px;">
<div class="floatLeft" style="text-align:center">
<br><img ng-src="{{banks[0].imgUrl}}">
</div>

<div class="floatLeft">
<div class="list">
<div class="list" ng-show="linkState_DBS==0">
<label class="item item-input">
<input type="text" placeholder="IB ID">
</label>
Expand All @@ -33,14 +38,20 @@
<input type="text" placeholder="OTP">
</label>
<label class="item item-input">
<button class="button button-positive">Link to DBS Account</button>
<button class="button button-positive" on-touch="loadDBSData();">Link to DBS Account</button>
</label>
</div>
<div ng-show="linkState_DBS==1" style="margin-top:10px; vertical-align: middle;"><img src="img/loader-larger.gif" style="width: 20px; vertical-align:middle; margin-top:-5px;"> Loading DBS Data</div>
</div>
</div><!-- endof floatRight div -->

<br class="floatClear">
</ion-item>
</ion-item>





</div><!-- endof list card for DBS -->

<div class="list card">
Expand All @@ -51,7 +62,7 @@
<a class="item item-thumbnail-left" ng-REPEAT="bank in banks.slice(1,entries.length)" href="#">
<img ng-src="{{bank.imgUrl}}" style="border-radius:5px;">
<!-- <p>Description</p> -->
<p style="vertical-align:middle; margin:15px;">
<p style="vertical-align:middle; margin-top:15px; margin-bottom:15px;">
<button on-touch="getBankAuthorisation($index)" class="button button-positive floatRight">Add Credit Card</button>
</p>
</a>
Expand Down

0 comments on commit 8b93ebf

Please sign in to comment.