Releases: vojtech-dobes/nette.ajax.js
Releases · vojtech-dobes/nette.ajax.js
Released version 2.3.0
- Fixed compatibility with Nette Forms 2.3 and older (thx @PingusPepan)
- Fixed bug when passing absolute URL with port number (thx @iguana007)
- Bower
nette.ajax.js
doesn't depend onnette-forms
anymore
Released version 2.2.0
- Added support for validation scope in forms (thx to @xificurk)
- Default configuration of validation extension can be globally changed
- Enabled installation via
npm install nette.ajax.js
(thx to @ondrs) - Fixed error on ajaxified form without
method
(thx to @Ciki) &action
(thx to @enumag) - Fixed compatibility with Nette Forms 2.4 (thx to @venca-x)
- Snippet's content gets always placed if it contains
<script>
element (thx to Jakub Patocka)
Example of validation defaults configuration:
$.nette.ext('validation').validation.keys = false; // also clicks with Cmd/Ctrl will be ajaxified
Released version 2.1.0
$.nette.ajax()
now supports first argument to be URL (thus becoming more similar to$.ajax()
)- Bower installs also extensions.
- Content of snippet is replaced with
$el.html(...)
only if new content differs from the previous one.
Released version 2.0.0
Improvements:
history.ajax.js
extension extracted to separate repositorynette.ajax.js
can be installed as Bower package
Features:
- added support for Ajax file uploads
- added support for
data-ajax-prepend
data attribute (similar todata-ajax-append
)
Bugfixes:
- form validation works nicely with
nette.ajax.js
in IE 8 (#75)
Released version 1.2.3
Here is the list of fixed issues:
- wrong selector in history.ajax
- Popstate on page's load in WebKit based browsers
- History: fix onload popstate trigerring reload
- popstate.nette handler prevents Youtube and Google custom search from loading Bug
- a.ajax doesn't stop propagation of the link in IE 8
Thanks to all reporters and contributors!
1.2.3 RC1
Released version 1.2.2
- added new method for removing ajaxification from any elements
$('.foo').netteAjaxOff();
- added default selector for
<button type=submit class=ajax>
There are also 3 new extensions:
confirm.ajax.js
for simple confirmation questions via[data-confirm]
attributega.ajax.js
outlining the way how to use Google Analytics withhistory.ajax.js
extensionfidRemove.ajax.js
for silent removal of_fid
parameter from URL
Also automatic call of load
on successful request is no longer registered in init
extension, but in load
extension.
Released version 1.2.1
- added new event
prepare
in request's lifecycle (triggered beforebefore
) - added support for infinite scrolling
<ul n:snippet="foo" data-ajax-append>
<li n:foreach="$articles as $article">
{$article->title}
</li>
</ul>
- events
success
,error
andcomplete
receive same arguments as in normal$.ajax()
call - new API for more precise work with snippets
$.nette.ext('snippets').before(function ($el) {
// příležitost k odvázání událostí a dalšího smetí...
});
$.nette.ext('snippets').after(function ($el) {
// ... a v již aktualizovaném snippetu možnost navázat haraburdí nové
});
Released version 1.2.0
- new support for History API (from HTML 5)
$configurator->onCompile[] = function ($configurator, $compiler) {
$compiler->addExtension('ajax', new VojtechDobes\NetteAjax\Extension);
};
- dependencies among extensions can be optional
- returned support for native
beforeSend
option - adding
data-ajax-pass
to ajaxified element will prevent killing the original event - fixed compatibility with
$form->addDynamic()
There is also change in events API:
beforeSend
now triggersbefore
eventstart
event is called immediately after start of the request- return value of
start
callback loses any meaning - events
before
andstart
receive same arguments:jqXHR, settings
Released version 1.1.2
- added support for anonymous extensions (name is optional as first argument)
$.nette.ext({
load: function () { ...
});
- extensions can be turned off per specific AJAX request
$.nette.ajax({
off: ['snippets']
}, this, e);
<a n:href="foo!" class="ajax" data-ajax-off="snippets">Do something.</a>
- added new jQuery shortcut method
.netteAjax()
for calling request directly on element
$('#element').click(function (e) {
$(this).netteAjax(e, { ... }).done(function () { ... });
});
setValidationScope(FALSE)
called on form is now respected- forms returned via snippets are automatically enhanced by client validation
- fixed
unique
extension