vojtech-dobes / nette.ajax.js

Flexible AJAX for Nette Framework. Supports snippets, redirects etc.
https://componette.org/vojtech-dobes/nette.ajax.js/
MIT License
149 stars 85 forks source link

Fixed ajax calling by passing url string instead of settings object #107

Closed richard-ejem closed 9 years ago

richard-ejem commented 10 years ago

Situation before: when I called $.nette.ajax('http://example.com'), the internal jquery $.ajax('http://example.com') was processed successfully, however nette.ajax.js didn't wrapped it correctly (i.e. one of side effects was that 'before' event was not properly assigned and therefore not fired).

Fix: if string is passed now, the settings object is converted: settings = {url: settings}, and now both nette.ajax.js and jquery is behaving proeprly.

vojtech-dobes commented 9 years ago

Thank you!