From 2dea08cd74cfff76f7bbd3bad3f1d1dd8be949cf Mon Sep 17 00:00:00 2001 From: Alan Fu Date: Sun, 10 Jan 2016 15:17:10 -0800 Subject: [PATCH 1/5] Additional feed html skeleton --- client/app/client-profile/bio/bio.html | 7 +++---- client/app/client-profile/feed/feed.html | 11 ++++++++--- client/app/client-profile/feed/feedController.js | 7 +++++++ client/app/dashboard/dashboard.html | 6 +++--- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/client/app/client-profile/bio/bio.html b/client/app/client-profile/bio/bio.html index 2ee686a..6a030b5 100644 --- a/client/app/client-profile/bio/bio.html +++ b/client/app/client-profile/bio/bio.html @@ -8,12 +8,11 @@

{{ bio.data.currentClient.client_name }}

alan@gmail.com -
Edit diff --git a/client/app/client-profile/feed/feed.html b/client/app/client-profile/feed/feed.html index 235093a..50c7215 100644 --- a/client/app/client-profile/feed/feed.html +++ b/client/app/client-profile/feed/feed.html @@ -1,8 +1,13 @@
-
- +
+ Feed Stuff 1 goes here +
+
+ Feed Stuff 2 goes here +
+
+ Feed Stuff 3 goes here
- diff --git a/client/app/client-profile/feed/feedController.js b/client/app/client-profile/feed/feedController.js index 68db0d4..c5491b6 100644 --- a/client/app/client-profile/feed/feedController.js +++ b/client/app/client-profile/feed/feedController.js @@ -2,4 +2,11 @@ angular.module('client-recon.client-profile.feed', []) .controller('FeedController', function ($scope, AppState, $state) { var feed = this; feed.data = AppState.state; + + + + + this.data = AppState.state; + }); + diff --git a/client/app/dashboard/dashboard.html b/client/app/dashboard/dashboard.html index a33187a..cc1a034 100644 --- a/client/app/dashboard/dashboard.html +++ b/client/app/dashboard/dashboard.html @@ -6,9 +6,9 @@

{{client.client_name}}

- alan@gmail.com -
Sr. Associate Director of Solutioning
-
Yahoo! Talent Solutions
+ alan@gmail.com +
Sr. Associate Director of Solutioning
+
Yahoo
From b538048be4080e6d5a3fb86ef99d23f5e609d228 Mon Sep 17 00:00:00 2001 From: Alan Fu Date: Sun, 10 Jan 2016 18:49:39 -0800 Subject: [PATCH 2/5] Feed view and controller done --- client/app/client-profile/bio/bio.html | 8 +-- client/app/client-profile/feed/feed.html | 26 +++++++--- .../app/client-profile/feed/feedController.js | 50 ++++++++++++++++--- client/app/dashboard/dashboard.html | 11 ++-- client/app/dashboard/dashboardController.js | 8 ++- client/app/edit-client/edit-client.html | 14 +++++- .../app/edit-client/editClientController.js | 2 +- client/app/new-client/new-client.html | 17 +++++-- client/app/services/clientApi.js | 4 +- client/index.html | 12 ++--- client/styles/style.css | 30 ++++++++++- 11 files changed, 141 insertions(+), 41 deletions(-) diff --git a/client/app/client-profile/bio/bio.html b/client/app/client-profile/bio/bio.html index 6a030b5..abf37fa 100644 --- a/client/app/client-profile/bio/bio.html +++ b/client/app/client-profile/bio/bio.html @@ -1,16 +1,18 @@
- +

{{ bio.data.currentClient.client_name }}

- alan@gmail.com + {{bio.data.currentClient.client_email}}
    + +
  • Company: {{bio.data.currentClient.client_company}}
  • +
  • Title: {{bio.data.currentClient.client_title}}
  • Location: {{bio.data.currentClient.client_zipcode}}
  • Birthday: {{bio.data.currentClient.client_birthday}}
  • -
  • Company: {{bio.data.currentClient.client_company}}
