diff --git a/application/config/config.php b/application/config/config.php
index 2237c686..e37d5537 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -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"
diff --git a/application/frontend/i18n/ru.php b/application/frontend/i18n/ru.php
index 48130767..14212d4b 100644
--- a/application/frontend/i18n/ru.php
+++ b/application/frontend/i18n/ru.php
@@ -1770,6 +1770,12 @@ return array(
),
),
),
+ /**
+ * Подгрузка контента
+ */
+ 'more' => array(
+ 'text' => 'Подгрузить еще'
+ ),
/**
* Управление правами (RBAC)
*/
diff --git a/application/frontend/skin/developer/actions/ActionBlog/blog.tpl b/application/frontend/skin/developer/actions/ActionBlog/blog.tpl
index f00e7a2a..f05f0a50 100644
--- a/application/frontend/skin/developer/actions/ActionBlog/blog.tpl
+++ b/application/frontend/skin/developer/actions/ActionBlog/blog.tpl
@@ -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}
diff --git a/application/frontend/skin/developer/actions/ActionSearch/index.tpl b/application/frontend/skin/developer/actions/ActionSearch/index.tpl
index e03e2dc5..7e00b994 100644
--- a/application/frontend/skin/developer/actions/ActionSearch/index.tpl
+++ b/application/frontend/skin/developer/actions/ActionSearch/index.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/blocks.css b/application/frontend/skin/developer/assets/css/blocks.css
index ea781500..c2ef0749 100644
--- a/application/frontend/skin/developer/assets/css/blocks.css
+++ b/application/frontend/skin/developer/assets/css/blocks.css
@@ -9,48 +9,6 @@
* @author Denis Shakhov
*/
-/**
- * Блок
- *
- * @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; }
-
/**
* Список категорий блогов
diff --git a/application/frontend/skin/developer/assets/js/init.js b/application/frontend/skin/developer/assets/js/init.js
index 2594a9d9..f0aa5f9d 100644
--- a/application/frontend/skin/developer/assets/js/init.js
+++ b/application/frontend/skin/developer/assets/js/init.js
@@ -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);
});
\ No newline at end of file
diff --git a/application/frontend/skin/developer/blocks/block.blogActions.tpl b/application/frontend/skin/developer/blocks/block.blogActions.tpl
index 843475fb..35b84e82 100644
--- a/application/frontend/skin/developer/blocks/block.blogActions.tpl
+++ b/application/frontend/skin/developer/blocks/block.blogActions.tpl
@@ -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'}
diff --git a/application/frontend/skin/developer/blocks/block.blogAdd.tpl b/application/frontend/skin/developer/blocks/block.blogAdd.tpl
index 10e2423e..33ca5bf7 100644
--- a/application/frontend/skin/developer/blocks/block.blogAdd.tpl
+++ b/application/frontend/skin/developer/blocks/block.blogAdd.tpl
@@ -18,10 +18,10 @@
{if $oUserCurrent and ($oUserCurrent->getRating() > {cfg name='acl.create.blog.rating'} or $oUserCurrent->isAdministrator())}
{$aLang.blog.can_add}
- {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}
{lang name='blog.cant_add' rating=Config::Get('acl.create.blog.rating')}
- {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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/blocks/block.blogNav.tpl b/application/frontend/skin/developer/blocks/block.blogNav.tpl
index 6b3fdccd..474e3b5e 100644
--- a/application/frontend/skin/developer/blocks/block.blogNav.tpl
+++ b/application/frontend/skin/developer/blocks/block.blogNav.tpl
@@ -33,8 +33,8 @@
{/foreach}
- {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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/blocks/block.blogsSearch.tpl b/application/frontend/skin/developer/blocks/block.blogsSearch.tpl
index cf8b5977..641a14c6 100644
--- a/application/frontend/skin/developer/blocks/block.blogsSearch.tpl
+++ b/application/frontend/skin/developer/blocks/block.blogsSearch.tpl
@@ -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}
diff --git a/application/frontend/skin/developer/blocks/block.userNote.tpl b/application/frontend/skin/developer/blocks/block.userNote.tpl
index c9bcb676..f791c6e6 100644
--- a/application/frontend/skin/developer/blocks/block.userNote.tpl
+++ b/application/frontend/skin/developer/blocks/block.userNote.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/actionbar/actionbar-item.tpl b/application/frontend/skin/developer/components/actionbar/actionbar-item.tpl
index 235d28bd..e8a4817b 100644
--- a/application/frontend/skin/developer/components/actionbar/actionbar-item.tpl
+++ b/application/frontend/skin/developer/components/actionbar/actionbar-item.tpl
@@ -9,10 +9,10 @@
{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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/activity/README.md b/application/frontend/skin/developer/components/activity/README.md
new file mode 100644
index 00000000..e4a88903
--- /dev/null
+++ b/application/frontend/skin/developer/components/activity/README.md
@@ -0,0 +1,3 @@
+# Компонент activity
+
+Активность
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/activity/activity.tpl b/application/frontend/skin/developer/components/activity/activity.tpl
index 13ffc890..a12175a5 100644
--- a/application/frontend/skin/developer/components/activity/activity.tpl
+++ b/application/frontend/skin/developer/components/activity/activity.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/activity.css b/application/frontend/skin/developer/components/activity/css/activity.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/activity.css
rename to application/frontend/skin/developer/components/activity/css/activity.css
diff --git a/application/frontend/common/js/activity-settings.js b/application/frontend/skin/developer/components/activity/js/activity-settings.js
similarity index 100%
rename from application/frontend/common/js/activity-settings.js
rename to application/frontend/skin/developer/components/activity/js/activity-settings.js
diff --git a/application/frontend/common/js/activity.js b/application/frontend/skin/developer/components/activity/js/activity.js
similarity index 100%
rename from application/frontend/common/js/activity.js
rename to application/frontend/skin/developer/components/activity/js/activity.js
diff --git a/application/frontend/skin/developer/components/alert/README.md b/application/frontend/skin/developer/components/alert/README.md
new file mode 100644
index 00000000..84e20379
--- /dev/null
+++ b/application/frontend/skin/developer/components/alert/README.md
@@ -0,0 +1,3 @@
+# Компонент alert
+
+Уведомления
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/alert/alert.tpl b/application/frontend/skin/developer/components/alert/alert.tpl
index 2c11db91..5ac6f6fc 100644
--- a/application/frontend/skin/developer/components/alert/alert.tpl
+++ b/application/frontend/skin/developer/components/alert/alert.tpl
@@ -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 /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'}
{* Уведомление *}
-
+
- {* Заголовок *}
- {if $sTitle}
-
{$sTitle}
- {/if}
+ {* Заголовок *}
+ {if $smarty.local.title}
+
{$smarty.local.title}
+ {/if}
- {* Кнопка закрытия *}
- {if $bClose}
-
×
- {/if}
+ {* Кнопка закрытия *}
+ {if $smarty.local.close}
+
×
+ {/if}
- {* Контент *}
-
- {block name='alert_body'}
- {if is_array($smarty.local.mAlerts)}
-
- {foreach $smarty.local.mAlerts as $aAlert}
-
- {if $aAlert.title}
- {$aAlert.title} :
- {/if}
+ {* Контент *}
+
+ {block 'alert_body'}
+ {if is_array( $smarty.local.text )}
+
+ {foreach $smarty.local.text as $alert}
+
+ {if $alert.title}
+ {$alert.title} :
+ {/if}
- {$aAlert.msg}
-
- {/foreach}
-
- {else}
- {$smarty.local.mAlerts}
- {/if}
- {/block}
-
+ {$alert.msg}
+
+ {/foreach}
+
+ {else}
+ {$smarty.local.text}
+ {/if}
+ {/block}
+
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/alert/css/alert.css b/application/frontend/skin/developer/components/alert/css/alert.css
new file mode 100644
index 00000000..1d4de9ec
--- /dev/null
+++ b/application/frontend/skin/developer/components/alert/css/alert.css
@@ -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
+ */
+
+.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;
+}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/alert/js/alert.js b/application/frontend/skin/developer/components/alert/js/alert.js
new file mode 100644
index 00000000..37bcc209
--- /dev/null
+++ b/application/frontend/skin/developer/components/alert/js/alert.js
@@ -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
+ */
+
+$.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' ) );
+ }
+});
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/alphanumeric/README.md b/application/frontend/skin/developer/components/alphanumeric/README.md
new file mode 100644
index 00000000..cfd96046
--- /dev/null
+++ b/application/frontend/skin/developer/components/alphanumeric/README.md
@@ -0,0 +1,3 @@
+# Компонент alhpanumberic
+
+Алфавитный указатель
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/alphanumeric.css b/application/frontend/skin/developer/components/alphanumeric/css/alphanumeric.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/alphanumeric.css
rename to application/frontend/skin/developer/components/alphanumeric/css/alphanumeric.css
diff --git a/application/frontend/skin/developer/components/auth/auth.invite.tpl b/application/frontend/skin/developer/components/auth/auth.invite.tpl
index 754e5676..470eebd8 100644
--- a/application/frontend/skin/developer/components/auth/auth.invite.tpl
+++ b/application/frontend/skin/developer/components/auth/auth.invite.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/auth/auth.login.tpl b/application/frontend/skin/developer/components/auth/auth.login.tpl
index 83460a15..8fc7b2ce 100644
--- a/application/frontend/skin/developer/components/auth/auth.login.tpl
+++ b/application/frontend/skin/developer/components/auth/auth.login.tpl
@@ -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}
{if $smarty.local.showExtra}
diff --git a/application/frontend/skin/developer/components/auth/auth.reactivation.tpl b/application/frontend/skin/developer/components/auth/auth.reactivation.tpl
index 84dc2129..e6f69e63 100644
--- a/application/frontend/skin/developer/components/auth/auth.reactivation.tpl
+++ b/application/frontend/skin/developer/components/auth/auth.reactivation.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/auth/auth.registration.tpl b/application/frontend/skin/developer/components/auth/auth.registration.tpl
index b1b979e4..df288eaf 100644
--- a/application/frontend/skin/developer/components/auth/auth.registration.tpl
+++ b/application/frontend/skin/developer/components/auth/auth.registration.tpl
@@ -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}
{hook run='registration_end'}
diff --git a/application/frontend/skin/developer/components/auth/auth.reset.tpl b/application/frontend/skin/developer/components/auth/auth.reset.tpl
index c532a0ff..eb15c468 100644
--- a/application/frontend/skin/developer/components/auth/auth.reset.tpl
+++ b/application/frontend/skin/developer/components/auth/auth.reset.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/block/css/block.css b/application/frontend/skin/developer/components/block/css/block.css
new file mode 100644
index 00000000..0936fc28
--- /dev/null
+++ b/application/frontend/skin/developer/components/block/css/block.css
@@ -0,0 +1,44 @@
+/**
+ * Блок
+ *
+ * @license GNU General Public License, version 2
+ * @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
+ * @author Denis Shakhov
+ */
+
+.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; }
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/blog/add.tpl b/application/frontend/skin/developer/components/blog/add.tpl
index a036f820..91eb4345 100644
--- a/application/frontend/skin/developer/components/blog/add.tpl
+++ b/application/frontend/skin/developer/components/blog/add.tpl
@@ -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'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/blog/admin.tpl b/application/frontend/skin/developer/components/blog/admin.tpl
index 6248040f..3c64d51a 100644
--- a/application/frontend/skin/developer/components/blog/admin.tpl
+++ b/application/frontend/skin/developer/components/blog/admin.tpl
@@ -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'}
{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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/blog/blog-list.tpl b/application/frontend/skin/developer/components/blog/blog-list.tpl
index a150a162..d13301b2 100644
--- a/application/frontend/skin/developer/components/blog/blog-list.tpl
+++ b/application/frontend/skin/developer/components/blog/blog-list.tpl
@@ -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'}
{* Действия *}
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/blog/blog.tpl b/application/frontend/skin/developer/components/blog/blog.tpl
index cb3fc009..b5bb4dd2 100644
--- a/application/frontend/skin/developer/components/blog/blog.tpl
+++ b/application/frontend/skin/developer/components/blog/blog.tpl
@@ -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 @@
{* Информация *}
- {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() ]
diff --git a/application/frontend/skin/developer/assets/css/blog.css b/application/frontend/skin/developer/components/blog/css/blog.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/blog.css
rename to application/frontend/skin/developer/components/blog/css/blog.css
diff --git a/application/frontend/skin/developer/components/blog/join.tpl b/application/frontend/skin/developer/components/blog/join.tpl
index 57d9112c..f15fb07b 100644
--- a/application/frontend/skin/developer/components/blog/join.tpl
+++ b/application/frontend/skin/developer/components/blog/join.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/common/js/blog_invite_users.js b/application/frontend/skin/developer/components/blog/js/blog-invites.js
similarity index 94%
rename from application/frontend/common/js/blog_invite_users.js
rename to application/frontend/skin/developer/components/blog/js/blog-invites.js
index cd086e82..5393ee24 100644
--- a/application/frontend/common/js/blog_invite_users.js
+++ b/application/frontend/skin/developer/components/blog/js/blog-invites.js
@@ -11,7 +11,7 @@
(function($) {
"use strict";
- $.widget( "livestreet.blog_invite_users", $.livestreet.user_list_add, {
+ $.widget( "livestreet.lsBlogInvites", $.livestreet.user_list_add, {
/**
* Дефолтные опции
*/
diff --git a/application/frontend/common/js/blog.js b/application/frontend/skin/developer/components/blog/js/blog.js
similarity index 100%
rename from application/frontend/common/js/blog.js
rename to application/frontend/skin/developer/components/blog/js/blog.js
diff --git a/application/frontend/skin/developer/components/button/README.md b/application/frontend/skin/developer/components/button/README.md
index 7af89569..8b98a692 100644
--- a/application/frontend/skin/developer/components/button/README.md
+++ b/application/frontend/skin/developer/components/button/README.md
@@ -9,32 +9,32 @@
| Опция | Тип | По умолчанию | Описание |
| :------------ | :---------- | :----------------- | :------- |
-| `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='Редактировать'}
```
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/button/button.tpl b/application/frontend/skin/developer/components/button/button.tpl
index 55b2b0e1..ce519283 100644
--- a/application/frontend/skin/developer/components/button/button.tpl
+++ b/application/frontend/skin/developer/components/button/button.tpl
@@ -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 /css/button.css
*}
{* Название компонента *}
-{$_sComponentName = 'button'}
+{$component = 'button'}
-{* Если указана ссылка sUrl то заменяем тег на *}
-<{($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}
-
- {/if}
+{* Если указана ссылка url то заменяем тег на *}
+<{( $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}
+
+ {/if}
- {* Текст *}
- {$smarty.local.sText}
-{($smarty.local.sUrl) ? 'a' : 'button'}>
\ No newline at end of file
+ {* Текст *}
+ {$smarty.local.text}
+{($smarty.local.url) ? 'a' : 'button'}>
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/button/css/button.css b/application/frontend/skin/developer/components/button/css/button.css
new file mode 100644
index 00000000..29b7c50d
--- /dev/null
+++ b/application/frontend/skin/developer/components/button/css/button.css
@@ -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
+ */
+
+.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; }
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/button/js/button-polyfills.js b/application/frontend/skin/developer/components/button/js/button-polyfills.js
new file mode 100644
index 00000000..7eda48ce
--- /dev/null
+++ b/application/frontend/skin/developer/components/button/js/button-polyfills.js
@@ -0,0 +1,17 @@
+/**
+ * Polyfills
+ *
+ * @license GNU General Public License, version 2
+ * @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
+ * @author Denis Shakhov
+ */
+
+/**
+ * Атрибут 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();
+ });
+}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/comment/README.md b/application/frontend/skin/developer/components/comment/README.md
new file mode 100644
index 00000000..e34082a1
--- /dev/null
+++ b/application/frontend/skin/developer/components/comment/README.md
@@ -0,0 +1 @@
+# Компонент comment
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/comment/comment-form.tpl b/application/frontend/skin/developer/components/comment/comment-form.tpl
index 1405ad69..e68c71e8 100644
--- a/application/frontend/skin/developer/components/comment/comment-form.tpl
+++ b/application/frontend/skin/developer/components/comment/comment-form.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/comment/comment-tree.tpl b/application/frontend/skin/developer/components/comment/comment-tree.tpl
index 708f2f36..4cff61bb 100644
--- a/application/frontend/skin/developer/components/comment/comment-tree.tpl
+++ b/application/frontend/skin/developer/components/comment/comment-tree.tpl
@@ -58,5 +58,5 @@
{section closewrappers2 loop=$iCurrentLevel + 1} {/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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/comment/comment.tpl b/application/frontend/skin/developer/components/comment/comment.tpl
index dcbf707d..164a23e9 100644
--- a/application/frontend/skin/developer/components/comment/comment.tpl
+++ b/application/frontend/skin/developer/components/comment/comment.tpl
@@ -113,16 +113,16 @@
{* Блокируем голосование для гостей или если залогиненый пользователь является автором комментария*}
{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')}
{/if}
{* Избранное *}
{if $oUserCurrent && $smarty.local.bShowFavourite}
- {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}
{/if}
diff --git a/application/frontend/skin/developer/components/comment/comments.tpl b/application/frontend/skin/developer/components/comment/comments.tpl
index d46f927c..94a9ef0d 100644
--- a/application/frontend/skin/developer/components/comment/comments.tpl
+++ b/application/frontend/skin/developer/components/comment/comments.tpl
@@ -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 @@
{$sNoticeCommentAdd|default:$aLang.comments.form.title}
{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}
diff --git a/application/frontend/skin/developer/assets/css/comments.css b/application/frontend/skin/developer/components/comment/css/comment.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/comments.css
rename to application/frontend/skin/developer/components/comment/css/comment.css
diff --git a/application/frontend/common/js/comments.js b/application/frontend/skin/developer/components/comment/js/comment.js
similarity index 98%
rename from application/frontend/common/js/comments.js
rename to application/frontend/skin/developer/components/comment/js/comment.js
index d08dce4e..ae73e3a9 100644
--- a/application/frontend/common/js/comments.js
+++ b/application/frontend/skin/developer/components/comment/js/comment.js
@@ -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),
diff --git a/application/frontend/skin/developer/components/dropdown/dropdown.tpl b/application/frontend/skin/developer/components/dropdown/dropdown.tpl
index b9a02bb7..ff756cee 100644
--- a/application/frontend/skin/developer/components/dropdown/dropdown.tpl
+++ b/application/frontend/skin/developer/components/dropdown/dropdown.tpl
@@ -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'
diff --git a/application/frontend/skin/developer/components/email/README.md b/application/frontend/skin/developer/components/email/README.md
new file mode 100644
index 00000000..daa636c1
--- /dev/null
+++ b/application/frontend/skin/developer/components/email/README.md
@@ -0,0 +1 @@
+# Компонент email
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/favourite/README.md b/application/frontend/skin/developer/components/favourite/README.md
index db51ffbe..1039ff0c 100644
--- a/application/frontend/skin/developer/components/favourite/README.md
+++ b/application/frontend/skin/developer/components/favourite/README.md
@@ -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}
...
```
diff --git a/application/frontend/skin/developer/assets/css/components/favourite.css b/application/frontend/skin/developer/components/favourite/css/favourite.css
similarity index 52%
rename from application/frontend/skin/developer/assets/css/components/favourite.css
rename to application/frontend/skin/developer/components/favourite/css/favourite.css
index 2255a051..43186cd3 100644
--- a/application/frontend/skin/developer/assets/css/components/favourite.css
+++ b/application/frontend/skin/developer/components/favourite/css/favourite.css
@@ -9,19 +9,31 @@
* @author Denis Shakhov
*/
-.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; }
\ No newline at end of file
+.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;
+}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/favourite/favourite.tpl b/application/frontend/skin/developer/components/favourite/favourite.tpl
index c77cb3a4..2977b983 100644
--- a/application/frontend/skin/developer/components/favourite/favourite.tpl
+++ b/application/frontend/skin/developer/components/favourite/favourite.tpl
@@ -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 /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}
-
+
{* Кнопка добавления/удаления из избранного *}
-
+
{* Кол-во объектов в избранном *}
- {if isset($_iCount)}
-
- {$_iCount}
+ {if isset( $count )}
+
+ {$count}
{/if}
\ No newline at end of file
diff --git a/application/frontend/common/js/favourite.js b/application/frontend/skin/developer/components/favourite/js/favourite.js
similarity index 100%
rename from application/frontend/common/js/favourite.js
rename to application/frontend/skin/developer/components/favourite/js/favourite.js
diff --git a/application/frontend/skin/developer/components/feed/README.md b/application/frontend/skin/developer/components/feed/README.md
new file mode 100644
index 00000000..02deffd3
--- /dev/null
+++ b/application/frontend/skin/developer/components/feed/README.md
@@ -0,0 +1,3 @@
+# Компонент feed
+
+Лента
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/feed/blogs.tpl b/application/frontend/skin/developer/components/feed/blogs.tpl
index 0e5bbe01..d6778e66 100644
--- a/application/frontend/skin/developer/components/feed/blogs.tpl
+++ b/application/frontend/skin/developer/components/feed/blogs.tpl
@@ -22,7 +22,7 @@
sLabel = "
getUrlFull()}\">{$blog->getTitle()|escape} "}
{/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}
{/if}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/feed/feed.tpl b/application/frontend/skin/developer/components/feed/feed.tpl
index 1ff45192..b882b3c1 100644
--- a/application/frontend/skin/developer/components/feed/feed.tpl
+++ b/application/frontend/skin/developer/components/feed/feed.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/common/js/feed-blogs.js b/application/frontend/skin/developer/components/feed/js/feed-blogs.js
similarity index 100%
rename from application/frontend/common/js/feed-blogs.js
rename to application/frontend/skin/developer/components/feed/js/feed-blogs.js
diff --git a/application/frontend/common/js/feed.js b/application/frontend/skin/developer/components/feed/js/feed.js
similarity index 100%
rename from application/frontend/common/js/feed.js
rename to application/frontend/skin/developer/components/feed/js/feed.js
diff --git a/application/frontend/skin/developer/assets/css/components/field.css b/application/frontend/skin/developer/components/field/css/field.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/field.css
rename to application/frontend/skin/developer/components/field/css/field.css
diff --git a/application/frontend/skin/developer/components/info-list/README.md b/application/frontend/skin/developer/components/info-list/README.md
new file mode 100644
index 00000000..903ef899
--- /dev/null
+++ b/application/frontend/skin/developer/components/info-list/README.md
@@ -0,0 +1,3 @@
+# Компонент info-list
+
+Список параметров
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/info_list.css b/application/frontend/skin/developer/components/info-list/css/info-list.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/info_list.css
rename to application/frontend/skin/developer/components/info-list/css/info-list.css
diff --git a/application/frontend/skin/developer/components/info_list/info_list.tpl b/application/frontend/skin/developer/components/info-list/info-list.tpl
similarity index 100%
rename from application/frontend/skin/developer/components/info_list/info_list.tpl
rename to application/frontend/skin/developer/components/info-list/info-list.tpl
diff --git a/application/frontend/skin/developer/assets/css/components/media.css b/application/frontend/skin/developer/components/media/css/media.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/media.css
rename to application/frontend/skin/developer/components/media/css/media.css
diff --git a/application/frontend/skin/developer/components/media/panes/pane.insert.tpl b/application/frontend/skin/developer/components/media/panes/pane.insert.tpl
index 2407b7bb..9377b194 100644
--- a/application/frontend/skin/developer/components/media/panes/pane.insert.tpl
+++ b/application/frontend/skin/developer/components/media/panes/pane.insert.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/media/panes/pane.photoset.tpl b/application/frontend/skin/developer/components/media/panes/pane.photoset.tpl
index 2a6f88ac..467d0cd2 100644
--- a/application/frontend/skin/developer/components/media/panes/pane.photoset.tpl
+++ b/application/frontend/skin/developer/components/media/panes/pane.photoset.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/media/panes/pane.url.tpl b/application/frontend/skin/developer/components/media/panes/pane.url.tpl
index 2774ddd6..3bb2aeb3 100644
--- a/application/frontend/skin/developer/components/media/panes/pane.url.tpl
+++ b/application/frontend/skin/developer/components/media/panes/pane.url.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/modal/css/modal.css b/application/frontend/skin/developer/components/modal/css/modal.css
new file mode 100644
index 00000000..6115a8de
--- /dev/null
+++ b/application/frontend/skin/developer/components/modal/css/modal.css
@@ -0,0 +1,127 @@
+/**
+ * Modals
+ *
+ * @module modal
+ *
+ * @license GNU General Public License, version 2
+ * @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
+ * @author Denis Shakhov
+ */
+
+
+/* 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;
+}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/modal/js/modal.js b/application/frontend/skin/developer/components/modal/js/modal.js
new file mode 100644
index 00000000..62f00e57
--- /dev/null
+++ b/application/frontend/skin/developer/components/modal/js/modal.js
@@ -0,0 +1,369 @@
+/**
+ * Modal
+ *
+ * @module modal
+ *
+ * @license GNU General Public License, version 2
+ * @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
+ * @author Denis Shakhov
+ */
+
+var ls = ls || {};
+
+(function($) {
+ "use strict";
+
+ var scrollbarWidth, html, body, _window = $(window);
+
+ // Overlay
+ // ----------
+
+ var _overlay = (function ($) {
+ this.element = $('
');
+
+ /**
+ * 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 = $('').css({ 'width': 100, 'height': 100, 'overflow': 'auto', 'position': 'absolute', 'bottom': 0, 'left': 0 });
+ var width = 100 - $('
').css('height', 200).appendTo( holder.appendTo('body') ).width();
+ holder.remove();
+ return width;
+ };
+
+ return this;
+ }).call(_overlay || {}, jQuery);
+
+
+ // Loader
+ // ----------
+
+ var _loader = (function ($) {
+ this.element = $('
');
+
+ /**
+ * 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);
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/more.css b/application/frontend/skin/developer/components/more/css/more.css
similarity index 72%
rename from application/frontend/skin/developer/assets/css/components/more.css
rename to application/frontend/skin/developer/components/more/css/more.css
index 6b8e0037..8ba793fc 100644
--- a/application/frontend/skin/developer/assets/css/components/more.css
+++ b/application/frontend/skin/developer/components/more/css/more.css
@@ -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; }
\ No newline at end of file
+.more:hover {
+ background-color: #f7f7f7;
+ color: #555;
+}
+.more.loading {
+ text-indent: -200%;
+}
\ No newline at end of file
diff --git a/application/frontend/common/js/more.js b/application/frontend/skin/developer/components/more/js/more.js
similarity index 100%
rename from application/frontend/common/js/more.js
rename to application/frontend/skin/developer/components/more/js/more.js
diff --git a/application/frontend/skin/developer/components/more/more.tpl b/application/frontend/skin/developer/components/more/more.tpl
index 3553e9cd..106c0e7d 100644
--- a/application/frontend/skin/developer/components/more/more.tpl
+++ b/application/frontend/skin/developer/components/more/more.tpl
@@ -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
/js/more.js
+ * @param string $text
+ * @param string $target
+ * @param integer $count
+ * @param boolean $append
*}
{* Название компонента *}
-{$_sComponentName = 'more'}
+{$component = 'more'}
-
+
{* Текст *}
- {$smarty.local.sText|default:'Подгрузить еще'}
+ {$smarty.local.text|default:{lang 'more.text'}}
{* Счетчик *}
- {if $smarty.local.iCount}
- ({$smarty.local.iCount} )
+ {if $smarty.local.count}
+ ({$smarty.local.count} )
{/if}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/user_note.css b/application/frontend/skin/developer/components/note/css/note.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/user_note.css
rename to application/frontend/skin/developer/components/note/css/note.css
diff --git a/application/frontend/common/js/usernote.js b/application/frontend/skin/developer/components/note/js/note.js
similarity index 98%
rename from application/frontend/common/js/usernote.js
rename to application/frontend/skin/developer/components/note/js/note.js
index cb10038a..a729c69e 100644
--- a/application/frontend/common/js/usernote.js
+++ b/application/frontend/skin/developer/components/note/js/note.js
@@ -11,7 +11,7 @@
(function($) {
"use strict";
- $.widget( "livestreet.usernote", {
+ $.widget( "livestreet.lsNote", {
/**
* Дефолтные опции
*/
diff --git a/application/frontend/skin/developer/components/user_note/user_note.tpl b/application/frontend/skin/developer/components/note/note.tpl
similarity index 87%
rename from application/frontend/skin/developer/components/user_note/user_note.tpl
rename to application/frontend/skin/developer/components/note/note.tpl
index 877f265b..736c2ad3 100644
--- a/application/frontend/skin/developer/components/user_note/user_note.tpl
+++ b/application/frontend/skin/developer/components/note/note.tpl
@@ -43,8 +43,8 @@
{/if}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/pagination.css b/application/frontend/skin/developer/components/pagination/css/pagination.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/pagination.css
rename to application/frontend/skin/developer/components/pagination/css/pagination.css
diff --git a/application/frontend/common/js/pagination.js b/application/frontend/skin/developer/components/pagination/js/pagination.js
similarity index 100%
rename from application/frontend/common/js/pagination.js
rename to application/frontend/skin/developer/components/pagination/js/pagination.js
diff --git a/application/frontend/skin/developer/assets/css/poll.css b/application/frontend/skin/developer/components/poll/css/poll.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/poll.css
rename to application/frontend/skin/developer/components/poll/css/poll.css
diff --git a/application/frontend/common/js/poll-manage.js b/application/frontend/skin/developer/components/poll/js/poll-manage.js
similarity index 100%
rename from application/frontend/common/js/poll-manage.js
rename to application/frontend/skin/developer/components/poll/js/poll-manage.js
diff --git a/application/frontend/common/js/poll.js b/application/frontend/skin/developer/components/poll/js/poll.js
similarity index 100%
rename from application/frontend/common/js/poll.js
rename to application/frontend/skin/developer/components/poll/js/poll.js
diff --git a/application/frontend/skin/developer/components/poll/poll.form.tpl b/application/frontend/skin/developer/components/poll/poll.form.tpl
index dfa98276..7e3d0d54 100644
--- a/application/frontend/skin/developer/components/poll/poll.form.tpl
+++ b/application/frontend/skin/developer/components/poll/poll.form.tpl
@@ -72,10 +72,10 @@
{if ! $oPoll or $oPoll->isAllowUpdate()}
{/if}
diff --git a/application/frontend/skin/developer/components/poll/poll.manage.tpl b/application/frontend/skin/developer/components/poll/poll.manage.tpl
index bbc89e20..c9b96e8f 100644
--- a/application/frontend/skin/developer/components/poll/poll.manage.tpl
+++ b/application/frontend/skin/developer/components/poll/poll.manage.tpl
@@ -15,7 +15,7 @@
{* Кнопка добавить *}
- {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=[
diff --git a/application/frontend/skin/developer/components/poll/poll.result.tpl b/application/frontend/skin/developer/components/poll/poll.result.tpl
index 6ee0de00..8cbd6057 100644
--- a/application/frontend/skin/developer/components/poll/poll.result.tpl
+++ b/application/frontend/skin/developer/components/poll/poll.result.tpl
@@ -34,7 +34,7 @@
{* Кнопка сортировки *}
-{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}\""}
{* Статистика голосования *}
diff --git a/application/frontend/skin/developer/components/poll/poll.vote.tpl b/application/frontend/skin/developer/components/poll/poll.vote.tpl
index 921ecbf4..c516d2f6 100644
--- a/application/frontend/skin/developer/components/poll/poll.vote.tpl
+++ b/application/frontend/skin/developer/components/poll/poll.vote.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/components/search_form.css b/application/frontend/skin/developer/components/search-form/css/search-form.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/search_form.css
rename to application/frontend/skin/developer/components/search-form/css/search-form.css
diff --git a/application/frontend/skin/developer/components/search_form/search_form.tpl b/application/frontend/skin/developer/components/search-form/search-form.tpl
similarity index 83%
rename from application/frontend/skin/developer/components/search_form/search_form.tpl
rename to application/frontend/skin/developer/components/search-form/search-form.tpl
index 7f9470b7..37f4dcd4 100644
--- a/application/frontend/skin/developer/components/search_form/search_form.tpl
+++ b/application/frontend/skin/developer/components/search-form/search-form.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/search_form/tests/visual/search_form.tpl b/application/frontend/skin/developer/components/search-form/tests/visual/search_form.tpl
similarity index 84%
rename from application/frontend/skin/developer/components/search_form/tests/visual/search_form.tpl
rename to application/frontend/skin/developer/components/search-form/tests/visual/search_form.tpl
index 0eb1a799..48a60b98 100644
--- a/application/frontend/skin/developer/components/search_form/tests/visual/search_form.tpl
+++ b/application/frontend/skin/developer/components/search-form/tests/visual/search_form.tpl
@@ -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.'}
diff --git a/application/frontend/skin/developer/components/tags/search_form.tags.tpl b/application/frontend/skin/developer/components/tags/search_form.tags.tpl
index 600e3d92..602459b2 100644
--- a/application/frontend/skin/developer/components/tags/search_form.tags.tpl
+++ b/application/frontend/skin/developer/components/tags/search_form.tags.tpl
@@ -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'}
diff --git a/application/frontend/skin/developer/components/tags/tag_cloud.tpl b/application/frontend/skin/developer/components/tags/tag_cloud.tpl
index f6a58df1..7b8d78f3 100644
--- a/application/frontend/skin/developer/components/tags/tag_cloud.tpl
+++ b/application/frontend/skin/developer/components/tags/tag_cloud.tpl
@@ -24,5 +24,5 @@
{/foreach}
{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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/talk/add.tpl b/application/frontend/skin/developer/components/talk/add.tpl
index d4cd46ea..47fc7181 100644
--- a/application/frontend/skin/developer/components/talk/add.tpl
+++ b/application/frontend/skin/developer/components/talk/add.tpl
@@ -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;"'}
{hook run='talk_add_end'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/talk/talk-list.tpl b/application/frontend/skin/developer/components/talk/talk-list.tpl
index ec18eff6..3f2299b7 100644
--- a/application/frontend/skin/developer/components/talk/talk-list.tpl
+++ b/application/frontend/skin/developer/components/talk/talk-list.tpl
@@ -52,7 +52,7 @@
{* Избранное *}
- {include 'components/favourite/favourite.tpl' sClasses='js-favourite-talk' oObject=$talk}
+ {include 'components/favourite/favourite.tpl' classes='js-favourite-talk' target=$talk}
{* Основная информация о диалоге *}
@@ -120,7 +120,7 @@
{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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/talk/talk-message-root.tpl b/application/frontend/skin/developer/components/talk/talk-message-root.tpl
index 093471f1..05b17f6c 100644
--- a/application/frontend/skin/developer/components/talk/talk-message-root.tpl
+++ b/application/frontend/skin/developer/components/talk/talk-message-root.tpl
@@ -17,6 +17,6 @@
{block 'article_footer_info_items' append}
{* Избранное *}
- {include 'components/favourite/favourite.tpl' sClasses="js-favourite-{$type}" oObject=$article}
+ {include 'components/favourite/favourite.tpl' classes="js-favourite-{$type}" target=$article}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/talk/talk-search-form.tpl b/application/frontend/skin/developer/components/talk/talk-search-form.tpl
index 36ed2d09..abe57174 100644
--- a/application/frontend/skin/developer/components/talk/talk-search-form.tpl
+++ b/application/frontend/skin/developer/components/talk/talk-search-form.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/topic.css b/application/frontend/skin/developer/components/topic/css/topic.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/topic.css
rename to application/frontend/skin/developer/components/topic/css/topic.css
diff --git a/application/frontend/common/js/topic.js b/application/frontend/skin/developer/components/topic/js/topic-add.js
similarity index 100%
rename from application/frontend/common/js/topic.js
rename to application/frontend/skin/developer/components/topic/js/topic-add.js
diff --git a/application/frontend/common/js/favourite_topic.js b/application/frontend/skin/developer/components/topic/js/topic-favourite.js
similarity index 90%
rename from application/frontend/common/js/favourite_topic.js
rename to application/frontend/skin/developer/components/topic/js/topic-favourite.js
index 9773d4e9..df860e03 100644
--- a/application/frontend/common/js/favourite_topic.js
+++ b/application/frontend/skin/developer/components/topic/js/topic-favourite.js
@@ -11,7 +11,7 @@
(function($) {
"use strict";
- $.widget( "livestreet.lsFavouriteTopic", $.livestreet.lsFavourite, {
+ $.widget( "livestreet.lsTopicFavourite", $.livestreet.lsFavourite, {
/**
* Дефолтные опции
*/
diff --git a/application/frontend/skin/developer/components/topic/js/topic.js b/application/frontend/skin/developer/components/topic/js/topic.js
new file mode 100644
index 00000000..3eb77a13
--- /dev/null
+++ b/application/frontend/skin/developer/components/topic/js/topic.js
@@ -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
+ */
+
+(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);
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/topic/topic-add.tpl b/application/frontend/skin/developer/components/topic/topic-add.tpl
index 001e9b59..8e19d9d3 100644
--- a/application/frontend/skin/developer/components/topic/topic-add.tpl
+++ b/application/frontend/skin/developer/components/topic/topic-add.tpl
@@ -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}
diff --git a/application/frontend/skin/developer/components/topic/topic-list.tpl b/application/frontend/skin/developer/components/topic/topic-list.tpl
index 97e2915b..a446b720 100644
--- a/application/frontend/skin/developer/components/topic/topic-list.tpl
+++ b/application/frontend/skin/developer/components/topic/topic-list.tpl
@@ -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}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/topic/topic.tpl b/application/frontend/skin/developer/components/topic/topic.tpl
index 8ae41c05..e648e83c 100644
--- a/application/frontend/skin/developer/components/topic/topic.tpl
+++ b/application/frontend/skin/developer/components/topic/topic.tpl
@@ -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}
{/if}
@@ -125,7 +125,7 @@
{if ! $isList && ! $isPreview}
{* Избранное *}
- {include 'components/favourite/favourite.tpl' sClasses="js-favourite-{$type}" oObject=$article}
+ {include 'components/favourite/favourite.tpl' classes="js-favourite-{$type}" target=$article}
{* Поделиться *}
diff --git a/application/frontend/skin/developer/components/uploader/uploader.tpl b/application/frontend/skin/developer/components/uploader/uploader.tpl
index a48b4873..4fced861 100644
--- a/application/frontend/skin/developer/components/uploader/uploader.tpl
+++ b/application/frontend/skin/developer/components/uploader/uploader.tpl
@@ -31,9 +31,9 @@
{* Блок отображаемый когда нет активного файла *}
{include 'components/alert/alert.tpl'
- sMods = 'empty'
- mAlerts = {lang name='uploader.info.empty'}
- sClasses = "{$component}-aside-empty js-{$component}-aside-empty"}
+ mods = 'empty'
+ text = {lang name='uploader.info.empty'}
+ classes = "{$component}-aside-empty js-{$component}-aside-empty"}
{* Блоки *}
diff --git a/application/frontend/skin/developer/components/user/header.tpl b/application/frontend/skin/developer/components/user/header.tpl
index f64583ae..b2b312fb 100644
--- a/application/frontend/skin/developer/components/user/header.tpl
+++ b/application/frontend/skin/developer/components/user/header.tpl
@@ -35,11 +35,11 @@
{* Голосование *}
{include 'components/vote/vote.tpl'
- sClasses = 'js-vote-user'
- sMods = 'large'
- oObject = $user
- bIsLocked = $oUserCurrent && $oUserCurrent->getId() == $user->getId()
- bShowLabel = true}
+ classes = 'js-vote-user'
+ mods = 'large'
+ target = $user
+ isLocked = $oUserCurrent && $oUserCurrent->getId() == $user->getId()
+ showLabel = true}
{hook run='profile_top_end' user=$user}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user/info-group.tpl b/application/frontend/skin/developer/components/user/info-group.tpl
index d09f5b7a..de022c1d 100644
--- a/application/frontend/skin/developer/components/user/info-group.tpl
+++ b/application/frontend/skin/developer/components/user/info-group.tpl
@@ -20,7 +20,7 @@
{if $smarty.local.html}
{$smarty.local.html}
{else}
- {include 'components/info_list/info_list.tpl' aInfoList=$smarty.local.items sClasses='user-info-group-items'}
+ {include 'components/info-list/info-list.tpl' aInfoList=$smarty.local.items sClasses='user-info-group-items'}
{/if}
diff --git a/application/frontend/skin/developer/components/user/settings/account.tpl b/application/frontend/skin/developer/components/user/settings/account.tpl
index 916058f9..95062013 100644
--- a/application/frontend/skin/developer/components/user/settings/account.tpl
+++ b/application/frontend/skin/developer/components/user/settings/account.tpl
@@ -55,7 +55,7 @@
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
- {include 'components/button/button.tpl' sName='submit_account_edit' sMods='primary' sText=$aLang.common.save}
+ {include 'components/button/button.tpl' name='submit_account_edit' mods='primary' text=$aLang.common.save}
{hook run='settings_account_end'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user/settings/invite.tpl b/application/frontend/skin/developer/components/user/settings/invite.tpl
index 4ba17542..58894769 100644
--- a/application/frontend/skin/developer/components/user/settings/invite.tpl
+++ b/application/frontend/skin/developer/components/user/settings/invite.tpl
@@ -36,7 +36,7 @@
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
- {include 'components/button/button.tpl' sName='submit_invite' sMods='primary' sText={lang name='user.settings.invites.fields.submit.text'}}
+ {include 'components/button/button.tpl' name='submit_invite' mods='primary' text={lang name='user.settings.invites.fields.submit.text'}}
{hook run='settings_invite_end'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user/settings/profile.tpl b/application/frontend/skin/developer/components/user/settings/profile.tpl
index 7f5e1432..f5874058 100644
--- a/application/frontend/skin/developer/components/user/settings/profile.tpl
+++ b/application/frontend/skin/developer/components/user/settings/profile.tpl
@@ -125,7 +125,7 @@
{include 'components/field/field.hidden.security_key.tpl'}
{* Кнопки *}
- {include 'components/button/button.tpl' sName='submit_profile_edit' sMods='primary' sText=$aLang.common.save}
+ {include 'components/button/button.tpl' name='submit_profile_edit' mods='primary' text=$aLang.common.save}
{hook run='settings_profile_end'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user/settings/tuning.tpl b/application/frontend/skin/developer/components/user/settings/tuning.tpl
index ce9a8f74..0c163503 100644
--- a/application/frontend/skin/developer/components/user/settings/tuning.tpl
+++ b/application/frontend/skin/developer/components/user/settings/tuning.tpl
@@ -62,7 +62,7 @@
{hook run='form_settings_tuning_end'}
- {include 'components/button/button.tpl' sName='submit_settings_tuning' sText=$aLang.common.save sMods='primary'}
+ {include 'components/button/button.tpl' name='submit_settings_tuning' text=$aLang.common.save mods='primary'}
{hook run='settings_tuning_end'}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user/stat.tpl b/application/frontend/skin/developer/components/user/stat.tpl
index 0e6df6b8..b5f6bcb5 100644
--- a/application/frontend/skin/developer/components/user/stat.tpl
+++ b/application/frontend/skin/developer/components/user/stat.tpl
@@ -2,14 +2,14 @@
{* Кол-во пользователей *}
- {include 'components/info_list/info_list.tpl' iInfoListLabelWidth=200 aInfoList=[
+ {include 'components/info-list/info-list.tpl' iInfoListLabelWidth=200 aInfoList=[
[ 'label' => "{lang name='user.stats.all'}:", 'content' => $aStat.count_all ],
[ 'label' => "{lang name='user.stats.active'}:", 'content' => $aStat.count_active ],
[ 'label' => "{lang name='user.stats.not_active'}:", 'content' => $aStat.count_inactive ]
]}
{* Пол *}
- {include 'components/info_list/info_list.tpl' iInfoListLabelWidth=200 aInfoList=[
+ {include 'components/info-list/info-list.tpl' iInfoListLabelWidth=200 aInfoList=[
[ 'label' => "{lang name='user.stats.men'}:", 'content' => $aStat.count_sex_man ],
[ 'label' => "{lang name='user.stats.women'}:", 'content' => $aStat.count_sex_woman ],
[ 'label' => "{lang name='user.stats.none'}:", 'content' => $aStat.count_sex_other ]
diff --git a/application/frontend/skin/developer/components/user/user-list-loop.tpl b/application/frontend/skin/developer/components/user/user-list-loop.tpl
index b77287a7..fbe14e4d 100644
--- a/application/frontend/skin/developer/components/user/user-list-loop.tpl
+++ b/application/frontend/skin/developer/components/user/user-list-loop.tpl
@@ -26,7 +26,7 @@
{* Заметка *}
{if $usernote}
- {include 'components/user_note/user_note.tpl' sClasses='js-user-note' oObject=$usernote iUserId=$user->getId()}
+ {include 'components/note/note.tpl' sClasses='js-user-note' oObject=$usernote iUserId=$user->getId()}
{/if}
{* Информация *}
@@ -34,7 +34,7 @@
{$lastSessionDate = {date_format date=$session->getDateLast() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}}
{/if}
- {include 'components/info_list/info_list.tpl' sInfoListClasses='object-list-item-info' aInfoList=[
+ {include 'components/info-list/info-list.tpl' sInfoListClasses='object-list-item-info' aInfoList=[
[ 'label' => "{$aLang.user.date_last_session}:", 'content' => ( $session ) ? $lastSessionDate : '—' ],
[ 'label' => "{$aLang.user.date_registration}:", 'content' => {date_format date=$user->getDateRegister() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"} ],
[ 'label' => "{$aLang.vote.rating}:", 'content' => $user->getRating() ]
diff --git a/application/frontend/skin/developer/components/user/user-list.tpl b/application/frontend/skin/developer/components/user/user-list.tpl
index 55d43871..55e1fa29 100644
--- a/application/frontend/skin/developer/components/user/user-list.tpl
+++ b/application/frontend/skin/developer/components/user/user-list.tpl
@@ -15,14 +15,14 @@
{if $bUseMore}
{if ! $bHideMore}
{include 'components/more/more.tpl'
- sClasses = 'js-more-search'
- sTarget = '.js-more-users-container'
- sAttributes = 'data-search-type="users" data-proxy-page-next="2"'}
+ classes = 'js-more-search'
+ target = '.js-more-users-container'
+ attributes = 'data-search-type="users" data-proxy-page-next="2"'}
{/if}
{else}
{include 'components/pagination/pagination.tpl' aPaging=$aPaging}
{/if}
{else}
- {include 'components/alert/alert.tpl' mAlerts=$sUserListEmpty|default:{lang name='user.notices.empty'} sMods='empty'}
+ {include 'components/alert/alert.tpl' text=$sUserListEmpty|default:{lang name='user.notices.empty'} mods='empty'}
{/if}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/user_list_add/user_list_add.tpl b/application/frontend/skin/developer/components/user_list_add/user_list_add.tpl
index 8c8ba054..998f2718 100644
--- a/application/frontend/skin/developer/components/user_list_add/user_list_add.tpl
+++ b/application/frontend/skin/developer/components/user_list_add/user_list_add.tpl
@@ -28,7 +28,7 @@
sLabel = $aLang.user_list_add.form.fields.add.label
sNote = "
Выбрать из списка друзей "}
- {include 'components/button/button.tpl' sText=$aLang.common.add sMods='primary' sClasses="js-$_sComponentName-form-submit"}
+ {include 'components/button/button.tpl' text=$aLang.common.add mods='primary' classes="js-$_sComponentName-form-submit"}
{/if}
diff --git a/application/frontend/skin/developer/components/user_list_avatar/user_list_avatar.tpl b/application/frontend/skin/developer/components/user_list_avatar/user_list_avatar.tpl
index aad56709..92f19e0b 100644
--- a/application/frontend/skin/developer/components/user_list_avatar/user_list_avatar.tpl
+++ b/application/frontend/skin/developer/components/user_list_avatar/user_list_avatar.tpl
@@ -16,9 +16,9 @@
{else}
{if $sUserListEmpty}
- {include 'components/alert/alert.tpl' mAlerts=$sUserListEmpty sMods='empty'}
+ {include 'components/alert/alert.tpl' text=$sUserListEmpty mods='empty'}
{else}
- {include 'components/alert/alert.tpl' mAlerts=$aLang.common.empty sMods='empty'}
+ {include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty'}
{/if}
{/if}
diff --git a/application/frontend/skin/developer/components/user_list_small/user_list_small.tpl b/application/frontend/skin/developer/components/user_list_small/user_list_small.tpl
index 96a0c95a..d429031d 100644
--- a/application/frontend/skin/developer/components/user_list_small/user_list_small.tpl
+++ b/application/frontend/skin/developer/components/user_list_small/user_list_small.tpl
@@ -10,10 +10,10 @@
{* Уведомление о пустом списке *}
{if ! $aUserList || $smarty.local.bHideableEmptyAlert}
{include 'components/alert/alert.tpl'
- mAlerts = $aLang.common.empty
- sMods = 'empty'
- sClasses = 'js-user-list-small-empty'
- bVisible = ! $aUserList}
+ text = $aLang.common.empty
+ mods = 'empty'
+ classes = 'js-user-list-small-empty'
+ visible = ! $aUserList}
{/if}
{* Список пользователей *}
diff --git a/application/frontend/skin/developer/assets/css/components/vote-rtl.css b/application/frontend/skin/developer/components/vote/css/vote-rtl.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/vote-rtl.css
rename to application/frontend/skin/developer/components/vote/css/vote-rtl.css
diff --git a/application/frontend/skin/developer/assets/css/components/vote.css b/application/frontend/skin/developer/components/vote/css/vote.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/components/vote.css
rename to application/frontend/skin/developer/components/vote/css/vote.css
diff --git a/application/frontend/common/js/vote.js b/application/frontend/skin/developer/components/vote/js/vote.js
similarity index 100%
rename from application/frontend/common/js/vote.js
rename to application/frontend/skin/developer/components/vote/js/vote.js
diff --git a/application/frontend/skin/developer/components/vote/vote.tpl b/application/frontend/skin/developer/components/vote/vote.tpl
index 2f6ecef6..c1a0f401 100644
--- a/application/frontend/skin/developer/components/vote/vote.tpl
+++ b/application/frontend/skin/developer/components/vote/vote.tpl
@@ -1,89 +1,86 @@
{**
* Голосование
*
- * @param object $oObject Объект сущности
- * @param string $sClasses Дополнительные классы
- * @param string $sAttributes Атрибуты
- * @param boolean $bShowRating Показывать рейтинг или нет
- * @param boolean $bIsLocked Блокировка голосования
- *
- * @styles assets/css/components/vote.css
- * @scripts
/js/vote.js
+ * @param object $target Объект сущности
+ * @param string $classes Дополнительные классы
+ * @param string $attributes Атрибуты
+ * @param boolean $showRating Показывать рейтинг или нет
+ * @param boolean $isLocked Блокировка голосования
*
* TODO: Добавить смарти блоки
*}
{* Название компонента *}
-{$_sComponentName = 'vote'}
+{$component = 'vote'}
{* Установка дефолтных значений *}
-{$_bShowRating = $smarty.local.bShowRating|default:true}
-{$_oObject = $smarty.local.oObject}
-{$_sMods = $smarty.local.sMods}
+{$showRating = $smarty.local.showRating|default:true}
+{$target = $smarty.local.target}
+{$mods = $smarty.local.mods}
{* Рейтинг *}
-{$_iRating = $_oObject->getRating()}
+{$rating = $target->getRating()}
{* Получаем модификаторы *}
-{if $_bShowRating}
- {if $_iRating > 0}
- {$_sMods = "$_sMods count-positive"}
- {elseif $_iRating < 0}
- {$_sMods = "$_sMods count-negative"}
+{if $showRating}
+ {if $rating > 0}
+ {$mods = "$mods count-positive"}
+ {elseif $rating < 0}
+ {$mods = "$mods count-negative"}
{else}
- {$_sMods = "$_sMods count-zero"}
+ {$mods = "$mods count-zero"}
{/if}
{/if}
-{if $oVote = $_oObject->getVote()}
- {$_sMods = "$_sMods voted"}
+{if $vote = $target->getVote()}
+ {$mods = "$mods voted"}
- {if $oVote->getDirection() > 0}
- {$_sMods = "$_sMods voted-up"}
- {elseif $oVote->getDirection() < 0}
- {$_sMods = "$_sMods voted-down"}
+ {if $vote->getDirection() > 0}
+ {$mods = "$mods voted-up"}
+ {elseif $vote->getDirection() < 0}
+ {$mods = "$mods voted-down"}
{else}
- {$_sMods = "$_sMods voted-zero"}
+ {$mods = "$mods voted-zero"}
{/if}
{else}
- {$_sMods = "$_sMods not-voted"}
+ {$mods = "$mods not-voted"}
{/if}
-{if ! $oUserCurrent || $smarty.local.bIsLocked}
- {$_sMods = "$_sMods locked"}
+{if ! $oUserCurrent || $smarty.local.isLocked}
+ {$mods = "$mods locked"}
{/if}
-{if ! $_bShowRating}
- {$_sMods = "$_sMods rating-hidden"}
+{if ! $showRating}
+ {$mods = "$mods rating-hidden"}
{/if}
-
+
{* Заголовок *}
- {if $bShowLabel}
-
{$aLang.$_sComponentName.rating}
+ {if $showLabel}
+
{$aLang.$component.rating}
{/if}
{* Основной блок *}
-
+
{* Рейтинг *}
-
- {if $_bShowRating}
- {$_iRating}
+
+ {if $showRating}
+ {$rating}
{else}
?
{/if}
{* Воздержаться *}
- {if $smarty.local.bUseAbstain}
-
+ {if $smarty.local.useAbstain}
+
{/if}
{* Нравится *}
-
+
{* Не нравится *}
-
+
\ No newline at end of file
diff --git a/application/frontend/skin/developer/assets/css/wall.css b/application/frontend/skin/developer/components/wall/css/wall.css
similarity index 100%
rename from application/frontend/skin/developer/assets/css/wall.css
rename to application/frontend/skin/developer/components/wall/css/wall.css
diff --git a/application/frontend/common/js/wall-entry.js b/application/frontend/skin/developer/components/wall/js/wall-entry.js
similarity index 100%
rename from application/frontend/common/js/wall-entry.js
rename to application/frontend/skin/developer/components/wall/js/wall-entry.js
diff --git a/application/frontend/common/js/wall-form.js b/application/frontend/skin/developer/components/wall/js/wall-form.js
similarity index 100%
rename from application/frontend/common/js/wall-form.js
rename to application/frontend/skin/developer/components/wall/js/wall-form.js
diff --git a/application/frontend/common/js/wall.js b/application/frontend/skin/developer/components/wall/js/wall.js
similarity index 100%
rename from application/frontend/common/js/wall.js
rename to application/frontend/skin/developer/components/wall/js/wall.js
diff --git a/application/frontend/skin/developer/components/wall/wall.form.tpl b/application/frontend/skin/developer/components/wall/wall.form.tpl
index d9e09a25..dafc99af 100644
--- a/application/frontend/skin/developer/components/wall/wall.form.tpl
+++ b/application/frontend/skin/developer/components/wall/wall.form.tpl
@@ -15,9 +15,9 @@
{* Подвал формы *}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/components/wall/wall.posts.tpl b/application/frontend/skin/developer/components/wall/wall.posts.tpl
index b9c113ed..84560393 100644
--- a/application/frontend/skin/developer/components/wall/wall.posts.tpl
+++ b/application/frontend/skin/developer/components/wall/wall.posts.tpl
@@ -16,10 +16,10 @@
{* Кнопка подгрузки комментариев *}
{if count( $comments ) < $post->getCountReply()}
{include 'components/more/more.tpl'
- sClasses = 'wall-more-comments js-wall-more-comments'
- iCount = $post->getCountReply() - Config::Get('module.wall.count_last_reply')
- bAppend = 'false'
- sAttributes = "data-more-target=\".js-wall-entry-container[data-id={$postId}]\" data-proxy-last_id=\"{$comments[0]->getId()}\" data-param-target_id=\"{$postId}\" "}
+ classes = 'wall-more-comments js-wall-more-comments'
+ count = $post->getCountReply() - Config::Get('module.wall.count_last_reply')
+ append = 'false'
+ attributes = "data-more-target=\".js-wall-entry-container[data-id={$postId}]\" data-proxy-last_id=\"{$comments[0]->getId()}\" data-param-target_id=\"{$postId}\" "}
{/if}
{* Комментарии *}
diff --git a/application/frontend/skin/developer/components/wall/wall.tpl b/application/frontend/skin/developer/components/wall/wall.tpl
index abf9290d..9dfb3afc 100644
--- a/application/frontend/skin/developer/components/wall/wall.tpl
+++ b/application/frontend/skin/developer/components/wall/wall.tpl
@@ -21,7 +21,7 @@
{if $oUserCurrent}
{include './wall.form.tpl'}
{else}
- {include 'components/alert/alert.tpl' sMods='info' sClasses='mt-15' mAlerts=$aLang.wall.alerts.unregistered}
+ {include 'components/alert/alert.tpl' text=$aLang.wall.alerts.unregistered mods='info' classes='mt-15'}
{/if}
{* Список записей *}
@@ -31,14 +31,14 @@
{* Уведомление о пустом списке *}
{if $oUserCurrent || ( ! $oUserCurrent && ! $loadedCount )}
- {include 'components/alert/alert.tpl' mAlerts=$aLang.common.empty sMods='empty' sClasses='mt-15 js-wall-alert-empty' sAttributes='id="wall-empty"' bVisible=!$loadedCount}
+ {include 'components/alert/alert.tpl' text=$aLang.common.empty mods='empty' classes='mt-15 js-wall-alert-empty' attributes='id="wall-empty"' visible=!$loadedCount}
{/if}
{* Кнопка подгрузки записей *}
{if $moreCount}
{include 'components/more/more.tpl'
- sClasses = 'js-wall-more'
- iCount = $moreCount
- sAttributes = "data-more-target=\".js-wall-entry-container[data-id=0]\" data-proxy-last_id=\"{$smarty.local.lastId}\""}
+ classes = 'js-wall-more'
+ count = $moreCount
+ attributes = "data-more-target=\".js-wall-entry-container[data-id=0]\" data-proxy-last_id=\"{$smarty.local.lastId}\""}
{/if}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/forms/search_forms/search_form.blogs.tpl b/application/frontend/skin/developer/forms/search_forms/search_form.blogs.tpl
index bbfc37d5..31890042 100644
--- a/application/frontend/skin/developer/forms/search_forms/search_form.blogs.tpl
+++ b/application/frontend/skin/developer/forms/search_forms/search_form.blogs.tpl
@@ -4,7 +4,7 @@
* @styles css/forms.css
*}
-{include 'components/search_form/search_form.tpl'
+{include 'components/search-form/search-form.tpl'
sName = 'blog'
sMethod = 'post'
sPlaceholder = $aLang.blog.search.placeholder
diff --git a/application/frontend/skin/developer/forms/search_forms/search_form.main.tpl b/application/frontend/skin/developer/forms/search_forms/search_form.main.tpl
index 88cd423c..fde147a0 100644
--- a/application/frontend/skin/developer/forms/search_forms/search_form.main.tpl
+++ b/application/frontend/skin/developer/forms/search_forms/search_form.main.tpl
@@ -4,4 +4,4 @@
* @styles css/forms.css
*}
-{include 'components/search_form/search_form.tpl' sName='main' sAction="{router page='search'}{$sSearchType|default:'topics'}" sMods=$smarty.local.sMods}
\ No newline at end of file
+{include 'components/search-form/search-form.tpl' sName='main' sAction="{router page='search'}{$sSearchType|default:'topics'}" sMods=$smarty.local.sMods}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/forms/search_forms/search_form.users.tpl b/application/frontend/skin/developer/forms/search_forms/search_form.users.tpl
index 80b9b6cc..42597fd6 100644
--- a/application/frontend/skin/developer/forms/search_forms/search_form.users.tpl
+++ b/application/frontend/skin/developer/forms/search_forms/search_form.users.tpl
@@ -4,7 +4,7 @@
* @styles css/forms.css
*}
-{include 'components/search_form/search_form.tpl'
+{include 'components/search-form/search-form.tpl'
sName = 'blog'
sMethod = 'post'
sPlaceholder = $aLang.user.search.placeholder
diff --git a/application/frontend/skin/developer/layouts/layout.base.tpl b/application/frontend/skin/developer/layouts/layout.base.tpl
index ebf1a9ef..7edb707f 100644
--- a/application/frontend/skin/developer/layouts/layout.base.tpl
+++ b/application/frontend/skin/developer/layouts/layout.base.tpl
@@ -113,11 +113,11 @@
{* Системные сообщения *}
{if ! $bNoSystemMessages}
{if $aMsgError}
- {include 'components/alert/alert.tpl' sMods='error' mAlerts=$aMsgError bClose=true}
+ {include 'components/alert/alert.tpl' text=$aMsgError mods='error' close=true}
{/if}
{if $aMsgNotice}
- {include 'components/alert/alert.tpl' mAlerts=$aMsgNotice bClose=true}
+ {include 'components/alert/alert.tpl' text=$aMsgNotice close=true}
{/if}
{/if}
{/block}
diff --git a/application/frontend/skin/developer/modals/modal.add_friend.tpl b/application/frontend/skin/developer/modals/modal.add_friend.tpl
index 8e7805a4..b1e553ad 100644
--- a/application/frontend/skin/developer/modals/modal.add_friend.tpl
+++ b/application/frontend/skin/developer/modals/modal.add_friend.tpl
@@ -25,5 +25,5 @@
{/block}
{block 'modal_footer_begin'}
- {include 'components/button/button.tpl' sMods='primary' sForm='#add_friend_form' sText={lang name='user.friends.form.fields.submit.text'}}
+ {include 'components/button/button.tpl' mods='primary' form='add_friend_form' text={lang name='user.friends.form.fields.submit.text'}}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/modals/modal.blog_delete.tpl b/application/frontend/skin/developer/modals/modal.blog_delete.tpl
index a5abce00..d38c3108 100644
--- a/application/frontend/skin/developer/modals/modal.blog_delete.tpl
+++ b/application/frontend/skin/developer/modals/modal.blog_delete.tpl
@@ -36,5 +36,5 @@
{/block}
{block name='modal_footer_begin'}
- {include 'components/button/button.tpl' sForm='#js-blog-remove-form' sText=$aLang.common.remove sMods='primary'}
+ {include 'components/button/button.tpl' form='js-blog-remove-form' text=$aLang.common.remove mods='primary'}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/modals/modal.favourite_tags.tpl b/application/frontend/skin/developer/modals/modal.favourite_tags.tpl
index 240b30d5..01513f74 100644
--- a/application/frontend/skin/developer/modals/modal.favourite_tags.tpl
+++ b/application/frontend/skin/developer/modals/modal.favourite_tags.tpl
@@ -23,8 +23,8 @@
{block name='modal_footer_begin'}
{include 'components/button/button.tpl'
- sForm = '#js-favourite-form'
- sText = $aLang.common.save
- sClasses = 'js-tags-form-submit'
- sMods = 'primary'}
+ form = 'js-favourite-form'
+ text = $aLang.common.save
+ classes = 'js-tags-form-submit'
+ mods = 'primary'}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/modals/modal.image_crop.tpl b/application/frontend/skin/developer/modals/modal.image_crop.tpl
index 472a4177..f32a9f47 100644
--- a/application/frontend/skin/developer/modals/modal.image_crop.tpl
+++ b/application/frontend/skin/developer/modals/modal.image_crop.tpl
@@ -29,5 +29,5 @@
{/block}
{block 'modal_footer_begin'}
- {include 'components/button/button.tpl' sText=$aLang.common.save sClasses='js-ajax-image-crop-submit' sMods='primary'}
+ {include 'components/button/button.tpl' text=$aLang.common.save sClasses='js-ajax-image-crop-submit' mods='primary'}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/modals/modal.poll_create.tpl b/application/frontend/skin/developer/modals/modal.poll_create.tpl
index 043d5666..ee1a2606 100644
--- a/application/frontend/skin/developer/modals/modal.poll_create.tpl
+++ b/application/frontend/skin/developer/modals/modal.poll_create.tpl
@@ -22,8 +22,8 @@
{block name='modal_footer_begin'}
{include 'components/button/button.tpl'
- sForm = '#js-poll-form'
- sText = ($oPoll) ? $aLang.common.save : $aLang.common.add
- sClasses = 'js-poll-form-submit'
- sMods = 'primary'}
+ form = 'js-poll-form'
+ text = ($oPoll) ? $aLang.common.save : $aLang.common.add
+ classes = 'js-poll-form-submit'
+ mods = 'primary'}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/modals/modal.user_list.tpl b/application/frontend/skin/developer/modals/modal.user_list.tpl
index b6d83e55..1c008146 100644
--- a/application/frontend/skin/developer/modals/modal.user_list.tpl
+++ b/application/frontend/skin/developer/modals/modal.user_list.tpl
@@ -32,9 +32,9 @@
{block 'modal_footer_begin'}
{if $aUserList && $bSelectable}
{include 'components/button/button.tpl'
- sText = $aLang.common.add
- sMods = 'primary'
- sClasses = 'js-user-list-select-add'
- sAttributes = "data-target=\"{$sTarget}\""}
+ text = $aLang.common.add
+ mods = 'primary'
+ classes = 'js-user-list-select-add'
+ attributes = "data-target=\"{$sTarget}\""}
{/if}
{/block}
\ No newline at end of file
diff --git a/application/frontend/skin/developer/settings/config/config.php b/application/frontend/skin/developer/settings/config/config.php
index 919183b7..1d5cbdfc 100644
--- a/application/frontend/skin/developer/settings/config/config.php
+++ b/application/frontend/skin/developer/settings/config/config.php
@@ -36,38 +36,39 @@ $aCss = array(
"___path.skin.assets.web___/css/common.css",
// Components
- "___path.skin.assets.web___/css/components/vote.css",
+ "___path.skin.web___/components/vote/css/vote.css",
"___path.skin.web___/components/actionbar/css/actionbar.css",
- "___path.skin.assets.web___/css/components/more.css",
- "___path.skin.assets.web___/css/components/favourite.css",
- "___path.skin.assets.web___/css/components/user_note.css",
+ "___path.skin.web___/components/favourite/css/favourite.css",
+ "___path.skin.web___/components/comment/css/comment.css",
+ "___path.skin.web___/components/topic/css/topic.css",
+ "___path.skin.web___/components/wall/css/wall.css",
+ "___path.skin.web___/components/blog/css/blog.css",
+ "___path.skin.web___/components/poll/css/poll.css",
+ "___path.skin.web___/components/more/css/more.css",
+ "___path.skin.web___/components/alphanumeric/css/alphanumeric.css",
+ "___path.skin.web___/components/media/css/media.css",
+ "___path.skin.web___/components/pagination/css/pagination.css",
+ "___path.skin.web___/components/field/css/field.css",
+ "___path.skin.web___/components/search-form/css/search-form.css",
+ "___path.skin.web___/components/note/css/note.css",
+ "___path.skin.web___/components/info-list/css/info-list.css",
+ "___path.skin.web___/components/uploader/css/uploader.css",
+ "___path.skin.web___/components/activity/css/activity.css",
+ "___path.skin.web___/components/block/css/block.css",
"___path.skin.assets.web___/css/components/user_item.css",
"___path.skin.assets.web___/css/components/user_list_small.css",
"___path.skin.assets.web___/css/components/user_list_add.css",
"___path.skin.assets.web___/css/components/user_list_avatar.css",
- "___path.skin.assets.web___/css/components/pagination.css",
- "___path.skin.assets.web___/css/components/info_list.css",
"___path.skin.assets.web___/css/components/tags.css",
- "___path.skin.assets.web___/css/components/alphanumeric.css",
- "___path.skin.assets.web___/css/components/search_form.css",
- "___path.skin.assets.web___/css/components/field.css",
- "___path.skin.web___/components/uploader/css/uploader.css",
- "___path.skin.assets.web___/css/components/media.css",
// Template's styles
"___path.skin.assets.web___/css/icons.css",
"___path.skin.assets.web___/css/tables.css",
- "___path.skin.assets.web___/css/topic.css",
- "___path.skin.assets.web___/css/comments.css",
"___path.skin.assets.web___/css/blocks.css",
- "___path.skin.assets.web___/css/blog.css",
"___path.skin.assets.web___/css/modals.css",
"___path.skin.assets.web___/css/profile.css",
- "___path.skin.assets.web___/css/wall.css",
- "___path.skin.assets.web___/css/activity.css",
"___path.skin.assets.web___/css/admin.css",
"___path.skin.assets.web___/css/toolbar.css",
- "___path.skin.assets.web___/css/poll.css",
"___path.skin.assets.web___/css/messages.css",
"___path.skin.assets.web___/css/sort.css",
"___path.skin.assets.web___/css/print.css",
@@ -80,7 +81,7 @@ if ( Config::Get('view.theme') ) {
// Стили для RTL языков
if ( Config::Get('view.rtl') ) {
- $aCss[] = "___path.skin.assets.web___/css/components/vote-rtl.css";
+ $aCss[] = "___path.skin.web___/components/vote/css/vote-rtl.css";
}
// Подключение фронтенд фреймворка