Skip to content

Commit

Permalink
added updated gifts
Browse files Browse the repository at this point in the history
  • Loading branch information
abarnhard committed Sep 8, 2014
1 parent d90d3b4 commit 0ce0f96
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 4 additions & 0 deletions app/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ User.prototype.find = function(data, cb){
filter.coordinates = {$nearSphere:[this.coordinates[0], this.coordinates[1]]};
}
filter._id = {$ne:this._id};
if(data.orderAge){
var dir = data.orderAge === 'A' ? 1 : -1;
sort.age = dir;
}
// console.log('*******FILTER', filter);
User.collection.find(filter).sort(sort).toArray(function(err, profiles){
if(data.distance === 'D-D'){profiles.reverse();}
Expand Down
3 changes: 1 addition & 2 deletions app/static/js/user/users-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
});

function search(e){
console.log('I Fired');
// console.log('I Fired');
var data = $('#searchForm').serialize(),
type = $('#searchForm').attr('method'),
url = $('#searchForm').attr('action'),
$searchResults = $('#results'),
$r;
//$('input, textarea').val('');

$.ajax({url:url, xhrFields:{withCredentials: true}, type:type, data:data, dataType:'html', success:function(html){
// console.log('html', html);
Expand Down
10 changes: 7 additions & 3 deletions app/views/shared/nav.jade
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
.navbar.navbar-default.navbar(role='navigation')
.navbar.navbar-default(role='navigation')
.container-fluid
.navbar-header
button.navbar-toggle(data-toggle='collapse', data-target='#navbar-collapse')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href='/') CelebriDate
if user
a.navbar-brand(href='/profile') CelebriDate
else
a.navbar-brand(href='/') CelebriDate

.collapse.navbar-collapse#navbar-collapse
ul.nav.navbar-nav.navbar-right
if user
li: a(href='/Profile'): span.fa.fa-user &nbsp Profile
li: a(href='/search'): span.fa.fa-search &nbsp Find Celebs
li: a(href='/inbox')
span.fa.fa-envelope &nbsp Inbox  
span.badge= 0
li: a(href='/profile'): span.fa.fa-user   #{user.alias}
li
form.navbar-form(method='post', action='/logout')
.form-group
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ block content
.col-sm-12
select.form-control(name='orderAge')
option(value='') Order By Age
option(value='A-A') Youngest to Oldest
option(value='A-D') Oldest to Youngest
option(value='A') Youngest to Oldest
option(value='D') Oldest to Youngest
button.btn.btn-primary#search(type='button') Search
.row
.col-xs-12
Expand Down
20 changes: 10 additions & 10 deletions db/giftsprod.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"_id" : {"$oid": "000000000000000000000001"},
"name" : "Tibetian Mastiff",
"money" : 15000,
"price" : 15000,
"photo" : "http://static5.therichestimages.com/cdn/650/480/90/cw/wp-content/uploads/33.jpeg"
}
{
"_id" : {"$oid": "000000000000000000000002"},
"name" : "Tesla",
"money" : 95000,
"price" : 95000,
"photo" : "http://wp.streetwise.co/wp-content/uploads//2014/08/tesla-model-s.0_standard_640.0.jpg"
}
{
"_id" : {"$oid": "000000000000000000000003"},
"name" : "Vacation Home",
"money" : 20000000,
"price" : 20000000,
"photo" : "http://tradetotravel.com/images/p-sister-rock-4.jpg"
}
{
"_id" : {"$oid": "000000000000000000000004"},
"name" : "Unicorn",
"money" : 100000000,
"price" : 100000000,
"photo" : "http://sybertraderllc.com/wp-content/uploads/2014/06/unicorn-europe.jpg"
}
{
"_id" : {"$oid": "000000000000000000000005"},
"name" : "Diamond Earrings",
"money" : 15000,
"price" : 15000,
"photo" : "http://cdn3.jamesallen.com/Images/Education/Jewelry/Four-Prong-Studs-Pair-of-Classic-0.25ctw-Ladies-18k-White-Gold-Four-Prong-Round-Brilliant-Diamond-Earrings-big02292.gif"
}
{
"_id" : {"$oid": "000000000000000000000006"},
"name" : "Private Jet",
"money" : 20000000,
"price" : 20000000,
"photo" : "http://blogs-images.forbes.com/mfonobongnsehe/files/2012/09/Private-Jet-Plane.jpg"
}
{
"_id" : {"$oid": "000000000000000000000007"},
"name" : "Roses",
"money" : 30,
"price" : 30,
"photo" : "http://cimages.proflowers.com/is/image/ProvideCommerce/PF_12_00000000R023_VA1104_W1_SQ"
}
{
"_id" : {"$oid": "000000000000000000000008"},
"name" : "Lakers Tickets",
"money" : 150000,
"price" : 150000,
"photo" : "http://i.ebayimg.com/00/s/MTQ0OFgxMTU2/z/St0AAMXQsmFRegWr/$T2eC16h,!)8E9s4l90(,BRegWrFJYQ~~60_35.JPG"
}
{
"_id" : {"$oid": "000000000000000000000009"},
"name" : "Harley Davidson",
"money" : 60000,
"price" : 60000,
"photo" : "http://media1.santabanta.com/full1/Bikes/Harley%20Davidson/harley-davidson-79v.jpg"
}
{
"_id" : {"$oid": "000000000000000000000010"},
"name" : "Yacht",
"money" : 60000000,
"price" : 60000000,
"photo" : "http://www.charterworld.com/news/wp-content/uploads/2011/02/YN-15850-50-metre-semi-displacement-motor-yacht-by-Heesen-Yachts.jpg"
}

0 comments on commit 0ce0f96

Please sign in to comment.