Commit 106471aed0d58ed636fea23db54a249a1fda146d

Authored by Alexey Boroda
1 parent 17c30848

-Comments finished

common/modules/comment/resources/artbox_comment.css
@@ -262,7 +262,11 @@ @@ -262,7 +262,11 @@
262 262
263 .input_bl.has-error input, .input_bl.has-error textarea, .answer-form .has-error textarea { 263 .input_bl.has-error input, .input_bl.has-error textarea, .answer-form .has-error textarea {
264 box-shadow: 1px 2px 2px 0 rgba(212, 0, 0, 0.2) inset; 264 box-shadow: 1px 2px 2px 0 rgba(212, 0, 0, 0.2) inset;
265 - border: 1px solid #d2d2d2; 265 + border: 1px solid #cccccc;
  266 +}
  267 +.input_bl.has-success input, .input_bl.has-success textarea, .answer-form .has-success textarea {
  268 + box-shadow: none;
  269 + border: 1px solid #cccccc;
266 } 270 }
267 271
268 .required.has-error label { 272 .required.has-error label {
@@ -316,4 +320,85 @@ @@ -316,4 +320,85 @@
316 .comments-start ul.pagination li.active a { 320 .comments-start ul.pagination li.active a {
317 color: #333; 321 color: #333;
318 background-color: inherit; 322 background-color: inherit;
  323 +}
  324 +
  325 +/* Validation error tooltips*/
  326 +/*.has-error {*/
  327 + /*text-transform: uppercase;*/
  328 + /*background: #ececec;*/
  329 + /*color: #555;*/
  330 + /*cursor: help;*/
  331 + /*font-family: "Gill Sans", Impact, sans-serif;*/
  332 + /*font-size: 20px;*/
  333 + /*margin: 100px 75px 10px 75px;*/
  334 + /*padding: 15px 20px;*/
  335 + /*position: relative;*/
  336 + /*text-align: center;*/
  337 + /*width: 200px;*/
  338 + /*-webkit-transform: translateZ(0); !* webkit flicker fix *!*/
  339 + /*-webkit-font-smoothing: antialiased; !* webkit text rendering fix *!*/
  340 +/*}*/
  341 +
  342 +.has-error .help-block {
  343 + background: #ffffff;
  344 + bottom: 100%;
  345 + color: #000000 !important;
  346 + display: block;
  347 + left: -25px;
  348 + margin-bottom: 15px;
  349 + opacity: 0;
  350 + padding: 20px;
  351 + pointer-events: none;
  352 + position: absolute;
  353 + width: 100%;
  354 + -webkit-transform: translateY(10px);
  355 + -moz-transform: translateY(10px);
  356 + -ms-transform: translateY(10px);
  357 + -o-transform: translateY(10px);
  358 + transform: translateY(10px);
  359 + -webkit-transition: all .25s ease-out;
  360 + -moz-transition: all .25s ease-out;
  361 + -ms-transition: all .25s ease-out;
  362 + -o-transition: all .25s ease-out;
  363 + transition: all .25s ease-out;
  364 + -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  365 + -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  366 + -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  367 + -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  368 + box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
  369 +}
  370 +
  371 +/* This bridges the gap so you can mouse into the tooltip without it disappearing */
  372 +.has-error .help-block:before {
  373 + bottom: -20px;
  374 + content: " ";
  375 + display: block;
  376 + height: 20px;
  377 + left: 0;
  378 + position: absolute;
  379 + width: 100%;
  380 +}
  381 +
  382 +/* CSS Triangles - see Trevor's post */
  383 +.has-error .help-block:after {
  384 + border-left: solid transparent 10px;
  385 + border-right: solid transparent 10px;
  386 + border-top: solid #ffffff 10px;
  387 + bottom: -10px;
  388 + content: " ";
  389 + height: 0;
  390 + left: 50%;
  391 + margin-left: -13px;
  392 + position: absolute;
  393 + width: 0;
  394 +}
  395 +
  396 +.has-error:hover .help-block {
  397 + opacity: 1;
  398 + pointer-events: auto;
  399 + -webkit-transform: translateY(0px);
  400 + -moz-transform: translateY(0px);
  401 + -ms-transform: translateY(0px);
  402 + -o-transform: translateY(0px);
  403 + transform: translateY(0px);
319 } 404 }
320 \ No newline at end of file 405 \ No newline at end of file
frontend/views/comments/_form.php
@@ -37,6 +37,8 @@ @@ -37,6 +37,8 @@
37 echo $form->field($comment_model, 'text', [ 'options' => [ 'class' => 'form-group input_bl area_bl' ] ]) 37 echo $form->field($comment_model, 'text', [ 'options' => [ 'class' => 'form-group input_bl area_bl' ] ])
38 ->textarea([ 38 ->textarea([
39 'placeholder' => 'Комментарий', 39 'placeholder' => 'Комментарий',
  40 + 'rows' => 8,
  41 + 'spellcheck' => false,
40 ]); 42 ]);
41 43
42 echo $form->field($comment_model, 'username', [ 'options' => [ 'class' => 'form-group input_bl' ] ]) 44 echo $form->field($comment_model, 'username', [ 'options' => [ 'class' => 'form-group input_bl' ] ])
frontend/web/css/style.css
@@ -1803,7 +1803,7 @@ p.right{text-align: right;} @@ -1803,7 +1803,7 @@ p.right{text-align: right;}
1803 resize: none; 1803 resize: none;
1804 padding: 0px 14px; 1804 padding: 0px 14px;
1805 letter-spacing: 0.5px; 1805 letter-spacing: 0.5px;
1806 - box-shadow: none!important; 1806 + /*box-shadow: none!important;*/
1807 border: 1px solid rgb(204, 204, 204); 1807 border: 1px solid rgb(204, 204, 204);
1808 width: 100%; 1808 width: 100%;
1809 } 1809 }