1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-26 03:30:48 +03:00

Добавление префикса ls компонентам

+ Обновление фреймворка
This commit is contained in:
Denis Shakhov 2015-05-20 23:26:11 +07:00
parent 92b7a15275
commit 19239e8b79
33 changed files with 187 additions and 168 deletions

View file

@ -576,7 +576,7 @@ class ActionProfile extends Action
* Создаем заметку и проводим валидацию
*/
$oNote = Engine::GetEntity('ModuleUser_EntityNote');
$oNote->setTargetUserId(getRequestStr('iUserId'));
$oNote->setTargetUserId(getRequestStr('user_id'));
$oNote->setUserId($this->oUserCurrent->getId());
$oNote->setText(getRequestStr('text'));
@ -608,7 +608,7 @@ class ActionProfile extends Action
return $this->EventErrorDebug();
}
if (!($oUserTarget = $this->User_GetUserById(getRequestStr('iUserId')))) {
if (!($oUserTarget = $this->User_GetUserById(getRequestStr('user_id')))) {
return $this->EventErrorDebug();
}
if (!($oNote = $this->User_GetUserNote($oUserTarget->getId(), $this->oUserCurrent->getId()))) {

View file

@ -6,7 +6,7 @@
*}
{if $oUserCurrent}
<div class="feed-blogs js-feed-blogs">
<div class="ls-feed-blogs js-feed-blogs">
{$blogsSubscribed = $smarty.local.blogsSubscribed}
<p class="text-help">

View file

@ -2,51 +2,51 @@
* Заметка
*/
.user-note {
.ls-note {
background: #F1F7AF;
padding: 20px 20px 18px;
margin-bottom: 15px;
border-radius: 5px;
box-shadow: 0 1px 0 #DBE28B;
}
.user-note:last-child {
.ls-note:last-child {
margin-bottom: 0;
}
/* Действия */
.user-note-actions {
.ls-note-actions {
margin: 10px 0 0 0;
}
.user-note-actions li {
.ls-note-actions li {
float: left;
margin-right: 15px;
}
.user-note-actions li a {
.ls-note-actions li a {
text-decoration: none;
color: #B7BD79;
-webkit-transition: color .2s;
transition: color .2s;
}
.user-note-actions li a:hover {
.ls-note-actions li a:hover {
color: #A3A86B;
}
.user-note-actions li a:focus {
.ls-note-actions li a:focus {
outline: dotted 1px;
}
.user-note-actions--add {
.ls-note-actions--add {
margin: 0;
}
.user-note-actions--add li {
.ls-note-actions--add li {
margin: 0;
float: none;
text-align: center;
}
/* Форма добавления/редактирования */
.user-note-form .ls-field {
.ls-note-form .ls-field {
margin-bottom: 15px;
}
.user-note-form-text {
.ls-note-form-text {
height: 5em;
}

View file

@ -24,16 +24,16 @@
// Селекторы
selectors: {
body: '.js-user-note-body',
text: '.js-user-note-text',
add: '.js-user-note-add',
actions: '.js-user-note-actions',
actions_edit: '.js-user-note-actions-edit',
actions_remove: '.js-user-note-actions-remove',
body: '.js-note-body',
text: '.js-note-text',
add: '.js-note-add',
actions: '.js-note-actions',
actions_edit: '.js-note-actions-edit',
actions_remove: '.js-note-actions-remove',
form: '.js-user-note-form',
form_text: '.js-user-note-form-text',
form_cancel: '.js-user-note-form-cancel'
form: '.js-note-form',
form_text: '.js-note-form-text',
form_cancel: '.js-note-form-cancel'
},
params: {}

View file

@ -7,17 +7,17 @@
*}
{* Название компонента *}
{$component = 'user-note'}
{$component = 'ls-note'}
{* Установка дефолтных значений *}
{$note = $smarty.local.note}
{$isEditable = $smarty.local.isEditable|default:true}
<div class="{$component} {cmods name=$component mods=$mods} {$smarty.local.classes}" data-param-i-user-id="{$smarty.local.targetId}" {cattr list=$smarty.local.attributes}>
<div class="{$component} {cmods name=$component mods=$mods} {$smarty.local.classes}" data-param-user_id="{$smarty.local.targetId}" {cattr list=$smarty.local.attributes}>
{* Заметка *}
<div class="{$component}-body js-{$component}-body">
<div class="{$component}-body js-note-body">
{* Текст *}
<p class="{$component}-text js-{$component}-text" {if ! $note}style="display: none"{/if}>
<p class="{$component}-text js-note-text" {if ! $note}style="display: none"{/if}>
{if $note}
{$note->getText()}
{/if}
@ -25,13 +25,13 @@
{* Действия *}
{if $isEditable}
<ul class="{$component}-actions js-{$component}-actions clearfix" {if ! $note}style="display: none;"{/if}>
<li><a href="#" class="js-{$component}-actions-edit">{$aLang.common.edit}</a></li>
<li><a href="#" class="js-{$component}-actions-remove">{$aLang.common.remove}</a></li>
<ul class="{$component}-actions js-note-actions clearfix" {if ! $note}style="display: none;"{/if}>
<li><a href="#" class="js-note-actions-edit">{$aLang.common.edit}</a></li>
<li><a href="#" class="js-note-actions-remove">{$aLang.common.remove}</a></li>
</ul>
{* Добавить *}
<ul class="{$component}-actions {$component}-actions--add clearfix js-{$component}-add" {if $note}style="display: none;"{/if}>
<ul class="{$component}-actions {$component}-actions--add clearfix js-note-add" {if $note}style="display: none;"{/if}>
<li><a href="#" class="">{$aLang.user_note.add}</a></li>
</ul>
{/if}
@ -39,11 +39,11 @@
{* Форма редактирования *}
{if $isEditable}
<form class="{$component}-form js-{$component}-form" style="display: none;">
{component 'field' template='textarea' inputClasses="$component-form-text js-$component-form-text"}
<form class="{$component}-form js-note-form" style="display: none;">
{component 'field' template='textarea' inputClasses="$component-form-text js-note-form-text"}
{component 'button' mods='primary' text=$aLang.common.save}
{component 'button' type='button' classes="js-$component-form-cancel" text=$aLang.common.cancel}
{component 'button' type='button' classes="js-note-form-cancel" text=$aLang.common.cancel}
</form>
{/if}
</div>

View file

@ -8,7 +8,7 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.photo {
.ls-photo {
position: relative;
min-width: 100%;
min-height: 50px;
@ -16,13 +16,13 @@
}
/* Изображение */
.photo-image {
.ls-photo-image {
vertical-align: top;
max-width: 100%;
}
/* Действия */
.photo-actions {
.ls-photo-actions {
position: absolute;
bottom: 0;
left: 0;
@ -33,7 +33,7 @@
-webkit-transition: opacity .3s;
transition: opacity .3s;
}
.photo-actions li {
.ls-photo-actions li {
padding: 7px 15px;
color: #bbb;
font-size: 13px;
@ -41,21 +41,21 @@
-webkit-transition: color .2s;
transition: color .2s;
}
.photo-actions li:hover {
.ls-photo-actions li:hover {
color: #eee;
}
.photo:hover .photo-actions {
.ls-photo:hover .ls-photo-actions {
opacity: 1;
}
/* @modifier nophoto */
.photo--nophoto .photo-image {
.ls-photo--nophoto .ls-photo-image {
width: 100%;
}
.photo--nophoto .photo-actions {
.ls-photo--nophoto .ls-photo-actions {
opacity: 1;
}
.photo--nophoto .photo-actions-crop-avatar,
.photo--nophoto .photo-actions-remove {
.ls-photo--nophoto .ls-photo-actions-crop-avatar,
.ls-photo--nophoto .ls-photo-actions-remove {
display: none;
}

View file

@ -12,7 +12,7 @@
* TODO: Вынести текстовки в photo
*}
{$component = 'photo'}
{$component = 'ls-photo'}
{$hasPhoto = $smarty.local.hasPhoto}
{$useAvatar = $smarty.local.useAvatar|default:true}

View file

@ -8,15 +8,15 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.poll { margin-bottom: 15px; background: #fafafa; padding: 15px; }
.ls-poll { margin-bottom: 15px; background: #fafafa; padding: 15px; }
.poll-title { font-size: 20px; margin-bottom: 20px; }
.ls-poll-title { font-size: 20px; margin-bottom: 20px; }
.poll-answer-list { margin-bottom: 20px; margin-left: 0; list-style-type: none; }
.ls-poll-answer-list { margin-bottom: 20px; margin-left: 0; list-style-type: none; }
.poll-answer-list-item { margin-bottom: 10px; }
.poll-answer-list-item:last-child { margin-bottom: 0; }
.poll-answer-list-item label { display: inline; }
.ls-poll-answer-list-item { margin-bottom: 10px; }
.ls-poll-answer-list-item:last-child { margin-bottom: 0; }
.ls-poll-answer-list-item label { display: inline; }
/**
@ -24,18 +24,18 @@
*
* @template polls/poll.result.tpl
*/
.poll-result { margin-bottom: 10px; padding: 15px 15px 0; background: #fff; border: 1px solid #eee; }
.poll-result-item { margin-bottom: 20px; overflow: hidden; zoom: 1; }
.poll-result-item-count { float: left; width: 50px; text-align: right; padding-right: 15px; }
.poll-result-item-count strong { display: block; }
.poll-result-item-count span { color: #aaa; }
.poll-result-item-chart { padding-left: 65px; }
.poll-result-item-bar { height: 10px; margin-top: 5px; background: #ccc; overflow: hidden; border-radius: 2px; }
.ls-poll-result { margin-bottom: 10px; padding: 15px 15px 0; background: #fff; border: 1px solid #eee; }
.ls-poll-result-item { margin-bottom: 20px; overflow: hidden; zoom: 1; }
.ls-poll-result-item-count { float: left; width: 50px; text-align: right; padding-right: 15px; }
.ls-poll-result-item-count strong { display: block; }
.ls-poll-result-item-count span { color: #aaa; }
.ls-poll-result-item-chart { padding-left: 65px; }
.ls-poll-result-item-bar { height: 10px; margin-top: 5px; background: #ccc; overflow: hidden; border-radius: 2px; }
.poll-result-item--most .poll-result-item-bar { background: #AC90DF; }
.poll-result-item--voted .poll-result-item-count strong { background: yellow; }
.ls-poll-result-item--most .ls-poll-result-item-bar { background: #AC90DF; }
.ls-poll-result-item--voted .ls-poll-result-item-count strong { background: yellow; }
.poll-result-total { color: #aaa; margin-left: 10px; }
.ls-poll-result-total { color: #aaa; margin-left: 10px; }
/**
@ -43,11 +43,11 @@
*
* @template polls/poll.form.tpl
*/
.poll-manage .fieldset-body { padding-bottom: 0; }
.poll-manage-add { margin-bottom: 15px; }
.poll-manage-list { overflow: hidden; }
.poll-manage-item { padding: 10px 70px 10px 15px; background: #fff; margin-bottom: 1px; position: relative; }
.poll-manage-item:last-child { margin-bottom: 15px; }
.ls-poll-manage .fieldset-body { padding-bottom: 0; }
.ls-poll-manage-add { margin-bottom: 15px; }
.ls-poll-manage-list { overflow: hidden; }
.ls-poll-manage-item { padding: 10px 70px 10px 15px; background: #fff; margin-bottom: 1px; position: relative; }
.ls-poll-manage-item:last-child { margin-bottom: 15px; }
/**
@ -55,7 +55,7 @@
*
* @template polls/poll.form.tpl
*/
.poll-form-answer-item { margin-bottom: 10px; padding-right: 25px; position: relative; }
.poll-form-answer-item .ls-field,
.poll-form-answer-item:last-child { margin-bottom: 0; }
.poll-form-answer-item-remove { position: absolute; top: 7px; right: 0; cursor: pointer; }
.ls-poll-form-answer-item { margin-bottom: 10px; padding-right: 25px; position: relative; }
.ls-poll-form-answer-item .ls-field,
.ls-poll-form-answer-item:last-child { margin-bottom: 0; }
.ls-poll-form-answer-item-remove { position: absolute; top: 7px; right: 0; cursor: pointer; }

View file

@ -5,7 +5,7 @@
* @scripts <common>/js/poll.js
*}
<li class="poll-form-answer-item js-poll-form-answer-item"
<li class="ls-poll-form-answer-item js-poll-form-answer-item"
{if $bPollItemIsTemplate|default:false}data-is-template="true"{/if}
{if $bPollItemIsTemplate|default:false}style="display: none"{/if}>
@ -26,7 +26,7 @@
{if $bPollIsAllowRemove|default:true}
{component 'icon'
icon='remove'
classes='poll-form-answer-item-remove js-poll-form-answer-item-remove'
classes='ls-poll-form-answer-item-remove js-poll-form-answer-item-remove'
attributes=[
title => {lang 'blog.private'},
style => "{if ! $smarty.local.showRemove|default:true}display: none{/if}"

View file

@ -62,7 +62,7 @@
</header>
<div class="fieldset-body">
<ul class="poll-form-answer-list js-poll-form-answer-list">
<ul class="ls-poll-form-answer-list js-poll-form-answer-list">
{if $oPoll}
{$aAnswers = $oPoll->getAnswers()}

View file

@ -7,7 +7,7 @@
* @scripts <common>/js/poll.js
*}
<li class="poll-manage-item js-poll-manage-item" data-poll-id="{$oPoll->getId()}" data-poll-target-tmp="{$oPoll->getTargetTmp()}">
<li class="ls-poll-manage-item js-poll-manage-item" data-poll-id="{$oPoll->getId()}" data-poll-target-tmp="{$oPoll->getTargetTmp()}">
{* Заголовок *}
{$oPoll->getTitle()}

View file

@ -5,7 +5,7 @@
* @scripts <common>/js/poll.js
*}
<ul class="poll-manage-list js-poll-manage-list">
<ul class="ls-poll-manage-list js-poll-manage-list">
{if $aPollItems}
{foreach $aPollItems as $oPoll}
{include './poll.manage.item.tpl' oPoll=$oPoll}

View file

@ -8,14 +8,14 @@
* @scripts <common>/js/poll.js
*}
<div class="fieldset poll-manage js-poll-manage" data-type="{$smarty.local.targetType}" data-target-id="{$smarty.local.targetId}">
<div class="fieldset ls-poll-manage js-poll-manage" data-type="{$smarty.local.targetType}" data-target-id="{$smarty.local.targetId}">
<header class="fieldset-header">
<h3 class="fieldset-title">{$aLang.poll.polls}</h3>
</header>
<div class="fieldset-body">
{* Кнопка добавить *}
{component 'button' text=$aLang.common.add type='button' classes='poll-manage-add js-poll-manage-add'}
{component 'button' text=$aLang.common.add type='button' classes='ls-poll-manage-add js-poll-manage-add'}
{* Список добавленных опросов *}
{insert name="block" block="pollFormItems" params=[

View file

@ -5,7 +5,7 @@
*}
{* Список ответов *}
<ul class="poll-result js-poll-result">
<ul class="ls-poll-result js-poll-result">
{$answers = $oPoll->getAnswers()}
{$count = count($answers)}
{$answersCurrent=$oPoll->getVoteCurrent()->getAnswers()}
@ -15,7 +15,7 @@
{$percent = $oPoll->getAnswerPercent($answer)}
{* Ответ *}
<li class="poll-result-item
<li class="ls-poll-result-item
{if $oPoll->getCountVoteAnswerMax() == $votes}poll-result-item--most{/if}
{if in_array( $answer->getId(), $answersCurrent )}poll-result-item--voted{/if}
js-poll-result-item"
@ -23,15 +23,15 @@
data-position = "{$count - $answer@index - 1}">
{* Кол-во и процент проголосовавших *}
<div class="poll-result-item-count">
<div class="ls-poll-result-item-count">
<strong>{$percent}%</strong>
<span>({$votes})</span>
</div>
{* Визуальное отображения процента проголосовавших *}
<div class="poll-result-item-chart">
<div class="poll-result-item-label">{$answer->getTitle()}</div>
<div class="poll-result-item-bar" style="width: {$percent}%;"></div>
<div class="ls-poll-result-item-chart">
<div class="ls-poll-result-item-label">{$answer->getTitle()}</div>
<div class="ls-poll-result-item-bar" style="width: {$percent}%;"></div>
</div>
</li>
{/foreach}
@ -45,7 +45,7 @@
attributes = [ 'title' => $aLang.poll.result.sort ]}
{* Статистика голосования *}
<span class="poll-result-total">
<span class="ls-poll-result-total">
{$aLang.poll.result.voted_total}: {$oPoll->getCountVote()} |
{$aLang.poll.result.abstained_total}: {$oPoll->getCountAbstain()}
</span>

View file

@ -4,8 +4,8 @@
* @param ModulePoll_EntityPoll $poll Опрос
*}
<div class="poll poll-type-{$poll->getTargetType()} js-poll" data-poll-id="{$poll->getId()}" data-poll-answer-max="{$poll->getCountAnswerMax()}">
<h3 class="poll-title">{$poll->getTitle()}</h3>
<div class="ls-poll poll-type-{$poll->getTargetType()} js-poll" data-poll-id="{$poll->getId()}" data-poll-answer-max="{$poll->getCountAnswerMax()}">
<h3 class="ls-poll-title">{$poll->getTitle()}</h3>
{if ! $poll->getVoteCurrent()}
{include './poll.vote.tpl' poll=$poll}

View file

@ -11,9 +11,9 @@
{* Форма *}
<form method="post" class="js-poll-vote-form">
{* Список ответов *}
<ul class="poll-answer-list">
<ul class="ls-poll-answer-list">
{foreach $poll->getAnswers() as $answer}
<li class="poll-answer-list-item js-poll-answer-list-item" data-answer-id="{$answer->getId()}">
<li class="ls-poll-answer-list-item js-poll-answer-list-item" data-answer-id="{$answer->getId()}">
{component 'field' template=$type
name = 'answers[]'
value = $answer->getId()

View file

@ -2,11 +2,11 @@
* Media
*/
.property-list {
.ls-property-list {
margin-bottom: 30px;
}
.property {
.ls-property {
padding: 15px 15px;
border-bottom: 1px solid #eee;
}

View file

@ -1,5 +1,5 @@
{if $smarty.local.properties}
<div class="property-list">
<div class="ls-property-list">
{foreach $smarty.local.properties as $property}
{include './item.tpl' property=$property}
{/foreach}

View file

@ -1,9 +1,9 @@
<div class="property">
<div class="property-list-item-label">
<div class="ls-property">
<div class="ls-property-list-item-label">
{$property->getTitle()}
</div>
<strong class="property-list-item-content">
<strong class="ls-property-list-item-content">
{$property->getValue()->getValueForDisplay()}
</strong>
</div>

View file

@ -1,8 +1,8 @@
{$value = $property->getValue()}
{$valueType = $value->getValueTypeObject()}
<div class="property">
<div class="property-list-item-label">
<div class="ls-property">
<div class="ls-property-list-item-label">
{$property->getTitle()}
</div>

View file

@ -1,7 +1,7 @@
{$valueType = $property->getValue()->getValueTypeObject()}
<div class="property">
<div class="property-list-item-label">
<div class="ls-property">
<div class="ls-property-list-item-label">
{$property->getTitle()}
</div>

View file

@ -3,11 +3,20 @@
*
* @template forms/form.search.base.tpl
*/
.search-form { padding: 15px; margin-bottom: 20px; background: #f7f7f7; position: relative; }
.search-form .ls-field { margin-bottom: 0;}
.search-form-input[type="text"] { padding-right: 30px; }
.ls-search-form {
padding: 15px;
margin-bottom: 20px;
background: #f7f7f7;
position: relative;
}
.ls-search-form .ls-field {
margin-bottom: 0;
}
.ls-search-form-input[type="text"] {
padding-right: 30px;
}
.ls-button--icon.search-form-submit {
.ls-button--icon.ls-search-form-submit {
border: none;
background: none;
position: absolute;
@ -19,10 +28,20 @@
opacity: .7;
filter: alpha(opacity=70);
}
.search-form-submit:hover { opacity: 1; filter: alpha(opacity=100); background-color: transparent; }
.ls-search-form-submit:hover {
opacity: 1;
filter: alpha(opacity=100);
background-color: transparent;
}
/**
* Light
*/
.search-form--light { background: none; padding: 0; }
.search-form--light .search-form-submit { top: 6px; right: 7px; }
.ls-search-form--light {
background: none;
padding: 0;
}
.ls-search-form--light .ls-search-form-submit {
top: 6px;
right: 7px;
}

View file

@ -7,7 +7,7 @@
*}
{* Название компонента *}
{$component = 'search-form'}
{$component = 'ls-search-form'}
<form action="{$smarty.local.action}" method="{$smarty.local.method|default:'get'}" class="{$component} {cmods name=$component mods=$smarty.local.mods} {$smarty.local.classes}" {cattr list=$smarty.local.attributes}>
{block 'search_form'}

View file

@ -8,17 +8,17 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.sort {
.ls-sort {
margin-bottom: 15px;
}
.sort--inline {
.ls-sort--inline {
display: inline;
margin-right: 10px;
}
.sort li.active[data-order=asc] a:after {
.ls-sort li.active[data-order=asc] a:after {
content: "↑";
}
.sort li.active[data-order=desc] a:after {
.ls-sort li.active[data-order=desc] a:after {
content: "↓";
}

View file

@ -6,10 +6,10 @@
* @param boolean $showLabel
*}
{$component = 'sort'}
{$component = 'ls-sort'}
{$items = $smarty.local.items}
{$classes = "{$smarty.local.classes} sort"}
{$classes = "{$smarty.local.classes} {$component}"}
{foreach $items as $item}
{$items[ $item@key ][ 'attributes' ] = array_merge( $items[ $item@key ][ 'attributes' ]|default:[], [

View file

@ -2,9 +2,9 @@
*
*}
<div class="sort {$sSortClasses}">
<div class="ls-sort {$sSortClasses}">
{if $bSortShowLabel|default:true}
<div class="sort-label">{if $sSortLabel}{$sSortLabel}{else}{$aLang.sort.label}{/if}</div>
<div class="ls-sort-label">{if $sSortLabel}{$sSortLabel}{else}{$aLang.sort.label}{/if}</div>
{/if}
<div class="dropdown dropdown-toggle js-dropdown-default" data-dropdown-target="js-dropdown-sort-{$sSortName}" data-dropdown-selectable="true">...</div>

View file

@ -6,21 +6,21 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.userbar {
.ls-userbar {
background: #fff;
}
.userbar-inner {
.ls-userbar-inner {
margin: 0 auto;
padding: 0 50px;
}
/* Меню */
.userbar-nav {
.ls-userbar-nav {
float: left;
}
/* Форма поиска */
.userbar .search-form {
.ls-userbar .ls-search-form {
float: right;
width: 200px;
position: relative;
@ -29,7 +29,7 @@
}
/* Лого */
.userbar-logo {
.ls-userbar-logo {
float: left;
font-size: 28px;
line-height: 54px;
@ -95,7 +95,7 @@
* Responsive styles
*/
@media (max-width: 360px) {
.userbar-inner {
.ls-userbar-inner {
padding: 0;
}
}

View file

@ -2,15 +2,15 @@
* Юзербар
*}
<div class="userbar">
<div class="userbar-inner clearfix" style="min-width: {Config::Get('view.grid.fluid_min_width')}; max-width: {Config::Get('view.grid.fluid_max_width')};">
<div class="ls-userbar">
<div class="ls-userbar-inner clearfix" style="min-width: {Config::Get('view.grid.fluid_min_width')}; max-width: {Config::Get('view.grid.fluid_max_width')};">
{if ! Config::Get( 'view.layout_show_banner' )}
<h1 class="userbar-logo">
<h1 class="ls-userbar-logo">
<a href="{router page='/'}">{Config::Get('view.name')}</a>
</h1>
{/if}
<nav class="userbar-nav">
<nav class="ls-userbar-nav">
{if $oUserCurrent}
{$items = [
[

View file

@ -1 +1 @@
.vote--small .vote-item, .vote--small .vote-rating { float: right; }
.ls-vote--small .ls-vote-item, .ls-vote--small .ls-vote-rating { float: right; }

View file

@ -10,47 +10,47 @@
*/
/* Body */
.vote-body { overflow: hidden; position: relative; padding-left: 40px; }
.ls-vote-body { overflow: hidden; position: relative; padding-left: 40px; }
/* Vote Item */
.vote-item { opacity: .3; filter: alpha(opacity=30); cursor: pointer; position: absolute; }
.vote-item:hover { opacity: .8; filter: alpha(opacity=80); }
.ls-vote-item { opacity: .3; filter: alpha(opacity=30); cursor: pointer; position: absolute; }
.ls-vote-item:hover { opacity: .8; filter: alpha(opacity=80); }
.vote-item-up { top: 1px; left: 0; }
.vote-item-down { top: 1px; left: 20px; }
.ls-vote-item-up { top: 1px; left: 0; }
.ls-vote-item-down { top: 1px; left: 20px; }
.vote-item i {
.ls-vote-item i {
}
/* Rating */
.vote-rating { font-weight: bold; color: #aaa; font-size: 14px; }
.ls-vote-rating { font-weight: bold; color: #aaa; font-size: 14px; }
.vote--count-positive .vote-rating { color: #390; }
.vote--count-negative .vote-rating { color: #f00; }
.ls-vote--count-positive .ls-vote-rating { color: #390; }
.ls-vote--count-negative .ls-vote-rating { color: #f00; }
/* Voted */
.vote--voted .vote-body { padding-left: 20px; }
.ls-vote--voted .ls-vote-body { padding-left: 20px; }
.vote--voted .vote-item { left: 0; opacity: 1; filter: alpha(opacity=100); }
.vote--voted .vote-item:hover { opacity: 1; filter: alpha(opacity=100); cursor: default; }
.ls-vote--voted .ls-vote-item { left: 0; opacity: 1; filter: alpha(opacity=100); }
.ls-vote--voted .ls-vote-item:hover { opacity: 1; filter: alpha(opacity=100); cursor: default; }
.vote--voted.vote--voted-zero .vote-item-down,
.vote--voted.vote--voted-zero .vote-item-up,
.ls-vote--voted.ls-vote--voted-zero .ls-vote-item-down,
.ls-vote--voted.ls-vote--voted-zero .ls-vote-item-up,
.vote--voted.vote--voted-up .vote-item-down,
.vote--voted.vote--voted-up .vote-item-abstain,
.ls-vote--voted.ls-vote--voted-up .ls-vote-item-down,
.ls-vote--voted.ls-vote--voted-up .ls-vote-item-abstain,
.vote--voted.vote--voted-down .vote-item-up,
.vote--voted.vote--voted-down .vote-item-abstain { display: none; }
.ls-vote--voted.ls-vote--voted-down .ls-vote-item-up,
.ls-vote--voted.ls-vote--voted-down .ls-vote-item-abstain { display: none; }
/* Locked */
.vote--locked .vote-item { display: none; }
.ls-vote--locked .ls-vote-item { display: none; }
/**
* Large (User, Blog)
*/
.vote--large .vote-heading {
.ls-vote--large .ls-vote-heading {
text-transform: uppercase;
text-align: right;
font-size: 11px;
@ -58,34 +58,34 @@
font-family: Arial;
color: #aaa;
}
.vote--large .vote-rating { font: 300 30px/1em 'Open Sans'; text-align: right; }
.vote--large .vote-item-up,
.vote--large .vote-item-down { top: 7px; }
.vote--large.vote--count-positive .vote-rating { color: #333; }
.ls-vote--large .ls-vote-rating { font: 300 30px/1em 'Open Sans'; text-align: right; }
.ls-vote--large .ls-vote-item-up,
.ls-vote--large .ls-vote-item-down { top: 7px; }
.ls-vote--large.ls-vote--count-positive .ls-vote-rating { color: #333; }
/**
* Small (Topic)
*/
.vote--small { border-radius: 3px; overflow: hidden; position: relative; }
.ls-vote--small { border-radius: 3px; overflow: hidden; position: relative; }
/* Body */
.vote--small .vote-body { padding: 0; }
.ls-vote--small .ls-vote-body { padding: 0; }
/* Кнопки голосования */
.vote--small .vote-item { opacity: 1; filter: alpha(opacity=100); position: static; }
.ls-vote--small .ls-vote-item { opacity: 1; filter: alpha(opacity=100); position: static; }
.vote--small .vote-item,
.vote--small .vote-rating { float: left; background: #ac90df; padding: 8px 13px; }
.vote--small .vote-item i { opacity: 1; }
.vote--small .vote-item:hover { opacity: .9; filter: alpha(opacity=90); }
.ls-vote--small .ls-vote-item,
.ls-vote--small .ls-vote-rating { float: left; background: #ac90df; padding: 8px 13px; }
.ls-vote--small .ls-vote-item i { opacity: 1; }
.ls-vote--small .ls-vote-item:hover { opacity: .9; filter: alpha(opacity=90); }
/* Рейтинг */
.vote--small .vote-rating { color: #fff; display: none; }
.vote--small.vote--voted .vote-rating { display: block; }
.ls-vote--small .ls-vote-rating { color: #fff; display: none; }
.ls-vote--small.ls-vote--voted .ls-vote-rating { display: block; }
.vote--small.vote--count-negative .vote-item,
.vote--small.vote--count-negative .vote-rating { background: #da3a3a; }
.ls-vote--small.ls-vote--count-negative .ls-vote-item,
.ls-vote--small.ls-vote--count-negative .ls-vote-rating { background: #da3a3a; }
/* Заблокированное */
.vote--small.vote--locked .vote-rating { display: block; }
.ls-vote--small.ls-vote--locked .ls-vote-rating { display: block; }

View file

@ -4,7 +4,7 @@
* @param object $target
*}
{$component = 'vote-info'}
{$component = 'ls-vote-info'}
{$target = $smarty.local.target}

View file

@ -11,7 +11,7 @@
*}
{* Название компонента *}
{$component = 'vote'}
{$component = 'ls-vote'}
{* Установка дефолтных значений *}
{$showRating = $smarty.local.showRating|default:true}
@ -67,7 +67,7 @@
{* Основной блок *}
<div class="{$component}-body">
{* Рейтинг *}
<div class="{$component}-rating js-{$component}-rating">
<div class="{$component}-rating js-vote-rating">
{if $showRating}
{$rating}
{else}
@ -77,18 +77,18 @@
{* Воздержаться *}
{if $smarty.local.useAbstain}
<div class="{$component}-item {$component}-item-abstain js-{$component}-item" {if ! $vote}title="{$aLang.$component.abstain}"{/if} data-vote-value="0">
<div class="{$component}-item {$component}-item-abstain js-vote-item" {if ! $vote}title="{$aLang.$component.abstain}"{/if} data-vote-value="0">
{component 'icon' icon='eye-open' mods=$iconMod}
</div>
{/if}
{* Нравится *}
<div class="{$component}-item {$component}-item-up js-{$component}-item" {if ! $vote}title="{$aLang.$component.up}"{/if} data-vote-value="1">
<div class="{$component}-item {$component}-item-up js-vote-item" {if ! $vote}title="{$aLang.$component.up}"{/if} data-vote-value="1">
{component 'icon' icon='plus' mods=$iconMod}
</div>
{* Не нравится *}
<div class="{$component}-item {$component}-item-down js-{$component}-item" {if ! $vote}title="{$aLang.$component.down}"{/if} data-vote-value="-1">
<div class="{$component}-item {$component}-item-down js-vote-item" {if ! $vote}title="{$aLang.$component.down}"{/if} data-vote-value="-1">
{component 'icon' icon='minus' mods=$iconMod}
</div>
</div>

@ -1 +1 @@
Subproject commit 78736696f5eb2bf4d72849cd3f47074c3fda8064
Subproject commit 25d3002ce7b7ec2da25ffd2aad22cdd536a6718d