RomanL 4 лет назад
Родитель
Сommit
badbf61fc7
24 измененных файлов с 187 добавлено и 33 удалено
  1. 1 0
      inc/js/classes/BxDolPage.js
  2. 17 9
      modules/base/profile/classes/BxBaseModProfileTemplate.php
  3. 3 0
      modules/boonex/artificer/data/template/bx_shopify/entry-buy.html
  4. 1 0
      modules/boonex/artificer/data/template/bx_snipcart/sct_button.html
  5. 2 2
      modules/boonex/decorous/data/template/system/css/default.less
  6. 0 4
      modules/boonex/files/template/css/main.css
  7. 2 2
      modules/boonex/lucid/data/template/system/css/default.less
  8. 25 0
      modules/boonex/lucid/data/template/system/css/editor.css
  9. 6 0
      modules/boonex/ocean/data/template/system/css/auth.css
  10. 30 0
      modules/boonex/ocean/data/template/system/css/editor.css
  11. 2 2
      modules/boonex/protean/data/template/system/css/default.less
  12. 26 0
      modules/boonex/protean/data/template/system/css/editor.css
  13. 1 1
      plugins_public/tailwind/css/tailwind.css
  14. 0 0
      plugins_public/tailwind/css/tailwind.min.css
  15. 9 4
      studio/js/forms_sortable_fields.js
  16. 6 2
      studio/template/scripts/BxBaseStudioFormsSearchForms.php
  17. 6 2
      studio/template/scripts/BxBaseStudioGrid.php
  18. 1 0
      template/form_field_custom_suggestions.html
  19. 12 0
      template/menu_custom_item_addon.html
  20. 7 2
      template/scripts/BxBaseFormView.php
  21. 4 1
      template/scripts/BxBaseFunctions.php
  22. 2 0
      template/scripts/BxBaseMenuDashboardReportsManage.php
  23. 6 2
      template/scripts/BxBaseReportsGrid.php
  24. 18 0
      template/unit_meta_item_ex.html

+ 1 - 0
inc/js/classes/BxDolPage.js

@@ -52,6 +52,7 @@ BxDolPage.prototype.share = function(oLink, sUrl)
     oData['a'] = 'get_share';
     oData['url'] = sUrl;
     $(".bx-popup-applied:visible").dolPopupHide();
