Guest User

Untitled

a guest
Jul 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. --- a/docs/js/jqmodal/jqmodalwin.js
  2. +++ b/docs/js/jqmodal/jqmodalwin.js
  3. @@ -1,5 +1,6 @@
  4. var jqmwin_focus = false;
  5. var jqmwin_count = 0;
  6. +var close_event = false;
  7. function jqmwin(win)
  8. {
  9. jqmwin_count++;
  10. @@ -133,7 +134,13 @@ function jqmwin_attach_close(func, winid) {
  11.  
  12. // sometiems IE6 likes to destroy the reference to the event before it can be bound.
  13. try {
  14. - $("#close_"+winid).click( function() { func() } );
  15. + close_event = true;
  16. + $("#close_"+winid).live( 'click', function() {
  17. + func();
  18. + if(close_event) close_event.cleartimeout();
  19. + }
  20. + );
  21. + //$("#close_"+winid).click( function() { func() } );
  22. }
  23. catch(e) {}
  24. }
  25. @@ -143,6 +150,14 @@ function jqmwin_refresh(winid) {
  26. }
  27.  
  28. var jqmwin_close_process=function(hash) {
  29. + if(close_event)
  30. + close_event = settimeout(do_close(), 3000);
  31. + else
  32. + do_close();
  33. +
  34. +};
  35. +
  36. +function do_close(hash) {
  37. jqmwin_count--;
  38. $('#overlay'+hash.w.attr('id')).remove();
  39. $('#hideselect'+hash.w.attr('id')).remove();
  40. @@ -170,9 +185,6 @@ var jqmwin_close_process=function(hash) {
  41. $('#centercontent').show(1);
  42.  
  43. }
  44. - });
  45. -
  46. -
  47. -
  48. -};
  49. + });
  50. +}
Add Comment
Please, Sign In to add comment