HomeHelpTrac

Changeset 15589 for tags


Ignore:
Timestamp:
10/10/11 20:36:30 (8 months ago)
Author:
Alexander Trofimov
Message:

Ticket #2636

Location:
tags/7.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/7.0/inc/classes/BxDolCmts.php

    r15261 r15589  
    104104    var $_oQuery = null; 
    105105    var $_sOrder = 'desc'; 
     106    var $_aMoodText = array( 
     107        '-1' => '_sys_txt_cmt_mood_negative', 
     108        '0' => '_sys_txt_cmt_mood_neutral', 
     109        '1' => '_sys_txt_cmt_mood_positive', 
     110    ); 
    106111 
    107112    /** 
     
    556561        $aCmt = $this->_oQuery->getCommentSimple ($this->getId(), $iCmtId); 
    557562         
    558         return $oJson->encode(array('text' => $aCmt['cmt_text'], 'mood' => $aCmt['cmt_mood'])); 
     563        return $oJson->encode(array('text' => $aCmt['cmt_text'], 'mood' => $aCmt['cmt_mood'], 'mood_text' => _t($this->_aMoodText[$aCmt['cmt_mood']]))); 
    559564    } 
    560565 
  • tags/7.0/inc/js/classes/BxDolCmts.js

    r15200 r15589  
    569569 
    570570                        $('#cmt' + iCmtId + ' .cmt-mood').html(' ' + oResponse.mood + ' '); 
     571                        $('#cmt' + iCmtId + ' .cmt-mood-text').html(oResponse.mood_text); 
    571572                        $(this).html(oResponse.text).bxdolcmtanim('show', $this._sAnimationEffect, $this._iAnimationSpeed); 
    572573                    }); 
  • tags/7.0/templates/base/scripts/BxBaseCmtsView.php

    r15385 r15589  
    260260     */ 
    261261    function _getCommentHeadBox (&$a) { 
    262         $aMood = array( 
    263             '-1' => '_sys_txt_cmt_mood_negative', 
    264             '0' => '_sys_txt_cmt_mood_neutral', 
    265             '1' => '_sys_txt_cmt_mood_positive', 
    266         ); 
    267262        if ($a['cmt_author_id'] && $a['cmt_author_name']) 
    268263            $sAuthor = '<a href="' . getProfileLink($a['cmt_author_id']) . '" class="cmt-author">' . $a['cmt_author_name'] . '</a>'; 
     
    270265            $sAuthor = _t('_Anonymous'); 
    271266                             
    272         $sRet = '<tr class="cmt-head"><td class="' . $this->_sStylePrefix . '-head-l">&nbsp;</td><td class="' . $this->_sStylePrefix . '-head-m">' . $sAuthor . ' ' . _t('_wrote') . ' <span class="cmt-posted-ago">' . $a['cmt_ago'] . ' (' . _t($aMood[$a['cmt_mood']]) . ')</span></td><td class="' . $this->_sStylePrefix . '-head-r">&nbsp;</td></tr>'; 
     267        $sRet = '<tr class="cmt-head"><td class="' . $this->_sStylePrefix . '-head-l">&nbsp;</td><td class="' . $this->_sStylePrefix . '-head-m">' . $sAuthor . ' ' . _t('_wrote') . ' <span class="cmt-posted-ago">' . $a['cmt_ago'] . ' (<span class="cmt-mood-text">' . _t($this->_aMoodText[$a['cmt_mood']]) . '</span>)</span></td><td class="' . $this->_sStylePrefix . '-head-r">&nbsp;</td></tr>'; 
    273268         
    274269        return $sRet; 
Note: See TracChangeset for help on using the changeset viewer.