+
     $(window).dolPopupAjax({
         url: bx_append_url_params(this._sActionsUri, oData),
         displayMode: 'box',

+ 17 - 9
modules/base/profile/classes/BxBaseModProfileTemplate.php

@@ -142,9 +142,25 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             $sText = $this->getText($aData);
             $sSummary = $this->getSummary($aData, $sTitle, $sText, $sUrl);
         }
-
+        
+        $sCoverUrl = $bPublicCover ? $this->urlCoverUnit($aData, false) : '';
+        $bCoverUrl = !empty($sCoverUrl);
+        $bCoverImage = false;
+        if(empty($sCoverUrl) && ($iCoverId = (int)getParam('sys_unit_cover_profile')) != 0)
+            $sCoverUrl = BxDolTranscoder::getObjectInstance(BX_DOL_TRANSCODER_OBJ_COVER_UNIT_PROFILE)->getFileUrlById($iCoverId);
+        
+        if(empty($sCoverUrl))
+            $sCoverUrl = $this->getImageUrl('cover.svg');
+        else
+            $bCoverImage = true;
+        
         $sThumbUrl = $bPublicThumb ? $this->_getUnitThumbUrl($sTemplateSize, $aData, false) : '';
         $bThumbUrl = !empty($sThumbUrl);
+
+        if(substr($sTemplate, 0, 13) == 'unit_wo_cover' && $bCoverImage && !$bThumbUrl){
+            $bThumbUrl = true;
+            $sThumbUrl = BxDolTranscoder::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_COVER_THUMB'])->getFileUrlById($aData[$CNF['FIELD_COVER']]);
+        }
 		
         $aTmplVarsThumbnail = array(
             'bx_if:show_thumb_image' => array(
@@ -171,14 +187,6 @@ class BxBaseModProfileTemplate extends BxBaseModGeneralTemplate
             'thumb_url' => $bThumbUrl ? $sThumbUrl : $this->getImageUrl('no-picture-thumb.png'),
         );
 
-        $sCoverUrl = $bPublicCover ? $this->urlCoverUnit($aData, false) : '';
-        $bCoverUrl = !empty($sCoverUrl);
-
-        if(empty($sCoverUrl) && ($iCoverId = (int)getParam('sys_unit_cover_profile')) != 0)
-            $sCoverUrl = BxDolTranscoder::getObjectInstance(BX_DOL_TRANSCODER_OBJ_COVER_UNIT_PROFILE)->getFileUrlById($iCoverId);
-        if(empty($sCoverUrl))
-            $sCoverUrl = $this->getImageUrl('cover.svg');
-
         $aTmplVarsMeta = array();
         if(substr($sTemplate, 0, 8) != 'unit_wo_')
             $aTmplVarsMeta = $this->getSnippetMenuVars ($iProfile, $bPublic);

+ 3 - 0
modules/boonex/artificer/data/template/bx_shopify/entry-buy.html

@@ -0,0 +1,3 @@
+<a id="__html_id__" class="bx-shopify-buy " href="javascript:void(0)" onclick="__js_object__.buyProductByHandle('__entry_code__', this)" style="display:none">
+    <bx_text:_bx_shopify_menu_item_title_buy_for />
+</a>

+ 1 - 0
modules/boonex/artificer/data/template/bx_snipcart/sct_button.html

@@ -0,0 +1 @@
+<button class="snipcart-add-item font-medium" <bx_repeat:attributes>data-item-__key__="__value__"</bx_repeat:attributes>>__content__</button>

+ 2 - 2
modules/boonex/decorous/data/template/system/css/default.less

@@ -139,8 +139,8 @@
     a:hover {
         color: @bx-color-link-body-hover; 
     }
-    .sys-icon:not(.sys-colored),
-    .sys-icon-a:not(.sys-colored) {
+    .sys-icon:not(.sys-colored):not(.bx-vote-star),
+    .sys-icon-a:not(.sys-colored):not(.bx-vote-star) {
         color: inherit; 
     }
     a:hover > .sys-icon:not(.sys-colored),

+ 0 - 4
modules/boonex/files/template/css/main.css

@@ -84,10 +84,6 @@
     padding: 0;
 }
 
-.bx-files-border-thick {
-    border-width: 3px;
-}
-
 /*--- Files Browser Table layout ---*/
 .bx-files-text-unit-simple-row {
     text-align: left;

+ 2 - 2
modules/boonex/lucid/data/template/system/css/default.less

@@ -129,8 +129,8 @@
     a:hover {
         color: @bx-color-link-body-hover; 
     }
-    .sys-icon:not(.sys-colored),
-    .sys-icon-a:not(.sys-colored) {
+    .sys-icon:not(.sys-colored):not(.bx-vote-star),
+    .sys-icon-a:not(.sys-colored):not(.bx-vote-star) {
         color: @bx-color-icon-body; 
     }
     a:hover > .sys-icon:not(.sys-colored),

+ 25 - 0
modules/boonex/lucid/data/template/system/css/editor.css

@@ -0,0 +1,25 @@
+blockquote {
+  /* NOTE: copied from common.css */
+  border-left: 2px solid #ccc;
+  padding-left: 10px;
+}
+pre {
+  /* NOTE: copied from common.css */
+  padding: 5px;
+  border: 1px solid green;
+  background-color: white;
+  color: #009900;
+  display: block;
+  margin: 0;
+  overflow-x: auto;
+}
+.bx-hide-in-htmleditor {
+  display: none;
+}
+.ql-toolbar.ql-snow {
+  border: none !important;
+  border-bottom: 1px solid rgba(50, 100, 180, 0.2) !important;
+}
+.ql-container.bx-form-input-html-quill-empty.ql-snow {
+  border-radius: 0.3rem;
+}

+ 6 - 0
modules/boonex/ocean/data/template/system/css/auth.css

@@ -0,0 +1,6 @@
+@import url(../../../../../../../template/css/auth.css);
+
+.sys-auth .bx-btn {
+    padding-top: 0px;
+    padding-bottom: 0px;
+}

+ 30 - 0
modules/boonex/ocean/data/template/system/css/editor.css

@@ -0,0 +1,30 @@
+blockquote {
+  /* NOTE: copied from common.css */
+  border-left: 2px solid #ccc;
+  padding-left: 10px;
+}
+pre {
+  /* NOTE: copied from common.css */
+  padding: 5px;
+  border: 1px solid green;
+  background-color: white;
+  color: #009900;
+  display: block;
+  margin: 0;
+  overflow-x: auto;
+}
+.bx-hide-in-htmleditor {
+  display: none;
+}
+.ql-toolbar.ql-snow {
+  border-radius: 0.3rem 0.3rem 0 0 !important;
+}
+.ql-toolbar.ql-snow,
+.ql-container.ql-snow {
+  border-color: #6097b0 !important;
+  border-width: 2px !important;
+}
+.bx-form-input-html-quill-empty.ql-container {
+  border-radius: 0.3rem !important;
+  border-top: 2px solid #6097b0 !important;
+}

+ 2 - 2
modules/boonex/protean/data/template/system/css/default.less

@@ -129,8 +129,8 @@
     a:hover {
         color: @bx-color-link-body-hover; 
     }
-    .sys-icon:not(.sys-colored),
-    .sys-icon-a:not(.sys-colored) {
+    .sys-icon:not(.sys-colored):not(.bx-vote-star),
+    .sys-icon-a:not(.sys-colored):not(.bx-vote-star) {
         color: @bx-color-icon-body; 
     }
     a:hover > .sys-icon:not(.sys-colored),

+ 26 - 0
modules/boonex/protean/data/template/system/css/editor.css

@@ -0,0 +1,26 @@
+blockquote {
+  /* NOTE: copied from common.css */
+  border-left: 2px solid #ccc;
+  padding-left: 10px;
+}
+pre {
+  /* NOTE: copied from common.css */
+  padding: 5px;
+  border: 1px solid green;
+  background-color: white;
+  color: #009900;
+  display: block;
+  margin: 0;
+  overflow-x: auto;
+}
+.bx-hide-in-htmleditor {
+  display: none;
+}
+.ql-toolbar.ql-snow,
+.ql-container {
+  border-color: rgba(136, 153, 170, 0.3) !important;
+}
+.bx-form-input-html-quill-empty.ql-container {
+  border-radius: 0.3rem !important;
+  border-top: 1px solid rgba(136, 153, 170, 0.3) !important;
+}

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

@@ -531,7 +531,7 @@
     }
 
     .bx-artificer .bx-db-header .bx-menu-custom-hor li.bx-menu-tab-active a {
-        @apply bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white;
+        @apply dark:bg-gray-800 text-gray-900 dark:text-white;
     }
 
     /* Vertical menu */

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
plugins_public/tailwind/css/tailwind.min.css


+ 9 - 4
studio/js/forms_sortable_fields.js

@@ -22,7 +22,7 @@ BxDolStudioFormsSearchFields.prototype.onChangeModule = function() {
 	var oDate = new Date();
 	var sModule = $('#bx-grid-module-' + this.sObjNameGrid).val();
 
-	this.reloadGrid();
+	this.reloadGrid(sModule);
 
 	bx_loading($('body'), true);
 
@@ -48,15 +48,19 @@ BxDolStudioFormsSearchFields.prototype.onChangeModule = function() {
 };
 
 BxDolStudioFormsSearchFields.prototype.onChangeForm = function() {
-	this.reloadGrid($('#bx-grid-module-' + this.sObjNameGrid).val(), $('#bx-grid-form-' + this.sObjNameGrid).val());
+	this.reloadGrid($('#bx-grid-module-' + this.sObjNameGrid).val(), $('#bx-grid-form-sys_studio_search_forms_fields').val());
 };
 
 BxDolStudioFormsSearchFields.prototype.reloadGrid = function(sModule, sObject) {
 	var bReload = false;
-
 	if(!sModule) 
 		sObject = '';
 
+    console.log(sModule);
+    console.log(sObject);
+    console.log($('#bx-grid-form-' + this.sObjNameGrid).val());
+      console.log('#bx-grid-form-' + this.sObjNameGrid);
+    
 	var oSearch = $('#bx-form-element-keyword');
 	var oActions = $("[bx_grid_action_independent]");
 	if(!sObject) {
@@ -72,11 +76,12 @@ BxDolStudioFormsSearchFields.prototype.reloadGrid = function(sModule, sObject) {
 		glGrids[this.sObjNameGrid]._oQueryAppend['module'] = sModule;
 		bReload = true;
 	}
-
+    
 	if(glGrids[this.sObjNameGrid]._oQueryAppend['form'] != sObject) {
 		glGrids[this.sObjNameGrid]._oQueryAppend['form'] = sObject;
 		bReload = true;
 	}
+    console.log(glGrids[this.sObjNameGrid]._oQueryAppend);
 	if(bReload)
 		glGrids[this.sObjNameGrid].reload(0);
 };

+ 6 - 2
studio/template/scripts/BxBaseStudioFormsSearchForms.php

@@ -211,8 +211,12 @@ class BxBaseStudioFormsSearchForms extends BxDolStudioFormsSearchForms
 
         $aCounter = array();
         $this->oDb->getSearchForms(array('type' => 'counter_by_modules'), $aCounter, false);
-        foreach($aInputModules['values'] as $sKey => $sValue)
-            $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
+        foreach($aInputModules['values'] as $sKey => $sValue){
+            if (isset($aCounter[$sKey]) && $aCounter[$sKey] > 0)
+                $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
+            else
+                unset($aInputModules['values'][$sKey]);
+        }
 
         $aInputModules['values'] = array_merge(array('' => _t('_adm_form_txt_all_modules')), $aInputModules['values']);
 

+ 6 - 2
studio/template/scripts/BxBaseStudioGrid.php

@@ -38,8 +38,12 @@ class BxBaseStudioGrid extends BxDolStudioGrid
 
         $aCounter = array();
         $this->oDb->$sGetItemsMethod(array('type' => 'counter_by_modules'), $aCounter, false);
-        foreach($aInputModules['values'] as $sKey => $sValue)
-            $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
+        foreach($aInputModules['values'] as $sKey => $sValue){
+            if (isset($aCounter[$sKey]) && $aCounter[$sKey] > 0)
+                $aInputModules['values'][$sKey] = $aInputModules['values'][$sKey] . " (" . (isset($aCounter[$sKey]) ? $aCounter[$sKey] : "0") . ")";
+            else
+                unset($aInputModules['values'][$sKey]);
+        }
         
         return $aInputModules;
     }

+ 1 - 0
template/form_field_custom_suggestions.html

@@ -2,6 +2,7 @@
     <bx_repeat:vals>
         <b class="val bx-def-color-bg-hl bx-def-round-corners">__item_unit____item_name__<input type="hidden" name="__name__" value="__value__" /></b>
     </bx_repeat:vals>
+    __value__
     <bx_if:input>__input__</bx_if:input>
 </div>
 __js_code__

+ 12 - 0
template/menu_custom_item_addon.html

@@ -0,0 +1,12 @@
+<span class="__class_wrp__">
+    <span class="flex mr-1">
+        <a class="__class_link__" 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>
+            <div class="bx-menu-addon inline-block  ml-1 flex items-center">
+                <div class="bx-menu-addon-cnt py-0.5 px-2 bg-blue-200 text-blue-800 text-xs rounded-full">
+                    __addon__
+               </div>
+            </div>                     
+        </bx_if:addon>
+    </span>
+</span>

+ 7 - 2
template/scripts/BxBaseFormView.php

@@ -1503,6 +1503,7 @@ BLAH;
         $aAttrs = $this->_genCustomInputUsernamesSuggestionsAttrs($aInput, $bDisabled);
 
         $aTmplVarsVals = [];
+        $sValue = '';
         if(!empty($aInput['value'])) {
             if(is_array($aInput['value']) || (is_numeric($aInput['value']))) {
                 if (!is_array($aInput['value']))
@@ -1521,7 +1522,7 @@ BLAH;
                 }
             }
             else if(is_string($aInput['value']))
-                $aTmplVarsVals = $aInput['value'];
+                $sValue = $aInput['value'];
         }
 
         $aTmplVarsInputText = [];
@@ -1561,6 +1562,7 @@ BLAH;
             'name' => $aInput['name'],
             'attrs' => bx_convert_array2attrs($aAttrs),
             'bx_repeat:vals' => $aTmplVarsVals,
+            'value' => $sValue,
             'bx_if:input' => array(
                 'condition' => !$bDisabled,
                 'content' => $aTmplVarsInputText
@@ -1633,6 +1635,9 @@ BLAH;
         if(strcmp($sKeyPlaceholder, _t($sKeyPlaceholder)) != 0)
             $sValue .= $oLabel->getLabelPlaceholder($sKeyPlaceholder);           
 
+       // print_r($aInput);
+         
+        
         $aInputLabels = array(
             'type' => 'custom',
             'name' => $sName,
@@ -1646,7 +1651,7 @@ BLAH;
                 'disabled' => 'disabled'
             )
         );
-
+        
         return $this->oTemplate->parseHtmlByName('label_select_field.html', array(
             'js_object' => $oLabel->getJsObjectName(),
             'js_code' => $oLabel->getJsCodeForm(),

+ 4 - 1
template/scripts/BxBaseFunctions.php

@@ -193,7 +193,10 @@ class BxBaseFunctions extends BxDolFactory implements iBxDolSingleton
                         $sIconHtml = $sCode;    
 
                     $sClass .= 'sys-icon sys-icon-svg ';
-                    if ($sClass != '' && strpos($sIconHtml, 'class="') !== false)
+                    
+                    
+                    $sIconHtmlClear = strip_tags($sIconHtml, '<svg>');
+                    if ($sClass != '' && strpos($sIconHtmlClear, 'class="') !== false)
                         $sIconHtml = str_replace('class="', 'class="' . $sClass, $sIconHtml);
                     else
                         $sIconHtml = str_replace('<svg', '<svg class="' . $sClass . '" ', $sIconHtml);

+ 2 - 0
template/scripts/BxBaseMenuDashboardReportsManage.php

@@ -17,6 +17,8 @@ class BxBaseMenuDashboardReportsManage extends BxTemplMenuCustom
     {
         parent::__construct ($aObject);
         
+        $this->_sTmplContentItem = $this->_oTemplate->getHtml('menu_custom_item_addon.html');
+        
         $this->_aObject['menu_id'] = 'sys-dashboard-reports-manage-menu';
 
         $this->_bShowDivider = false;

+ 6 - 2
template/scripts/BxBaseReportsGrid.php

@@ -106,7 +106,9 @@ class BxBaseReportsGrid extends BxTemplGrid
         $mixedValue = '';
         if ($this->_aReportSystemInfo['object_comment'] && $this->_aReportSystemInfo['object_comment'] != ''){
             $oCmts = BxDolCmts::getObjectInstance($this->_aReportSystemInfo['object_comment'], $aRow['object_id']);
-            $mixedValue =  BxDolTemplate::getInstance()->parseLink('javascript:', $oCmts->getCommentsCount(), array("onclick" => "bx_get_notes(this, '" . $this->_aReportSystemInfo['name'] . "', '" . $aRow['object_id'] . "')"));   
+            if ($oCmts){
+                $mixedValue =  BxDolTemplate::getInstance()->parseLink('javascript:', $oCmts->getCommentsCount(), array("onclick" => "bx_get_notes(this, '" . $this->_aReportSystemInfo['name'] . "', '" . $aRow['object_id'] . "')"));  
+            }    
         }
 
         return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
@@ -118,7 +120,9 @@ class BxBaseReportsGrid extends BxTemplGrid
         
         if ($this->_aReportSystemInfo['object_comment'] && $this->_aReportSystemInfo['object_comment'] != ''){
             $oCmts = BxDolCmts::getObjectInstance($this->_aReportSystemInfo['object_comment'], -$aRow['id']);
-            $mixedValue =  BxDolTemplate::getInstance()->parseLink('javascript:', $oCmts->getCommentsCount(), array("onclick" => "bx_get_notes(this, '" . $this->_aReportSystemInfo['name'] . "', '" . - $aRow['id'] . "')"));  
+            if ($oCmts){
+                $mixedValue =  BxDolTemplate::getInstance()->parseLink('javascript:', $oCmts->getCommentsCount(), array("onclick" => "bx_get_notes(this, '" . $this->_aReportSystemInfo['name'] . "', '" . - $aRow['id'] . "')")); 
+            }
         }
 
         return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);

+ 18 - 0
template/unit_meta_item_ex.html

@@ -0,0 +1,18 @@
+<span class="bx-menu-meta-item-ex __class__ flex mr-4 items-center font-medium text-slate-700  bg-slate-100 py-1 px-1.5 rounded-md hover:bg-slate-200 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300">
+    <bx_if:extended>
+        <bx_if:a>
+            <a href ='__link__' class="flex items-center">
+        </bx_if:a>
+        <bx_if:icon>
+            <span class="bx-menu-meta-icon w-4 h-4 mr-1 text-slate-700 dark:text-gray-300 flex items-baseline text-sm">__icon__</span>
+        </bx_if:icon>
+        <bx_if:noicon>
+        </bx_if:noicon>
+        <bx_if:text> 
+            <span>__content__</span>
+        </bx_if:text>    
+        <bx_if:a2>
+            </a>
+        </bx_if:a2>    
+    </bx_if:extended>
+</span>    

Некоторые файлы не были показаны из-за большого количества измененных файлов