Explorar o código

Merge branch 'master' of https://github.com/unaio/una

RomanL %!s(int64=5) %!d(string=hai) anos
pai
achega
bfa804978b
Modificáronse 27 ficheiros con 199 adicións e 50 borrados
  1. 8 6
      inc/classes/BxDolTemplate.php
  2. 1 0
      install/sql/system.sql
  3. 25 0
      modules/boonex/artificer/data/template/bx_albums/form_ghost_template.html
  4. 3 1
      modules/boonex/artificer/data/template/bx_albums/unit.html
  5. 2 2
      modules/boonex/artificer/data/template/bx_albums/unit_gallery.html
  6. 3 0
      modules/boonex/artificer/data/template/bx_notifications/css/view.css
  7. 3 3
      modules/boonex/artificer/data/template/bx_notifications/menu_custom_ver.html
  8. 1 1
      modules/boonex/artificer/data/template/bx_notifications/menu_preview.html
  9. 1 0
      modules/boonex/artificer/data/template/bx_organizations/cover.html
  10. 9 0
      modules/boonex/artificer/data/template/bx_videos/entry-text.html
  11. 2 3
      modules/boonex/artificer/data/template/mod_text/unit.html
  12. 16 0
      modules/boonex/artificer/data/template/system/css/cmts.css
  13. 1 1
      modules/boonex/artificer/data/template/system/menu_custom_hor_sys_cmts_item_actions.html
  14. 2 2
      modules/boonex/artificer/data/template/system/menu_custom_hor_sys_cmts_item_meta.html
  15. 4 0
      modules/boonex/artificer/data/template/system/menu_custom_item_sys_cmts_item_actions.html
  16. 4 0
      modules/boonex/artificer/data/template/system/menu_custom_item_sys_cmts_item_manage.html
  17. 1 1
      modules/boonex/artificer/data/template/system/menu_custom_ver_sys_cmts_item_manage.html
  18. 1 0
      modules/boonex/english/data/langs/system/en.xml
  19. 6 9
      modules/boonex/notifications/classes/BxNtfsMenuPreview.php
  20. 1 0
      modules/boonex/russian/data/langs/system/ru.xml
  21. 3 3
      modules/boonex/timeline/install/sql/enable.sql
  22. 1 1
      modules/boonex/timeline/template/css/view.css
  23. 1 1
      plugins_public/tailwind/css/tailwind.css
  24. 0 0
      plugins_public/tailwind/css/tailwind.min.css
  25. 1 0
      studio/classes/BxDolStudioBuilderPageQuery.php
  26. 11 0
      studio/template/scripts/BxBaseStudioBuilderPage.php
  27. 88 16
      template/scripts/BxBasePage.php

+ 8 - 6
inc/classes/BxDolTemplate.php

@@ -495,17 +495,19 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
         $fFilterCss = function ($a) use ($aExcludeCss) {
             if (in_array($a['url'], $aExcludeCss))
                 return false;
-            foreach ($this->aPageSnapshot['css_compiled'] as $r)
-                if ($r['url'] == $a['url'])
-                    return false;
+            if (isset($this->aPageSnapshot['css_compiled']))
+                foreach ($this->aPageSnapshot['css_compiled'] as $r)
+                    if ($r['url'] == $a['url'])
+                        return false;
             return true;
         };
         $fFilterJs = function ($a) use ($aExcludeJs) {
             if (in_array($a['url'], $aExcludeJs))
                 return false;
-            foreach ($this->aPageSnapshot['js_compiled'] as $r)
-                if ($r['url'] == $a['url'])
-                    return false;
+            if (isset($this->aPageSnapshot['js_compiled']))
+                foreach ($this->aPageSnapshot['js_compiled'] as $r)
+                    if ($r['url'] == $a['url'])
+                        return false;
             return true;
         };    
 

+ 1 - 0
install/sql/system.sql

