Browse Source

Ticket #1527 - Related changes in Comments.

AntonLV 8 years ago
parent
commit
f6ae053d98
3 changed files with 20 additions and 4 deletions
  1. 1 3
      template/comment_reply_box.html
  2. 6 0
      template/css/cmts.css
  3. 13 1
      template/scripts/BxBaseCmts.php

+ 1 - 3
template/comment_reply_box.html

@@ -4,9 +4,7 @@
             <bx_if:show_form_min>
                 <div class="__style_prefix__-body-min">
                     <div class="__style_prefix__-bm-user">__author_unit__</div>
-                    <div class="__style_prefix__-bm-content bx-def-thumb-size-min-height bx-def-thumb-size-left-indent bx-def-font-grayed">
-                        <div onclick="__js_object__.cmtShowForm(this)">__placeholder__</div>
-                    </div>
+                    <div class="__style_prefix__-bm-content bx-def-thumb-size-min-height bx-def-thumb-size-left-indent bx-def-font-grayed">__placeholder__</div>
                 </div>
             </bx_if:show_form_min>
             <div class="__style_prefix__-body">__form__</div>

+ 6 - 0
template/css/cmts.css

@@ -263,6 +263,12 @@
         display: flex;
         -webkit-align-items: center;
         align-items: center;
+        -webkit-justify-content: stretch;
+        justify-content: stretch;
+    }
+    div.cmt-reply div.cmt-body-min .cmt-bm-content .bx-form-element-wrapper {
+        position: relative;
+        width: 100%;
     }
 
     /*--- Comment Styles in Live Update Notification ---*/

+ 13 - 1
template/scripts/BxBaseCmts.php

@@ -714,11 +714,23 @@ class BxBaseCmts extends BxDolCmts
         if($bFormMin) {
             list($sAuthorName, $sAuthorLink, $sAuthorIcon, $sAuthorUnit) = $this->_getAuthorInfo($this->_getAuthorId());
 
+            $oForm = new BxTemplFormView(array());
+            $aInputPlaceholder = array(
+                'type' => 'text',
+                'name' => 'comment',
+                'caption' => '',
+                'attrs' => array(
+                    'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtShowForm(this)',
+                    'placeholder' => _t('_cmt_txt_min_form_placeholder', $sAuthorName)
+                ),
+                'value' => '',
+            );
+
             $aTmplVarsFormMin = array(
                 'js_object' => $this->_sJsObjName,
                 'style_prefix' => $this->_sStylePrefix,
                 'author_unit' => $sAuthorUnit,
-                'placeholder' => _t('_cmt_txt_min_form_placeholder', $sAuthorName)
+                'placeholder' => $oForm->genRow($aInputPlaceholder)
             );
         }