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

Доработка компонентов

This commit is contained in:
Denis Shakhov 2014-10-10 23:29:24 +07:00
parent 75f8bac631
commit 1162ae606f
135 changed files with 1307 additions and 503 deletions

View file

@ -527,43 +527,48 @@ $config['head']['default']['js'] = array(
/* User Interface */
"___path.framework.frontend.web___/js/ui/dropdown.js",
"___path.framework.frontend.web___/js/ui/tab.js",
"___path.framework.frontend.web___/js/ui/modal.js",
"___path.framework.frontend.web___/js/ui/toolbar.js",
"___path.framework.frontend.web___/js/ui/tooltip.js",
"___path.framework.frontend.web___/js/ui/autocomplete.js",
"___path.framework.frontend.web___/js/ui/notification.js",
"___path.framework.frontend.web___/js/ui/alert.js",
"___path.framework.frontend.web___/js/ui/captcha.js",
/* LiveStreet */
"___path.application.web___/frontend/common/js/user_list_add.js",
"___path.skin.web___/components/modal/js/modal.js",
"___path.skin.web___/components/dropdown/js/dropdown.js",
"___path.application.web___/frontend/common/js/favourite.js",
"___path.application.web___/frontend/common/js/favourite_topic.js",
"___path.application.web___/frontend/common/js/blocks.js",
"___path.application.web___/frontend/common/js/pagination.js",
"___path.skin.web___/components/alert/js/alert.js",
"___path.skin.web___/components/button/js/button-polyfills.js",
"___path.skin.web___/components/favourite/js/favourite.js",
"___path.skin.web___/components/editor/js/editor.js",
"___path.skin.web___/components/comment/js/comment.js",
"___path.skin.web___/components/topic/js/topic.js",
"___path.skin.web___/components/topic/js/topic-add.js",
"___path.skin.web___/components/topic/js/topic-favourite.js",
"___path.skin.web___/components/wall/js/wall.js",
"___path.skin.web___/components/wall/js/wall-form.js",
"___path.skin.web___/components/wall/js/wall-entry.js",
"___path.skin.web___/components/blog/js/blog.js",
"___path.skin.web___/components/blog/js/blog-invites.js",
"___path.skin.web___/components/poll/js/poll.js",
"___path.skin.web___/components/poll/js/poll-manage.js",
"___path.skin.web___/components/more/js/more.js",
"___path.skin.web___/components/activity/js/activity.js",
"___path.skin.web___/components/activity/js/activity-settings.js",
"___path.skin.web___/components/vote/js/vote.js",
"___path.skin.web___/components/pagination/js/pagination.js",
"___path.skin.web___/components/note/js/note.js",
"___path.skin.web___/components/feed/js/feed.js",
"___path.skin.web___/components/feed/js/feed-blogs.js",
"___path.application.web___/frontend/common/js/blocks.js",
"___path.application.web___/frontend/common/js/talk.js",
"___path.application.web___/frontend/common/js/vote.js",
"___path.application.web___/frontend/common/js/poll.js",
"___path.application.web___/frontend/common/js/poll-manage.js",
"___path.application.web___/frontend/common/js/subscribe.js",
"___path.application.web___/frontend/common/js/geo.js",
"___path.application.web___/frontend/common/js/wall.js",
"___path.application.web___/frontend/common/js/wall-form.js",
"___path.application.web___/frontend/common/js/wall-entry.js",
"___path.application.web___/frontend/common/js/usernote.js",
"___path.application.web___/frontend/common/js/comments.js",
"___path.application.web___/frontend/common/js/blog.js",
"___path.application.web___/frontend/common/js/user.js",
"___path.application.web___/frontend/common/js/user-follow.js",
"___path.application.web___/frontend/common/js/user-friend.js",
"___path.application.web___/frontend/common/js/feed.js",
"___path.application.web___/frontend/common/js/feed-blogs.js",
"___path.application.web___/frontend/common/js/activity.js",
"___path.application.web___/frontend/common/js/activity-settings.js",
"___path.application.web___/frontend/common/js/toolbar.comments.js",
"___path.application.web___/frontend/common/js/toolbar.topics.js",
"___path.application.web___/frontend/common/js/toolbar.scrollup.js",
"___path.application.web___/frontend/common/js/topic.js",
"___path.application.web___/frontend/common/js/admin.js",
"___path.application.web___/frontend/common/js/userfield.js",
"___path.application.web___/frontend/common/js/media.js",
@ -574,11 +579,8 @@ $config['head']['default']['js'] = array(
"___path.skin.web___/components/media/js/media.js",
"___path.application.web___/frontend/common/js/tags.js",
"___path.application.web___/frontend/common/js/content.js",
"___path.application.web___/frontend/common/js/user_list_add.js",
"___path.application.web___/frontend/common/js/blog_invite_users.js",
"___path.application.web___/frontend/common/js/message_users.js",
"___path.application.web___/frontend/common/js/search.js",
"___path.application.web___/frontend/common/js/more.js",
"___path.application.web___/frontend/common/js/init.js",
"___path.skin.web___/components/actionbar/js/actionbar-item-select.js",
"//yandex.st/share/share.js" => array('merge' => false),
@ -589,13 +591,13 @@ $config['head']['default']['css'] = array(
"___path.framework.frontend.web___/css/reset.css",
"___path.framework.frontend.web___/css/helpers.css",
"___path.framework.frontend.web___/css/text.css",
"___path.skin.web___/components/alert/css/alert.css",
"___path.skin.web___/components/dropdown/css/dropdown.css",
"___path.framework.frontend.web___/css/buttons.css",
"___path.skin.web___/components/button/css/button.css",
"___path.skin.web___/components/modal/css/modal.css",
"___path.framework.frontend.web___/css/forms.css",
"___path.framework.frontend.web___/css/navs.css",
"___path.framework.frontend.web___/css/modals.css",
"___path.framework.frontend.web___/css/tooltip.css",
"___path.framework.frontend.web___/css/alerts.css",
"___path.framework.frontend.web___/css/toolbar.css",
"___path.framework.frontend.web___/css/typography.css",
"___path.framework.frontend.web___/css/grid.css"

View file

@ -1770,6 +1770,12 @@ return array(
),
),
),
/**
* Подгрузка контента
*/
'more' => array(
'text' => 'Подгрузить еще'
),
/**
* Управление правами (RBAC)
*/

View file

@ -30,12 +30,12 @@
{* Сообщение для забаненного пользователя *}
{* TODO: Вывод сообщения о бане *}
{if false}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog.alerts.banned sMods='error'}
{include 'components/alert/alert.tpl' text=$aLang.blog.alerts.banned mods='error'}
{/if}
{* Список топиков *}
{if $bPrivateBlog}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog.alerts.private sMods='error'}
{include 'components/alert/alert.tpl' text=$aLang.blog.alerts.private mods='error'}
{else}
{include 'components/topic/topic-list.tpl' topics=$aTopics paging=$aPaging}
{/if}

View file

@ -25,6 +25,6 @@
{hook run='search_result' sType=$sSearchType}
{/if}
{elseif $_aRequest.q}
{include 'components/alert/alert.tpl' mAlerts=$aLang.search.alerts.empty aMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.search.alerts.empty mods='empty'}
{/if}
{/block}

View file

