Commit 2a6e0fb1ac84b59f5e75099f7d3112bd9cf7f82c

Authored by bernard
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.
... ... @@ -271,7 +271,7 @@
271 271 pnotify.animate({"opacity": opts.pnotify_nonblock_opacity}, "fast");
272 272 }
273 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 276 "mouseleave": function(e) {
277 277 if (opts.pnotify_nonblock) e.stopPropagation();
... ... @@ -280,7 +280,7 @@
280 280 if (opts.pnotify_nonblock && animating != "out")
281 281 pnotify.animate({"opacity": opts.pnotify_opacity}, "fast");
282 282 if (opts.pnotify_hide && opts.pnotify_mouse_reset) pnotify.pnotify_queue_remove();
283   - pnotify.closer.hide();
  283 + pnotify.closer.css("visibility", "hidden");
284 284 $.pnotify_position_all();
285 285 },
286 286 "mouseover": function(e) {
... ... @@ -535,10 +535,10 @@
535 535 // Provide a button to close the notice.
536 536 pnotify.closer = $14("<div />", {
537 537 "class": "rf-ny-cl",
538   - "css": {"cursor": "pointer", "display": "none"},
  538 + "css": {"cursor": "pointer", "visibility": "hidden"},
539 539 "click": function() {
540 540 pnotify.pnotify_remove();
541   - pnotify.closer.hide();
  541 + pnotify.closer.css("visibility", "hidden");
542 542 }
543 543 })
544 544 .append($14("<span />", {"class": "rf-ny-cl-ic"}))
... ...
Please register or login to post a comment