@@ -5144,6 +5144,7 @@ CREATE TABLE IF NOT EXISTS `sys_pages_blocks` (
   `text` mediumtext NOT NULL,
   `text_updated` int(11) NOT NULL,
   `help` varchar(255) NOT NULL,
+  `cache_lifetime` int(11) NOT NULL DEFAULT '0',
   `deletable` tinyint(4) NOT NULL DEFAULT '1',
   `copyable` tinyint(4) NOT NULL DEFAULT '1',
   `active` tinyint(4) NOT NULL DEFAULT '1',

+ 25 - 0
modules/boonex/artificer/data/template/bx_albums/form_ghost_template.html

@@ -0,0 +1,25 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost mt-2 flex items-start">
+    <a class="bx-anchor-invisible" name="album-media-{file_id}"></a>
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <div class="bx-base-general-icon-wrapper mr-2">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <div class="font-bold"><bx_text:_bx_albums_form_entry_file_title /></div>
+        <div class="bx-form-input-wrapper bx-form-input-wrapper-text mt-1">
+            <input class="bx-def-font-inputs bx-form-input-text block w-full py-2 px-3 border border-gray-300 dark:border-gray-700 rounded-md shadow-sm bg-white dark:bg-gray-900 placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-2 focus:text-gray-900 dark:focus:text-gray-100 focus:ring-blue-500 focus:border-opacity-70 focus:ring-opacity-20 focus:border-blue-500 text-sm text-gray-700 dark:text-gray-300 appearance-none" type="text" value="{file_title_attr}" name="title-{file_id}" /> <br />
+        </div>
+        <div class="mt-2">
+            <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+            <bx_if:set_thumb>
+                <span class="bx-base-general-use-as-thumb">
+                    <input type="checkbox" name="__name_thumb__[]" value="{file_id}" onclick="bx_base_general_select_thumb(this)" id="__name_thumb__-{file_id}" /> 
+                    <label for="__name_thumb__-{file_id}"><bx_text:_sys_txt_form_entry_input_picture_use_as_thumb /></label>
+                </span>
+            </bx_if:set_thumb>
+        </div>
+    </span>
+</div>
+<script>
+    $('#bx-uploader-file-{storage_object}-{file_id} .bx-base-general-use-as-thumb input[value="__thumb_id__"]').attr('checked', true);
+</script>

+ 3 - 1
modules/boonex/artificer/data/template/bx_albums/unit.html

@@ -1,6 +1,8 @@
 <div class="bx-base-text-unit bx-base-text-unit-ext flex flex-col mb-3 md:mb-4 lg:mb-6 ring-1 ring-gray-200 dark:ring-gray-700 overflow-hidden bg-white dark:bg-gray-800 text-left rounded-md">
     <div class="bx-albums-unit-text-cont px-4 pt-4 pb-2">
-        <h2 class="bx-base-text-unit-title"><a href="__content_url__">__title__</a></h2>
+        <div class="bx-base-text-unit-title">
+            <a class="text-lg lg:text-xl font-semibold text-gray-700 group-hover:text-gray-900 dark:text-gray-200 dark:group-hover:text-white" href="__content_url__">__title__</a>
+        </div>
         <bx_if:meta>
             <div class="bx-base-text-unit-info mt-1 mb-2">
                 <div class="bx-base-general-unit-meta">__meta__</div>

+ 2 - 2
modules/boonex/artificer/data/template/bx_albums/unit_gallery.html

@@ -6,8 +6,8 @@
             </div> 
         </div>
         <div class="bx-albums-unit-text-cont px-4 py-2 text-center">
-            <div class="bx-base-text-unit-title font-bold">
-                <a class="text-gray-500 dark:text-gray-400" href="__content_url__">__title__</a>
+            <div class="bx-base-text-unit-title">
+                <a class="text-lg lg:text-xl font-semibold text-gray-700 group-hover:text-gray-900 dark:text-gray-200 dark:group-hover:text-white" href="__content_url__">__title__</a>
             </div>
             <div class="bx-base-text-unit-info">
                 <bx_if:meta><div class="bx-base-general-unit-meta">__meta__</div></bx_if:meta>

+ 3 - 0
modules/boonex/artificer/data/template/bx_notifications/css/view.css

@@ -8,4 +8,7 @@ import url(../../../../../notifications/template/css/view.css);
     top: 0;
     right: 0;
     padding: 1rem;
+}
+#bx_notifications_preview .bx-ntfs-preview .bx-menu-item:last-child .bx-ntfs-preview-item {
+    margin-bottom: 0;
 }

