pfletcherhill / Gandalf

Events application for the Yale community.
2 stars 0 forks source link

Calendar view nearly done! #25

Closed khannotations closed 11 years ago

khannotations commented 11 years ago

Bug with time zones: they don't change the date! So though TEDxYale starts before HackYale, it appears on the front end that it starts after because the date didn't go back when subtracting 5 hours from GMT. How should we fix?

I literally renamed almost everything. Pay attention to the changes; I think from now on all our html classnames should have hyphens (eg. feed-day-container), not underscores. filenames, variables and JS classes should continue to be named how they are. all the renames are pretty self explanatory though.

As for the feed itself: styling with float:left's isn't scaleable or manageable. It's much better to use display: inline-block. compare your previous feed-day (which was named something else in your code, probably). i made the time a "left" div, and then the rest of the info as a right div. this also makes much more intuitive sense, instead of having odd margin-lefts every where and adjusting 3 numbers each time you want to change the design instead of 1.

Use variables in your Sass!!

Were you previously sorting the events somehow? I'm now doing it in the sort_and_group function in index.coffee, but it might better be done in the backend. i also don't know if you're doing it somewhere else...

The calendar is as functional as can be hoped for! For some reason, jQuery selectors aren't working nicely in backbone. You can see what i mean though by running the following: In the ruby console:

b = Event.find(4)
b.end_at ="2012-11-22 04:39:02"
b.save

That will make HackYale and TED Overlap. You can see that it's pretty ugly in the browser (one just covers up the other). Now open up the chrome console and run:

$(".cal-event[data_id='1']").addClass("overlap-2").addClass("overlap-order-0")
$(".cal-event[data_id='4']").addClass("overlap-2").addClass("overlap-order-1")

voila! you'll see what I mean. of course, the ordering is messed up because of the aforementioned time zone bug.

Also, i removed normalize.css because it comes with bootstrap.

I think i just worked more than 12 hours straight...holy cow!

pfletcherhill commented 11 years ago

Okay, sorry for going crazy on the comments, but once those changes are made, I'll merge. Good stuff!

pfletcherhill commented 11 years ago

Baller

khannotations commented 11 years ago

i'm RETARDED