Permalink
Browse files

Merge branch 'patrick' of https://github.com/SE-Team/project-x into j…

…ordan
  • Loading branch information...
2 parents 861d64e + 4d75283 commit 70893c3dfc35525f31a22480d3263a1a36bcc965 @jordanrossdunn jordanrossdunn committed Dec 9, 2012
@@ -229,7 +229,7 @@ def tags
"entertainment",
"personal",
"school",
- "outdoors",
+ "outdoor",
"etc"]
end
View
@@ -70,8 +70,8 @@ def toggle_google_calendar_event(user_uuid)
def generate_google_event_json
{
- "start" => { "date" => event.start_date.strftime("%Y-%m-%d") },
- "end" => { "date" => event.end_date.strftime("%Y-%m-%d") },
+ "start" => { "date" => self.start_date.strftime("%Y-%m-%d") },
+ "end" => { "date" => self.end_date.strftime("%Y-%m-%d") },
"location" => self.location,
"transparency" => "transparent",
"description" => self.body,
View
@@ -19,6 +19,8 @@ class Link #from http://datamapper.org/docs/associations.html
property :id, Serial
property :user_name, String, key: true, length: (3..40), required: true
property :img_url, String
+ property :display_name, String
+ property :location, String
property :email, String
property :password, String
property :display_name, String
@@ -284,7 +284,6 @@ width: 350px;
height: 38px;
background: #666;
display:block;
-border-bottom: 7px solid #00A3D9;
}
.element.large .window-pane-buttons .google-event-btn{
@@ -713,3 +712,55 @@ bottom:14px;
#start_time table {
background-color: red;
}
+
+.etc.element .event-date { border-bottom: 4px solid red; }
+.etc.element.large .event-date { border-bottom: 0px; }
+.etc.large .window-pane-buttons { border-bottom: 7px solid red; }
+
+.outdoor.element .event-date { border-bottom: 4px solid orange; }
+.outdoor.element.large .event-date { border-bottom: 0px; }
+.outdoor.large .window-pane-buttons { border-bottom: 7px solid orange;}
+
+.entertainment.element .event-date { border-bottom: 4px solid yellow; }
+.entertainment.element.large .event-date { border-bottom: 0px; }
+.entertainment.large .window-pane-buttons { border-bottom: 7px solid yellow; }
+
+.personal.element .event-date { border-bottom: 4px solid green; }
+.personal.element.large .event-date { border-bottom: 0px; }
+.personal.large .window-pane-buttons { border-bottom: 7px solid green; }
+
+.tv.element .event-date { border-bottom: 4px solid blue; }
+.tv.element.large .event-date { border-bottom: 0px; }
+.tv.large .window-pane-buttons { border-bottom: 7px solid blue; }
+
+.music.element .event-date { border-bottom: 4px solid purple; }
+.music.element.large .event-date { border-bottom: 0px; }
+.music.large .window-pane-buttons { border-bottom: 7px solid purple; }
+
+.movies.element .event-date { border-bottom: 4px solid aqua; }
+.movies.element.large .event-date { border-bottom: 0px; }
+.movies.large .window-pane-buttons { border-bottom: 7px solid aqua; }
+
+.art.element .event-date { border-bottom: 4px solid brown; }
+.art.element.large .event-date { border-bottom: 0px; }
+.art.large .window-pane-buttons { border-bottom: 7px solid brown; }
+
+.community.element .event-date { border-bottom: 4px solid crimson; }
+.community.element.large .event-date { border-bottom: 0px; }
+.community.large .window-pane-buttons { border-bottom: 7px solid crimson; }
+
+.sports.element .event-date { border-bottom: 4px solid #00A3D9; }
+.sports.element.large .event-date { border-bottom: 0px; }
+.sports.large .window-pane-buttons { border-bottom: 7px solid red; }
+
+.school.element.large .event-date { border-bottom: darkolivegreen; }
+.school.element .event-date { border-bottom: 4px solid #00A3D9; }
+.school.large .window-pane-buttons { border-bottom: 7px solid darkolivegreen; }
+
+.political.element.large .event-date { border-bottom: deepskyblue; }
+.political.element .event-date { border-bottom: 4px solid #00A3D9; }
+.political.large .window-pane-buttons { border-bottom: 7px solid deepskyblue; }
+
+.charity.element.large .event-date { border-bottom: darkorange; }
+.charity.element .event-date { border-bottom: 4px solid #00A3D9; }
+.charity.large .window-pane-buttons { border-bottom: 7px solid darkorange; }
View
@@ -131,6 +131,14 @@ def categories
haml :with_sidebar
end
+post '/user/:username/account' do
+ @user = current_user
+ @user.display_name = params[:display_name]
+ @user.location = params[:location]
+ @user.save!
+ redirect '/'
+end
+
get '/user/:username/profile' do
@user = current_user
@content = partial(:'user/profile', {user: @user})
@@ -34,4 +34,4 @@
%a.event-load-btn{href: "/user/#{map[:user_name]}/event/#{map[:id]}"}
More Info
%a.google-event-btn{id: "google-btn-#{map[:id]}", href:"#", class: "#{map[:event].google_calendar_id ? "synched-btn-decoration" : ""}"}
- Add to calendar
+ Add to calendar
@@ -10,18 +10,13 @@
%img.center_block.mid_mb{:src => gravatar_for(user,200)}
%form.form-horizontal{:action => "", :method => "post"}
.control-group
- %label.control-label{:for => "inputEmail"}
- Email:
- .controls
- %input#inputEmail{:name => "email", :value => "#{user.email}", :type => "text"}
- .control-group
%label.control-label{:for => "inputDisplayName"}
Display Name
.controls
- %input#inputDisplayName{:name => "display_name", :placeholder => "#{user.display_name ? user.display_name : 'Display Name'}", :type => "text"}
+ %input#inputDisplayName{:name => "display_name", :placeholder => "Display Name", :type => "text", :value => "#{user.display_name}"}
.control-group
%label.control-label{:for => "location"}
Location
.controls
- %input#location{:name => "location", :placeholder => "Location", :type => "text"}
+ %input#location{:value => "#{user.location}",:name => "location", :placeholder => "Location", :type => "text"}
%input.center_block{:type => "submit", :class => "btn", :name => "Update"}/
@@ -42,7 +42,8 @@
$container.isotope('insert', html);
// add the click handlers for the new elements
$('.google-event-btn').click(function(e) {
- var event_id = $(this).parent().parent().parent().parent().attr('data-symbol');
+ var event_id = $(this).parent().parent().parent().parent().parent().parent().attr('data-symbol');
+ console.log(event_id);
e.preventDefault();
$.ajax({
type: "POST",

0 comments on commit 70893c3

Please sign in to comment.