Explorar o código

#32 - Votes feature improvements

AntonLV %!s(int64=11) %!d(string=hai) anos
pai
achega
8ed60fde60
Modificáronse 3 ficheiros con 6 adicións e 2 borrados
  1. 1 1
      inc/js/classes/BxDolVote.js
  2. 4 0
      template/css/vote.css
  3. 1 1
      template/scripts/BxBaseVote.php

+ 1 - 1
inc/js/classes/BxDolVote.js

@@ -90,7 +90,7 @@ BxDolVote.prototype.vote = function (oLink, iValue)
 	    		}
 
 	    		if(oData && oData.disabled)
-	    			$(oLink).removeAttr('onclick').addClass('bx-btn-disabled');
+	    			$(oLink).removeAttr('onclick').addClass($(oLink).hasClass('bx-btn') ? 'bx-btn-disabled' : 'bx-vote-disabled');
     		}
 
     		if(!$this._iLikeMode)

+ 4 - 0
template/css/vote.css

@@ -39,6 +39,10 @@ div.bx-vote div.bx-vote-counter-holder {
 	line-height: 1.6rem;
 }
 
+.bx-vote-likes .bx-vote-element-holder .bx-vote-do-vote.bx-vote-disabled {
+	color: #ddd;
+}
+
 .bx-vote-likes-button .bx-vote-counter-holder,
 .bx-vote-likes-button-small .bx-vote-counter-holder {
 	font-size: 1.5rem;

+ 1 - 1
template/scripts/BxBaseVote.php

@@ -233,7 +233,7 @@ class BxBaseVote extends BxDolVote
 			$sClass = 'bx-btn bx-btn-small';
 
 		if($bDisabled)
-			$sClass .= ' bx-btn-disabled';
+			$sClass .= $bShowDoVoteAsButton || $bShowDoVoteAsButtonSmall ? ' bx-btn-disabled' : 'bx-vote-disabled';
 
         return BxDolTemplate::getInstance()->parseHtmlByName($this->_sTmplNameDoVoteLikes, array(
             'style_prefix' => $this->_sStylePrefix,