+ 3 - 3
modules/boonex/artificer/data/template/bx_notifications/menu_custom_ver.html

@@ -1,5 +1,5 @@
 <ul class="bx-menu-custom bx-menu-custom-ver bx-menu-object-__object__ bx-clearfix">
-	<bx_repeat:menu_items>
-		<li class="bx-menu-item bx-menu-item-__name____class__ text-gray-500 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700">__item__</li>
-	</bx_repeat:menu_items>
+    <bx_repeat:menu_items>
+        <li class="bx-menu-item bx-menu-item-__name____class__">__item__</li>
+    </bx_repeat:menu_items>
 </ul>

+ 1 - 1
modules/boonex/artificer/data/template/bx_notifications/menu_preview.html

@@ -1,4 +1,4 @@
 <div class="bx-ntfs-preview bx-popup-width">
     <div class="text-xl pb-2"><bx_text:_bx_ntfs_menu_item_title_notifications /></div>
-    <div class="relative max-h-96 overflow-y-auto -mx-2 p-2">__content__</div>
+    <div class="relative max-h-96 overflow-y-auto -mx-2 px-2 pt-2">__content__</div>
 </div>

+ 1 - 0
modules/boonex/artificer/data/template/bx_organizations/cover.html

@@ -0,0 +1 @@
+<bx_include_auto_mod_profile:cover.html />

+ 9 - 0
modules/boonex/artificer/data/template/bx_videos/entry-text.html

@@ -0,0 +1,9 @@
+<div class="bx-content-description-before">__content_description_before__</div>
+<div class="bx-content-description">
+    <div class="bx-base-text-entity-content bx-def-constraint-list bx-def-constraint-pre bx-def-constraint-object bx-def-constraint-iframe bx-def-constraint-img bx-videos-entity-video">
+        <p class="text-center">__entry_video__</p>
+        <h1>__entry_title__</h1>
+        __entry_text__
+    </div>
+</div>
+<div class="bx-content-description-after">__content_description_after__</div>

+ 2 - 3
modules/boonex/artificer/data/template/mod_text/unit.html

@@ -8,9 +8,8 @@
         <div class="bx-base-text-unit-info flex space-x-1 text-sm text-gray-500 dark:text-gray-400 pb-2">
             <bx_if:meta><div class="bx-base-general-unit-meta">__meta__</div></bx_if:meta>
         </div>
-        <div class="bx-base-text-unit-title">
-            <h2 class="text-left"><a href="__content_url__" class="text-lg lg:text-xl font-semibold text-gray-700 group-hover:text-gray-900 dark:text-gray-200 dark:group-hover:text-white">__title__</a></h2>
-            __badges__
+        <div class="bx-base-text-unit-title text-left">
+            <a href="__content_url__" class="text-lg lg:text-xl font-semibold text-gray-700 group-hover:text-gray-900 dark:text-gray-200 dark:group-hover:text-white">__title__</a>__badges__
         </div>
         <div class="bx-base-text-unit-text text-left mt-1 lg:mt-2 font-normal text-sm lg:text-base text-gray-500 group-hover:text-gray-600 dark:text-gray-400 dark:group-hover:text-gray-300">
         __summary__

+ 16 - 0
modules/boonex/artificer/data/template/system/css/cmts.css

@@ -2,6 +2,10 @@
 import url(../../../../../../../template/css/cmts.css);
 --*/
 
