mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-30 21:45:01 +03:00
Добавление префикса ls компонентам
* В процессе
This commit is contained in:
parent
4a9aba520c
commit
6bf0f4d287
|
@ -35,7 +35,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Контент */
|
/* Контент */
|
||||||
.blog .actionbar {
|
.blog .ls-actionbar {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{* Название компонента *}
|
{* Название компонента *}
|
||||||
{$component = 'comment-form'}
|
{$component = 'ls-comment-form'}
|
||||||
|
|
||||||
{* Переменные *}
|
{* Переменные *}
|
||||||
{$targetId = $smarty.local.targetId}
|
{$targetId = $smarty.local.targetId}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* TODO: Добавить путь до комментария
|
* TODO: Добавить путь до комментария
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{$component = 'comment-list'}
|
{$component = 'ls-comment-list'}
|
||||||
|
|
||||||
<div class="{$component} {cmods name=$component mods=$smarty.local.mods} {$smarty.local.classes}" {cattr list=$smarty.local.attributes}>
|
<div class="{$component} {cmods name=$component mods=$smarty.local.mods} {$smarty.local.classes}" {cattr list=$smarty.local.attributes}>
|
||||||
{include './comment-tree.tpl'
|
{include './comment-tree.tpl'
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
{$currentLevel = $commentLevel}
|
{$currentLevel = $commentLevel}
|
||||||
|
|
||||||
{* Вспомогательный блок-обертка *}
|
{* Вспомогательный блок-обертка *}
|
||||||
<div class="comment-wrapper js-comment-wrapper" data-id="{$comment->getId()}">
|
<div class="ls-comment-wrapper js-comment-wrapper" data-id="{$comment->getId()}">
|
||||||
|
|
||||||
{* Комментарий *}
|
{* Комментарий *}
|
||||||
{block 'comment_tree_comment'}
|
{block 'comment_tree_comment'}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{* Название компонента *}
|
{* Название компонента *}
|
||||||
{$component = 'comment'}
|
{$component = 'ls-comment'}
|
||||||
|
|
||||||
{* Переменные *}
|
{* Переменные *}
|
||||||
{$comment = $smarty.local.comment}
|
{$comment = $smarty.local.comment}
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
* Комментарий
|
* Комментарий
|
||||||
* Атрибут id используется для ссылки на комментарий через хэш в урл (например #comment123)
|
* Атрибут id используется для ссылки на комментарий через хэш в урл (например #comment123)
|
||||||
*}
|
*}
|
||||||
<section class = "{$component} {cmods name=$component mods=$mods} {$smarty.local.classes} open js-{$component}"
|
<section class = "{$component} {cmods name=$component mods=$mods} {$smarty.local.classes} open js-comment"
|
||||||
id = "comment{$commentId}"
|
id = "comment{$commentId}"
|
||||||
data-id = "{$commentId}"
|
data-id = "{$commentId}"
|
||||||
data-parent-id = "{$comment->getPid()}"
|
data-parent-id = "{$comment->getPid()}"
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<li>
|
<li>
|
||||||
{* Блокируем голосование для гостей или если залогиненый пользователь является автором комментария*}
|
{* Блокируем голосование для гостей или если залогиненый пользователь является автором комментария*}
|
||||||
{component 'vote'
|
{component 'vote'
|
||||||
classes = "{$component}-vote js-{$component}-vote"
|
classes = "{$component}-vote js-comment-vote"
|
||||||
target = $comment
|
target = $comment
|
||||||
isLocked = ($oUserCurrent && $oUserCurrent->getId() == $user->getId()) || strtotime($comment->getDate()) < $smarty.now - Config::Get('acl.vote.comment.limit_time')}
|
isLocked = ($oUserCurrent && $oUserCurrent->getId() == $user->getId()) || strtotime($comment->getDate()) < $smarty.now - Config::Get('acl.vote.comment.limit_time')}
|
||||||
</li>
|
</li>
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
{* Избранное *}
|
{* Избранное *}
|
||||||
{if $oUserCurrent && $smarty.local.useFavourite}
|
{if $oUserCurrent && $smarty.local.useFavourite}
|
||||||
<li>
|
<li>
|
||||||
{component 'favourite' classes='comment-favourite js-comment-favourite' target=$comment}
|
{component 'favourite' classes="{$component}-favourite js-comment-favourite" target=$comment}
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
<div class="{$component}-edit-info">
|
<div class="{$component}-edit-info">
|
||||||
{$aLang.comments.comment.edit_info}:
|
{$aLang.comments.comment.edit_info}:
|
||||||
|
|
||||||
<span class="{$component}-edit-info-time js-{$component}-edit-time">
|
<span class="{$component}-edit-info-time js-comment-edit-time">
|
||||||
{date_format date=$comment->getDateEdit() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
{date_format date=$comment->getDateEdit() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{* Действия *}
|
{* Действия *}
|
||||||
<ul class="comment-actions clearfix">
|
<ul class="{$component}-actions clearfix">
|
||||||
{* Ответить *}
|
{* Ответить *}
|
||||||
{if $oUserCurrent && ! $isDeleted && $smarty.local.showReply|default:true}
|
{if $oUserCurrent && ! $isDeleted && $smarty.local.showReply|default:true}
|
||||||
<li>
|
<li>
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{* Сворачивание *}
|
{* Сворачивание *}
|
||||||
<li class="comment-fold js-comment-fold open" data-id="{$commentId}">
|
<li class="{$component}-fold js-comment-fold open" data-id="{$commentId}">
|
||||||
<a href="#" class="link-dotted">{$aLang.comments.folding.fold}</a>
|
<a href="#" class="link-dotted">{$aLang.comments.folding.fold}</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* @param string $mods
|
* @param string $mods
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{$component = 'comments'}
|
{$component = 'ls-comments'}
|
||||||
|
|
||||||
{block 'comment-list-options'}
|
{block 'comment-list-options'}
|
||||||
{$mods = $smarty.local.mods}
|
{$mods = $smarty.local.mods}
|
||||||
|
@ -70,20 +70,20 @@
|
||||||
{* Подписка на комментарии *}
|
{* Подписка на комментарии *}
|
||||||
{if $smarty.local.useSubscribe && $oUserCurrent}
|
{if $smarty.local.useSubscribe && $oUserCurrent}
|
||||||
{$items[] = [ 'buttons' => [[
|
{$items[] = [ 'buttons' => [[
|
||||||
'classes' => "comments-subscribe js-comments-subscribe {if $isSubscribed}active{/if}",
|
'classes' => "{$component}-subscribe js-comments-subscribe {if $isSubscribed}active{/if}",
|
||||||
'text' => ( $isSubscribed ) ? $aLang.comments.unsubscribe : $aLang.comments.subscribe
|
'text' => ( $isSubscribed ) ? $aLang.comments.unsubscribe : $aLang.comments.subscribe
|
||||||
]]]}
|
]]]}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{* TODO: Добавить хук *}
|
{* TODO: Добавить хук *}
|
||||||
|
|
||||||
{component 'actionbar' items=$items classes='comments-actions'}
|
{component 'actionbar' items=$items classes="{$component}-actions"}
|
||||||
|
|
||||||
|
|
||||||
{**
|
{**
|
||||||
* Комментарии
|
* Комментарии
|
||||||
*}
|
*}
|
||||||
<div class="comment-list js-comment-list">
|
<div class="ls-comment-list js-comment-list">
|
||||||
{include './comment-tree.tpl'
|
{include './comment-tree.tpl'
|
||||||
comments = $smarty.local.comments
|
comments = $smarty.local.comments
|
||||||
forbidAdd = $forbidAdd
|
forbidAdd = $forbidAdd
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
{else}
|
{else}
|
||||||
{if $oUserCurrent}
|
{if $oUserCurrent}
|
||||||
{* Кнопка открывающая форму *}
|
{* Кнопка открывающая форму *}
|
||||||
<h4 class="comment-reply-root js-comment-reply js-comment-reply-root" data-id="0">
|
<h4 class="ls-comment-reply-root js-comment-reply js-comment-reply-root" data-id="0">
|
||||||
<a href="#" class="link-dotted">{$smarty.local.addCommentText|default:$aLang.comments.form.title}</a>
|
<a href="#" class="link-dotted">{$smarty.local.addCommentText|default:$aLang.comments.form.title}</a>
|
||||||
</h4>
|
</h4>
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -4,17 +4,17 @@
|
||||||
* @template comment-form.tpl
|
* @template comment-form.tpl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.comment-form {
|
.ls-comment-form {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
.comment-form textarea {
|
.ls-comment-form textarea {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Предпросмотр текста комментария */
|
/* Предпросмотр текста комментария */
|
||||||
.comment-preview {
|
.ls-comment-preview {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: 10px 0 10px 0;
|
margin: 10px 0 10px 0;
|
||||||
border: 1px solid #eee;
|
border: 1px solid #eee;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.comment {
|
.ls-comment {
|
||||||
min-height: 48px;
|
min-height: 48px;
|
||||||
padding: 15px 15px 15px 80px;
|
padding: 15px 15px 15px 80px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
|
@ -22,38 +22,38 @@
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment--self {
|
.ls-comment--self {
|
||||||
background: #c5f7ea;
|
background: #c5f7ea;
|
||||||
}
|
}
|
||||||
.comment--new {
|
.ls-comment--new {
|
||||||
background: #fbfba8;
|
background: #fbfba8;
|
||||||
}
|
}
|
||||||
.comment--current {
|
.ls-comment--current {
|
||||||
background: #a5e7fa;
|
background: #a5e7fa;
|
||||||
}
|
}
|
||||||
.comment--bad {
|
.ls-comment--bad {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
filter: alpha(opacity=30);
|
filter: alpha(opacity=30);
|
||||||
}
|
}
|
||||||
.comment--bad:hover {
|
.ls-comment--bad:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
filter: alpha(opacity=100);
|
filter: alpha(opacity=100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment.comment--deleted { background: #efd5d5; }
|
.ls-comment.ls-comment--deleted { background: #efd5d5; }
|
||||||
.ls-user-role-not-admin .comment.comment--deleted {
|
.ls-user-role-not-admin .ls-comment.ls-comment--deleted {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment.comment-list-item { margin-bottom: 20px; }
|
.ls-comment.ls-comment-list-item { margin-bottom: 20px; }
|
||||||
.comment.comment-list-item .vote .vote-up,
|
.ls-comment.ls-comment-list-item .vote .vote-up,
|
||||||
.comment.comment-list-item .vote .vote-down { display: none; }
|
.ls-comment.ls-comment-list-item .vote .vote-down { display: none; }
|
||||||
|
|
||||||
/* Аватар */
|
/* Аватар */
|
||||||
.comment-avatar {
|
.ls-comment-avatar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
|
@ -62,35 +62,35 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.comment-avatar img {
|
.ls-comment-avatar img {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Информация */
|
/* Информация */
|
||||||
.comment-info {
|
.ls-comment-info {
|
||||||
padding: 0 70px 0 0;
|
padding: 0 70px 0 0;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.comment-info li {
|
.ls-comment-info li {
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.comment-info a {
|
.ls-comment-info a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Логин */
|
/* Логин */
|
||||||
.comment-info .comment-username {
|
.ls-comment-info .ls-comment-username {
|
||||||
float: none;
|
float: none;
|
||||||
font: 20px/1.3em "Open Sans", sans-serif;
|
font: 20px/1.3em "Open Sans", sans-serif;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Избранное */
|
/* Избранное */
|
||||||
.comment-favourite {
|
.ls-comment-favourite {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
@ -99,35 +99,35 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-favourite.favourite--added,
|
.ls-comment-favourite.ls-favourite--added,
|
||||||
.comment-favourite.favourite--has-counter,
|
.ls-comment-favourite.ls-favourite--has-counter,
|
||||||
.comment:hover .comment-favourite { display: block; }
|
.ls-comment:hover .ls-comment-favourite { display: block; }
|
||||||
|
|
||||||
/* Дата */
|
/* Дата */
|
||||||
.comment-date a { color: #999; }
|
.ls-comment-date a { color: #999; }
|
||||||
.comment-date a:hover { color: #777; }
|
.ls-comment-date a:hover { color: #777; }
|
||||||
|
|
||||||
/* Голосование */
|
/* Голосование */
|
||||||
.comment-vote {
|
.ls-comment-vote {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-vote.vote--not-voted.vote--count-zero { display: none; }
|
.ls-comment-vote.vote--not-voted.vote--count-zero { display: none; }
|
||||||
.comment:hover .comment-vote { display: block; }
|
.ls-comment:hover .ls-comment-vote { display: block; }
|
||||||
|
|
||||||
/* Прокрутка к дочернему комментарию */
|
/* Прокрутка к дочернему комментарию */
|
||||||
.comment-scroll-to { cursor: pointer; }
|
.ls-comment-scroll-to { cursor: pointer; }
|
||||||
.comment-scroll-to-child { display: none; }
|
.ls-comment-scroll-to-child { display: none; }
|
||||||
|
|
||||||
/* Текст комментария */
|
/* Текст комментария */
|
||||||
.comment-content.ls-text {
|
.ls-comment-content.ls-text {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.7em;
|
line-height: 1.7em;
|
||||||
}
|
}
|
||||||
.comment-content.ls-text blockquote {
|
.ls-comment-content.ls-text blockquote {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
|
@ -135,21 +135,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Действия */
|
/* Действия */
|
||||||
.comment-actions li {
|
.ls-comment-actions li {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 10px 10px 0 0;
|
margin: 10px 10px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Сворачивание */
|
/* Сворачивание */
|
||||||
.comment-fold {
|
.ls-comment-fold {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.comment--folded .comment-fold {
|
.ls-comment--folded .ls-comment-fold {
|
||||||
background: #CBCBF3;
|
background: #CBCBF3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Информация о редактировании */
|
/* Информация о редактировании */
|
||||||
.comment-edit-info {
|
.ls-comment-edit-info {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
opacity: .5;
|
opacity: .5;
|
||||||
|
|
|
@ -9,32 +9,32 @@
|
||||||
/**
|
/**
|
||||||
* @modifier forbid Комментирование запрещено
|
* @modifier forbid Комментирование запрещено
|
||||||
*/
|
*/
|
||||||
.comments--forbid .comment-form {
|
.ls-comments--forbid .ls-comment-form {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Блок с комментариями
|
* Блок с комментариями
|
||||||
*/
|
*/
|
||||||
.comment-list {
|
.ls-comment-list {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Хидер
|
* Хидер
|
||||||
*/
|
*/
|
||||||
.comments-header {
|
.ls-comments-header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Заголовок */
|
/* Заголовок */
|
||||||
.comments-title {
|
.ls-comments-title {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Действия */
|
/* Действия */
|
||||||
.comments-actions {
|
.ls-comments-actions {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
@ -42,24 +42,24 @@
|
||||||
/**
|
/**
|
||||||
* Кнопка "Комментировать"
|
* Кнопка "Комментировать"
|
||||||
*/
|
*/
|
||||||
.comment-reply-root {
|
.ls-comment-reply-root {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.comment-reply-root + .comment-form {
|
.ls-comment-reply-root + .ls-comment-form {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Пагинация
|
* Пагинация
|
||||||
*/
|
*/
|
||||||
.comments-pagination {
|
.ls-comments-pagination {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Вспомогательный блок-обертка
|
* Вспомогательный блок-обертка
|
||||||
*/
|
*/
|
||||||
.comment-wrapper .comment-wrapper { padding-left: 25px; }
|
.ls-comment-wrapper .ls-comment-wrapper { padding-left: 25px; }
|
||||||
.comment-wrapper .comment-form,
|
.ls-comment-wrapper .ls-comment-form,
|
||||||
.comment-wrapper .comment-preview { margin-left: 25px; }
|
.ls-comment-wrapper .ls-comment-preview { margin-left: 25px; }
|
|
@ -37,7 +37,11 @@
|
||||||
|
|
||||||
// Классы
|
// Классы
|
||||||
classes : {
|
classes : {
|
||||||
locked: 'comment-form--locked'
|
locked: 'ls-comment-form--locked'
|
||||||
|
},
|
||||||
|
|
||||||
|
html: {
|
||||||
|
preview: '<div class="ls-comment-preview ls-text"></div>'
|
||||||
},
|
},
|
||||||
|
|
||||||
params: {}
|
params: {}
|
||||||
|
@ -240,7 +244,7 @@
|
||||||
|
|
||||||
this.previewHide();
|
this.previewHide();
|
||||||
|
|
||||||
this._preview = $( '<div class="comment-preview text"></div>' );
|
this._preview = $( this.option( 'html.preview' ) );
|
||||||
|
|
||||||
this.element.before( this._preview );
|
this.element.before( this._preview );
|
||||||
ls.utils.textPreview( this.elements.text, this._preview, false);
|
ls.utils.textPreview( this.elements.text, this._preview, false);
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
* @param {Number} commentParentId (optional) ID родительского комментария
|
* @param {Number} commentParentId (optional) ID родительского комментария
|
||||||
*/
|
*/
|
||||||
insert: function( comment, commentId, commentParentId ) {
|
insert: function( comment, commentId, commentParentId ) {
|
||||||
var commentWrapper = $( '<div class="comment-wrapper js-comment-wrapper" data-id="' + commentId + '"></div>' ).append( comment );
|
var commentWrapper = $( '<div class="ls-comment-wrapper js-comment-wrapper" data-id="' + commentId + '"></div>' ).append( comment );
|
||||||
|
|
||||||
if ( commentParentId ) {
|
if ( commentParentId ) {
|
||||||
// Получаем обертку родительского комментария
|
// Получаем обертку родительского комментария
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.favourite {
|
.ls-favourite {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.favourite:hover {
|
.ls-favourite:hover {
|
||||||
opacity: .8;
|
opacity: .8;
|
||||||
filter: alpha(opacity=80);
|
filter: alpha(opacity=80);
|
||||||
}
|
}
|
||||||
.favourite-toggle {
|
.ls-favourite-toggle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
|
@ -25,15 +25,15 @@
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
filter: alpha(opacity=30);
|
filter: alpha(opacity=30);
|
||||||
}
|
}
|
||||||
.favourite--added .favourite-toggle {
|
.ls-favourite--added .ls-favourite-toggle {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
filter: alpha(opacity=100);
|
filter: alpha(opacity=100);
|
||||||
}
|
}
|
||||||
.favourite-count {
|
.ls-favourite-count {
|
||||||
display: none;
|
display: none;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.favourite--has-counter .favourite-count {
|
.ls-favourite--has-counter .ls-favourite-count {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{* Название компонента *}
|
{* Название компонента *}
|
||||||
{$component = 'favourite'}
|
{$component = 'ls-favourite'}
|
||||||
|
|
||||||
{* Переменные *}
|
{* Переменные *}
|
||||||
{$mods = $smarty.local.mods}
|
{$mods = $smarty.local.mods}
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
{cattr list=$smarty.local.attributes}>
|
{cattr list=$smarty.local.attributes}>
|
||||||
|
|
||||||
{* Кнопка добавления/удаления из избранного *}
|
{* Кнопка добавления/удаления из избранного *}
|
||||||
{component 'icon' icon='heart' classes="{$component}-toggle js-{$component}-toggle"}
|
{component 'icon' icon='heart' classes="{$component}-toggle js-favourite-toggle"}
|
||||||
|
|
||||||
{* Кол-во объектов в избранном *}
|
{* Кол-во объектов в избранном *}
|
||||||
{if isset( $count )}
|
{if isset( $count )}
|
||||||
<span class="{$component}-count js-{$component}-count" {if ! $count && $smarty.local.hideZeroCounter|default:true}style="display: none;"{/if}>
|
<span class="{$component}-count js-favourite-count" {if ! $count && $smarty.local.hideZeroCounter|default:true}style="display: none;"{/if}>
|
||||||
{$count}
|
{$count}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
// Классы
|
// Классы
|
||||||
classes: {
|
classes: {
|
||||||
// Добавлено в избранное
|
// Добавлено в избранное
|
||||||
added: 'favourite--added',
|
added: 'ls-favourite--added',
|
||||||
// Кол-во добавивших в избранное больше нуля
|
// Кол-во добавивших в избранное больше нуля
|
||||||
has_counter: 'favourite--has-counter'
|
has_counter: 'ls-favourite--has-counter'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Параметры отправляемые при каждом аякс запросе
|
// Параметры отправляемые при каждом аякс запросе
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/**
|
/**
|
||||||
* Сообщения
|
* Сообщения
|
||||||
*/
|
*/
|
||||||
.comment.comment--self.wall-comment { background: #fafafa; }
|
.ls-comment.ls-comment--self.wall-comment { background: #fafafa; }
|
||||||
|
|
||||||
.wall-comments { padding-left: 70px; }
|
.wall-comments { padding-left: 70px; }
|
||||||
|
|
||||||
|
@ -36,15 +36,15 @@
|
||||||
/**
|
/**
|
||||||
* Кнопка подгрузки комментариев
|
* Кнопка подгрузки комментариев
|
||||||
*/
|
*/
|
||||||
.more.wall-more-comments {
|
.ls-more.wall-more-comments {
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0 0 2px;
|
margin: 0 0 2px;
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
.more.wall-more-comments:hover {
|
.ls-more.wall-more-comments:hover {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
.more.wall-more-comments.more--locked {
|
.ls-more.wall-more-comments.ls-more--locked {
|
||||||
background-color: #f7f7f7;
|
background-color: #f7f7f7;
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit 585905a5473f083df9f97031c9a3055507de8742
|
Subproject commit 238f440347427f8074bb791088f4988ca6e01d08
|
Loading…
Reference in a new issue