lib/thoth/public/js/admin/comments.js
/**
   * Deletes the comment with the specified <i>id</i>.
   *
   * @method deleteComment
   * @param {Number} id comment id
   * @param {Boolean} silent if <i>true</i>, no confirmation dialog will be
   *   displayed
   * @private
   */
Deletes the comment with the specified id.
@method deleteComment
@param {Number} id comment id
@param {Boolean} silent if true, no confirmation dialog will be
displayed
@private
Deletes the comment with the specified id . @method deleteComment @param { Number } id comment id @param { Boolean } silent if true no confirmation dialog will be displayed @private
function deleteComment(id, silent) {
    var postData = 'id=' + encodeURIComponent(id) + '&token=' +
          encodeURIComponent(Thoth.getToken());
    if (!silent && !confirm(
        'Are you sure you want to permanently delete this comment?')) {
      return;
    }
    yuc.asyncRequest('POST', '/api/comment/delete', {
      scope: this,
      timeout: 8000,
      failure: function (r) {
        try {
          alert(Y.lang.JSON.parse(r.responseText).error);
        } catch (e) {
          alert('Unable to delete comment.');
        }
      },
      success: function () { hideComment(id); }
    }, postData);
  }
function deleteComment ( id , silent ) { var postData = 'id=' + encodeURIComponent ( id ) + '&token=' + encodeURIComponent ( Thoth . getToken ( ) ) ; if ( ! silent && ! confirm ( 'Are you sure you want to permanently delete this comment?' ) ) { return ; } yuc . asyncRequest ( 'POST' , '/api/comment/delete' , { scope : this , timeout : 8000 , failure : function ( r ) { try { alert ( Y . lang . JSON . parse ( r . responseText ) . error ) ; } catch ( e ) { alert ( 'Unable to delete comment.' ) ; } } , success : function ( ) { hideComment ( id ) ; } } , postData ) ; }
Deletes the comment with the specified <i>id</i>.
Deletes the comment with the specified <i > id< / i > .