ezsystems/ezpublish-legacy — pull request #1048 by dpobel (2014-07-30 16:31:07+00:00)
Title: [WIP] EZP-23208: async publishing JavaScript polling gives bad results

JIRA: https://jira.ez.no/browse/EZP-23208

# Description

The asynchronous publishing *queued* page is meant to regularly poll eZ Publish to inform the editor whether a given version is still waiting to be published or not. It does that by doing an AJAX request every second no matter if the server is slow or takes to much time to generate a response. As a result, if the server is a bit slow, the browser will queue a lots of requests which at some point (depending on the browser) blocks others tabs or request to the same server giving the impression to the editor that a content is still waiting to be published while it was actually published several minutes ago.

This patch (actually 664e4b5) makes sure the JavaScript won't generate a new AJAX request if a previous one is still not executed.

# Tasks

* [x] Fix CS
* [x] Fix EZP-23208
* [ ] Improve the UI and give better feedback to the editor

# Tests

manual tests by slowing down the AJAX response and opening the same *queued* page in several tabs.