AntonLV 9 éve
szülő
commit
1fe5d93248

+ 5 - 0
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -123,11 +123,16 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         );
 
         $sHp = str_replace('_', '-', $this->_sName);
+        $sHpI = BX_TIMELINE_VIEW_ITEM;
         $sHpT = BX_TIMELINE_VIEW_TIMELINE;
         $sHpO = BX_TIMELINE_VIEW_OUTLINE;
         $sHpS = BX_TIMELINE_VIEW_SEARCH;
         $this->_aHtmlIds = array(
         	'view' => array(
+        		'main_' . $sHpI => $sHp . '-' . $sHpI,
+        		'item_' . $sHpI => $sHp . '-item-' . $sHpI . '-',
+                'photo_popup_' . $sHpI => $sHp . '-photo-popup-' . $sHpI,
+
                 'main_' . $sHpT => $sHp . '-' . $sHpT,
         		'item_' . $sHpT => $sHp . '-item-' . $sHpT . '-',
                 'photo_popup_' . $sHpT => $sHp . '-photo-popup-' . $sHpT,

+ 1 - 0
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -16,6 +16,7 @@ define('BX_TIMELINE_TYPE_ITEM', 'view_item');
 define('BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS', 'owner_and_connections');
 define('BX_TIMELINE_TYPE_DEFAULT', BX_BASE_MOD_NTFS_TYPE_OWNER);
 
+define('BX_TIMELINE_VIEW_ITEM', 'item');
 define('BX_TIMELINE_VIEW_TIMELINE', 'timeline');
 define('BX_TIMELINE_VIEW_OUTLINE', 'outline');
 define('BX_TIMELINE_VIEW_SEARCH', 'search');

+ 3 - 2
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -11,6 +11,7 @@
 
 class BxTimelineTemplate extends BxBaseModNotificationsTemplate
 {
+    protected static $_sTmplContentItemItem;
     protected static $_sTmplContentItemOutline;
     protected static $_sTmplContentItemTimeline;
     protected static $_sTmplContentItemSearch;
@@ -130,7 +131,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             return MsgBox($mixedResult);
 
         $aParams = array(
-        	'view' => BX_TIMELINE_VIEW_DEFAULT, 
+        	'view' => BX_TIMELINE_VIEW_ITEM, 
         	'type' => BX_TIMELINE_TYPE_ITEM
         );
         $sContent = $this->getPost($aEvent, $aParams);
@@ -152,7 +153,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         	'html_id' => $this->_oConfig->getHtmlIds('view', 'main_item'),
         	'content' => $sContent,
         	'view_image_popup' => $this->_getImagePopup($aParams),
-            'js_content' => $this->getJsCode('view')
+            'js_content' => $this->getJsCode('view') . $this->getJsCode('repost')
         ));
     }
 

+ 11 - 3
modules/boonex/timeline/js/main.js

@@ -224,10 +224,18 @@ BxTimelineMain.prototype._loading = function(e, bShow) {
 	bx_loading(oParent, bShow);
 };
 
-BxTimelineMain.prototype._getView = function(oView) {
-	oView = $(oView);
+BxTimelineMain.prototype._getView = function(oElement) {
+	oElement = $(oElement);
+
+	var oView = oElement;
+	if(!oView.hasClass(this.sClassView))
+		oView = oElement.parents('.' + this.sClassView + ':first');
+
 	if(!oView.hasClass(this.sClassView))
-		oView = oView.parents('.bx-db-container:first').find('.' + this.sClassView + ':first');
+		oView = oElement.parents('.bx-page-block-container:first').find('.' + this.sClassView + ':first');
+
+	if(oView.hasClass(this.sClassView + '-item'))
+		return 'item';
 
 	if(oView.hasClass(this.sClassView + '-timeline'))
 		return 'timeline';

+ 1 - 0
modules/boonex/timeline/template/item_item.html

@@ -0,0 +1 @@
+<bx_include_auto:item_outline.html />