AntonLV пре 5 година
родитељ
комит
f13d3fe71d

+ 67 - 63
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -849,65 +849,69 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true;
 
         //--- Do repost link ---//
-		$sClass = $sStylePrefixRepost . 'do-repost';
-		if($bShowDoRepostAsButton)
-			$sClass .= ' bx-btn';
-		else if($bShowDoRepostAsButtonSmall)
-			$sClass .= ' bx-btn bx-btn-small';
-
-                $sOnClick = '';
-                if(!$bDisabled) {
-                    $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
-                    if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
-                        $aRepostedData = unserialize($aReposted['content']);
-
-                        $sOnClick = $this->_getRepostJsClick($iOwnerId, $aRepostedData['type'], $aRepostedData['action'], $aRepostedData['object_id']);
-                    }
-                    else
-                        $sOnClick = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
-                }
-                else
-                    $sClass .= $bShowDoRepostAsButton || $bShowDoRepostAsButtonSmall ? ' bx-btn-disabled' : ' ' . $sStylePrefixRepost . 'disabled';
-
-		$aOnClickAttrs = array(
-			'title' => _t('_bx_timeline_txt_do_repost')
-		);
-		if(!empty($sClass))
-			$aOnClickAttrs['class'] = $sClass;
-		if(!empty($sOnClick))
-			$aOnClickAttrs['onclick'] = $sOnClick;
-
-		//--- Do repost label ---//
-		$sMethodDoRepostLabel = ''; 
-		$sTemplateDoRepostLabel = '';
-		if(!empty($aParams['template_do_repost_label'])) {
-			$sMethodDoRepostLabel = 'parseHtmlByContent';
-			$sTemplateDoRepostLabel = $aParams['template_do_repost_label'];
-		}
-		else {
-			$sMethodDoRepostLabel = 'parseHtmlByName';
-			$sTemplateDoRepostLabel = $aParams['template_do_repost_label_name'];
-		}
-
-		$sDoRepost = $this->$sMethodDoRepostLabel($sTemplateDoRepostLabel, array(
-        	'bx_if:show_image' => array(
-        		'condition' => $bShowDoRepostImage,
-        		'content' => array(
-        			'src' => $this->getIconUrl($aParams['image_do_repost'])
-        		)
-        	),
-        	'bx_if:show_icon' => array(
-        		'condition' => $bShowDoRepostIcon,
-        		'content' => array(
-        			'name' => $aParams['icon_do_repost']
-        		)
-        	),
-        	'bx_if:show_text' => array(
-        		'condition' => $bShowDoRepostText,
-        		'content' => array(
-        			'text' => _t($aParams['text_do_repost'])
-        		)
-        	)
+        $sClass = $sStylePrefixRepost . 'do-repost';
+        if($bShowDoRepostAsButton)
+            $sClass .= ' bx-btn';
+        else if($bShowDoRepostAsButtonSmall)
+            $sClass .= ' bx-btn bx-btn-small';
+
+        $sOnClick = '';
+        if(!$bDisabled) {
+            $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+            if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+                $aRepostedData = unserialize($aReposted['content']);
+
+                $sOnClick = $this->_getRepostJsClick($iOwnerId, $aRepostedData['type'], $aRepostedData['action'], $aRepostedData['object_id']);
+            }
+            else
+                $sOnClick = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+        }
+        else
+            $sClass .= $bShowDoRepostAsButton || $bShowDoRepostAsButtonSmall ? ' bx-btn-disabled' : ' ' . $sStylePrefixRepost . 'disabled';
+
+        $aOnClickAttrs = array(
+            'title' => _t('_bx_timeline_txt_do_repost')
+        );
+        if(!empty($sClass))
+            $aOnClickAttrs['class'] = $sClass;
+        if(!empty($sOnClick))
+            $aOnClickAttrs['onclick'] = $sOnClick;
+
+        //--- Do repost label ---//
+        $sMethodDoRepostLabel = ''; 
+        $sTemplateDoRepostLabel = '';
+        if(!empty($aParams['template_do_repost_label'])) {
+            $sMethodDoRepostLabel = 'parseHtmlByContent';
+            $sTemplateDoRepostLabel = $aParams['template_do_repost_label'];
+        }
+        else {
+            $sMethodDoRepostLabel = 'parseHtmlByName';
+            $sTemplateDoRepostLabel = $aParams['template_do_repost_label_name'];
+        }
+
+        $sDoRepost = $this->$sMethodDoRepostLabel($sTemplateDoRepostLabel, array(
+            'style_prefix' => $sStylePrefix,
+            'bx_if:show_image' => array(
+                'condition' => $bShowDoRepostImage,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'src' => $this->getIconUrl($aParams['image_do_repost'])
+                )
+            ),
+            'bx_if:show_icon' => array(
+                'condition' => $bShowDoRepostIcon,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'name' => $aParams['icon_do_repost']
+                )
+            ),
+            'bx_if:show_text' => array(
+                'condition' => $bShowDoRepostText,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'text' => _t($aParams['text_do_repost'])
+                )
+            )
         ));
 
         return $this->parseHtmlByName('repost_element_block.html', array(
@@ -920,10 +924,10 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
                 'condition' => $bShowCounter,
                 'content' => array(
                     'style_prefix' => $sStylePrefix,
-        			'bx_if:show_hidden' => array(
-        				'condition' => (int)$aReposted['reposts'] == 0,
-        				'content' => array()
-        			),
+                    'bx_if:show_hidden' => array(
+                        'condition' => (int)$aReposted['reposts'] == 0,
+                        'content' => array()
+                    ),
                     'counter' => $this->getRepostCounter($aReposted, $aParams)
                 )
             ),

+ 22 - 22
modules/boonex/timeline/template/css/repost.css

@@ -1,50 +1,50 @@
 /*--- Reposted By ---*/
 div.bx-tl-by-list {}
 div.bx-tl-by-list-cnt {
-	max-height: 200px;
-	max-height: 12.5rem;
-	min-width: 220px;
-	min-width: 13.75rem;
-	overflow: auto;
+    max-height: 200px;
+    max-height: 12.5rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    overflow: auto;
 }
 div.bx-tl-by-list div.bx-base-pofile-unit {
-	float: none;
-	margin-right: 0px;
-	margin-bottom: 0px;
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
 }
 
 /*--- Repost Element Styles ---*/
 .bx-tl-repost .bx-tl-repost-element-holder .bx-tl-repost-do-repost.bx-tl-repost-disabled,
 .bx-tl-repost .bx-tl-repost-element-holder .bx-tl-repost-do-repost.bx-tl-repost-disabled .sys-icon {
-	color: #ddd;
+    color: #ddd;
 }
 .bx-tl-repost .bx-tl-repost-counter-holder {
-	margin-left: 5px;
-	margin-left: 0.3125rem;
+    margin-left: 5px;
+    margin-left: 0.3125rem;
 }
 .bx-tl-repost-button .bx-tl-repost-element-holder,
 .bx-tl-repost-button .bx-tl-repost-counter-holder {
-	line-height: 36px;
-	line-height: 2.25rem;
+    line-height: 36px;
+    line-height: 2.25rem;
 }
 .bx-tl-repost.bx-tl-repost-button .bx-tl-repost-counter-holder {
-	margin-left: 10px;
-	margin-left: 0.625rem;
+    margin-left: 10px;
+    margin-left: 0.625rem;
 }
 .bx-tl-repost-button-small .bx-tl-repost-element-holder,
 .bx-tl-repost-button-small .bx-tl-repost-counter-holder {
-	line-height: 24px;
-	line-height: 1.6rem;
+    line-height: 24px;
+    line-height: 1.6rem;
 }
-.bx-tl-repost-button .bx-tl-repost-counter-holder,
-.bx-tl-repost-button-small .bx-tl-repost-counter-holder {
-	font-size: 1.5rem;
+.bx-tl-repost-button .bx-tl-repost-counter-holder .bx-btn-height,
+.bx-tl-repost-button-small .bx-tl-repost-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
 }
 
 div.bx-tl-repost div.bx-tl-repost-element-holder,
 div.bx-tl-repost div.bx-tl-repost-counter-holder {
-	position: relative;
-	float: left;
+    position: relative;
+    float: left;
 }
 
 /*--- Counter Styles ---*/

+ 25 - 25
template/css/favorite.css

@@ -1,65 +1,65 @@
 /*--- Favorited By List ---*/
 div.bx-favorite-by-list {}
 div.bx-favorite-by-list-cnt {
-	max-height: 400px;
-	max-height: 25rem;
-	min-width: 220px;
-	min-width: 13.75rem;
-	max-width: 320px;
-	max-width: 20rem;
-	overflow: auto;
+    max-height: 400px;
+    max-height: 25rem;
+    min-width: 220px;
+    min-width: 13.75rem;
+    max-width: 320px;
+    max-width: 20rem;
+    overflow: auto;
 }
 div.bx-favorite-by-list div.bx-def-unit {
-	float: none;
-	margin-right: 0px;
-	margin-bottom: 0px;
+    float: none;
+    margin-right: 0px;
+    margin-bottom: 0px;
 }
 div.bx-favorite-bi-thumbnail,
 div.bx-favorite-bi-info {
-	position: relative;
+    position: relative;
 }
 div.bx-favorite-bi-info p {
-	margin: 0px; 
+    margin: 0px; 
 }
 
 /*--- Favorite Element Styles ---*/
 div.bx-favorite div.bx-favorite-element-holder,
 div.bx-favorite div.bx-favorite-counter-holder {
-	position: relative;
-	float: left;
+    position: relative;
+    float: left;
 }
 
 /*--- Favorite Element Styles ---*/
 .bx-favorite .bx-favorite-element-holder,
 .bx-favorite .bx-favorite-counter-holder {
-	line-height: 20px;
-	line-height: 1.25rem;
+    line-height: 20px;
+    line-height: 1.25rem;
 }
 
 .bx-favorite-button .bx-favorite-element-holder,
 .bx-favorite-button .bx-favorite-counter-holder {
-	line-height: 36px;
-	line-height: 2.2rem;
+    line-height: 36px;
+    line-height: 2.2rem;
 }
 
 .bx-favorite-button-small .bx-favorite-element-holder,
 .bx-favorite-button-small .bx-favorite-counter-holder {
-	line-height: 24px;
-	line-height: 1.6rem;
+    line-height: 24px;
+    line-height: 1.6rem;
 }
 
 .bx-favorite .bx-favorite-element-holder .bx-favorite-do-favorite.bx-favorite-disabled,
 .bx-favorite .bx-favorite-element-holder .bx-favorite-do-favorite.bx-favorite-disabled .sys-icon {
-	color: #ddd;
+    color: #ddd;
 }
 
-.bx-favorite-button .bx-favorite-counter-holder,
-.bx-favorite-button-small .bx-favorite-counter-holder {
-	font-size: 1.5rem;
+.bx-favorite-button .bx-favorite-counter-holder .bx-btn-height,
+.bx-favorite-button-small .bx-favorite-counter-holder .bx-btn-height {
+    font-size: 1.5rem;
 }
 
 .bx-favorite-link .bx-favorite-counter-holder.bx-btn-border {
-	border-width: 0px;
+    border-width: 0px;
 }
 
 .bx-favorite-do-form .bx-form-input-checkbox_set {