Fix prettyDate(). Also, provide a index.php file to do CORS. #7

Merged
merged 3 commits into from Sep 19, 2012

Projects

None yet

2 participants

@DinoChiesa

fix to prettyDate() function and its caller, drawMessages().

There was lots of date arithmetic, none of it documented, which seemed to go round
the block and end up where it started. Converting a number to a Date()
object, then converting that to a string, then replacing dashes in that
string with slashes, converting the result back to another Date()
object. It was all very obtuse. On my browser it resulted in all
messages being formatted as "just now" which is obviously wrong. I
simplified things and it seems to work better now.

@DinoChiesa DinoChiesa Update to fix prettyDate display in the drawMessages() func. There was
lots of date arithmetic, none of it documented, which seemd to go round
the block and end up where it started. Converting a number to a Date()
object, then converting that to a string, then replacing dashes in that
string with slashes, converting the result back to another Date()
object. It was all very obtuse. On my browser it resulted in all
messages being formatted as "just now" which is obviously wrong. I
simplified and it seems to work better now.
1616c68
@rodsimpson
@rodsimpson rodsimpson merged commit 77ce760 into apigee:master Sep 19, 2012
@rodsimpson

Dino,

We have made some modifications to the way access control headers are dealt with in the usergrid API / servers which may make the index.php file unnecessary. That fix should go out very soon and it will be interesting to see what your experience is with it.

Again, thank you for the updates to the code!

Rod

@DinoChiesa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment