Changeset 66093 in spip-zone


Ignore:
Timestamp:
Sep 20, 2012, 11:12:08 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
  • _core_/branches/spip-3.0/plugins/forum/formulaires/inc-forum_previsu.html

    r60668 r66093  
    2323                </li>
    2424        </ul>
    25         [<p class="boutons"><input type="submit" class="submit" onclick="confirmer_previsu_forum_poste=true;" name="confirmer_previsu_forum" value="(#ENV*{bouton})" /></p>]
     25        [<p class="boutons"><input type="submit" class="submit" onclick="jQuery(window).unbind();" name="confirmer_previsu_forum" value="(#ENV*{bouton})" /></p>]
    2626</fieldset>
    2727<br class="clear" />
    2828<script type="text/javascript">/*<![CDATA[*/
    29 var confirmer_previsu_forum_poste = false;
    30 if (window.jQuery){ jQuery(function(){ jQuery(window).unload(function() { if (!confirmer_previsu_forum_poste) alert('<:forum:forum_attention_message_non_poste|texte_script:>');confirmer_previsu_forum_poste=true;});});}
     29if (window.jQuery){ jQuery(function(){
     30        jQuery(window).unload(function() { alert('<:forum:forum_attention_message_non_poste|texte_script:>');jQuery(window).unbind();});
     31        jQuery(window).on('beforeunload', function(){           jQuery(window).unbind();return '<:forum:forum_attention_message_non_poste|texte_script:>';      });
     32});}
    3133/*]]>*/</script>
Note: See TracChangeset for help on using the changeset viewer.