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