Changeset 66092 in spip-zone


Ignore:
Timestamp:
Sep 20, 2012, 11:11:51 AM (7 years ago)
Author:
cedric@…
Message:

Reparer l'alerte qui se declenchait a tort sous safari après post du message, et qui ne se déclenchait pas du tout sous Chrome

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/comments/trunk/formulaires/inc-forum_previsu.html

    r62789 r66092  
    1111    </div>
    1212        [<div class="reponse_formulaire">(#ENV*{erreur})</div>]
    13         [<p class="boutons"><input type="submit" class="submit" onclick="confirmer_previsu_forum=true;" name="confirmer_previsu_forum" value="(#ENV*{bouton}|?{<:comments:submit2:>,''})" /></p>]
     13        [<p class="boutons"><input type="submit" class="submit" onclick="jQuery(window).unbind();" name="confirmer_previsu_forum" value="(#ENV*{bouton}|?{<:comments:submit2:>,''})" /></p>]
    1414</fieldset>
    1515<br class="nettoyeur" />
    1616<script type="text/javascript">/*<![CDATA[*/
    17 var confirmer_previsu_forum = false;
    18 if (window.jQuery){ jQuery(function(){ jQuery(window).unload(function() { if (!confirmer_previsu_forum) alert('<:forum:forum_attention_message_non_poste|texte_script:>');confirmer_previsu_forum=true;});});}
     17if (window.jQuery){ jQuery(function(){
     18        jQuery(window).unload(function() { alert('<:forum:forum_attention_message_non_poste|texte_script:>');jQuery(window).unbind();});
     19        jQuery(window).on('beforeunload', function(){           jQuery(window).unbind();return '<:forum:forum_attention_message_non_poste|texte_script:>';      });
     20});}
    1921/*]]>*/</script>
Note: See TracChangeset for help on using the changeset viewer.