Просмотр исходного кода

Ticket #3747 - Forum: Link attachments in forum are broken: Apply style like in Timeline.

AntonLV 4 лет назад
Родитель
Сommit
1bb0ac2a5a

+ 1 - 0
modules/base/text/classes/BxBaseModTextFormEntry.php

@@ -46,6 +46,7 @@ class BxBaseModTextFormEntry extends BxBaseModGeneralFormEntry
         
         if(isset($CNF['PARAM_LINKS_ENABLED']) && $CNF['PARAM_LINKS_ENABLED'] === true) {
             $sInclude = '';
+            $sInclude .= $this->_oModule->_oTemplate->addCss(array('links.css'), $bDynamicMode);
             $sInclude .= $this->_oModule->_oTemplate->addJs(array('modules/base/text/js/|links.js', 'links.js'), $bDynamicMode);
 
             $sResult .= ($bDynamicMode ? $sInclude : '') . $this->_oModule->_oTemplate->getJsCode('links', ['sFormId' => $this->getId(), 'iContentId' => (int)$this->_iContentId,]);

+ 6 - 0
modules/base/text/template/css/links.css

@@ -0,0 +1,6 @@
+/*-- Forms: Link attachment --*/
+.bx-base-attach-link-form-field .embed {
+    display: inline-block;
+    vertical-align: top;
+    width: 50%;
+}

+ 0 - 6
modules/base/text/template/css/polls.css

@@ -26,12 +26,6 @@
     float: none;
 }
 
-.bx-base-attach-link-form-field .embed {
-    display: inline-block;
-    vertical-align: top;
-    width: 50%;
-}
-
 
 /*--- Polls list ---*/
 .bx-base-text-polls {