Просмотр исходного кода

Ticket #258 - Market module: Core changes.

AntonLV 10 лет назад
Родитель
Сommit
57a34e6051

+ 5 - 0
inc/classes/BxDolCmts.php

@@ -154,6 +154,7 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
     protected $_aSystem = array (); ///< current comments system array
     protected $_iId = 0; ///< obect id to be commented
 
+    protected $_aT = array (); ///< an array of lang keys
     protected $_aMarkers = array ();
 
     protected $_sDisplayType = '';
@@ -235,6 +236,10 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
         $this->_sMetatagsObj = 'sys_cmts';
 
+        $this->_aT = array(
+        	'block_comments_title' => '_cmt_block_comments_title'
+        );
+
         if ($iInit)
             $this->init($iId);
 

+ 9 - 0
inc/classes/BxDolPayments.php

@@ -128,6 +128,9 @@ class BxDolPayments extends BxDol implements iBxDolSingleton
 		return BxDolService::call($this->_sActive, 'get_cart_item_descriptor', $aSrvParams, 'Cart');
     }
     
+    /**
+     * Returns cart JavaScript code which should be included in the page to make "Add To Cart" buttons work properly.
+     */
     public function getCartJs($bWrapped = true)
     {
     	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_js', 'Cart'))
@@ -137,6 +140,9 @@ class BxDolPayments extends BxDol implements iBxDolSingleton
 		return BxDolService::call($this->_sActive, 'get_cart_js', $aSrvParams, 'Cart');
     }
 
+    /**
+     * Returns "Add To Cart" JavaScript code to use in onclick attribute.
+     */
     public function getAddToCartJs($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect = false, $bWrapped = true)
     {
     	if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_js', 'Cart'))
@@ -146,6 +152,9 @@ class BxDolPayments extends BxDol implements iBxDolSingleton
 		return BxDolService::call($this->_sActive, 'get_add_to_cart_js', $aSrvParams, 'Cart');
     }
 
+    /**
+     * Returns the whole "Add To Cart" link including HTML tag BUTTON and cart JavaScript code.
+     */
     public function getAddToCartLink($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect = false)
     {
 		if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_link', 'Cart'))

+ 2 - 1
template/css/default.less

@@ -351,7 +351,8 @@
     font-family:@bx-font-family;
     font-weight:400; /* 27.13.13: prev val 300 */
     .font-size(@bx-font-size-default);
-    color:@bx-font-color-default;
+    /* TODO: Remove 'color' instruction later. It affects the font color in Buttons which is usually differs from text color in inputs. */
+    /*color:@bx-font-color-default; */ 
 }
 
 .bx-def-font-color {

+ 1 - 1
template/scripts/BxBaseCmts.php

@@ -86,7 +86,7 @@ class BxBaseCmts extends BxDolCmts
 		BxDolLiveUpdates::getInstance()->add($this->_sSystem . '_live_updates_cmts_' . $this->_iId, 1, $sServiceCall);
 		//add live update
 
-        $sCaption = _t('_cmt_block_comments_title', $this->getCommentsCountAll());
+        $sCaption = _t($this->_aT['block_comments_title'], $this->getCommentsCountAll());
         $sContent = BxDolTemplate::getInstance()->parseHtmlByName('comments_block.html', array(
             'system' => $this->_sSystem,
             'list_anchor' => $this->getListAnchor(),