AntonLV 13 лет назад
Родитель
Сommit
4b21026e90

+ 13 - 2
modules/boonex/timeline/classes/BxTimelineMenuItem.php

@@ -63,8 +63,6 @@ class BxTimelineMenuItem extends BxTemplMenu {
     	$this->addMarkers(array(
     		'content_id' => $aEvent['id'],
     		'share_onclick' => $this->_oModule->serviceGetShareJsClick($iOwnerId, $sType, $sAction, $iObjectId),
-    		'comment_onclick' => $this->_oModule->_oConfig->getJsObject('view') . ".commentItem(this, '" . $sCommentsSystem . "', " . $aEvent['id'] . ")",
-    		'comment_count' => (int)$this->_aEvent['comments']['count'] > 0 ? (int)$this->_aEvent['comments']['count'] : '',
     		'vote_onclick' => $sVotesOnclick
 		));    	
     }
@@ -121,6 +119,19 @@ class BxTimelineMenuItem extends BxTemplMenu {
 
     	foreach($aItems as $iKey => $aItem)
     		switch($aItem['name']) {
+    			case 'item-comment':
+    				if(isset($this->_aEvent['comments']) && is_array($this->_aEvent['comments']) && isset($this->_aEvent['comments']['system'])) {
+			    		$aItems[$iKey]['addon'] = $this->_oModule->_oTemplate->parseHtmlByName('bx_a.html', array(
+			    			'href' => 'javascript:void(0)',
+			    			'title' => _t('_bx_timeline_menu_item_title_item_comment'),
+				    		'bx_repeat:attrs' => array(
+		    					array('key' => 'onclick', 'value' => "javascript:" . $this->_oModule->_oConfig->getJsObject('view') . ".commentItem(this, '" . $this->_aEvent['comments']['system'] . "', " . $this->_aEvent['id'] . ")")
+		    				),
+			    			'content' => (int)$this->_aEvent['comments']['count'] > 0 ? (int)$this->_aEvent['comments']['count'] : ''
+			    		));
+			    	}
+    				break;
+
     			case 'item-vote':
     				if(isset($this->_aEvent['votes']) && is_array($this->_aEvent['votes']) && isset($this->_aEvent['votes']['system'])) {
 			    		$oVote = $this->_oModule->getVoteObject($this->_aEvent['votes']['system'], $this->_aEvent['votes']['object_id']);

+ 8 - 5
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -381,11 +381,14 @@ class BxTimelineTemplate extends BxDolModuleTemplate
     	$aEvent = $this->_oDb->getShared($sType, $sAction, $iObjectId);
 
     	return $this->parseHtmlByName('share_counter.html', array(
-    		'style_prefix' => $sStylePrefix,
-    		'js_object' => $sJsObject,
-			'html_id_counter' => $this->_oConfig->getHtmlIds('share', 'counter') . $aEvent['id'],
-    		'id' => $aEvent['id'],
-			'counter' => !empty($aEvent['shares']) && (int)$aEvent['shares'] > 0 ? $aEvent['shares'] : ''
+    		'href' => 'javascript:void(0)',
+    		'title' => _t('_bx_timeline_txt_shared_by'),
+    		'bx_repeat:attrs' => array(
+    			array('key' => 'id', 'value' => $this->_oConfig->getHtmlIds('share', 'counter') . $aEvent['id']),
+    			array('key' => 'class', 'value' => $sStylePrefix . '-counter'),
+				array('key' => 'onclick', 'value' => 'javascript:' . $sJsObject . '.toggleByPopup(this, ' . $aEvent['id'] . ')')
+			),
+	    	'content' => !empty($aEvent['shares']) && (int)$aEvent['shares'] > 0 ? $aEvent['shares'] : ''
     	));
     }
 

+ 4 - 4
modules/boonex/timeline/install/langs/en.xml

@@ -69,16 +69,15 @@
 	<string name="_bx_timeline_menu_title_item_actions"><![CDATA[Item Actions]]></string>
     <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Item Actions]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Comment]]></string>
-    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[{comment_count}]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Comment]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Vote]]></string>
-    <string name="_bx_timeline_menu_item_title_item_vote"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_vote"><![CDATA[Plus]]></string>
     <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Share]]></string>
-    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Share]]></string>
 
     <string name="_bx_timeline_menu_item_title_system_timeline"><![CDATA[Timeline]]></string>
     <string name="_bx_timeline_menu_item_title_timeline"><![CDATA[Timeline]]></string>
 
-	<string name="_bx_timeline_alert_module_XXX"><![CDATA[]]></string>
 	<string name="_bx_timeline_alert_action_added"><![CDATA[add]]></string>
 
 	<string name="_bx_timeline_txt_msg_no_results"><![CDATA[Empty]]></string>
@@ -96,6 +95,7 @@
 
 	<string name="_bx_timeline_txt_do_share"><![CDATA[Share]]></string>
 	<string name="_bx_timeline_txt_shared"><![CDATA[Shared {0}'s {1}.]]></string>
+	<string name="_bx_timeline_txt_shared_by"><![CDATA[Shared by]]></string>
 	<string name="_bx_timeline_txt_err_cannot_share"><![CDATA[Cannot share. Please report.]]></string>
 	<string name="_bx_timeline_txt_msg_success_share"><![CDATA[]]></string>
 

+ 1 - 1
modules/boonex/timeline/template/share_counter.html

@@ -1 +1 @@
-<a id="__html_id_counter__" class="__style_prefix__-counter" href="javascript:void(0)" onclick="__js_object__.toggleByPopup(this, __id__)">__counter__</a>
+<bx_include_auto:bx_a.html />