+ul.cmts {
+    list-style: none;
+}
+
 /*--- Minified Post Form ---*/
 div.cmt-reply.cmt-reply-min div.cmt-body {
     display: none;
@@ -25,6 +29,10 @@ div.cmt-cont .cmt-post-reply .bx-form-element-wrapper {
 }
 
 /*--- Menu action ---*/
+.bx-menu-object-sys_cmts_item_actions .sys-action {
+    padding-left: 0.5rem;
+    padding-right: 0.5rem;
+}
 .bx-menu-object-sys_cmts_item_manage .bx-report .sys-action-element-holder{
     padding: 0px !important;
 }
@@ -46,3 +54,11 @@ div.cmt-cont .cmt-post-reply .bx-form-element-wrapper {
     width:100%;
     display: block;
 }
+
+/*--- Menu meta ---*/
+span.cmt-reply-to a .bx-def-icon-size {
+    width: 1.0rem;
+    height: 1.0rem;
+    line-height: 0.875rem;
+    font-size: 0.6rem;
+}

+ 1 - 1
modules/boonex/artificer/data/template/system/menu_custom_hor_sys_cmts_item_actions.html

@@ -1,6 +1,6 @@
 <ul id="__html_id__" class="bx-menu-custom bx-menu-custom-hor bx-menu-hor-inline<bx_if:show_more_auto_class> bx-menu-more-auto</bx_if:show_more_auto_class> bx-menu-object-__object__ flex  justify-start space-x-8 pb-3 md:pb-4">
     <bx_repeat:menu_items>
-        <li class="bx-menu-item bx-menu-item-__name____class__ flex justify-center items-center border border-transparent rounded-md px-2 space-x-1 text-gray-500 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 text-sm font-medium">__item__</li>
+        <li class="bx-menu-item bx-menu-item-__name____class__ flex justify-center items-center border border-transparent rounded-md space-x-1 text-gray-500 hover:text-gray-700 dark:text-gray-500 dark:hover:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 text-sm font-medium">__item__</li>
     </bx_repeat:menu_items>
 </ul>
 __js_code__

+ 2 - 2
modules/boonex/artificer/data/template/system/menu_custom_hor_sys_cmts_item_meta.html

@@ -1,6 +1,6 @@
-<ul id="__html_id__" class="bx-menu-custom bx-menu-custom-hor bx-menu-hor-inline<bx_if:show_more_auto_class> bx-menu-more-auto</bx_if:show_more_auto_class> bx-menu-object-__object__ flex justify-start items-start">
+<ul id="__html_id__" class="bx-menu-custom bx-menu-custom-hor bx-menu-hor-inline<bx_if:show_more_auto_class> bx-menu-more-auto</bx_if:show_more_auto_class> bx-menu-object-__object__ flex justify-start items-center">
     <bx_repeat:menu_items>
-        <li class="bx-menu-item bx-menu-item-__name____class__ flex flex-wrap text-sm text-gray-500 dark:text-gray-400">__item__</li>
+        <li class="bx-menu-item bx-menu-item-__name____class__ flex flex-wrap items-center text-sm text-gray-500 dark:text-gray-400">__item__</li>
     </bx_repeat:menu_items>
 </ul>
 __js_code__

+ 4 - 0
modules/boonex/artificer/data/template/system/menu_custom_item_sys_cmts_item_actions.html

@@ -0,0 +1,4 @@
+<span class="__class_wrp__">
+    <a class="__class_link__ block p-2" href="__link__" onclick="__onclick__" title="__title_attr__"__attrs__><bx_include_auto:menu_icon.html /><bx_if:title><span class="bx-def-margin-sec-left-auto">__title__</span></bx_if:title></a>
+    <bx_if:addon>__addon__</bx_if:addon>
+</span>

+ 4 - 0
modules/boonex/artificer/data/template/system/menu_custom_item_sys_cmts_item_manage.html

@@ -0,0 +1,4 @@
+<span class="__class_wrp__">
+    <a class="__class_link__ block" href="__link__" onclick="__onclick__" title="__title_attr__"__attrs__><bx_include_auto:menu_icon.html /><bx_if:title><span class="bx-def-margin-sec-left-auto">__title__</span></bx_if:title></a>
+    <bx_if:addon>__addon__</bx_if:addon>
+</span>

+ 1 - 1
modules/boonex/artificer/data/template/system/menu_custom_ver_sys_cmts_item_manage.html

@@ -1,7 +1,7 @@
 <div class="w-full md:w-56 box-border">
     <ul class="bx-menu-custom bx-menu-custom-ver bx-menu-object-__object__ bx-clearfix">
         <bx_repeat:menu_items>
-            <li class="bx-menu-item bx-menu-item-__name____class__ group opacity-80 hover:opacity-100 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:text-gray-100 dark:hover:bg-gray-900 hover:text-gray-900 flex items-center px-4 py-2 text-sm font-normal">__item__</li>
+            <li class="bx-menu-item bx-menu-item-__name____class__ group opacity-80 hover:opacity-100 flex items-center px-4 py-2 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:text-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 text-sm font-normal">__item__</li>
         </bx_repeat:menu_items>
     </ul>
 </div>

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -530,6 +530,7 @@
 	<string name="_adm_bp_scs_save"><![CDATA[The changes were successfully saved]]></string>
 	<string name="_adm_bp_txt_block_active"><![CDATA[Active]]></string>
 	<string name="_adm_bp_txt_block_async"><![CDATA[Asynchronous Mode]]></string>
+	<string name="_adm_bp_txt_block_cache_lifetime"><![CDATA[Block Cache Lifetime (in seconds)]]></string>
 	<string name="_adm_bp_txt_block_content_attachments_html"><![CDATA[Attachments]]></string>
 	<string name="_adm_bp_txt_block_content_image_align"><![CDATA[Alignment]]></string>
 	<string name="_adm_bp_txt_block_content_image_align_center"><![CDATA[center]]></string>

+ 6 - 9
modules/boonex/notifications/classes/BxNtfsMenuPreview.php

@@ -65,6 +65,8 @@ class BxNtfsMenuPreview extends BxTemplMenuCustom
             if(!$this->_oModule->_oTemplate->getPost($aItem))
                 continue;
 
+            $aItem['name'] = 'event';
+
             $aResults[] = $aItem;
         }
 
