On Wed, Jan 26, 2011 at 2:30 PM, Ethan Jewett <[email protected]> wrote: > Yeah, I agree with your colloquialism :-) I think we need to step back > a little bit and figure out how to do one of two things: > > 1. Use only relative paths, which would probably involve having each > page set a JS variable to the value of the relative base path from its > location (e.g. "../..")
That would be perfect but do you have ideas how to do this? Any ideas? The current code committed to JIRA is still a work around and doesn't really work. Shall I do a rollback to the old code - at least it worked in jetty. > > 2. Using paths provided by the snippets (which know "where" they are). > > Truthfully, we could probably stand to do a complete rewrite of the > comet timeline to use incremental updates instead of slinging JSON all > over the place and then having the page manage its own updates. (The > page would still manage it's own updates, but that would be managed by > Lift, not by our custom JS.) I think that would make this problem go > away. I looked at this a while ago, kind of shuddered, and looked > away, ROFL - I know the feeling - I'm not a Javascript or UI expert either. >but maybe it is time to look at it again. > > Ethan > > On Wed, Jan 26, 2011 at 4:17 PM, Richard Hirsch <[email protected]> wrote: >> Still working on this problem - it's a little bit of a bitch. I >> couldn't get Tomcat and Jetty working correctly. It was always one or >> the other. >> >> D. >> >> On Wed, Jan 26, 2011 at 8:31 AM, Richard Hirsch <[email protected]> >> wrote: >>> Oops - you are right. >>> >>> That's what happens with those quick changes.... >>> >>> Let me take another look... >>> >>> D. >>> >>> On Wed, Jan 26, 2011 at 8:27 AM, Ethan Jewett <[email protected]> wrote: >>>> Unfortunately, this change is going to break the links on all the >>>> pages except the main page. We need to find another way to do this. >>>> :-( >>>> >>>> Ethan >>>> >>>> On Wed, Jan 26, 2011 at 10:22 AM, <[email protected]> wrote: >>>>> Author: rhirsch >>>>> Date: Wed Jan 26 07:22:44 2011 >>>>> New Revision: 1063618 >>>>> >>>>> URL: http://svn.apache.org/viewvc?rev=1063618&view=rev >>>>> Log: >>>>> [ESME-327] URL path problems >>>>> >>>>> Modified: >>>>> esme/trunk/server/src/main/webapp/scripts/display_messages_top.js >>>>> >>>>> Modified: >>>>> esme/trunk/server/src/main/webapp/scripts/display_messages_top.js >>>>> URL: >>>>> http://svn.apache.org/viewvc/esme/trunk/server/src/main/webapp/scripts/display_messages_top.js?rev=1063618&r1=1063617&r2=1063618&view=diff >>>>> ============================================================================== >>>>> --- esme/trunk/server/src/main/webapp/scripts/display_messages_top.js >>>>> (original) >>>>> +++ esme/trunk/server/src/main/webapp/scripts/display_messages_top.js Wed >>>>> Jan 26 07:22:44 2011 >>>>> @@ -195,7 +195,13 @@ function displayMessages(msgArray, eleme >>>>> >>>>> >>>>> newMsg.find('#author').text(msgAuthor.nickname); >>>>> - newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname >>>>> ); >>>>> + >>>>> + // Dealing with tomcat >>>>> + if (top.location.pathName == "/") >>>>> + newMsg.find('#author').attr('href',"/user/" + >>>>> msgAuthor.nickname ); >>>>> + else >>>>> + newMsg.find('#author').attr('href', window.location.pathname + >>>>> "user/" + msgAuthor.nickname ); >>>>> + >>>>> >>>>> >>>>> // Dealing with users with no avatars >>>>> >>>>> >>>>> >>>> >>> >> >
