Exit confirmation tweaks in post upload
Confirmation is disabled after user removes last file from the upload queue. It's enabled again whenever user adds something.
This commit is contained in:
parent
4b08686393
commit
0b6a0337fe
1 changed files with 6 additions and 1 deletions
|
@ -224,7 +224,6 @@ $(function()
|
||||||
{
|
{
|
||||||
for (var i = 0; i < inputs.length; i ++)
|
for (var i = 0; i < inputs.length; i ++)
|
||||||
{
|
{
|
||||||
enableExitConfirmation();
|
|
||||||
var input = inputs[i];
|
var input = inputs[i];
|
||||||
var postDom = $('#post-template').clone(true);
|
var postDom = $('#post-template').clone(true);
|
||||||
postDom.find('form').submit(false);
|
postDom.find('form').submit(false);
|
||||||
|
@ -238,9 +237,15 @@ $(function()
|
||||||
callback(postDom, input);
|
callback(postDom, input);
|
||||||
}
|
}
|
||||||
if ($('.posts .post').length == 0)
|
if ($('.posts .post').length == 0)
|
||||||
|
{
|
||||||
|
disableExitConfirmation();
|
||||||
$('#upload-step2').fadeOut();
|
$('#upload-step2').fadeOut();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
enableExitConfirmation();
|
||||||
$('#upload-step2').fadeIn();
|
$('#upload-step2').fadeIn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.post img').mouseenter(function(e)
|
$('.post img').mouseenter(function(e)
|
||||||
|
|
Loading…
Reference in a new issue