@@ -72,15 +74,10 @@ class BxNtfsMenuPreview extends BxTemplMenuCustom
         if(count($aResults) > $iPerPage)
             $aResults = array_slice($aResults, 0, $iPerPage);
 
-        $bFirst = true;
-        foreach($aItems as $iKey => $aItem) {
-            if($bFirst)
-                $bFirst = !$this->_oModule->_oDb->markAsRead($this->_iOwnerId, $aItem['id']);
-
-            $aItems[$iKey]['name'] = 'event';
-        }
-
-        return array_merge($aItems, $this->_oQuery->getMenuItems());
+        $aFirst = array_shift($aItems);
+        $this->_oModule->_oDb->markAsRead($this->_iOwnerId, $aFirst['id']);
+        
+        return array_merge($aResults, $this->_oQuery->getMenuItems());
     }
 
     protected function _getMenuItemDefault ($aItem)

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -530,6 +530,7 @@ _sys_layout_1_column<?xml version="1.0" encoding="utf-8"?>
 	<string name="_adm_bp_scs_save"><![CDATA[Изменения успешно сохранены]]></string>
 	<string name="_adm_bp_txt_block_active"><![CDATA[Активный]]></string>
     <string name="_adm_bp_txt_block_async"><![CDATA[Асинхронный режим]]></string>