@ -9,48 +9,6 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
/**
* Блок
*
* @template blocks/block.aside.base.tpl
*/
.block { background: #fff; margin-bottom: 30px; }
.block:last-child { margin-bottom: 0; }
.block .text { font-size: 13px; line-height: 18px; }
.block .max-height-200 { overflow: auto; max-height: 200px; position: relative; }
.block .search-form { padding: 0; margin-bottom: 20px; }
.block .block-content.loading { min-height: 100px; background-image: url(../images/loader.gif); background-position: 50% 45px; }
/* Шапка */
.block-header { padding: 18px 20px 0; position: relative; }
.block-header .block-title { margin-bottom: 0; font-size: 16px; line-height: 1em; font-weight: normal; }
/* Навигация */
.block-nav { padding: 20px; border-bottom: 1px solid #eee; }
.block-nav .nav,
.block-nav .dropdown { margin-bottom: 0; }
/* Контент */
.block-content { padding: 20px; }
/* Подвал */
.block-footer { border-top: 1px solid #eee; padding: 15px 20px; font-size: 12px; }
/* Кнопка обновления блока */
.block-update {
position: absolute;
top: 19px;
right: 15px;
width: 16px;
height: 16px;
background: url(../images/update.gif) no-repeat; cursor: pointer;
}
.block-update.active { background-position: -16px 0; }
/* Блок без отступов у контента */
.block--nopadding .block-content { padding: 0; }
/**
* Список категорий блогов

View file

@ -74,7 +74,7 @@ jQuery(document).ready(function($){
/**
* Alerts
*/
$('.js-alert').alert();
$('.js-alert').lsAlert();
/**
@ -112,12 +112,6 @@ jQuery(document).ready(function($){
ls.autocomplete.add($(".autocomplete-users"), aRouter['ajax']+'autocompleter/user/', false);
/**
* Scroll
*/
$(window)._scrollable();
/**
* Code highlight
*/
@ -206,6 +200,7 @@ jQuery(document).ready(function($){
/**
* Toolbar
*/
$(window)._scrollable();
$('.js-toolbar').toolbar({
target: '.grid-role-wrapper',
offsetX: 20
@ -238,7 +233,7 @@ jQuery(document).ready(function($){
* User Note
*/
$('.js-user-note').livequery(function () {
$(this).usernote({
$(this).lsNote({
urls: {
save: aRouter['profile'] + 'ajax-note-save/',
remove: aRouter['profile'] + 'ajax-note-remove/'
@ -262,6 +257,7 @@ jQuery(document).ready(function($){
/**
* Topic
*/
$( '.js-topic' ).lsTopic();
ls.topic.init();
ls.content.init();
@ -270,14 +266,6 @@ jQuery(document).ready(function($){
* Vote
*/
// Голосование за топик
$('.js-vote-topic').vote({
urls: {
vote: aRouter['ajax'] + 'vote/topic/',
info: aRouter['ajax'] + 'vote/get/info/topic'
}
});
// Голосование за пользователя
$('.js-vote-user').vote({
urls: {
@ -292,15 +280,6 @@ jQuery(document).ready(function($){
}
});
// Голосование за комментарий
$('.js-vote-comment').livequery(function () {
$(this).vote({
urls: {
vote: aRouter['ajax'] + 'vote/comment/'
}
});
});
/**
* Пагинация
@ -317,18 +296,6 @@ jQuery(document).ready(function($){
* Избранное
*/
// Топик
$('.js-favourite-topic').lsFavouriteTopic();
// Комментарий
$('.js-favourite-comment').livequery(function () {
$(this).lsFavourite({
urls: {
toggle: aRouter['ajax'] + 'favourite/comment/'
}
});
});
// Личное сообщение
$('.js-favourite-talk').lsFavourite({
urls: {
@ -378,7 +345,7 @@ jQuery(document).ready(function($){
*/
// Приглашение пользователей в блог
$('.js-user-list-add-blog-invite').blog_invite_users();
$('.js-user-list-add-blog-invite').lsBlogInvites();
// Добавление участников личного сообщения
$('.js-message-users').message_users();
@ -410,13 +377,6 @@ jQuery(document).ready(function($){
$( this ).fotorama();
});
// Временный костыль для сабмита форм
// TODO: Перенести в плагин button
$(document).on('click', 'button[data-button-submit-form]', function () {
$( $(this).data('button-submit-form') ).submit();
});
// Хук конца инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_end',[],window);
});

View file

@ -20,7 +20,7 @@
{block 'block_footer'}
{* Подписаться через RSS *}
{include 'components/button/button.tpl' sUrl="{router page='rss'}blog/{$oBlog->getUrl()}/" sText=$aLang.blog.rss}
{include 'components/button/button.tpl' url="{router page='rss'}blog/{$oBlog->getUrl()}/" text=$aLang.blog.rss}
{* Вступить / Покинуть блог *}
{include 'components/blog/join.tpl'}

View file

@ -18,10 +18,10 @@
{if $oUserCurrent and ($oUserCurrent->getRating() > {cfg name='acl.create.blog.rating'} or $oUserCurrent->isAdministrator())}
<p>{$aLang.blog.can_add}</p>
{include 'components/button/button.tpl' sUrl="{router page='blog'}add/" sMods='primary large' sText=$aLang.blog.create_blog}
{include 'components/button/button.tpl' url="{router page='blog'}add/" mods='primary large' text=$aLang.blog.create_blog}
{else}
<p>{lang name='blog.cant_add' rating=Config::Get('acl.create.blog.rating')}</p>
{include 'components/button/button.tpl' sMods='primary large' sText=$aLang.blog.create_blog bIsDisabled=true}
{include 'components/button/button.tpl' mods='primary large' text=$aLang.blog.create_blog isDisabled=true}
{/if}
{/block}

View file

@ -33,8 +33,8 @@
{/foreach}
</select></p>
{include 'components/button/button.tpl' sText={lang 'blog.blocks.navigator.submit'} sClasses='js-blog-nav-submit' bIsDisabled=true}
{include 'components/button/button.tpl' text={lang 'blog.blocks.navigator.submit'} classes='js-blog-nav-submit' isDisabled=true}
{else}
{include 'components/alert/alert.tpl' mAlerts={lang 'blog.blocks.navigator.empty'} sMods='empty'}
{include 'components/alert/alert.tpl' text={lang 'blog.blocks.navigator.empty'} mods='empty'}
{/if}
{/block}

View file

@ -45,7 +45,7 @@
sMods = 'stacked pills'
aItems = $aItems}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog.categories.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.blog.categories.empty mods='empty'}
{/if}
<br>

View file

@ -15,5 +15,5 @@
{/block}
{block 'block_content_after'}
{include 'components/user_note/user_note.tpl' sClasses='js-user-note' oObject=$oUserProfile->getUserNote() iUserId=$oUserProfile->getId()}
{include 'components/note/note.tpl' sClasses='js-user-note' oObject=$oUserProfile->getUserNote() iUserId=$oUserProfile->getId()}
{/block}

View file

@ -9,10 +9,10 @@
<li class="actionbar-item">
{block 'actionbar_item'}
{include 'components/button/button.tpl'
sUrl = $item['url']
sClasses = "actionbar-item-link {$item['classes']}"
sText = $item['text']
sIcon = $item['icon']
sAttributes = $item['attributes']}
url = $item['url']
classes = "actionbar-item-link {$item['classes']}"
text = $item['text']
icon = $item['icon']
attributes = $item['attributes']}
{/block}
</li>

View file

@ -0,0 +1,3 @@
# Компонент activity
Активность

View file

@ -22,11 +22,11 @@
{$last = end($events)}
{include 'components/more/more.tpl'
iCount = $smarty.local.count
sClasses = "js-activity-more"
sAttributes = "data-proxy-last_id=\"{$last->getId()}\" data-param-target_id=\"{$smarty.local.targetId}\""}
count = $smarty.local.count
classes = "js-activity-more"
attributes = "data-proxy-last_id=\"{$last->getId()}\" data-param-target_id=\"{$smarty.local.targetId}\""}
{/if}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.common.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty'}
{/if}
</div>

View file

@ -0,0 +1,3 @@
# Компонент alert
Уведомления

View file

@ -1,58 +1,52 @@
{**
* Уведомления
*
* @param string $sTitle Заголовок
* @param mixed $mAlerts Массив либо строка с текстом уведомления
* @param string $sMods (success) Модификаторы (error, info и т.д.)
* @param string $sAttributes Дополнительные атрибуты основного блока
* @param string $sClasses Дополнительные классы
* @param bool $bVisible (true) Показывать или нет уведомление
* @param bool $bClose (true) Показывать или нет кнопку закрытия
*
* @styles <framework>/css/alerts.css
* @param string $title Заголовок
* @param mixed $text Массив либо строка с текстом уведомления
* @param string $mods (success) Модификаторы (error, info и т.д.)
* @param string $attributes Дополнительные атрибуты основного блока
* @param string $classes Дополнительные классы
* @param bool $visible (true) Показывать или нет уведомление
* @param bool $close (true) Показывать или нет кнопку закрытия
*}
{* Название компонента *}
{$_sComponentName = 'alert'}
{* Дефолтный модификатор *}
{$_sComponentDefaultMod = 'success'}
{$component = 'alert'}
{* Уведомление *}
<div class="{$_sComponentName} {mod name=$_sComponentName mods=$sMods default=$_sComponentDefaultMod} {$smarty.local.sClasses} js-{$_sComponentName}"
{if ! $smarty.local.bVisible|default:true}style="display: none"{/if}
{$smarty.local.sAttributes}
role="alert">
<div class="{$component} {mod name=$component mods=$mods default='success'} {$smarty.local.classes} js-{$component}"
{if ! $smarty.local.visible|default:true}style="display: none"{/if}
{$smarty.local.attributes}
role="alert">
{* Заголовок *}
{if $sTitle}
<h4 class="{$_sComponentName}-title">{$sTitle}</h4>
{/if}
{* Заголовок *}
{if $smarty.local.title}
<h4 class="{$component}-title">{$smarty.local.title}</h4>
{/if}
{* Кнопка закрытия *}
{if $bClose}
<div class="{$_sComponentName}-close" data-type="alert-close">×</div>
{/if}
{* Кнопка закрытия *}
{if $smarty.local.close}
<div class="{$component}-close" data-type="alert-close">×</div>
{/if}
{* Контент *}
<div class="{$_sComponentName}-body">
{block name='alert_body'}
{if is_array($smarty.local.mAlerts)}
<ul class="{$_sComponentName}-list">
{foreach $smarty.local.mAlerts as $aAlert}
<li class="{$_sComponentName}-list-item">
{if $aAlert.title}
<strong>{$aAlert.title}</strong>:
{/if}
{* Контент *}
<div class="{$component}-body">
{block 'alert_body'}
{if is_array( $smarty.local.text )}
<ul class="{$component}-list">
{foreach $smarty.local.text as $alert}
<li class="{$component}-list-item">
{if $alert.title}
<strong>{$alert.title}</strong>:
{/if}
{$aAlert.msg}
</li>
{/foreach}
</ul>
{else}
{$smarty.local.mAlerts}
{/if}
{/block}
</div>
{$alert.msg}
</li>
{/foreach}
</ul>
{else}
{$smarty.local.text}
{/if}
{/block}
</div>
</div>

View file

@ -0,0 +1,63 @@
/**
* Alerts
*
* @module ls/alerts
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.alert {
position: relative;
border: 1px solid #EED3D7;
background-color: #F2DEDE;
color: #B94A48;
padding: 10px 35px 10px 15px;
margin-bottom: 15px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.alert:last-child { margin-bottom: 0; }
.alert-title {
font-size: 14px;
font-weight: bold;
}
.alert-close {
position: absolute;
top: 11px;
right: 10px;
font-size: 23px;
cursor: pointer;
opacity: .6;
}
.alert-close:hover { opacity: 1; }
/* Error */
.alert.alert--error {
background-color: #F2DEDE;
color: #B94A48;
border-color: #EED3D7;
}
/* Success */
.alert.alert--success {
background-color: #DFF0D8;
color: #468847;
border-color: #D6E9C6;
}
/* Info */
.alert.alert--info {
background-color: #D9EDF7;
color: #3A87AD;
border-color: #BCE8F1;
}
/* Empty */
.alert.alert--empty {
background-color: #fafafa;
color: #777;
border-color: #eee;
}

View file

@ -0,0 +1,46 @@
/**
* Alert
*
* @module ls/alert
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
$.widget( "livestreet.lsAlert", {
/**
* Дефолтные опции
*/
options: {
// Селекторы
selectors: {
// Кнопка закрывающая уведомление
close: '[data-type=alert-close]'
},
// Анимация при скрытии
hide: {
effect: 'fade',
duration: 200
}
},
/**
* Конструктор
*
* @constructor
* @private
*/
_create: function() {
this.closeButton = this.element.find( this.option( 'selectors.close' ) );
this._on( this.closeButton, { 'click': this.hide } );
},
/**
* Скрывает уведомление
*/
hide: function () {
this.element.hide( this.option( 'hide' ) );
}
});

View file

@ -0,0 +1,3 @@
# Компонент alhpanumberic
Алфавитный указатель

View file

@ -8,5 +8,5 @@
aRules = [ 'required' => true, 'type' => 'alphanum' ]
sLabel = $aLang.auth.invite.form.fields.code.label}
{include 'components/button/button.tpl' sName='submit_invite' sMods='primary' sText=$aLang.auth.invite.form.fields.submit.text}
{include 'components/button/button.tpl' name='submit_invite' mods='primary' text=$aLang.auth.invite.form.fields.submit.text}
</form>

View file

@ -42,7 +42,7 @@
{include 'components/field/field.hidden.tpl' sName='return-path' sValue=$redirectUrl}
{/if}
{include 'components/button/button.tpl' sName='submit_login' sMods='primary' sText=$aLang.auth.login.form.fields.submit.text}
{include 'components/button/button.tpl' name='submit_login' mods='primary' text=$aLang.auth.login.form.fields.submit.text}
</form>
{if $smarty.local.showExtra}

View file

@ -6,5 +6,5 @@
{* E-mail *}
{include 'components/field/field.email.tpl' sLabel=$aLang.auth.reactivation.form.fields.mail.label}
{include 'components/button/button.tpl' sName='submit_reactivation' sMods='primary' sText=$aLang.auth.reactivation.form.fields.submit.text}
{include 'components/button/button.tpl' name='submit_reactivation' mods='primary' text=$aLang.auth.reactivation.form.fields.submit.text}
</form>

View file

@ -47,7 +47,7 @@
{include 'components/field/field.hidden.tpl' sName='return-path' sValue=$redirectUrl}
{/if}
{include 'components/button/button.tpl' sName='submit_register' sMods='primary' sText=$aLang.auth.registration.form.fields.submit.text}
{include 'components/button/button.tpl' name='submit_register' mods='primary' text=$aLang.auth.registration.form.fields.submit.text}
</form>
{hook run='registration_end'}

View file

@ -6,5 +6,5 @@
{* E-mail *}
{include 'components/field/field.email.tpl' sLabel=$aLang.auth.reset.form.fields.mail.label}
{include 'components/button/button.tpl' sName='submit_reset' sMods='primary' sText=$aLang.auth.reset.form.fields.submit.text}
{include 'components/button/button.tpl' name='submit_reset' mods='primary' text=$aLang.auth.reset.form.fields.submit.text}
</form>

View file

@ -0,0 +1,44 @@
/**
* Блок
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.block { background: #fff; margin-bottom: 30px; }
.block:last-child { margin-bottom: 0; }
.block .text { font-size: 13px; line-height: 18px; }
.block .max-height-200 { overflow: auto; max-height: 200px; position: relative; }
.block .search-form { padding: 0; margin-bottom: 20px; }
.block .block-content.loading { min-height: 100px; background-image: url(../images/loader.gif); background-position: 50% 45px; }
/* Шапка */
.block-header { padding: 18px 20px 0; position: relative; }
.block-header .block-title { margin-bottom: 0; font-size: 16px; line-height: 1em; font-weight: normal; }
/* Навигация */
.block-nav { padding: 20px; border-bottom: 1px solid #eee; }
.block-nav .nav,
.block-nav .dropdown { margin-bottom: 0; }
/* Контент */
.block-content { padding: 20px; }
/* Подвал */
.block-footer { border-top: 1px solid #eee; padding: 15px 20px; font-size: 12px; }
/* Кнопка обновления блока */
.block-update {
position: absolute;
top: 19px;
right: 15px;
width: 16px;
height: 16px;
background: url(../images/update.gif) no-repeat; cursor: pointer;
}
.block-update.active { background-position: -16px 0; }
/* Блок без отступов у контента */
.block--nopadding .block-content { padding: 0; }

View file

@ -91,5 +91,5 @@
{$sSubmitInputText = $aLang.common.save}
{/if}
{include 'components/button/button.tpl' sName='submit_blog_add' sText=$sSubmitInputText sMods='primary'}
{include 'components/button/button.tpl' name='submit_blog_add' text=$sSubmitInputText mods='primary'}
</form>

View file

@ -41,10 +41,10 @@
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
{include 'components/button/button.tpl' sName='submit_blog_admin' sText=$aLang.common.save sMods='primary'}
{include 'components/button/button.tpl' name='submit_blog_admin' text=$aLang.common.save mods='primary'}
</form>
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.blog.admin.alerts.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.blog.admin.alerts.empty mods='empty'}
{/if}

View file

@ -40,7 +40,7 @@
[ 'label' => "{$aLang.blog.topics_total}:", 'content' => $oBlog->getCountTopic() ]
]}
{include 'components/info_list/info_list.tpl' aInfoList=$info sInfoListClasses='object-list-item-info'}
{include 'components/info-list/info-list.tpl' aInfoList=$info sInfoListClasses='object-list-item-info'}
{* Действия *}
<div class="object-list-item-actions">
@ -55,14 +55,14 @@
{if $bUseMore}
{if ! $bHideMore}
{include 'components/more/more.tpl'
sClasses = 'js-more-search'
sTarget = '.js-more-blogs-container'
sAttributes = 'data-search-type="blogs" data-proxy-page-next="2"'}
classes = 'js-more-search'
target = '.js-more-blogs-container'
attributes = 'data-search-type="blogs" data-proxy-page-next="2"'}
{/if}
{else}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{/if}
{else}
{include 'components/alert/alert.tpl' mAlerts=(($sBlogsEmptyList) ? $sBlogsEmptyList : $aLang.blog.alerts.empty) sMods='empty'}
{include 'components/alert/alert.tpl' text=(($sBlogsEmptyList) ? $sBlogsEmptyList : $aLang.blog.alerts.empty) mods='empty'}
{/if}

View file

@ -30,11 +30,11 @@
{* Голосование *}
{block 'blog_vote'}
{include 'components/vote/vote.tpl'
sClasses = 'js-vote-blog'
sMods = 'large'
oObject = $blog
bIsLocked = $isBlogAdmin
bShowLabel = true}
classes = 'js-vote-blog'
mods = 'large'
target = $blog
isLocked = $isBlogAdmin
showLabel = true}
{/block}
{* Заголовок *}
@ -56,7 +56,7 @@
</div>
{* Информация *}
{include 'components/info_list/info_list.tpl' aInfoList=[
{include 'components/info-list/info-list.tpl' aInfoList=[
[ 'label' => $aLang.blog.date_created, 'content' => "{date_format date=$blog->getDateAdd() hours_back='12' minutes_back='60' now='60' day='day H:i' format='j F Y'}" ],
[ 'label' => $aLang.blog.topics_total, 'content' => $blog->getCountTopic() ],
[ 'label' => $aLang.blog.rating_limit, 'content' => $blog->getLimitRatingTopic() ]

View file

@ -8,9 +8,9 @@
*}
{if $oUserCurrent && $oUserCurrent->getId() != $oBlog->getOwnerId() && $oBlog->getType() == 'open'}
{include 'components/button/button.tpl'
sAttributes = "data-blog-id=\"{$oBlog->getId()}\""
sClasses = 'js-blog-join'
sText = ($oBlog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
sMods = ($oBlog->getUserIsJoin()) ? false : 'primary'}
{include 'components/button/button.tpl'
attributes = "data-blog-id=\"{$oBlog->getId()}\""
classes = 'js-blog-join'
text = ($oBlog->getUserIsJoin()) ? $aLang.blog.join.leave : $aLang.blog.join.join
mods = ($oBlog->getUserIsJoin()) ? false : 'primary'}
{/if}

View file

@ -11,7 +11,7 @@
(function($) {
"use strict";
$.widget( "livestreet.blog_invite_users", $.livestreet.user_list_add, {
$.widget( "livestreet.lsBlogInvites", $.livestreet.user_list_add, {
/**
* Дефолтные опции
*/

View file

@ -9,32 +9,32 @@
| Опция | Тип | По&nbsp;умолчанию | Описание |
| :------------ | :---------- | :----------------- | :------- |
| `sType` | string | 'submit' | Тип кнопки (submit, button) |
| `sText` | string | null | Текст кнопки |
| `sUrl` | string | null | Ссылка |
| `sId` | string | null | Атрибут id |
| `sName` | string | null | Атрибут name |
| `bIsDisabled` | boolean | false | Атрибут disabled |
| `sForm` | string | null | Селектор формы для сабмита |
| `sIcon` | string | null | Класс иконки |
| `sClasses` | string | null | Дополнительные классы (указываются через пробел) |
| `sMods` | string | null | Список классов-модификаторов (указываются через пробел) |
| `sAttributes` | string | null | Атрибуты (указываются через пробел) |
| `type` | string | 'submit' | Тип кнопки (submit, button) |
| `text` | string | null | Текст кнопки |
| `url` | string | null | Ссылка |
| `id` | string | null | Атрибут id |
| `name` | string | null | Атрибут name |
| `isDisabled` | boolean | false | Атрибут disabled |
| `form` | string | null | Селектор формы для сабмита |
| `icon` | string | null | Класс иконки |
| `classes` | string | null | Дополнительные классы (указываются через пробел) |
| `mods` | string | null | Список классов-модификаторов (указываются через пробел) |
| `attributes` | string | null | Атрибуты (указываются через пробел) |
## Использование
Кнопка с дефолтным оформлением:
```smarty
{include 'components/button/button.tpl' sText='Отправить'}
{include 'components/button/button.tpl' text='Отправить'}
```
Primary-кнопка:
```smarty
{include 'components/button/button.tpl' sMods='primary' sText='Отправить'}
{include 'components/button/button.tpl' mods='primary' text='Отправить'}
```
Кнопка-ссылка:
```smarty
{include 'components/button/button.tpl' sUrl='/topic/edit/1' sText='Редактировать'}
{include 'components/button/button.tpl' url='/topic/edit/1' text='Редактировать'}
```

View file

@ -1,43 +1,43 @@
{**
* Кнопка
*
* @param sType string ('submit') Тип кнопки (submit, button)
* @param sText string (null) Текст кнопки
* @param sUrl string (null) Ссылка
* @param sId string (null) Атрибут id
* @param sName string (null) Атрибут name
* @param bIsDisabled boolean (false) Атрибут disabled
* @param sForm string (null) Селектор формы для сабмита
* @param sIcon string (null) Класс иконки
* @param sClasses string (null) Дополнительные классы (указываются через пробел)
* @param sMods string (null) Список классов-модификаторов (указываются через пробел)
* @param sAttributes string (null) Атрибуты (указываются через пробел)
* @param type string (submit) Тип кнопки (submit, reset, button)
* @param text string (null) Текст кнопки
* @param url string (null) Ссылка
* @param id string (null) Атрибут id
* @param name string (null) Атрибут name
* @param isDisabled boolean (false) Атрибут disabled
* @param form string (null) Селектор формы для сабмита
* @param icon string (null) Класс иконки
* @param classes string (null) Дополнительные классы (указываются через пробел)
* @param mods string (null) Список классов-модификаторов (указываются через пробел)
* @param attributes string (null) Атрибуты (указываются через пробел)
*
* @styles <framework>/css/button.css
*}
{* Название компонента *}
{$_sComponentName = 'button'}
{$component = 'button'}
{* Если указана ссылка sUrl то заменяем тег <button> на <a> *}
<{($smarty.local.sUrl) ? 'a' : 'button'}
{if ! $smarty.local.sUrl}
type="{($smarty.local.sType) ? $smarty.local.sType : 'submit'}"
value="{if $smarty.local.sValue}{$smarty.local.sValue}{elseif isset($_aRequest[$smarty.local.sName])}{$_aRequest[$smarty.local.sName]}{/if}"
{if $smarty.local.bIsDisabled}disabled{/if}
{if $smarty.local.sForm}data-button-submit-form="{$smarty.local.sForm}"{/if}
{else}
href="{$smarty.local.sUrl}"
{/if}
{if $smarty.local.sId}id="{$smarty.local.sId}"{/if}
{if $smarty.local.sName}name="{$smarty.local.sName}"{/if}
class="{$_sComponentName} {mod name=$_sComponentName mods=$smarty.local.sMods} {$smarty.local.sClasses}"
{$smarty.local.sAttributes}>
{* Иконка *}
{if $smarty.local.sIcon}
<i class="{$smarty.local.sIcon}"></i>
{/if}
{* Если указана ссылка url то заменяем тег <button> на <a> *}
<{( $smarty.local.url ) ? 'a' : 'button'}
{if ! $smarty.local.url}
type="{( $smarty.local.type ) ? $smarty.local.type : 'submit'}"
value="{if $smarty.local.value}{$smarty.local.value}{elseif isset( $_aRequest[ $smarty.local.name ] )}{$_aRequest[ $smarty.local.name ]}{/if}"
{if $smarty.local.isDisabled}disabled{/if}
{if $smarty.local.form}form="{$smarty.local.form}"{/if}
{else}
href="{$smarty.local.url}"
{/if}
{if $smarty.local.id}id="{$smarty.local.id}"{/if}
{if $smarty.local.name}name="{$smarty.local.name}"{/if}
class="{$component} {mod name=$component mods=$smarty.local.mods} {$smarty.local.classes}"
{$smarty.local.attributes}>
{* Иконка *}
{if $smarty.local.icon}
<i class="{$smarty.local.icon}"></i>
{/if}
{* Текст *}
{$smarty.local.sText}
</{($smarty.local.sUrl) ? 'a' : 'button'}>
{* Текст *}
{$smarty.local.text}
</{($smarty.local.url) ? 'a' : 'button'}>

View file

@ -0,0 +1,123 @@
/**
* Buttons
*
* @module ls/button
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.button {
display: inline-block;
padding: 7px 13px;
margin: 0;
border: 1px solid #ddd;
text-align: center;
vertical-align: middle;
text-decoration: none;
font-size: 13px;
line-height: normal;
color: #444;
background: transparent;
font-family: Arial, sans-serif;
cursor: pointer;
position: relative;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: background .2s, color .2s;
-moz-transition: background .2s, color .2s;
transition: background .2s, color .2s;
}
.button:hover { text-decoration: none; background: #fafafa; color: #333; }
.button:active {
position: relative;
top: 1px;
}
.button:focus { outline: none; }
.button.active {
background: #eaeaea;
}
/* Icon */
.button [class^="icon-"],
.button [class*=" icon-"] {
float: left;
position: relative;
margin-right: 5px;
}
/*
* Button Disabled
*/
.button.disabled,
.button.disabled:hover,
.button[disabled],
.button[disabled]:hover {
border-color: #ccc;
background: #eee;
color: #999;
}
.button.disabled:active,
.button[disabled]:active {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/**
* Button Primary
*/
.button--primary { border-color: #74A2FF; color: #777DFF; }
.button--primary:hover { background: #91B6FF; color: #fff; }
.button--primary.active { background: #006DCC; }
/**
* Button Icon
*/
.button.button--icon { padding-left: 6px; padding-right: 6px; }
.button.button--icon [class^="icon-"],
.button.button--icon [class*=" icon-"] { margin: 0; }
/**
* Button Small
*/
.button--small { height: 24px; font-size: 11px; padding-left: 8px; padding-right: 8px; }
a.button--small { padding-top: 4px; }
.button.button--small.button-icon { padding-left: 5px; padding-right: 5px; }
/**
* Button Large
*/
.button--large { height: 34px; font-size: 14px; }
a.button--large { padding-top: 8px; }
.button.button--large.button-icon { padding-left: 9px; padding-right: 9px; }
/**
* Loading
*/
.button[disabled].loading,
.button.loading {
color: transparent;
background-image: url(../images/loader.gif);
background-repeat: no-repeat;
background-position: 50% 50%;
}
/**
* Dropdown support
*/
.button.dropdown-toggle { padding-right: 25px; }

View file

@ -0,0 +1,17 @@
/**
* Polyfills
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
/**
* Атрибут form
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-form
*/
if ( ! document.createElement( 'button' ).hasOwnProperty( 'form' ) ) {
$( document ).on( 'click', 'button[form]', function () {
$( $( this ).attr( 'form' ) ).submit();
});
}

View file

@ -0,0 +1 @@
# Компонент comment

View file

@ -51,13 +51,13 @@
*}
{* Кнопка добавления *}
{include 'components/button/button.tpl' sName='submit_comment' sText=$aLang.common.add sMods='primary' sClasses='js-comment-form-submit'}
{include 'components/button/button.tpl' name='submit_comment' text=$aLang.common.add mods='primary' classes='js-comment-form-submit'}
{* Кнопки редактирования *}
{include 'components/button/button.tpl' sName='submit_comment' sType='button' sText=$aLang.common.save sMods='primary' sClasses='js-comment-form-update-submit hide'}
{include 'components/button/button.tpl' sName='submit_comment' sType='button' sText=$aLang.common.cancel sClasses='js-comment-form-update-cancel fl-r hide'}
{include 'components/button/button.tpl' name='submit_comment' type='button' text=$aLang.common.save mods='primary' classes='js-comment-form-update-submit hide'}
{include 'components/button/button.tpl' name='submit_comment' type='button' text=$aLang.common.cancel classes='js-comment-form-update-cancel fl-r hide'}
{* Кнопка превью текста *}
{include 'components/button/button.tpl' sText=$aLang.common.preview_text sType='button' sClasses='js-comment-form-preview'}
{include 'components/button/button.tpl' text=$aLang.common.preview_text type='button' classes='js-comment-form-preview'}
{/block}
</form>

View file

@ -58,5 +58,5 @@
{section closewrappers2 loop=$iCurrentLevel + 1}</div>{/section}
{/if}
{foreachelse}
{include 'components/alert/alert.tpl' sMods='empty' sClasses='js-comments-empty' mAlerts=$aLang.common.empty}
{include 'components/alert/alert.tpl' mods='empty' classes='js-comments-empty' text=$aLang.common.empty}
{/foreach}

View file

@ -113,16 +113,16 @@
<li>
{* Блокируем голосование для гостей или если залогиненый пользователь является автором комментария*}
{include 'components/vote/vote.tpl'
sClasses = "{$sComponent}-vote js-vote-{$sComponent}"
oObject = $oComment
bIsLocked = ($oUserCurrent && $oUserCurrent->getId() == $oUser->getId()) || strtotime($oComment->getDate()) < $smarty.now - Config::Get('acl.vote.comment.limit_time')}
classes = "{$sComponent}-vote js-vote-{$sComponent}"
target = $oComment
isLocked = ($oUserCurrent && $oUserCurrent->getId() == $oUser->getId()) || strtotime($oComment->getDate()) < $smarty.now - Config::Get('acl.vote.comment.limit_time')}
</li>
{/if}
{* Избранное *}
{if $oUserCurrent && $smarty.local.bShowFavourite}
<li>
{include 'components/favourite/favourite.tpl' sClasses='comment-favourite js-favourite-comment' oObject=$oComment}
{include 'components/favourite/favourite.tpl' classes='comment-favourite js-favourite-comment' target=$oComment}
</li>
{/if}
</ul>

View file

@ -90,7 +90,7 @@
{* Проверяем запрещено комментирование или нет *}
{if $bForbidAdd}
{include 'components/alert/alert.tpl' sMods='info' mAlerts=$sNoticeNotAllow}
{include 'components/alert/alert.tpl' mods='info' text=$sNoticeNotAllow}
{* Если разрешено то показываем форму добавления комментария *}
{else}
@ -100,7 +100,7 @@
<a href="#" class="link-dotted">{$sNoticeCommentAdd|default:$aLang.comments.form.title}</a>
</h4>
{else}
{include 'components/alert/alert.tpl' sMods='info' mAlerts=$aLang.comments.alerts.unregistered}
{include 'components/alert/alert.tpl' mods='info' text=$aLang.comments.alerts.unregistered}
{/if}
{/if}

View file

@ -174,6 +174,24 @@
this.elements.form.text.bind( 'keydown' + this.eventNamespace, 'ctrl+return', function() { _this.form.submit() } );
// Голосование за комментарий
this.element.find('.js-vote-comment').livequery(function () {
$(this).vote({
urls: {
vote: aRouter['ajax'] + 'vote/comment/'
}
});
});
// Комментарий
this.element.find('.js-favourite-comment').livequery(function () {
$(this).lsFavourite({
urls: {
toggle: aRouter['ajax'] + 'favourite/comment/'
}
});
});
// Удаление
this.element.on('click' + this.eventNamespace, this.options.selectors.comment.remove, function(e) {
var element = $(this),

View file

@ -14,10 +14,10 @@
{* Кнопка *}
{include 'components/button/button.tpl'
sType = 'button'
sClasses = "{$component}-toggle {$smarty.local.classes}"
sAttributes = "data-{$component}-target=\"{$uid}\" {$smarty.local.attributes}"
sText = $smarty.local.text}
type = 'button'
classes = "{$component}-toggle {$smarty.local.classes}"
attributes = "data-{$component}-target=\"{$uid}\" {$smarty.local.attributes}"
text = $smarty.local.text}
{* Меню *}
{include './dropdown.menu.tpl'

View file

@ -0,0 +1 @@
# Компонент email

View file

@ -10,7 +10,7 @@
аблон с изображением_ **image.tpl**
```smarty
...
{include 'components/favourite/favourite.tpl' sClasses='js-plugin-gallery-image-favourite'}
{include 'components/favourite/favourite.tpl' classes='js-plugin-gallery-image-favourite' target=$image}
...
```

View file

@ -9,19 +9,31 @@
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.favourite { cursor: pointer; display: inline-block; }
.favourite:hover { opacity: .8; filter: alpha(opacity=80); }
.favourite {
cursor: pointer;
display: inline-block;
}
.favourite:hover {
opacity: .8;
filter: alpha(opacity=80);
}
.favourite-toggle {
display: inline-block;
width: 14px;
height: 14px;
vertical-align: text-top;
background: url(../../images/icons.png) -96px 0 no-repeat;
opacity: .3;
filter: alpha(opacity=30);
}
.favourite--added .favourite-toggle { opacity: 1; filter: alpha(opacity=100); }
.favourite-count { display: none; margin-left: 0; font-weight: bold; }
.favourite--has-counter .favourite-count { display: inline-block; }
.favourite--added .favourite-toggle {
opacity: 1;
filter: alpha(opacity=100);
}
.favourite-count {
display: none;
margin-left: 0;
font-weight: bold;
}
.favourite--has-counter .favourite-count {
display: inline-block;
}

View file

@ -1,12 +1,12 @@
{**
* Добавление в избранное
*
* @param object $oObject Объект сущности
* @param string $sType Название сущности (blog, topic и т.д.)
* @param string $sClasses
* @param string $sAttributes
* @param string $oUserCurrent Текущий залогиненый пользователь
* @param boolean $bHideZeroCounter (true)
* @param object $target Объект сущности
* @param string $type Название сущности (blog, topic и т.д.)
* @param string $classes
* @param string $attributes
* @param string $isActive
* @param boolean $hideZeroCounter (true)
*
* @styles assets/css/common.css
* @scripts <common>/js/favourite.js
@ -15,42 +15,39 @@
*}
{* Название компонента *}
{$_sComponentName = 'favourite'}
{$component = 'favourite'}
{* Переменные *}
{$sMods = $smarty.local.sMods}
{$mods = $smarty.local.mods}
{* True если объект находится в избранном *}
{$_bIsActive = $oUserCurrent && $oObject->getIsFavourite()}
{$isActive = $target && $target->getIsFavourite()}
{* Кол-во объектов в избранном *}
{$_iCount = $oObject->getCountFavourite()}
{$count = $target->getCountFavourite()}
{**
* Добавляем модификаторы
*}
{if $_iCount}
{$sMods = "$sMods has-counter"}
{* Добавляем модификаторы *}
{if $count}
{$mods = "$mods has-counter"}
{/if}
{if $_bIsActive}
{$sMods = "$sMods added"}
{if $isActive}
{$mods = "$mods added"}
{/if}
<div class="{$_sComponentName} {mod name=$_sComponentName mods=$sMods} {if $_bIsActive}active{/if} {$smarty.local.sClasses}"
data-param-i-target-id="{$oObject->getId()}"
title="{$aLang.$_sComponentName[ ($_bIsActive) ? 'remove' : 'add' ]}"
{$smarty.local.sAttributes}>
<div class="{$component} {mod name=$component mods=$mods} {if $isActive}active{/if} {$smarty.local.classes}"
data-param-i-target-id="{$target->getId()}"
title="{$aLang.$component[ ($isActive) ? 'remove' : 'add' ]}"
{$smarty.local.attributes}>
{* Кнопка добавления/удаления из избранного *}
<div class="{$_sComponentName}-toggle js-{$_sComponentName}-toggle"></div>
<div class="icon-heart {$component}-toggle js-{$component}-toggle"></div>
{* Кол-во объектов в избранном *}
{if isset($_iCount)}
<span class="{$_sComponentName}-count js-{$_sComponentName}-count" {if ! $_iCount && $smarty.local.bHideZeroCounter|default:true}style="display: none;"{/if}>
{$_iCount}
{if isset( $count )}
<span class="{$component}-count js-{$component}-count" {if ! $count && $smarty.local.hideZeroCounter|default:true}style="display: none;"{/if}>
{$count}
</span>
{/if}
</div>

View file

@ -0,0 +1,3 @@
# Компонент feed
Лента

View file

@ -22,7 +22,7 @@
sLabel = "<a href=\"{$blog->getUrlFull()}\">{$blog->getTitle()|escape}</a>"}
{/foreach}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.feed.blogs.empty sMods='info'}
{include 'components/alert/alert.tpl' text=$aLang.feed.blogs.empty mods='info'}
{/if}
</div>
{/if}

View file

@ -22,11 +22,11 @@
{$last = end($topics)}
{include 'components/more/more.tpl'
iCount = $smarty.local._count
sClasses = "js-{$component}-more"
sAttributes = "data-proxy-last_id=\"{$last->getId()}\""}
count = $smarty.local._count
classes = "js-{$component}-more"
attributes = "data-proxy-last_id=\"{$last->getId()}\""}
{/if}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.common.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty'}
{/if}
</div>

View file

@ -0,0 +1,3 @@
# Компонент info-list
Список параметров

View file

@ -16,7 +16,7 @@
{block 'media_pane_footer' prepend}
{include 'components/button/button.tpl'
sMods = 'primary'
sClasses = 'js-media-insert-submit'
sText = {lang name='media.insert.submit'}}
mods = 'primary'
classes = 'js-media-insert-submit'
text = {lang name='media.insert.submit'}}
{/block}

View file

@ -6,7 +6,7 @@
{block 'media_pane_footer' prepend}
{include 'components/button/button.tpl'
sMods = 'primary'
sClasses = 'js-media-photoset-submit'
sText = {lang name='media.photoset.submit'}}
mods = 'primary'
classes = 'js-media-photoset-submit'
text = {lang name='media.photoset.submit'}}
{/block}

View file

@ -31,12 +31,12 @@
{block 'media_pane_footer' prepend}
{include 'components/button/button.tpl'
sMods = 'primary'
sClasses = 'js-media-url-submit-insert'
sText = {lang 'media.url.submit_insert'}}
mods = 'primary'
classes = 'js-media-url-submit-insert'
text = {lang 'media.url.submit_insert'}}
{include 'components/button/button.tpl'
sMods = 'primary'
sClasses = 'js-media-url-submit-upload'
sText = {lang 'media.url.submit_upload'}}
mods = 'primary'
classes = 'js-media-url-submit-upload'
text = {lang 'media.url.submit_upload'}}
{/block}

View file

@ -0,0 +1,127 @@
/**
* Modals
*
* @module modal
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
/* Base class */
.modal {
display: none;
margin: 50px auto;
position: relative;
min-width: 300px;
max-width: 500px;
color: #333;
border: 1px solid #666;
background-color: #fff;
z-index: 1000;
-webkit-box-shadow: 0 0 15px rgba(0,0,0,.5);
-moz-box-shadow: 0 0 15px rgba(0,0,0,.5);
box-shadow: 0 0 15px rgba(0,0,0,.5);
}
/* Close button */
.modal .modal-close:before,
.modal .close:before { display: block; content: "×"; }
.modal .modal-close,
.modal .close {
position: absolute;
top: 50%;
right: 15px;
margin-top: -13px;
font-size: 26px;
line-height: 1em;
color: #000;
opacity: .3;
filter: alpha(opacity=30);
}
.modal .modal-close:hover,
.modal .close:hover { opacity: .7; filter: alpha(opacity=70); }
/* Header */
.modal-header {
background: #fafafa;
border-bottom: 1px solid #eee;
padding: 15px 20px 13px;
position: relative;
min-height: 10px;
}
.modal-title { font-size: 17px; margin: 0 30px 0 0; color: #000; }
/* Nav */
.modal > .nav { padding: 20px 20px 0; }
/* Content */
.modal .modal-content { padding: 20px; }
/* Lock */
.modal .modal-lock {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: #000;
opacity: .2;
filter: alpha(opacity=20);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
/* Footer */
.modal .modal-footer { background: #fafafa; border-top: 1px solid #eee; padding: 15px 20px; text-align: right; }
/* Loader */
.modal-loader {
display: none;
width: 100px;
height: 50px;
margin: -25px 0 0 -50px;
position: fixed;
top: 50%;
left: 50%;
border-radius: 5px;
background-color: #000;
background: rgba(0,0,0,.8) url(../images/loader.gif) 50% 50% no-repeat;
z-index: 1001;
}
.modal-loader.modal-loader-text {
background-image: none;
color: #eee;
text-align: center;
font-size: 13px;
line-height: 1.2em;
padding: 15px;
width: 300px;
margin-left: -150px;
height: auto;
}
/* Overlay */
.modal-overlay {
display: none;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9JREFUeNpiYmBgaAAIMAAAjwCD5Hc2/AAAAABJRU5ErkJggg==);;
background: rgba(0,0,0,.5);
z-index: 999;
overflow: auto;
padding: 30px;
}

View file

@ -0,0 +1,369 @@
/**
* Modal
*
* @module modal
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
var ls = ls || {};
(function($) {
"use strict";
var scrollbarWidth, html, body, _window = $(window);
// Overlay
// ----------
var _overlay = (function ($) {
this.element = $('<div class="modal-overlay js-modal-overlay" />');
/**
* Init
*/
this.init = function () {
html = $('html');
body = $('body');
scrollbarWidth = this.getScrollbarWidth();
body.append( this.element );
this.resize();
};
/**
* Show
*/
this.show = function () {
// Скрываем скролл
html.css('overflow', 'hidden');
// Добавляем отступ чтобы контент не смещался после убирания скроллбара
if ( body.outerHeight() > _window.height() ) body.css('margin-right', scrollbarWidth);
this.element.css({
overflow: 'auto'
});
this.element.show({
effect: 'fade',
duration: 300
});
};
/**
* Hide
*/
this.hide = function () {
this.element.hide({
effect: 'fade',
duration: 300,
complete: function () {
html.css('overflow', 'auto');
body.css('margin-right', 0);
}
});
};
/**
* Resize
*/
this.resize = function () {
this.element.height( _window.height() );
// Центрирование мод. окна при ресайзе
// Необходимо из за того что в FF и IE анимация воспроизводится
// криво при margin: 0 auto
var modal = this.getActiveModal();
if ( ! modal.length ) return;
modal.css('margin-left', ( _overlay.element.width() - modal.outerWidth() ) / 2);
};
/**
* Is overlay visible or not
*/
this.isVisible = function () {
return this.element.is(':visible');
};
/**
* Return active modal window
*/
this.getActiveModal = function () {
return _overlay.element.find('[data-type=modal]:visible').eq(0);
};
/**
* Получает ширину скроллбара в браузере
*/
this.getScrollbarWidth = function () {
var holder = $('<div>').css({ 'width': 100, 'height': 100, 'overflow': 'auto', 'position': 'absolute', 'bottom': 0, 'left': 0 });
var width = 100 - $('<div>').css('height', 200).appendTo( holder.appendTo('body') ).width();
holder.remove();
return width;
};
return this;
}).call(_overlay || {}, jQuery);
// Loader
// ----------
var _loader = (function ($) {
this.element = $('<div class="modal-loader js-modal-loader" />');
/**
* Init
*/
this.init = function () {
_overlay.element.append( this.element );
};
/**
* Show
*/
this.show = function () {
this.element.show();
};
/**
* Hide
*/
this.hide = function () {
this.element.hide();
};
return this;
}).call(_loader || {}, jQuery);
// Plugin
// ----------
$.widget( "livestreet.modal", {
/**
* Дефолтные опции
*/
options: {
// Анимация при показе
show: {
effect: 'slide',
duration: 300,
direction: 'up'
},
// Анимация при скрытии
hide: {
effect: 'drop',
duration: 200,
direction: 'up'
},
// Центрирование окна по вертикали
center: true,
// Ajax
url: null,
params: null,
// Callbacks
create: null,
aftershow: null,
afterhide: null
},
/**
* Конструктор
*
* @constructor
* @private
*/
_create: function() {
this.options = $.extend({}, this.options, ls.utils.getDataOptions(this.element, 'modal'));
this._toggle = $( '[data-modal-target=' + this.element.attr('id') + ']' );
this.closeButton = this.element.find('[data-type=modal-close]');
// Переносим все модальные в оверлей
if ( this.options.url ) {
_overlay.element.append(this.element);
} else {
this.document.on('ready' + this.eventNamespace, function (e) {
_overlay.element.append(this.element);
}.bind(this));
}
// События
// ----------
// Триггер при клике по которому появляется модальное окно
this._on( this._toggle, {
click: function (e) {
this.toggle();
e.preventDefault();
}
});
// Кнопки закрытия модального окна
this._on( this.closeButton, { click: this.hide });
this._trigger("create", null, this);
},
/**
* Показавает модальное окно
*/
show: function () {
var isOverlayVisible = _overlay.isVisible();
_overlay.getActiveModal().modal('hide', false);
if ( ! isOverlayVisible ) _overlay.element.css({ 'display' : 'block', 'visibility' : 'hidden' });
this.element.css({ 'display' : 'block', 'visibility' : 'hidden' });
this.element.css({
// Центрируем по вертикали только если высота
// модального меньше высоты окна
'margin-top': this.options.center && this.element.outerHeight() < _overlay.element.height() ? ( _overlay.element.height() - this.element.outerHeight() ) / 2 : 50,
// В FF и IE исправляет баг с анимацией
'margin-left': ( _overlay.element.width() - this.element.outerWidth() ) / 2
});
if ( ! isOverlayVisible ) _overlay.element.css({ 'display' : 'none', 'visibility' : 'visible' });
this.element.css({ 'display' : 'none', 'visibility' : 'visible' });
// Показываем модальное
if ( ! isOverlayVisible ) _overlay.show();
this._show(this.element, this.options.show, function () {
if (this.options.aftershow) {
if (typeof( this.options.aftershow ) == 'string') {
$.proxy(eval(this.options.aftershow), this);
}
}
this._trigger("aftershow", null, this);
}.bind(this));
},
/**
* Скрывает модальное окно
*/
hide: function ( hideOverlay ) {
hideOverlay = typeof hideOverlay === 'undefined' ? true : hideOverlay;
_overlay.element.css('overflow', 'hidden');
// Если есть другие открытые окна, то оверлей не скрываем
if ( hideOverlay && ! _overlay.getActiveModal().not(this.element).length ) _overlay.hide();
this._hide(this.element, this.options.hide, function () {
if ( this.options.url ) this.element.remove();
this._trigger("afterhide", null, this);
}.bind(this));
},
/**
* Показавает/скрывает модальное окно
*/
toggle: function () {
this[ this.element.is(':visible') ? 'hide' : 'show' ]();
}
});
// Ajax
// ----------
ls.modal = (function ($) {
/**
* Load modal from url
*
* @param {String} url URL
* @param {Object} params Params
* @param {Object} options Options
*/
this.load = function (url, params, options) {
if ( ! _overlay.isVisible() ) _overlay.show();
_overlay.getActiveModal().modal('hide', false);
_loader.show();
options.url = url;
options.params = params || {};
ls.ajax.load(url, params, function (result) {
if (result.bStateError) {
_loader.hide();
_overlay.hide();
ls.msg.error('Error', result.sMsg);
} else {
_loader.hide();
$( $.trim( result['sText'] ) ).modal( options ).modal('show');
}
}, {
error: function () {
_loader.hide();
_overlay.hide();
ls.msg.error('Error');
}
});
};
/**
* Перезагрузка активного аякс окна
*/
this.reload = function () {
var modal = _overlay.getActiveModal();
if ( ! modal.length ) return;
var options = modal.data('livestreet-modal').options;
modal.remove();
ls.modal.load( options.url, options.params, options );
};
return this;
}).call(ls.modal || {}, jQuery);
// События
// ----------
// Клик по оверлею
_overlay.element.on('click', function (e) {
if ( e.target == this ) {
_overlay.getActiveModal().modal('hide');
_loader.hide();
}
});
// Закрытие модального по нажатию на Esc
$(document).on('keyup.modal', function (e) {
var modal = _overlay.getActiveModal();
if ( e.keyCode === 27 && modal.length ) modal.modal('hide');
});
// Инизиализация
$(document).on('ready', function (e) {
_overlay.init();
_loader.init();
// Ajax
$(document).on('click', '[data-type=modal-toggle][data-modal-url]', function (e) {
var options = ls.utils.getDataOptions($(this), 'modal');
var params = ls.utils.getDataOptions($(this), 'param') || {};
ls.modal.load(options.url, params, options);
e.preventDefault();
});
});
_window.on('resize', function () {
_overlay.resize();
});
})(jQuery);

View file

@ -11,14 +11,20 @@
.more {
display: block;
text-align: center;
overflow: hidden;
padding: 12px 0;
margin-top: 30px;
background: #fafafa;
text-align: center;
background-color: #fafafa;
color: #aaa;
border-top: 1px solid #eee;
text-decoration: none;
cursor: pointer;
}
.more:hover { background: #f7f7f7; color: #555; }
.more.loading { background: #f7f7f7 url(../../images/loader.gif) 50% 50% no-repeat; text-indent: -9999px; }
.more:hover {
background-color: #f7f7f7;
color: #555;
}
.more.loading {
text-indent: -200%;
}

View file

@ -1,30 +1,25 @@
{**
* Подгрузка контента
*
* @param string $sText
* @param string $sTarget
* @param integer $iCount
* @param integer $iTargetId
* @param integer $iLastId
* @param boolean $bAppend
*
* @styles assets/css/components/more.css
* @scripts <common>/js/more.js
* @param string $text
* @param string $target
* @param integer $count
* @param boolean $append
*}
{* Название компонента *}
{$_sComponentName = 'more'}
{$component = 'more'}
<div class="{$_sComponentName} {mod name=$_sComponentName mods=$smarty.local.sMods} {$smarty.local.sClasses}"
data-more-append="{$smarty.local.bAppend|default:true}"
{if $smarty.local.sTarget}data-more-target="{$smarty.local.sTarget}"{/if}
{$smarty.local.sAttributes}>
<div class="{$component} {mod name=$component mods=$smarty.local.mods} {$smarty.local.classes}"
data-more-append="{$smarty.local.append|default:true}"
{if $smarty.local.target}data-more-target="{$smarty.local.target}"{/if}
{$smarty.local.attributes}>
{* Текст *}
{$smarty.local.sText|default:'Подгрузить еще'}
{$smarty.local.text|default:{lang 'more.text'}}
{* Счетчик *}
{if $smarty.local.iCount}
(<span class="js-more-count">{$smarty.local.iCount}</span>)
{if $smarty.local.count}
(<span class="js-more-count">{$smarty.local.count}</span>)
{/if}
</div>

View file

@ -11,7 +11,7 @@
(function($) {
"use strict";
$.widget( "livestreet.usernote", {
$.widget( "livestreet.lsNote", {
/**
* Дефолтные опции
*/

View file

@ -43,8 +43,8 @@
<form class="{$_sComponentName}-form js-{$_sComponentName}-form" style="display: none;">
{include 'components/field/field.textarea.tpl' sInputClasses="$_sComponentName-form-text js-$_sComponentName-form-text"}
{include 'components/button/button.tpl' sMods='primary' sClasses="js-$_sComponentName-form-save" sText=$aLang.common.save}
{include 'components/button/button.tpl' sType='button' sClasses="js-$_sComponentName-form-cancel" sText=$aLang.common.cancel}
{include 'components/button/button.tpl' mods='primary' classes="js-$_sComponentName-form-save" text=$aLang.common.save}
{include 'components/button/button.tpl' type='button' classes="js-$_sComponentName-form-cancel" text=$aLang.common.cancel}
</form>
{/if}
</div>

View file

@ -72,10 +72,10 @@
{if ! $oPoll or $oPoll->isAllowUpdate()}
<footer class="fieldset-footer">
{include 'components/button/button.tpl'
sType = 'button'
sText = $aLang.common.add
sAttributes = 'title="[Ctrl + Enter]"'
sClasses = 'js-poll-form-answer-add'}
type = 'button'
text = $aLang.common.add
attributes = 'title="[Ctrl + Enter]"'
classes = 'js-poll-form-answer-add'}
</footer>
{/if}
</div>

View file

@ -15,7 +15,7 @@
<div class="fieldset-body">
{* Кнопка добавить *}
{include 'components/button/button.tpl' sText=$aLang.common.add sType='button' sClasses='poll-manage-add js-poll-manage-add'}
{include 'components/button/button.tpl' text=$aLang.common.add type='button' classes='poll-manage-add js-poll-manage-add'}
{* Список добавленных опросов *}
{insert name="block" block="pollFormItems" params=[

View file

@ -34,7 +34,7 @@
</ul>
{* Кнопка сортировки *}
{include 'components/button/button.tpl' sMods='icon' sClasses='js-poll-result-sort' sIcon='icon-align-left' sAttributes="title=\"{$aLang.poll.result.sort}\""}
{include 'components/button/button.tpl' mods='icon' classes='js-poll-result-sort' icon='icon-align-left' attributes="title=\"{$aLang.poll.result.sort}\""}
{* Статистика голосования *}
<span class="poll-result-total">

View file

@ -27,12 +27,12 @@
{if $oUserCurrent}
{* Проголосовать *}
{include 'components/button/button.tpl' sText=$aLang.poll.vote sType='button' sMods='primary' sClasses='js-poll-vote'}
{include 'components/button/button.tpl' text=$aLang.poll.vote type='button' mods='primary' classes='js-poll-vote'}
{* Воздержаться *}
{include 'components/button/button.tpl' sText=$aLang.poll.abstain sType='button' sClasses='js-poll-abstain'}
{include 'components/button/button.tpl' text=$aLang.poll.abstain type='button' classes='js-poll-abstain'}
{else}
{* Предупрежение: голосовать могут только авторизованные пользователи *}
{include 'components/alert/alert.tpl' sMods='info' mAlerts=$aLang.poll.only_auth}
{include 'components/alert/alert.tpl' mods='info' text=$aLang.poll.only_auth}
{/if}
</form>

View file

@ -1,7 +1,7 @@
{**
* Форма поиска
*
* @styles components/search_form/search_form.css
* @styles components/search-form/search-form.css
*
* TODO: Fix submit icon position
*}
@ -20,7 +20,7 @@
sName = $smarty.local.sInputName|default:'q'}
{if ! $bNoSubmitButton}
{include 'components/button/button.tpl' sMods='icon' sClasses="{$_sComponentName}-submit" sIcon='icon-search'}
{include 'components/button/button.tpl' mods='icon' classes="{$_sComponentName}-submit" icon='icon-search'}
{/if}
{/block}
</form>

View file

@ -20,14 +20,14 @@
{test_heading sText='Default'}
{include 'components/search_form/search_form.tpl'
{include 'components/search-form/search-form.tpl'
sName = 'text'
sNote = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Velit, libero.'}
{test_heading sText='Light'}
{include 'components/search_form/search_form.tpl'
{include 'components/search-form/search-form.tpl'
sName = 'text'
sMods = 'light'
sNote = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Velit, libero.'}

View file

@ -4,7 +4,7 @@
* @styles css/forms.css
*}
{include 'components/search_form/search_form.tpl'
{include 'components/search-form/search-form.tpl'
sName = 'tags'
sMods = $smarty.local.sMods
sPlaceholder = {lang 'tags.search.label'}

View file

@ -24,5 +24,5 @@
{/foreach}
</ul>
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.block_tags_empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.block_tags_empty mods='empty'}
{/if}

View file

@ -38,8 +38,12 @@
{hook run='form_add_talk_end'}
{* Кнопки *}
{include 'components/button/button.tpl' sName='submit_talk_add' sMods='primary' sText=$aLang.common.send}
{include 'components/button/button.tpl' sName='submit_preview' sType='button' sText=$aLang.common.preview_text sAttributes='onclick="jQuery(\'#text_preview\').show(); ls.utils.textPreview($(\'#talk_text\'), $(\'#text_preview\'), false); return false;"'}
{include 'components/button/button.tpl' name='submit_talk_add' mods='primary' text=$aLang.common.send}
{include 'components/button/button.tpl'
name ='submit_preview'
type ='button'
text =$aLang.common.preview_text
attributes ='onclick="jQuery(\'#text_preview\').show(); ls.utils.textPreview($(\'#talk_text\'), $(\'#text_preview\'), false); return false;"'}
</form>
{hook run='talk_add_end'}

View file

@ -52,7 +52,7 @@
{* Избранное *}
<td class="cell-favourite">
{include 'components/favourite/favourite.tpl' sClasses='js-favourite-talk' oObject=$talk}
{include 'components/favourite/favourite.tpl' classes='js-favourite-talk' target=$talk}
</td>
{* Основная информация о диалоге *}
@ -120,7 +120,7 @@
</table>
</form>
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.talk.notices.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.talk.notices.empty mods='empty'}
{/if}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}

View file

@ -17,6 +17,6 @@
{block 'article_footer_info_items' append}
{* Избранное *}
<li class="{$component}-info-item {$component}-info-item--favourite">
{include 'components/favourite/favourite.tpl' sClasses="js-favourite-{$type}" oObject=$article}
{include 'components/favourite/favourite.tpl' classes="js-favourite-{$type}" target=$article}
</li>
{/block}

View file

@ -49,11 +49,11 @@
{* Кнопки *}
{include 'components/button/button.tpl'
sName = 'submit_talk_filter'
sValue = '1'
sMods = 'primary'
sText = $aLang.search.find}
name = 'submit_talk_filter'
value = '1'
mods = 'primary'
text = $aLang.search.find}
{include 'components/button/button.tpl' sType='reset' sText=$aLang.common.form_reset}
{include 'components/button/button.tpl' type='reset' text=$aLang.common.form_reset}
</form>
</div>

View file

@ -11,7 +11,7 @@
(function($) {
"use strict";
$.widget( "livestreet.lsFavouriteTopic", $.livestreet.lsFavourite, {
$.widget( "livestreet.lsTopicFavourite", $.livestreet.lsFavourite, {
/**
* Дефолтные опции
*/

View file

@ -0,0 +1,48 @@
/**
* comment
*
* @module ls/topic
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
(function($) {
"use strict";
$.widget( "livestreet.lsTopic", {
/**
* Дефолтные опции
*/
options: {
// Ссылки
urls: {
},
// Селекторы
selectors: {
vote: '.js-vote-topic',
favourite: '.js-favourite-topic'
}
},
/**
* Конструктор
*
* @constructor
* @private
*/
_create: function () {
// Избранное
this.element.find( this.option( 'selectors.favourite' ) ).lsTopicFavourite();
// Голосование за топик
this.element.find( this.option( 'selectors.vote' ) ).vote({
urls: {
vote: aRouter.ajax + 'vote/topic/',
info: aRouter.ajax + 'vote/get/info/topic'
}
});
}
});
})(jQuery);

View file

@ -131,19 +131,19 @@
{* Опубликовать / Сохранить изменения *}
{include 'components/button/button.tpl'
sId = {( $topic ) ? 'submit-edit-topic-publish' : 'submit-add-topic-publish' }
sMods = 'primary'
sClasses = 'fl-r'
sText = $aLang.topic.add.button[ ( $sEvent == 'add' or ( $topic and $topic->getPublish() == 0 ) ) ? 'publish' : 'update' ]}
id = {( $topic ) ? 'submit-edit-topic-publish' : 'submit-add-topic-publish' }
mods = 'primary'
classes = 'fl-r'
text = $aLang.topic.add.button[ ( $sEvent == 'add' or ( $topic and $topic->getPublish() == 0 ) ) ? 'publish' : 'update' ]}
{* Превью *}
{include 'components/button/button.tpl' sType='button' sClasses='js-topic-preview-text-button' sText=$aLang.common.preview_text}
{include 'components/button/button.tpl' type='button' classes='js-topic-preview-text-button' text=$aLang.common.preview_text}
{* Сохранить в черновиках / Перенести в черновики *}
{if $topic && $topic->getPublish() != 0}
{include 'components/button/button.tpl'
sId = {( $topic ) ? 'submit-edit-topic-save' : 'submit-add-topic-save' }
sText = $aLang.topic.add.button[ ( $sEvent == 'add' ) ? 'save_as_draft' : 'mark_as_draft' ]}
id = {( $topic ) ? 'submit-edit-topic-save' : 'submit-add-topic-save' }
text = $aLang.topic.add.button[ ( $sEvent == 'add' ) ? 'save_as_draft' : 'mark_as_draft' ]}
{/if}
</form>

View file

@ -16,5 +16,5 @@
{include 'components/pagination/pagination.tpl' aPaging=$smarty.local.paging sClasses='js-pagination-topics'}
{else}
{include 'components/alert/alert.tpl' mAlerts=$aLang.common.empty sMods='empty'}
{include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty'}
{/if}

View file

@ -59,7 +59,7 @@
]}
{/foreach}
{include 'components/info_list/info_list.tpl' aInfoList=$info}
{include 'components/info-list/info-list.tpl' aInfoList=$info}
{/if}
{/block}
@ -111,12 +111,12 @@
{$isExpired = strtotime($topic->getDateAdd()) < $smarty.now - Config::Get('acl.vote.topic.limit_time')}
{include 'components/vote/vote.tpl'
oObject = $topic
sClasses = 'js-vote-topic'
sMods = 'small white topic'
bUseAbstain = true
bIsLocked = ( $oUserCurrent && $topic->getUserId() == $oUserCurrent->getId() ) || $isExpired
bShowRating = $topic->getVote() || ($oUserCurrent && $topic->getUserId() == $oUserCurrent->getId()) || $isExpired}
target = $topic
classes = 'js-vote-topic'
mods = 'small white topic'
useAbstain = true
isLocked = ( $oUserCurrent && $topic->getUserId() == $oUserCurrent->getId() ) || $isExpired
showRating = $topic->getVote() || ($oUserCurrent && $topic->getUserId() == $oUserCurrent->getId()) || $isExpired}
</li>
{/if}
@ -125,7 +125,7 @@
{if ! $isList && ! $isPreview}
{* Избранное *}
<li class="{$component}-info-item {$component}-info-item--favourite">
{include 'components/favourite/favourite.tpl' sClasses="js-favourite-{$type}" oObject=$article}
{include 'components/favourite/favourite.tpl' classes="js-favourite-{$type}" target=$article}
</li>
{* Поделиться *}

Some files were not shown because too many files have changed in this diff Show more