js_delete_functions

NAML documentation   Watch a video
   Usages of this macro
... in javascript_library.naml
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<macro name="js_delete_functions" requires="servlet">
    var t_confirm_delete_post = "<t>Do you really want to delete this post?</t>";
    var t_confirm_delete_post_recursively = "<t>Do you really want to permanently delete this message and all replies?</t>";
    var t_caution_cannot_revert = "<t>CAUTION: this action cannot be reverted.</t>";
    <![CDATA[
    Nabble.deletePost = function(postId) {
        if (!confirm(t_confirm_delete_post))
            return;
        var newLocation = "/template/NamlServlet.jtp?macro=delete_post&node="+postId;
        Nabble.setTop(newLocation);
    };
 
    Nabble.deleteFromSite = function(nodeId) {
        if( !confirm(t_confirm_delete_post_recursively+"\n\n"+t_caution_cannot_revert) )
            return;
        var newLocation = "/template/NamlServlet.jtp?macro=delete_from_site&node="+nodeId;
        Nabble.setTop(newLocation);
    };
    ]]>
</macro>