includes/clientside/static/comments.js
changeset 825 9d5c04c1414f
parent 779 609e35845ec3
child 827 2c20563245b2
equal deleted inserted replaced
817:880c4b7eb658 825:9d5c04c1414f
    52           alert($lang.get('comment_msg_comment_posted'));
    52           alert($lang.get('comment_msg_comment_posted'));
    53           hideCommentForm();
    53           hideCommentForm();
    54           materializeComment(response);
    54           materializeComment(response);
    55           break;
    55           break;
    56         case 'error':
    56         case 'error':
    57           new MessageBox(MB_OK|MB_ICONSTOP, ( response.title ? response.title : 'Error fetching comment data' ), response.error);
    57           load_component(['messagebox', 'fadefilter', 'flyin']);
       
    58           new MessageBox(MB_OK|MB_ICONSTOP, ( response.title ? response.title : $lang.get('comment_ajax_err_generic_title') ), response.error);
    58           break;
    59           break;
    59         default:
    60         default:
    60           alert(ajax.responseText);
    61           alert(ajax.responseText);
    61           break;
    62           break;
    62       }
    63       }
   178   tplvars.DATETIME = this_comment.time;
   179   tplvars.DATETIME = this_comment.time;
   179   tplvars.SUBJECT = this_comment.subject;
   180   tplvars.SUBJECT = this_comment.subject;
   180   tplvars.DATA = this_comment.comment_data;
   181   tplvars.DATA = this_comment.comment_data;
   181   tplvars.SIGNATURE = this_comment.signature;
   182   tplvars.SIGNATURE = this_comment.signature;
   182   
   183   
   183   if ( this_comment.approved != '1' )
   184   if ( this_comment.approved == '0' )
   184     tplvars.SUBJECT += ' <span style="color: #D84308">' + $lang.get('comment_msg_note_unapp') + '</span>';
   185     tplvars.SUBJECT += ' <span style="color: #D84308">' + $lang.get('comment_msg_note_unapp') + '</span>';
       
   186   else if ( this_comment.approved == '2' )
       
   187     tplvars.SUBJECT += ' <span style="color: #D84308">' + $lang.get('comment_msg_note_spam') + '</span>';
   185   
   188   
   186   // Name
   189   // Name
   187   tplvars.NAME = this_comment.name;
   190   tplvars.NAME = this_comment.name;
   188   if ( this_comment.user_id > 1 )
   191   if ( this_comment.user_id > 1 )
   189     tplvars.NAME = '<a href="' + makeUrlNS('User', this_comment.name) + '" style="' + this_comment.rank_style + '">' + this_comment.name + '</a>';
   192     tplvars.NAME = '<a href="' + makeUrlNS('User', this_comment.name) + '" style="' + this_comment.rank_style + '">' + this_comment.name + '</a>';