Commit 2a6e0fb1ac84b59f5e75099f7d3112bd9cf7f82c
1 parent
a12a7a3e
Modified jquery.pnotify.js to operate on CSS visibility attribute in stead of display.
This way long messages in notify components don't break and resize notify when closer icon is shown or hidden.
Showing
1 changed file
with
4 additions
and
4 deletions
@@ -271,7 +271,7 @@ | @@ -271,7 +271,7 @@ | ||
271 | pnotify.animate({"opacity": opts.pnotify_nonblock_opacity}, "fast"); | 271 | pnotify.animate({"opacity": opts.pnotify_nonblock_opacity}, "fast"); |
272 | } | 272 | } |
273 | if (opts.pnotify_hide && opts.pnotify_mouse_reset) pnotify.pnotify_cancel_remove(); | 273 | if (opts.pnotify_hide && opts.pnotify_mouse_reset) pnotify.pnotify_cancel_remove(); |
274 | - if (opts.pnotify_closer && !opts.pnotify_nonblock) pnotify.closer.show(); | 274 | + if (opts.pnotify_closer && !opts.pnotify_nonblock) pnotify.closer.css("visibility", "visible"); |
275 | }, | 275 | }, |
276 | "mouseleave": function(e) { | 276 | "mouseleave": function(e) { |
277 | if (opts.pnotify_nonblock) e.stopPropagation(); | 277 | if (opts.pnotify_nonblock) e.stopPropagation(); |
@@ -280,7 +280,7 @@ | @@ -280,7 +280,7 @@ | ||
280 | if (opts.pnotify_nonblock && animating != "out") | 280 | if (opts.pnotify_nonblock && animating != "out") |
281 | pnotify.animate({"opacity": opts.pnotify_opacity}, "fast"); | 281 | pnotify.animate({"opacity": opts.pnotify_opacity}, "fast"); |
282 | if (opts.pnotify_hide && opts.pnotify_mouse_reset) pnotify.pnotify_queue_remove(); | 282 | if (opts.pnotify_hide && opts.pnotify_mouse_reset) pnotify.pnotify_queue_remove(); |
283 | - pnotify.closer.hide(); | 283 | + pnotify.closer.css("visibility", "hidden"); |
284 | $.pnotify_position_all(); | 284 | $.pnotify_position_all(); |
285 | }, | 285 | }, |
286 | "mouseover": function(e) { | 286 | "mouseover": function(e) { |
@@ -535,10 +535,10 @@ | @@ -535,10 +535,10 @@ | ||
535 | // Provide a button to close the notice. | 535 | // Provide a button to close the notice. |
536 | pnotify.closer = $14("<div />", { | 536 | pnotify.closer = $14("<div />", { |
537 | "class": "rf-ny-cl", | 537 | "class": "rf-ny-cl", |
538 | - "css": {"cursor": "pointer", "display": "none"}, | 538 | + "css": {"cursor": "pointer", "visibility": "hidden"}, |
539 | "click": function() { | 539 | "click": function() { |
540 | pnotify.pnotify_remove(); | 540 | pnotify.pnotify_remove(); |
541 | - pnotify.closer.hide(); | 541 | + pnotify.closer.css("visibility", "hidden"); |
542 | } | 542 | } |
543 | }) | 543 | }) |
544 | .append($14("<span />", {"class": "rf-ny-cl-ic"})) | 544 | .append($14("<span />", {"class": "rf-ny-cl-ic"})) |
Please
register
or
login
to post a comment