Skip to content

Commit

Permalink
Added default photo to dashboard query results, minor bug fixes. Work…
Browse files Browse the repository at this point in the history
…ing on Connect button params
  • Loading branch information
Radiobeat33 committed Feb 6, 2015
1 parent e3216d5 commit 03d9a59
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions client/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="jumbotron" ng-controller="dashboardController">
<div class="container">
<div class="col-md-3">
<h2>Welcome, {{user.firstName}}!</h2>
<h2>Welcome, {{user.firstname}}!</h2>
<div class="userimage" style="background: url({{user.photoUrl}}) no-repeat;"></div>
<h4 class="languageChange">Change Native Language</h4>
<span class="custom-dropdown custom-dropdown--white">
Expand All @@ -46,10 +46,11 @@ <h4 class="languageChange">Change Desired Language</h4>
<h2>Your Language Matches</h2>
<div class="usermatches col-md-9">
<div ng-repeat="user in users" class="col-md-4">
<h4 class="matchtext">{{user.firstName}} {{user.lastName}}</h4>
<h4 class="matchtext">{{user.firstname}} {{user.lastname}}</h4>
<img src="{{user.photoUrl}}" class="matchphotos">
<!-- <span class="onlineIndicator">{{online}}</span> -->
<br>
<h5>{{user.nativeRating}}</h5>
<button class="btn btn-primary connectButton" ng-click="connect({'u_id': 1, 'my_id': 2})" id="{{user.id}}">
Connect
</button>
Expand Down
25 changes: 15 additions & 10 deletions client/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,29 +282,29 @@ angular.module('translateModule', [])
})

.controller('dashboardController', function ($scope, $http, $location, $log) {

$scope.myID = document.cookie.slice(5);
$scope.online = true;

$scope.users = [{
firstName: 'Gary',
lastName: 'Hepburn',
firstname: 'Gary',
lastname: 'Hepburn',
photoUrl: 'https://41.media.tumblr.com/tumblr_mdyrwdkunc1rlif9vo1_500.jpg',
id: 1
},{
firstName: 'Ron',
lastName: 'Arnaldo',
firstname: 'Ron',
lastname: 'Arnaldo',
photoUrl: 'http://www.somuchviral.com/wp-content/uploads/2014/03/nicolas-cage1.jpg',
id: 2
},{
firstName: 'Flo',
lastName: 'Chapman',
firstname: 'Flo',
lastname: 'Chapman',
photoUrl: 'client/assets/208238_6580859075_4368_n.jpg',
id: 3
}];

$scope.user = {
firstName: 'John',
lastName: 'Williams',
firstname: 'John',
lastname: 'Williams',
photoUrl: 'http://www.musicweb-international.com/film/williams.gif'
}

Expand Down Expand Up @@ -363,7 +363,12 @@ angular.module('translateModule', [])
$scope.updateDesiredLang = function(value) {
$http.post('/api/updateDesired', { msg: value }).
success(function(data, status, headers, config){
console.log(data);
$scope.users = [];
for (var i = 0; i < data.length; i++) {
data[i].photoUrl = 'https://socializeapplications.com/kraft/youtube-channel/assets/images/blank_user.png';
data[i].password = '';
$scope.users.push(data[i]);
};
}).error(function(data, status, headers, config){
console.log('error posting!!');
})
Expand Down

0 comments on commit 03d9a59

Please sign in to comment.