ncri / ajaxify_rails Goto Github PK
View Code? Open in Web Editor NEWRails gem for automatically turning internal links into ajax links that load content without a full page reload.
License: MIT License
Rails gem for automatically turning internal links into ajax links that load content without a full page reload.
License: MIT License
For example:
Login required before filter redirects to login page but when a ajaxified link is clicked and the filter halts the execution, the redirect_to is also ajaxified but I want it to load the full page instead of ajaxified div.
Is there any way to do so?
Thanks
RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.
via e.g.
spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']
Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.
There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.
I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!
Appendix:
If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies
p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.
We have installed ajaxify_rails 0.7.5.
It is working perfectly on development environment, wherein assets are not precompiled.
Then when we deployed our app on staging and production environment. Something weird is happening. It appears that ajaxify_rails is processing the request twice. When you click a link, ajaxify will happen, then after the response is rendered the page will refresh. I'm not sure if ajaxify_rails is processing the request twice, or there is something on ajaxify_rails code that initiate a refresh action after rendering.
I downgraded to v 0.5.* then the issue was gone. The issue is also not present on v. 0.2.*.
There is something on v 0.7.* and the precompiled assets that is triggering this auto-refresh thing. I still don't have an idea what is happening on the code. Maybe these will give you some clues where to look at. Thanks and Goodluck!
Hi
line 118 and 119, it will be better to use the buil-in rails confirm function in place of the standard confirm function, like this
if options.confirm
return false unless $.rails.confirm(options.confirm, element)
it should permit to customize the dialog of the confirmation.
But how to pass the element (link) parameter
Vincent
I want to make work ajaxify with links that appears in "changing content - class main". Can I refresh ajaxify in some way ? I was trying initialize Ajaxify again in content_inserted event but it was just unlucky shot.
I have a sitaution where I need to deactivate ajaxify.
I tried Ajaxify.activate(false) as stated in the readme, but it doesn't seem to do anything.
Ajaxify works just fine even after calling Ajaxify.activate(false).
So I tried just not initializing Ajaxify at all for specific situations.
I expected it to do fail gracefully and do a full page load, but it returned an error at line 184.
TypeError: current_url is null
options.url = current_url.replace(/(&|&|?)ajaxify_redirect=true/, '');
And then I went do the demo site to see if it does full page load when the check box is not checked. Everything was still ajaxified when 'ajaxify' checkbox was not checked.
It would be great if deactivating works properly and it fails gracefully to do full page load when Ajaxify is not initialized.
Thank you.
In requirments there is :
Your app doesn't use named anchors (#). Named anchors can't be correctly represented in the fallback hash based url scheme.
Is it some hack for it ?
Hello !
I am having a problem with ajaxify's response, when i try to access to a link and so to update only #main, the response contains the html code of the whole page (with js sources / metadata / footer ... ) and put it in the #main div. I really dont understand why, even after analyzing your demo source code.
If anyone had this problem before or knows how to solve it, it would be very nice !
Thank you :-)
When I click on a link, the screen always scrolls to the top.
It can be reproduced on the demo site. Decrease the height of the browser window and you will see that screen scrolls to the top when a link is clicked.
I want my screen to stay where it is, but there are situations where it needs to scroll to the top. It would be great if its scrolling behavior can be configurable.
Do not work with cells gem
Hey
First, thanks for this gem, it's cool
But I have a question for you, how to trigger events if ajax request was failed. all the callbacks are from successul requests
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.