+    <string name="_adm_bp_txt_block_cache_lifetime"><![CDATA[Кэш для блока (в секундах)]]></string>
 	<string name="_adm_bp_txt_block_content_attachments_html"><![CDATA[Вложения]]></string>
 	<string name="_adm_bp_txt_block_content_image_align"><![CDATA[Выравнивание]]></string>
 	<string name="_adm_bp_txt_block_content_image_align_center"><![CDATA[по центру]]></string>

+ 3 - 3
modules/boonex/timeline/install/sql/enable.sql

@@ -13,7 +13,7 @@ INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `lay
 ('bx_timeline_view_hot', '_bx_timeline_page_title_sys_view_hot', '_bx_timeline_page_title_view_hot', 'bx_timeline', 5, 2147483647, 1, 'timeline-view-hot', 'page.php?i=timeline-view-hot', '', '', '', 0, 1, 0, '', ''),
 
 ('bx_timeline_item', '_bx_timeline_page_title_sys_item', '_bx_timeline_page_title_item', 'bx_timeline', 2, 2147483647, 1, 'item', 'page.php?i=item', '', '', '', 0, 1, 0, 'BxTimelinePageViewItem', 'modules/boonex/timeline/classes/BxTimelinePageViewItem.php'),
-('bx_timeline_item_brief', '_bx_timeline_page_title_sys_item_brief', '_bx_timeline_page_title_item_brief', 'bx_timeline', 2, 2147483647, 1, 'item-quick', 'page.php?i=item-quick', '', '', '', 0, 1, 0, 'BxTimelinePageViewItem', 'modules/boonex/timeline/classes/BxTimelinePageViewItem.php'),
+('bx_timeline_item_brief', '_bx_timeline_page_title_sys_item_brief', '_bx_timeline_page_title_item_brief', 'bx_timeline', 5, 2147483647, 1, 'item-quick', 'page.php?i=item-quick', '', '', '', 0, 1, 0, 'BxTimelinePageViewItem', 'modules/boonex/timeline/classes/BxTimelinePageViewItem.php'),
 
 ('bx_timeline_manage', '_bx_timeline_page_title_sys_manage', '_bx_timeline_page_title_manage', 'bx_timeline', 5, 2147483647, 1, 'timeline-manage', 'page.php?i=timeline-manage', '', '', '', 0, 1, 0, '', '');
 
@@ -34,8 +34,8 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 ('bx_timeline_item', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
 
 ('bx_timeline_item_brief', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item_content', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_item_content";}', 0, 0, 1, 1),
-('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
-('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_item_comments";}', 0, 0, 1, 2),
+('bx_timeline_item_brief', 0, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
+('bx_timeline_item_brief', 0, 'bx_timeline', '', '_bx_timeline_page_block_title_item_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_item_comments";}', 0, 0, 1, 2),
 
 ('bx_timeline_manage', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_muted', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:15:"get_block_muted";}', 0, 0, 1, 1);
 

+ 1 - 1
modules/boonex/timeline/template/css/view.css

@@ -885,7 +885,7 @@ div.bx-tl-bview-images {
 }
 div.bx-tl-bview-images div.bx-tl-bview-image:not(.bx-tl-bvi-single) {
     width: 100%;
-    height: 30rem;
+    height: calc(100vh - 7rem);
     text-align: center;
 }
 div.bx-tl-bview-images div.bx-tl-bview-image:not(.bx-tl-bvi-single) img {

+ 1 - 1
plugins_public/tailwind/css/tailwind.css

@@ -524,7 +524,7 @@
         @apply w-48 h-48;
     }
 
-    .bx-artificer .bx-base-general-unit-meta .bx-base-profile-unit-meta-item > a,
+    .bx-artificer .bx-base-general-unit-meta .bx-base-profile-unit-meta-item > a:not(.bx-btn),
     .bx-artificer .bx-base-general-unit-meta ul.bx-menu-custom.bx-menu-custom-hor .bx-base-pofile-unit {
         @apply p-1 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700;
     }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 1 - 0
studio/classes/BxDolStudioBuilderPageQuery.php

@@ -417,6 +417,7 @@ class BxDolStudioBuilderPageQuery extends BxDolStudioPageQuery
                 `tpb`.`title` AS `title`,
                 `tpb`.`designbox_id` AS `designbox_id`,
                 `tpb`.`async` AS `async`,
+                `tpb`.`cache_lifetime` AS `cache_lifetime`,
                 `tpb`.`submenu` AS `submenu`,
                 `tpb`.`tabs` AS `tabs`,
                 `tpb`.`hidden_on` AS `hidden_on`,

+ 11 - 0
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -795,6 +795,17 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                         'pass' => 'Xss',
                     ),
                 ),
+                'cache_lifetime' => array(
+                    'type' => 'text',
+                    'name' => 'cache_lifetime',
+                    'caption' => _t('_adm_bp_txt_block_cache_lifetime'),
+                    'info' => '',
+                    'value' => isset($aBlock['cache_lifetime']) ? $aBlock['cache_lifetime'] : 0,
+                    'required' => '0',
+                    'db' => array (
+                        'pass' => 'Int',
+                    ),
+                ),
                 'active' => array(
                     'type' => 'switcher',
                     'name' => 'active',

+ 88 - 16
template/scripts/BxBasePage.php

@@ -19,6 +19,7 @@ class BxBasePage extends BxDolPage
 
     protected $_sStorage; //--- Storage object for page's images like custom cover, HTML block attachments, etc.
     protected $_oPageCacheObject = null;
+    protected $_oBlockCacheObject = null;
     
     protected $_bStickyColumns = false;
 
@@ -148,7 +149,7 @@ class BxBasePage extends BxDolPage
         else {
             $oCache = $this->_getPageCacheObject();
             $sKey = $this->_getPageCacheKey();
-            $sKeyCssJs = $sKey . 'cssjs';
+            $sKeyCssJs = 'cssjs_' . $sKey;
 
             $mixedRet = $oCache->getData($sKey, $this->_aObject['cache_lifetime']);
             $aRetCssJs = $oCache->getData($sKeyCssJs, $this->_aObject['cache_lifetime']);
@@ -396,7 +397,7 @@ class BxBasePage extends BxDolPage
             foreach ($aCell as $aBlock) {
                 $this->processPageBlock($aBlock, false);
 
-                $sContentWithBox = $this->_getBlockCode($aBlock, $aBlock['async']);
+                $sContentWithBox = $this->_getBlockCodeWithCache($aBlock, $aBlock['async']);
 
             	$sHiddenOn = '';
                 if(!empty($aBlock['hidden_on']))
@@ -448,7 +449,41 @@ class BxBasePage extends BxDolPage
     {
         if (!($aBlock = $this->_oQuery->getPageBlock((int)$iBlockId)))
             return '';
-        return $this->_getBlockCode($aBlock, 0);
+        return $this->_getBlockCodeWithCache($aBlock, 0);
+    }
+
+
+    protected function _getBlockCodeWithCache($aBlock, $iAsync = 0)
+    {
+        if (!getParam('sys_pb_cache_enable') || !$aBlock['cache_lifetime'] || $iAsync) {
+            $sBlockCode = $this->_getBlockCode($aBlock, $iAsync);
+        }
+        else {
+            $oCache = $this->_getBlockCacheObject();
+            $sKey = $this->_getBlockCacheKey(false, $aBlock);
+            $sKeyCssJs = 'cssjs_' . $sKey;
+
+            $mixedRet = $oCache->getData($sKey, $aBlock['cache_lifetime']);
+            $aRetCssJs = $oCache->getData($sKeyCssJs, $aBlock['cache_lifetime']);
+
+            if ($mixedRet !== null && $aRetCssJs !== null) {
+                BxDolTemplate::getInstance()->collectingStart();
+                BxDolTemplate::getInstance()->collectingInject($aRetCssJs['css'], $aRetCssJs['js']);
+                $sBlockCode = BxDolTemplate::getInstance()->collectingEndGetCode();
+                $sBlockCode .= $mixedRet;
+            } else {
+                BxDolTemplate::getInstance()->collectingStart();
+
+                $sBlockCode = $this->_getBlockCode($aBlock, $iAsync);
+
+                $aBlockCssJs = BxDolTemplate::getInstance()->collectingEndGetCode(array(), array(), 'array');
+
+                $oCache->setData($sKey, $sBlockCode, $aBlock['cache_lifetime']);
+                $oCache->setData($sKeyCssJs, $aBlockCssJs, $aBlock['cache_lifetime']);
+            }
+        }
+
+        return $sBlockCode;
     }
 
     /**
@@ -774,14 +809,31 @@ class BxBasePage extends BxDolPage
      */
     protected function _getPageCacheObject ()
     {
-        if ($this->_oPageCacheObject != null) {
-            return $this->_oPageCacheObject;
+        return $this->_getCacheObject ();
+    }
+
+    /**
+     * Get block cache object.
+     * @return cache object instance
+     */
+    protected function _getBlockCacheObject ()
+    {
+        return $this->_getCacheObject ('Block', 'pb');
+    }
+
+    protected function _getCacheObject ($sSuffixObj = 'Page', $sSuffixParam = 'page')
+    {
+        $sObj = '_o' . $sSuffixObj . 'CacheObject';
+        $sParam = 'sys_' . $sSuffixParam . '_cache_engine';
+
+        if ($this->{$sObj} != null) {
+            return $this->{$sObj};
         } else {
-            $sEngine = getParam('sys_page_cache_engine');
-            $this->_oPageCacheObject = bx_instance ('BxDolCache' . $sEngine);
-            if (!$this->_oPageCacheObject->isAvailable())
-                $this->_oPageCacheObject = bx_instance ('BxDolCacheFile');
-            return $this->_oPageCacheObject;
+            $sEngine = getParam($sParam);
+            $this->{$sObj} = bx_instance ('BxDolCache' . $sEngine);
+            if (!$this->{$sObj}->isAvailable())
+                $this->{$sObj} = bx_instance ('BxDolCacheFile');
+            return $this->{$sObj};
         }
     }
 
@@ -800,6 +852,21 @@ class BxBasePage extends BxDolPage
         return $s;
     }
 
+    /**
+     * Get block cache key.
+     * @param $isPrefixOnly return key prefix only.
+     * @return string
+     */
+    protected function _getBlockCacheKey ($isPrefixOnly = false, $aBlock = array())
+    {
+        $s = $this->_getPageCacheKey(true) . 'block_';
+        if ($isPrefixOnly)
+            return $s;
+        $s .= ($aBlock ? $aBlock['id'] : 0) . '_' . $this->_getPageCacheParams ();
+        $s .= bx_site_hash() . '.php';
+        return $s;
+    }
+
     /**
      * Additional cache key. In the case of dynamic page.
      * For example - profile page, where each profile has own page.
@@ -817,13 +884,18 @@ class BxBasePage extends BxDolPage
      */
     protected function cleanCache ($isDelAllWithPagePrefix = false)
     {
-        $oCache = $this->_getPageCacheObject ();
-        $sKey = $this->_getPageCacheKey($isDelAllWithPagePrefix);
+        $a = ['Page', 'Block'];
+        $bRet = false;
+        foreach ($a as $s) {
+            $oCache = $this->{'_get' . $s . 'CacheObject'} ();
+            $sKey = $this->{'_get'. $s . 'CacheKey'} ($isDelAllWithPagePrefix);
 
-        if ($isDelAllWithPagePrefix)
-            return $oCache->removeAllByPrefix($sKey);
-        else
-            return $oCache->delData($sKey);
+            if ($isDelAllWithPagePrefix)
+                $bRet = $bRet && $oCache->removeAllByPrefix($sKey);
+            else
+                $bRet = $bRet && $oCache->delData($sKey);
+        }
+        return $bRet;
     }
 }
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio