Mobile (iOS) fix for dismissing flashes

iOS devices don’t like listening to clicks on most objects.  They
typically prefer a and button objects.  This fix replaces the
#closeflash span with a link to “#” instead (while also inheriting
text-decoration and color styling), so that mobile (iOS) devices will
allow you to close the flash.
This commit is contained in:
Vinyl Darkscratch
2016-11-10 01:19:06 -08:00
parent 46ce04355f
commit 8e79e49ae3
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -563,7 +563,7 @@
var flash = $('.w2p_flash');
web2py.hide_flash();
flash.html(message).addClass(status);
if (flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> &times; </a>').slideDown();
},
hide_flash: function () {
$('.w2p_flash').fadeOut(0).html('');
+1 -1
View File
@@ -563,7 +563,7 @@
var flash = $('.w2p_flash');
web2py.hide_flash();
flash.html(message).addClass(status);
if (flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> &times; </a>').slideDown();
},
hide_flash: function () {
$('.w2p_flash').fadeOut(0).html('');
+1 -1
View File
@@ -563,7 +563,7 @@
var flash = $('.w2p_flash');
web2py.hide_flash();
flash.html(message).addClass(status);
if (flash.html()) flash.append('<span id="closeflash"> &times; </span>').slideDown();
if (flash.html()) flash.append('<a id="closeflash" href="#" style="text-decoration: inherit; color: inherit;"> &times; </a>').slideDown();
},
hide_flash: function () {
$('.w2p_flash').fadeOut(0).html('');