Ajax-Include-Pattern icon indicating copy to clipboard operation
Ajax-Include-Pattern copied to clipboard

added onOrientationChange / onManualCall options and test page

Open zigotica opened this issue 12 years ago • 9 comments

this "fixes" (improves at least) #6 as explained in readme:

onOrientationChange: when set to false it avoids Ajax call when a media query does not evaluate to true onload but later onOrientationChange. This can save bandwith and also avoid confusion when user has passed scrolling area of elements containing ajaxInclude triggers.

onManualCall: to allow downloading content in previous situations or simply when a media query is not met (ie. smaller displays), we can do so manually on click. Script detects links inside ajaxInclude elements and prevents further action since we want to get content via ajax if possible.

zigotica avatar Nov 27 '12 14:11 zigotica

sorry @scottjehl for sending 4 commits, had'nt run grunt and couldnt find the error travis was blocking. i hope you do like the PR anyway

zigotica avatar Nov 27 '12 17:11 zigotica

sorry mate, I can't stop it! :)

zigotica avatar Nov 27 '12 18:11 zigotica

You are welcome

staabm avatar Nov 27 '12 21:11 staabm

It doesn't matter how many commits are contained in a PR. You can rebase it again into one commit, when everything is finished

staabm avatar Nov 27 '12 22:11 staabm

@staabm hell i should go learn some Git now… :) rebase sounds pretty scary to me :S

zigotica avatar Nov 27 '12 22:11 zigotica

See e.g. http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

staabm avatar Nov 27 '12 22:11 staabm

cool, thanx again! but wont i mess it up if i rebase commits already pushed and even commented here?

zigotica avatar Nov 27 '12 22:11 zigotica

The whole git history of this branch will be rewritten, so you should wait until everything is finished.

staabm avatar Nov 27 '12 22:11 staabm

@staabm @scottjehl Hi, I had forgotten about this PR. Would you be interested in merging this? do you need any further background info, etc? I've used my fork in several projects now and I think the 2 additions are nice. Of course that's just my opinion :)

zigotica avatar Mar 27 '14 16:03 zigotica