-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Allow local browsing of the docs without a web server #3117
Conversation
Potential fix for #3113 |
I don't think we should disable AJAX is browsing locally if we can avoid it. I'd prefer to add in the URL fix here, but leave AJAX on and add in the messaging about the server requirement. Otherwise, you won't see transitions and other important features. |
How about an automatic ajax check to see if it should be disabled? |
.filter( "[href='/']" ).attr( "href", "/index.html" ).end() | ||
.filter( "[href^='..']" ).filter( "[href$='/']" ).each(function() { | ||
this.href = $(this).attr("href")+"index.html"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need to do this on changePage
when the ajax requests are working for these protocols to alter new links. Sorry I didn't think of this earlier.
@toddparker and I were thinking a big yellow warning that sits above the content (ie a direct descendant of |
@johnbender - simple mockup of the yellow bar of doom (and helpful information) here: Content isn't right if we auto disable ajax, but that's the style. |
@eddimonge I pulled your changes and I'm working on adding the warning (almost done), though I'm still unclear on why we need to |
@johnbender Since its adding it to all links on the page, I was account for the following examples:
However, there may also be external links that added in like:
So the first check tests for a single slash, which is safe and easy to do.
One link style I forgot about is the non-trailing slash ones:
Other links:
|
@johnbender @toddparker I added in more url rewrites and the warning message. I have it appending to the footer of the page. I can change it to somewhere else if need be. |
Is there a way to preview the message before pushing? .................................. . . . . On Nov 21, 2011, at 10:05 PM, "Eddie Monge Jr." reply@reply.github.com wrote:
|
Pull from my repo or copy the jqmdocs.js file into your source, make docs, unzip and test |
I'll pull eddie's latest and add the pagechange binding that I created on my end tomorrow morning. |
changes pushed |
No description provided.