Prevent Firefox from loading the page "javascript:null;"
This commit is contained in:
@@ -168,7 +168,8 @@
|
|||||||
* and require no dom manipulations
|
* and require no dom manipulations
|
||||||
*/
|
*/
|
||||||
var doc = $(document);
|
var doc = $(document);
|
||||||
doc.on('click', '.w2p_flash', function () {
|
doc.on('click', '.w2p_flash', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
var t = $(this);
|
var t = $(this);
|
||||||
if (t.css('top') == '0px') t.slideUp('slow');
|
if (t.css('top') == '0px') t.slideUp('slow');
|
||||||
else t.fadeOut();
|
else t.fadeOut();
|
||||||
@@ -563,7 +564,7 @@
|
|||||||
var flash = $('.w2p_flash');
|
var flash = $('.w2p_flash');
|
||||||
web2py.hide_flash();
|
web2py.hide_flash();
|
||||||
flash.html(message).addClass(status);
|
flash.html(message).addClass(status);
|
||||||
if (flash.html()) flash.append('<a id="closeflash" href="javascript:null;" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||||
},
|
},
|
||||||
hide_flash: function () {
|
hide_flash: function () {
|
||||||
$('.w2p_flash').fadeOut(0).html('');
|
$('.w2p_flash').fadeOut(0).html('');
|
||||||
|
|||||||
@@ -168,7 +168,8 @@
|
|||||||
* and require no dom manipulations
|
* and require no dom manipulations
|
||||||
*/
|
*/
|
||||||
var doc = $(document);
|
var doc = $(document);
|
||||||
doc.on('click', '.w2p_flash', function () {
|
doc.on('click', '.w2p_flash', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
var t = $(this);
|
var t = $(this);
|
||||||
if (t.css('top') == '0px') t.slideUp('slow');
|
if (t.css('top') == '0px') t.slideUp('slow');
|
||||||
else t.fadeOut();
|
else t.fadeOut();
|
||||||
@@ -563,7 +564,7 @@
|
|||||||
var flash = $('.w2p_flash');
|
var flash = $('.w2p_flash');
|
||||||
web2py.hide_flash();
|
web2py.hide_flash();
|
||||||
flash.html(message).addClass(status);
|
flash.html(message).addClass(status);
|
||||||
if (flash.html()) flash.append('<a id="closeflash" href="javascript:null;" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||||
},
|
},
|
||||||
hide_flash: function () {
|
hide_flash: function () {
|
||||||
$('.w2p_flash').fadeOut(0).html('');
|
$('.w2p_flash').fadeOut(0).html('');
|
||||||
|
|||||||
@@ -168,7 +168,8 @@
|
|||||||
* and require no dom manipulations
|
* and require no dom manipulations
|
||||||
*/
|
*/
|
||||||
var doc = $(document);
|
var doc = $(document);
|
||||||
doc.on('click', '.w2p_flash', function () {
|
doc.on('click', '.w2p_flash', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
var t = $(this);
|
var t = $(this);
|
||||||
if (t.css('top') == '0px') t.slideUp('slow');
|
if (t.css('top') == '0px') t.slideUp('slow');
|
||||||
else t.fadeOut();
|
else t.fadeOut();
|
||||||
@@ -563,7 +564,7 @@
|
|||||||
var flash = $('.w2p_flash');
|
var flash = $('.w2p_flash');
|
||||||
web2py.hide_flash();
|
web2py.hide_flash();
|
||||||
flash.html(message).addClass(status);
|
flash.html(message).addClass(status);
|
||||||
if (flash.html()) flash.append('<a id="closeflash" href="javascript:null;" style="text-decoration: inherit; color: inherit;"> × </a>').slideDown();
|
if (flash.html()) flash.append('<span id="closeflash"> × </span>').slideDown();
|
||||||
},
|
},
|
||||||
hide_flash: function () {
|
hide_flash: function () {
|
||||||
$('.w2p_flash').fadeOut(0).html('');
|
$('.w2p_flash').fadeOut(0).html('');
|
||||||
|
|||||||
Reference in New Issue
Block a user