From 8e79e49ae3b19f816310858f0f04016d54c6f2bb Mon Sep 17 00:00:00 2001 From: Vinyl Darkscratch Date: Thu, 10 Nov 2016 01:19:06 -0800 Subject: [PATCH] Mobile (iOS) fix for dismissing flashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- applications/admin/static/js/web2py.js | 2 +- applications/examples/static/js/web2py.js | 2 +- applications/welcome/static/js/web2py.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index 7b9d9802..bbeb0a9c 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -563,7 +563,7 @@ var flash = $('.w2p_flash'); web2py.hide_flash(); flash.html(message).addClass(status); - if (flash.html()) flash.append(' × ').slideDown(); + if (flash.html()) flash.append(' × ').slideDown(); }, hide_flash: function () { $('.w2p_flash').fadeOut(0).html(''); diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index 7b9d9802..bbeb0a9c 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -563,7 +563,7 @@ var flash = $('.w2p_flash'); web2py.hide_flash(); flash.html(message).addClass(status); - if (flash.html()) flash.append(' × ').slideDown(); + if (flash.html()) flash.append(' × ').slideDown(); }, hide_flash: function () { $('.w2p_flash').fadeOut(0).html(''); diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index 7b9d9802..bbeb0a9c 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -563,7 +563,7 @@ var flash = $('.w2p_flash'); web2py.hide_flash(); flash.html(message).addClass(status); - if (flash.html()) flash.append(' × ').slideDown(); + if (flash.html()) flash.append(' × ').slideDown(); }, hide_flash: function () { $('.w2p_flash').fadeOut(0).html('');