diff --git a/client/app/client-profile/feed/feed.html b/client/app/client-profile/feed/feed.html index 50c7215..f305f0a 100644 --- a/client/app/client-profile/feed/feed.html +++ b/client/app/client-profile/feed/feed.html @@ -1,12 +1,26 @@ -
+
+
+
+

Upcoming:

+

{{feed.fakeFeedData.message}}
+
+
- Feed Stuff 1 goes here +
+

Weather in {{feed.fakeFeedData.weather.name}}:

+ {{feed.fakeFeedData.weather.main.convertedTemp}} F, {{feed.fakeFeedData.weather.weather[0].description}} +
- Feed Stuff 2 goes here -
-
- Feed Stuff 3 goes here +
+

Company News:

+
+
+ {{article.Title}} +

{{article.Description}}

+
+
+

diff --git a/client/app/client-profile/feed/feedController.js b/client/app/client-profile/feed/feedController.js index c5491b6..1b88960 100644 --- a/client/app/client-profile/feed/feedController.js +++ b/client/app/client-profile/feed/feedController.js @@ -1,12 +1,46 @@ angular.module('client-recon.client-profile.feed', []) - .controller('FeedController', function ($scope, AppState, $state) { - var feed = this; - feed.data = AppState.state; - - - - - this.data = AppState.state; + .controller('FeedController', function ($scope, AppState, $state, ClientsApi) { + this.fakeFeedData = { + 'weather':{ + "coord":{"lon":-122.42,"lat":37.77}, + "weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}], + "base":"cmc stations", + "main":{"temp":285.15,"pressure":1023,"humidity":81,"temp_min":284.15,"temp_max":286.15}, + "wind":{"speed":2.6,"deg":80},"clouds":{"all":75},"dt":1452470622, + "sys":{"type":1,"id":478,"message":0.0092,"country":"US","sunrise":1452525898,"sunset":1452561019}, + "id":5391959, + "name":"San Francisco", + "cod":200 + }, + 'news': [ + { + "__metadata":{ + "uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query='Adobe'&NewsSortBy='Date'&NewsCategory='rt_Business'&$skip=3&$top=1", + "type":"NewsResult" + }, + "ID":"a2f61661-9242-43e3-b86f-d4d97f110260", + "Title":"Adobe Systems Incorporated (ADBE) Stake Reduced by Capital Investment Services of America", + "Url":"http://www.tickerreport.com/banking-finance/1202773/adobe-systems-incorporated-adbe-stake-reduced-by-capital-investment-services-of-america/", + "Source":"Ticker Report", + "Description":"Capital Investment Services of America lowered its position in Adobe Systems Incorporated (NASDAQ:ADBE) by 0.7% during the fourth quarter, according to its most recent 13F filing with the SEC. The institutional investor owned 175,415 shares of the software ...", + "Date":"2016-01-09T18:31:48Z" + }, + {"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query='Adobe'&NewsSortBy='Date'&NewsCategory='rt_Business'&$skip=4&$top=1","type":"NewsResult"},"ID":"f15bcaaf-9267-4e8b-bd37-b9c729b63f04","Title":"Adobe preparing fixes for the Windows and OS X versions of Acrobat and Reader","Url":"http://betanews.com/2016/01/08/adobe-preparing-fixes-for-the-windows-and-os-x-versions-of-acrobat-and-reader/","Source":"Beta News","Description":"If you're an advanced user utilizing Adobe products then you likely know the inherent perils of some of the company's platforms. Adobe has gone as far as to instigate its own version of Patch Tuesday, and that will be rolling around in just a few days.","Date":"2016-01-08T20:34:40Z"}, + {"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query='Adobe'&NewsSortBy='Date'&NewsCategory='rt_Business'&$skip=5&$top=1","type":"NewsResult"},"ID":"d12fd518-5d5c-42fc-98b3-9f47bb2a7874","Title":"Web Standards Evolution Drives Hybrid Apps: IDC Study","Url":"http://www.eweek.com/developer/web-standards-evolution-drives-hybrid-apps-idc-study.html","Source":"eWeek","Description":"Indeed, Hilwa points out that HTML5 is finally taking off as browser vendors support the standard more completely and as the industry, particularly advertisers, accelerates its shift from Adobe's Flash technology. \"These moves will open pathways for more ...","Date":"2016-01-10T16:43:14Z"}, + {"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query='Adobe'&NewsSortBy='Date'&NewsCategory='rt_Business'&$skip=6&$top=1","type":"NewsResult"},"ID":"92e4e5cd-ab75-4360-a0ce-59a1dcdcdfb8","Title":"Spirit Air’s Ousted CEO Walks Away With $1 Million and Free Flights for Life","Url":"http://skift.com/2016/01/09/spirit-airs-ousted-ceo-walks-away-with-1-million-and-free-flights-for-life/","Source":"Skift","Description":"Video: Adobe’s Head of Industry Strategy on Creating the Next Golden Age of Travel Sponsored This content is created collaboratively with one of our sponsors. Michael Klein, Adobe’s Head of Industry Strategy, Travel & Retail spoke about the need to ...","Date":"2016-01-09T04:19:58Z"}, + {"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query='Adobe'&NewsSortBy='Date'&NewsCategory='rt_Business'&$skip=7&$top=1","type":"NewsResult"},"ID":"ffb31841-abe9-4012-8ad5-332a1f11a819","Title":"Adobe Flash has begun to die","Url":"http://www.businessinsider.com/adobe-flash-has-begun-to-die-2015-12","Source":"The Business Insider","Description":"Deaths are rarely to be celebrated, but there is one passing that certainly won’t be widely mourned: that of Adobe’s Flash. 2015 was the year the bug ridden security flaw finally went into terminal decline. Once the darling of the new interactive web ...","Date":"2015-12-29T05:37:26Z"} + ], + 'message': 'His birthday is in 9 days.' + }; + this.fakeFeedData.weather.main.temp = (this.fakeFeedData.weather.main.temp - 273) * 1.8 + 32; + this.fakeFeedData.weather.main.convertedTemp = this.fakeFeedData.weather.main.temp.toString().split('.')[0]; + this.fakeFeedData.weather.weather[0].iconUrl = 'http://openweathermap.org/img/w/' + this.fakeFeedData.weather.weather[0].icon + '.png'; + /* + ClientsApi.getFeed(1,this.data.currentClient.client_id) + .then(function(feed){ + this.feed = feed; + }); + */ }); diff --git a/client/app/dashboard/dashboard.html b/client/app/dashboard/dashboard.html index cc1a034..c994e9d 100644 --- a/client/app/dashboard/dashboard.html +++ b/client/app/dashboard/dashboard.html @@ -2,14 +2,17 @@
- +

{{client.client_name}}

- alan@gmail.com -
Sr. Associate Director of Solutioning
-
Yahoo
+ {{client.client_email}} +
{{client.client_title}}
+
{{client.client_company}}
+
+ + +
diff --git a/client/app/dashboard/dashboardController.js b/client/app/dashboard/dashboardController.js index cd60dfb..900d976 100644 --- a/client/app/dashboard/dashboardController.js +++ b/client/app/dashboard/dashboardController.js @@ -9,7 +9,9 @@ angular.module('client-recon.dashboard', []) var initializeClients = function () { ClientsApi.getAll(1) .then(function (clients) { - console.log(clients); + clients.map(function(client){ + client.client_birthday = client.client_birthday.slice(0,10); + }); dashboard.data.clients = clients; }) .catch(function (error) { @@ -24,5 +26,9 @@ angular.module('client-recon.dashboard', []) $state.go('client-profile.bio'); } + dashboard.addNew = function(index) { + $state.go('new-client'); + } + initializeClients(); }); diff --git a/client/app/edit-client/edit-client.html b/client/app/edit-client/edit-client.html index c4b6196..373888c 100644 --- a/client/app/edit-client/edit-client.html +++ b/client/app/edit-client/edit-client.html @@ -20,6 +20,12 @@

Company

+
+
+

Title

+ +
+

Zipcode

@@ -29,7 +35,13 @@

Zipcode

Birthday

- + +
+
+
+
+

Image Url

+
diff --git a/client/app/edit-client/editClientController.js b/client/app/edit-client/editClientController.js index c2a0fb9..bed58a2 100644 --- a/client/app/edit-client/editClientController.js +++ b/client/app/edit-client/editClientController.js @@ -1,5 +1,5 @@ angular.module('client-recon.edit-client', []) -.controller('EditClientController', function ($scope, $timeout, ClientsApi, AppState) { +.controller('EditClientController', function ($scope, $timeout, ClientsApi, AppState, $state) { // TEMPLATE FOR DATA this.data = AppState.state; var successfulPost = this.success; diff --git a/client/app/new-client/new-client.html b/client/app/new-client/new-client.html index 1edc7b1..24d5962 100644 --- a/client/app/new-client/new-client.html +++ b/client/app/new-client/new-client.html @@ -5,31 +5,37 @@

Name

- +

Email

- +

Company

- +

Zipcode

- +

Birthday

- + +
+
+
+
+

Image Url

+
@@ -37,6 +43,7 @@

Birthday

+
New Client Successfully Added! diff --git a/client/app/services/clientApi.js b/client/app/services/clientApi.js index dfe13e5..45e1642 100644 --- a/client/app/services/clientApi.js +++ b/client/app/services/clientApi.js @@ -21,7 +21,7 @@ angular.module('client-recon.services', []) var editOne = function(user_id, editedClient){ //currently user is hard coded - return $http.put('/api/users/' + 1 + '/clients/' + editedClient.client_id, editedClient) + return $http.put('/api/users/' + user_id + '/clients/' + editedClient.client_id, editedClient) .then(function(res){ return res.data; }); @@ -29,7 +29,7 @@ angular.module('client-recon.services', []) var getFeed = function(user_id, client_id) { //currently user is hard coded - return $http.get('/api/users/' + 1 + '/clients/' + user_id + '/feed') + return $http.get('/api/users/' + user_id + '/clients/' + user_id + '/feed') .then(function(res){ return res.data; }); diff --git a/client/index.html b/client/index.html index 5ddbd29..47f2201 100644 --- a/client/index.html +++ b/client/index.html @@ -4,8 +4,9 @@ - Client Recon + Frendli + @@ -13,19 +14,14 @@
diff --git a/client/styles/style.css b/client/styles/style.css index ef7fdc8..5e48a15 100644 --- a/client/styles/style.css +++ b/client/styles/style.css @@ -23,6 +23,7 @@ nav{ .nav-bar{ margin: 0px auto; width: 1200px; + text-align: center; } .nav-bar ul{ @@ -36,8 +37,9 @@ nav{ } .nav-link{ - font-size: 1.3em; - padding: 10px 15px; + font-family: 'Font-Awesome', 'Lato', sans-serif; + font-size: 1.8em; + padding: 5px 15px; display: inline; } @@ -60,6 +62,13 @@ nav{ z-index: -1; } +.add-new{ + text-align: center; + padding: 10px 0px; + font-size: 1.5em; + font-weight:400; +} + .authentication{ text-align: right; } @@ -226,6 +235,23 @@ nav{ /* --------- CLIENT PROFILE.BIO VIEW --------- */ +.article-container div:hover { + cursor: default; + background-color: white; +} + +.article{ + padding: 10px 20px; + +} +.article-headline{ + font-size: 0.9em; + margin-bottom: 5px; +} + +.article-description{ + font-size: 0.8em; +} From 04723970e9fa3784db58edd52537b4d954d4abcd Mon Sep 17 00:00:00 2001 From: Alan Fu Date: Sun, 10 Jan 2016 18:56:20 -0800 Subject: [PATCH 3/5] Adds feed view/controller and new way to add clients --- client/index.html | 4 ++-- client/styles/style.css | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/index.html b/client/index.html index 47f2201..ebe51fc 100644 --- a/client/index.html +++ b/client/index.html @@ -4,9 +4,9 @@ - Frendli + Frend.li - + diff --git a/client/styles/style.css b/client/styles/style.css index 5e48a15..c365aab 100644 --- a/client/styles/style.css +++ b/client/styles/style.css @@ -37,13 +37,13 @@ nav{ } .nav-link{ - font-family: 'Font-Awesome', 'Lato', sans-serif; + font-family: 'Courgette', 'Lato', sans-serif; font-size: 1.8em; - padding: 5px 15px; + padding: 0px 15px; display: inline; } -.nav-link:select{ +link:active, link:visited{ text-decoration: none; } From 5d0baa5aded24cda560641e78f97d07a3a63c5bd Mon Sep 17 00:00:00 2001 From: Alan Fu Date: Mon, 11 Jan 2016 10:15:02 -0800 Subject: [PATCH 4/5] Getting set up on the front end --- client/app/new-client/newClientController.js | 6 ++++-- client/styles/style.css | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/app/new-client/newClientController.js b/client/app/new-client/newClientController.js index 1b7dd42..6957b3a 100644 --- a/client/app/new-client/newClientController.js +++ b/client/app/new-client/newClientController.js @@ -3,7 +3,7 @@ angular.module('client-recon.new-client', []) -.controller('NewClientController', function ($scope, $timeout, ClientsApi, AppState) { +.controller('NewClientController', function ($scope, $timeout, ClientsApi, AppState, $state) { // TEMPLATE FOR DATA this.data = { name:'', @@ -18,8 +18,9 @@ angular.module('client-recon.new-client', []) this.postClient = function () { //DETECT USER ID FROM APP STATE - ClientsApi.addOne( 1,newClient).then(function(res){ + ClientsApi.addOne(1,newClient).then(function(res){ // CALLED AFTER SUCCESSFUL POST + console.log(res); successfulPost = true; newClient.name = ''; newClient.email = ''; @@ -30,6 +31,7 @@ angular.module('client-recon.new-client', []) // NOTIFICATION ONLY SHOW FOR A FEW SECONDS AND DISAPPEAR $timeout(function(){ successfulPost = false; + $state.go('dashboard'); }, 2000); }) diff --git a/client/styles/style.css b/client/styles/style.css index c365aab..b619964 100644 --- a/client/styles/style.css +++ b/client/styles/style.css @@ -13,7 +13,6 @@ a:hover{ nav{ background-color: rgba(0,0,0,0.5); font-weight: 300; - background-color: #293565; letter-spacing: 0.4px; -webkit-box-shadow: 0px 2px 7px 0px rgba(0,0,0,0.5); -moz-box-shadow: 0px 2px 7px 0px rgba(0,0,0,0.5); From e36d733b5d2436ee2489e20f2b530dcfcda27dbf Mon Sep 17 00:00:00 2001 From: Alan Fu Date: Mon, 11 Jan 2016 10:28:56 -0800 Subject: [PATCH 5/5] New Client adds all titles --- client/app/new-client/new-client.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/app/new-client/new-client.html b/client/app/new-client/new-client.html index 24d5962..1f7a78c 100644 --- a/client/app/new-client/new-client.html +++ b/client/app/new-client/new-client.html @@ -20,6 +20,12 @@

Company

+
+
+

Title

+ +
+

Zipcode