@vojtech-dobes vojtech-dobes released this Mar 4, 2017 · 5 commits to master since this release

Assets 2
  • 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

@vojtech-dobes vojtech-dobes released this Oct 15, 2016 · 12 commits to master since this release

Assets 2
  • 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

@vojtech-dobes vojtech-dobes released this Sep 22, 2015 · 24 commits to master since this release

Assets 2
  • $.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.

@vojtech-dobes vojtech-dobes released this Nov 11, 2014 · 28 commits to master since this release

Assets 2

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)
Pre-release

@vojtech-dobes vojtech-dobes released this Jan 14, 2014 · 41 commits to master since this release

Assets 2

Same as stable version 1.2.3.

@vojtech-dobes vojtech-dobes released this Jul 6, 2013 · 68 commits to master since this release

Assets 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] 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.

@vojtech-dobes vojtech-dobes released this Jul 6, 2013 · 93 commits to master since this release

Assets 2
  • 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é
});

@vojtech-dobes vojtech-dobes released this Jul 6, 2013 · 103 commits to master since this release

Assets 2
  • 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
Sep 14, 2012
Returning false in 'start' doesn't cause TypeError
TypeError: $.ajax($.extend({
	beforeSend: function (xhr) {
		return inner.fire({
			name: "start",
			off: settings.off || {}
		}, xhr);
	}
}, settings)).done is not a function...

fix