I've found that in the latest git, some of the AJAX message animation is not shown correctly if it has been shown some times on the same page.
Way to reproduce this (with the ajax option enabled in the preferences):
1. on the home page, click Privileges menu
2. click "Add a new User" or "Edit Privileges" link, and it will display a new popup dialog
3. close the popup dialog by pressing Esc or click close button on the top right corner
4. repeat step 2 and 3 until several times (for me, it is about 3 - 5 times), and you'll see that the AJAX loading message will never show up again even the AJAX request is on progress
After some googlings, I found that jQuery clearQuery function used in latest git, will only stop current animation and remove queued animation as well. But, left current animation value unchange. (i.e., unfinished fadeOut animation, will left "opacity" attribute < 1 and > 0)
This is what creates the "not showing up" AJAX message. I suggest to use stop(true, true) function [1] to solve this.
initial patch
Also, in the latest git, if I click on the "Edit Privileges", and then click "Go" button on the Global Privileges, I cannot read the AJAX message shown, because it disappeared too quickly. And this is solved in this patch.
I uploaded the initial patch, which patch only the "Privileges" page. If phpMyAdmin developers okay with this patch, I will continue to patch all other pages.
Aris,
I'm currently replacing the animation removing code by a single function (better not to duplicate code) so I'll try your idea.
Works well so I'll apply your idea (with you as author) on the resulting PMA_ajaxRemoveMessage() function after I'm done.
Your patch was merged in the repository, thanks.
Marc, you gave me credit for the patch, instead of Aris by mistake. I wonder if you can ammend that...
Thanks Rouslan, I have tried to amend but am not satisfied with the result.
Hi, Marc. Thanks for the merge. No problem with the unchanged amendment. :)
However, I've pulled the latest git and found that "clearQueue()" function in file "functions.js" is still not replaced with "stop(true, true)" function. Are you do this accidentally?
Pulled from which repository? It's there on the Sourceforge repo.
Yes, from the sourceforge repo. In the following code:
function PMA_ajaxShowMessage(message, timeout) {
...
else {
//Otherwise, just show the div again after inserting the message
$("#loading")
.clearQueue()
.html(msg)
.fadeIn('medium')
.delay(to)
.fadeOut('medium', function() {
$(this)
.html("")
.hide();
})
}
...
}
Ok, I had not seen this one and I was not seeing a problem with current master.
I just changed this instance; too bad we cannot easily reuse PMA_ajaxRemoveMessage().
Ok, thank you.
With the previous code, we cannot see the AJAX notification message (either error or success notification) because it disappeared too quickly, as mentioned in my first comment below. And now, the AJAX notification message is showed correctly for the specified timeout.
This also fixed the immediately disappearing success message when submitting the 'edit privilege' dialog.