Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
0.6beta1, 0.6, 0.7, 0.8, 0.8.1, 1.0, 1.1, 1.1.1
-
None
Description
Currently, the Image Reorderer has a default afterMove event listener that takes care of updating the image order correctly for a form-based style of communicating with the server. It is intended to automatically POST the order back to the server after each move.
However, there is a bug in the code that causes it to never be invoked. The code tries to assign the event listener to the options.afterMoveCallback member, which is no longer supported by the Reorderer (and hasn't been since about Infusion 0.6 or so).
The fix is simple and will be included in Infusion 1.2. In the meantime, there are straightforward workarounds. Try this:
var url; // Put the URL you want to POST the order back to here.
fluid.reorderer("#gallery", {
listeners: {
afterMove: function (imageMoved, position, allImages) {
images.each(function (idx, image)
);
var imageOrder = jQuery("#reorder-form").serialize();
jQuery.ajax({
type: "POST",
url: url,
data: imageOrder,
complete: function (data, ajaxStatus)
});
}
}
});
Attachments
Issue Links
- relates to
-
FLUID-3122 Image Reorderer default API, sample code, and documentation still use the old-style id-based scheme for identifying and communicating orderables.
-
- Closed
-