RomanL 4 лет назад
Родитель
Сommit
840bf7da24

+ 4 - 2
inc/js/classes/BxDolPage.js

@@ -51,11 +51,13 @@ BxDolPage.prototype.share = function(oLink, sUrl)
     var oData = this._getDefaultParams();
     oData['a'] = 'get_share';
     oData['url'] = sUrl;
-    
+    $(".bx-popup-applied:visible").dolPopupHide();
     $(window).dolPopupAjax({
         url: bx_append_url_params(this._sActionsUri, oData),
-        closeOnOuterClick: true,
+        displayMode: 'box',
+        closeOnOuterClick: false,
         removeOnClose: true,
+        id: {value: 'sys_share_popup', force: true}
     });
 }
 

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

@@ -1,5 +1,4 @@
 <div class="bx-db-share-popup">
-    <div class="bx-db-title text-lg lg:text-xl leading-6 font-semibold text-gray-800 dark:text-gray-100 align-middle"><bx_text:_sys_txt_share_popup_header /></div>
     <div class="bx-db-share-popup-cnt">
          <bx_menu:sys_social_sharing />
          <div class="mb-4">

+ 1 - 2
template/designbox_share_popup.html

@@ -1,5 +1,4 @@
 <div class="bx-db-share-popup">
-    <div class="bx-db-title bx-def-font-h2"><bx_text:_sys_txt_share_popup_header /></div>
     <div class="bx-db-share-popup-cnt">
          <bx_menu:sys_social_sharing />
          <div class="bx-def-margin-sec-bottom">
@@ -8,7 +7,7 @@
          </div>
          <div class="bx-def-margin-sec-bottom">
              <bx_text:_sys_txt_share_popup_embeded_code />        
-             <div class="bx-def-border bx-def-padding-sec max-w-xs rounded bx-def-font-small">__code__</div> 
+             <div class="bx-def-border bx-def-padding-sec rounded bx-def-font-small">__code__</div> 
          </div>
     </div>
 </div>

+ 6 - 4
template/scripts/BxBasePage.php

@@ -64,10 +64,12 @@ class BxBasePage extends BxDolPage
     {
         $aEmbedData = BxDolPage::getEmbedData(bx_get('url'));
         
-        echo $this->_oTemplate->parseHtmlByName('designbox_share_popup.html', array(
-            'url' => $aEmbedData['url'],
-            'code' => htmlspecialchars($aEmbedData['html']),
-        ));
+        echo PopupBox('sys_share_popup', _t('_sys_txt_share_popup_header'), 
+            $this->_oTemplate->parseHtmlByName('designbox_share_popup.html', [
+                'url' => $aEmbedData['url'],
+                'code' => htmlspecialchars($aEmbedData['html']),
+            ]
+        ), true);
     }
     
     public function performActionEmbed ()