Skip to content

Releases: vojtech-dobes/nette.ajax.js

Released version 2.3.0

04 Mar 13:03
Compare
Choose a tag to compare
  • 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 on nette-forms anymore

Released version 2.2.0

15 Oct 12:08
Compare
Choose a tag to compare
  • 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

22 Sep 11:51
Compare
Choose a tag to compare
  • $.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

11 Nov 18:04
Compare
Choose a tag to compare

Improvements:

  • history.ajax.js extension extracted to separate repository
  • nette.ajax.js can be installed as Bower package

Features:

  • added support for Ajax file uploads
  • added support for data-ajax-prepend data attribute (similar to data-ajax-append)

Bugfixes:

  • form validation works nicely with nette.ajax.js in IE 8 (#75)

Released version 1.2.3

1.2.3 RC1

14 Jan 14:49
Compare
Choose a tag to compare
1.2.3 RC1 Pre-release
Pre-release

Same as stable version 1.2.3.

Released version 1.2.2

06 Jul 20:40
Compare
Choose a tag to compare
  • 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] attribute
  • ga.ajax.js outlining the way how to use Google Analytics with history.ajax.js extension
  • fidRemove.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

06 Jul 20:29
Compare
Choose a tag to compare
  • added new event prepare in request's lifecycle (triggered before before)
  • 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 and complete 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

06 Jul 20:25
Compare
Choose a tag to compare
  • 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 triggers before event
  • start event is called immediately after start of the request
  • return value of start callback loses any meaning
  • events before and start receive same arguments: jqXHR, settings

Released version 1.1.2

06 Jul 20:16
Compare
Choose a tag to compare
  • 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