mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
Доработка компонентов
This commit is contained in:
parent
1162ae606f
commit
6863326fbe
|
@ -1502,7 +1502,7 @@ class ActionBlog extends Action
|
|||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'iUserId' => $oUser->getId(),
|
||||
'sHtml' => $oViewer->Fetch("components/user_list_small/user_list_small_item.blog_invite.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.blog_invite.tpl")
|
||||
);
|
||||
$this->SendBlogInvite($oBlog, $oUser);
|
||||
} else {
|
||||
|
|
|
@ -294,7 +294,7 @@ class ActionStream extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user_list_small/user_list_small_item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
|
|
@ -829,7 +829,7 @@ class ActionTalk extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user_list_small/user_list_small_item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
|
|
@ -235,7 +235,7 @@ class ActionUserfeed extends Action
|
|||
'sUserLogin' => htmlspecialchars($sUser),
|
||||
'sUserWebPath' => $oUser->getUserWebPath(),
|
||||
'sUserAvatar48' => $oUser->getProfileAvatarPath(48),
|
||||
'sHtml' => $oViewer->Fetch("components/user_list_small/user_list_small_item.tpl")
|
||||
'sHtml' => $oViewer->Fetch("components/user/user-list-small-item.tpl")
|
||||
);
|
||||
} else {
|
||||
$aResult[] = array(
|
||||
|
|
|
@ -525,19 +525,17 @@ $config['head']['default']['js'] = array(
|
|||
"___path.framework.frontend.web___/js/core/utils.js",
|
||||
"___path.framework.frontend.web___/js/core/timer.js",
|
||||
/* User Interface */
|
||||
"___path.framework.frontend.web___/js/ui/dropdown.js",
|
||||
"___path.framework.frontend.web___/js/ui/tab.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/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.skin.web___/components/alert/js/alert.js",
|
||||
"___path.skin.web___/components/toolbar/js/toolbar.js",
|
||||
"___path.skin.web___/components/button/js/button-polyfills.js",
|
||||
"___path.skin.web___/components/user-list-add/js/user-list-add.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",
|
||||
|
@ -559,31 +557,30 @@ $config['head']['default']['js'] = array(
|
|||
"___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/subscribe.js",
|
||||
"___path.application.web___/frontend/common/js/geo.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/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/admin.js",
|
||||
"___path.application.web___/frontend/common/js/userfield.js",
|
||||
"___path.application.web___/frontend/common/js/media.js",
|
||||
"___path.skin.web___/components/talk/js/talk.js",
|
||||
"___path.skin.web___/components/talk/js/message-users.js",
|
||||
"___path.skin.web___/components/user/js/user.js",
|
||||
"___path.skin.web___/components/user/js/user-follow.js",
|
||||
"___path.skin.web___/components/user/js/user-friend.js",
|
||||
"___path.skin.web___/components/field/js/field.geo.js",
|
||||
"___path.skin.web___/components/field/js/field.captcha.js",
|
||||
"___path.skin.web___/components/uploader/js/uploader.js",
|
||||
"___path.skin.web___/components/uploader/js/uploader-file-list.js",
|
||||
"___path.skin.web___/components/uploader/js/uploader-file.js",
|
||||
"___path.skin.web___/components/uploader/js/uploader-info.js",
|
||||
"___path.skin.web___/components/media/js/media.js",
|
||||
"___path.application.web___/frontend/common/js/tags.js",
|
||||
"___path.skin.web___/components/tags/js/tags.js",
|
||||
"___path.skin.web___/components/actionbar/js/actionbar-item-select.js",
|
||||
"___path.application.web___/frontend/common/js/blocks.js",
|
||||
"___path.application.web___/frontend/common/js/subscribe.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/admin.js",
|
||||
"___path.application.web___/frontend/common/js/content.js",
|
||||
"___path.application.web___/frontend/common/js/message_users.js",
|
||||
"___path.application.web___/frontend/common/js/search.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),
|
||||
"//yandex.st/share/share.js" => array('merge' => false),
|
||||
);
|
||||
|
||||
$config['head']['default']['css'] = array(
|
||||
|
@ -595,10 +592,10 @@ $config['head']['default']['css'] = array(
|
|||
"___path.skin.web___/components/dropdown/css/dropdown.css",
|
||||
"___path.skin.web___/components/button/css/button.css",
|
||||
"___path.skin.web___/components/modal/css/modal.css",
|
||||
"___path.skin.web___/components/toolbar/css/toolbar.css",
|
||||
"___path.framework.frontend.web___/css/forms.css",
|
||||
"___path.framework.frontend.web___/css/navs.css",
|
||||
"___path.framework.frontend.web___/css/tooltip.css",
|
||||
"___path.framework.frontend.web___/css/toolbar.css",
|
||||
"___path.framework.frontend.web___/css/typography.css",
|
||||
"___path.framework.frontend.web___/css/grid.css"
|
||||
);
|
||||
|
|
|
@ -1,166 +0,0 @@
|
|||
/**
|
||||
* Пользовательские поля (контакты, соцсети и т.д.)
|
||||
*
|
||||
* @module ls/userfield
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
var ls = ls || {};
|
||||
|
||||
ls.userfield =( function ($) {
|
||||
|
||||
this.iCountMax = 2;
|
||||
|
||||
this.showAddForm = function(){
|
||||
$('#user_fields_form_name').val('');
|
||||
$('#user_fields_form_title').val('');
|
||||
$('#user_fields_form_id').val('');
|
||||
$('#user_fields_form_pattern').val('');
|
||||
$('#user_fields_form_type').val('');
|
||||
$('#user_fields_form_action').val('add');
|
||||
$('#userfield_form').jqmShow();
|
||||
};
|
||||
|
||||
this.showEditForm = function(id) {
|
||||
$('#user_fields_form_action').val('update');
|
||||
var name = $('#field_'+id+' .userfield_admin_name').text();
|
||||
var title = $('#field_'+id+' .userfield_admin_title').text();
|
||||
var pattern = $('#field_'+id+' .userfield_admin_pattern').text();
|
||||
var type = $('#field_'+id+' .userfield_admin_type').text();
|
||||
$('#user_fields_form_name').val(name);
|
||||
$('#user_fields_form_title').val(title);
|
||||
$('#user_fields_form_pattern').val(pattern);
|
||||
$('#user_fields_form_type').val(type);
|
||||
$('#user_fields_form_id').val(id);
|
||||
$('#userfield_form').jqmShow();
|
||||
};
|
||||
|
||||
this.applyForm = function(){
|
||||
$('#userfield_form').jqmHide();
|
||||
if ($('#user_fields_form_action').val() == 'add') {
|
||||
this.addUserfield();
|
||||
} else if ($('#user_fields_form_action').val() == 'update') {
|
||||
this.updateUserfield();
|
||||
}
|
||||
};
|
||||
|
||||
this.addUserfield = function() {
|
||||
var name = $('#user_fields_form_name').val();
|
||||
var title = $('#user_fields_form_title').val();
|
||||
var pattern = $('#user_fields_form_pattern').val();
|
||||
var type = $('#user_fields_form_type').val();
|
||||
|
||||
var url = aRouter['admin']+'userfields';
|
||||
var params = {'action':'add', 'name':name, 'title':title, 'pattern':pattern, 'type':type};
|
||||
|
||||
ls.hook.marker('addUserfieldBefore');
|
||||
ls.ajax.load(url, params, function(data) {
|
||||
if (!data.bStateError) {
|
||||
liElement = $('<li id="field_'+data.id+'"><span class="userfield_admin_name"></span > / <span class="userfield_admin_title"></span> / <span class="userfield_admin_pattern"></span> / <span class="userfield_admin_type"></span>'
|
||||
+'<div class="userfield-actions"><a class="icon-edit" href="javascript:ls.userfield.showEditForm('+data.id+')"></a> '
|
||||
+'<a class="icon-remove" href="javascript:ls.userfield.deleteUserfield('+data.id+')"></a></div></li>')
|
||||
;
|
||||
$('#user_field_list').append(liElement);
|
||||
$('#field_'+data.id+' .userfield_admin_name').text(name);
|
||||
$('#field_'+data.id+' .userfield_admin_title').text(title);
|
||||
$('#field_'+data.id+' .userfield_admin_pattern').text(pattern);
|
||||
$('#field_'+data.id+' .userfield_admin_type').text(type);
|
||||
ls.msg.notice(data.sMsgTitle,data.sMsg);
|
||||
ls.hook.run('ls_userfield_add_userfield_after',[params, data],liElement);
|
||||
} else {
|
||||
ls.msg.error(data.sMsgTitle,data.sMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.updateUserfield = function() {
|
||||
var id = $('#user_fields_form_id').val();
|
||||
var name = $('#user_fields_form_name').val();
|
||||
var title = $('#user_fields_form_title').val();
|
||||
var pattern = $('#user_fields_form_pattern').val();
|
||||
var type = $('#user_fields_form_type').val();
|
||||
|
||||
var url = aRouter['admin']+'userfields';
|
||||
var params = {'action':'update', 'id':id, 'name':name, 'title':title, 'pattern':pattern, 'type':type};
|
||||
|
||||
ls.hook.marker('updateUserfieldBefore');
|
||||
ls.ajax.load(url, params, function(data) {
|
||||
if (!data.bStateError) {
|
||||
$('#field_'+id+' .userfield_admin_name').text(name);
|
||||
$('#field_'+id+' .userfield_admin_title').text(title);
|
||||
$('#field_'+id+' .userfield_admin_pattern').text(pattern);
|
||||
$('#field_'+id+' .userfield_admin_type').text(type);
|
||||
ls.msg.notice(data.sMsgTitle,data.sMsg);
|
||||
ls.hook.run('ls_userfield_update_userfield_after',[params, data]);
|
||||
} else {
|
||||
ls.msg.error(data.sMsgTitle,data.sMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.deleteUserfield = function(id) {
|
||||
if (!confirm(ls.lang.get('user_field_delete_confirm'))) {return;}
|
||||
|
||||
var url = aRouter['admin']+'userfields';
|
||||
var params = {'action':'delete', 'id':id};
|
||||
|
||||
ls.hook.marker('deleteUserfieldBefore');
|
||||
ls.ajax.load(url, params, function(data) {
|
||||
if (!data.bStateError) {
|
||||
$('#field_'+id).remove();
|
||||
ls.msg.notice(data.sMsgTitle,data.sMsg);
|
||||
ls.hook.run('ls_userfield_update_userfield_after',[params, data]);
|
||||
} else {
|
||||
ls.msg.error(data.sMsgTitle,data.sMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.addFormField = function() {
|
||||
var tpl=$('#profile_user_field_template').clone();
|
||||
/**
|
||||
* Находим доступный тип контакта
|
||||
*/
|
||||
var value;
|
||||
tpl.find('select').find('option').each(function(k,v){
|
||||
if (this.getCountFormField($(v).val())<this.iCountMax) {
|
||||
value=$(v).val();
|
||||
return false;
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
if (value) {
|
||||
tpl.find('select').val(value);
|
||||
$('#user-field-contact-contener').append(tpl.show());
|
||||
} else {
|
||||
ls.msg.error('',ls.lang.get('user.settings.profile.notices.error_max_userfields',{count: this.iCountMax}));
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
this.changeFormField = function(obj) {
|
||||
var iCount=this.getCountFormField($(obj).val());
|
||||
if (iCount>this.iCountMax) {
|
||||
ls.msg.error('',ls.lang.get('user.settings.profile.notices.error_max_userfields',{count: this.iCountMax}));
|
||||
}
|
||||
};
|
||||
|
||||
this.getCountFormField = function(value) {
|
||||
var iCount=0;
|
||||
$('#user-field-contact-contener').find('select').each(function(k,v){
|
||||
if (value==$(v).val()) {
|
||||
iCount++;
|
||||
}
|
||||
});
|
||||
return iCount;
|
||||
};
|
||||
|
||||
this.removeFormField = function(obj) {
|
||||
$(obj).parent('.js-user-field-item').detach();
|
||||
return false;
|
||||
};
|
||||
return this;
|
||||
}).call(ls.userfield || {},jQuery);
|
|
@ -2,21 +2,12 @@
|
|||
* Админка
|
||||
*
|
||||
* @template actions/ActionAdmin/*.tpl
|
||||
*
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Настраиваемые поля
|
||||
*/
|
||||
.userfield-list li { background: #f7f7f7; margin-bottom: 1px; padding: 13px 65px 13px 15px; position: relative; }
|
||||
.userfield-list li:hover { background: #eee; }
|
||||
.userfield-actions { position: absolute; top: 15px; right: 15px; }
|
||||
|
||||
|
||||
/**
|
||||
* Информация о производительности
|
||||
*
|
||||
|
|
|
@ -16,15 +16,15 @@
|
|||
|
||||
{block 'block_content'}
|
||||
{* Создатель *}
|
||||
{include 'components/user_list_small/user_list_small.tpl' aUserList=[ $oBlog->getOwner() ] sUserListSmallTitle=$aLang.blog.owner}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=[ $oBlog->getOwner() ] sUserListSmallTitle=$aLang.blog.owner}
|
||||
|
||||
{* Администраторы *}
|
||||
{if count($aBlogAdministrators)}
|
||||
{include 'components/user_list_small/user_list_small.tpl' aUserList=$aBlogAdministrators sUserListSmallTitle="{$aLang.blog.administrators} ({count($aBlogAdministrators)})"}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=$aBlogAdministrators sUserListSmallTitle="{$aLang.blog.administrators} ({count($aBlogAdministrators)})"}
|
||||
{/if}
|
||||
|
||||
{* Модераторы *}
|
||||
{if count($aBlogModerators)}
|
||||
{include 'components/user_list_small/user_list_small.tpl' aUserList=$aBlogModerators sUserListSmallTitle="{$aLang.blog.moderators} ({count($aBlogModerators)})"}
|
||||
{include 'components/user/user-list-small.tpl' aUserList=$aBlogModerators sUserListSmallTitle="{$aLang.blog.moderators} ({count($aBlogModerators)})"}
|
||||
{/if}
|
||||
{/block}
|
|
@ -16,9 +16,9 @@
|
|||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include 'components/user_list_add/user_list_add.tpl'
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = "js-user-list-add-blog-invite"
|
||||
sUserListAddAttributes = "data-param-i-target-id=\"{$oBlogEdit->getId()}\""
|
||||
aUserList = $aBlogUsersInvited
|
||||
sUserListSmallItemPath = 'components/user_list_small/user_list_small_item.blog_invite.tpl'}
|
||||
sUserListSmallItemPath = 'components/blog/user-list-small-item.blog-invite.tpl'}
|
||||
{/block}
|
|
@ -23,5 +23,5 @@
|
|||
{/block}
|
||||
|
||||
{block 'block_content'}
|
||||
{include 'components/user_list_avatar/user_list_avatar.tpl' aUsersList=$aBlogUsers}
|
||||
{include 'components/user/user-list-avatar.tpl' aUsersList=$aBlogUsers}
|
||||
{/block}
|
|
@ -4,7 +4,7 @@
|
|||
* @param array $users
|
||||
*}
|
||||
|
||||
{include 'components/user_list_add/user_list_add.tpl'
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = 'js-activity-users'
|
||||
aUserList = $smarty.local.users
|
||||
sUserListNote = $aLang.activity.users.note}
|
|
@ -100,7 +100,7 @@
|
|||
{block 'article_footer_info_items'}
|
||||
{* Автор топика *}
|
||||
<li class="{$component}-info-item {$component}-info-item--author">
|
||||
{include 'components/user_item/user_item.tpl' oUser=$user iUserItemAvatarSize=48 sUserItemStyle='rounded'}
|
||||
{include 'components/user/user-item.tpl' oUser=$user iUserItemAvatarSize=48 sUserItemStyle='rounded'}
|
||||
</li>
|
||||
|
||||
{* Ссылка на комментарии *}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<tr>
|
||||
<td class="cell-name">
|
||||
{include 'components/user_item/user_item.tpl' oUser=$oUser}
|
||||
{include 'components/user/user-item.tpl' oUser=$oUser}
|
||||
</td>
|
||||
|
||||
{if $oUser->getId() == $oUserCurrent->getId()}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Расширяет основной шаблон с пользователем добавляя кнопку "Повторно отправить приглашение" в блоке "Пригласить пользователей в блог"
|
||||
*}
|
||||
|
||||
{extends 'components/user_list_small/user_list_small_item.tpl'}
|
||||
{extends 'components/user/user-list-small-item.tpl'}
|
||||
|
||||
{block 'components/user_list_small/user_list_small_item_actions'}
|
||||
<li class="icon-repeat js-blog-invite-user-repeat" title="{$aLang.blog.invite.repeat}" data-user-id="{$iUserId}"></li>
|
|
@ -4,7 +4,7 @@
|
|||
* @param array $users
|
||||
*}
|
||||
|
||||
{include 'components/user_list_add/user_list_add.tpl'
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = 'js-feed-users'
|
||||
aUserList = $smarty.local.users
|
||||
sUserListAddAttributes = 'data-param-type="users"'
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* Captcha
|
||||
*
|
||||
* @module captcha
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
$.widget( "livestreet.captcha", {
|
||||
/**
|
||||
* Дефолтные опции
|
||||
*/
|
||||
options: {
|
||||
name: '',
|
||||
url: aRouter.ajax + 'captcha/'
|
||||
},
|
||||
|
||||
/**
|
||||
* Конструктор
|
||||
*
|
||||
* @constructor
|
||||
* @private
|
||||
*/
|
||||
_create: function() {
|
||||
this.options = $.extend({}, this.options, ls.utils.getDataOptions(this.element, 'captcha'));
|
||||
|
||||
this._on({ click: this.update });
|
||||
|
||||
this.update();
|
||||
},
|
||||
|
||||
/**
|
||||
* Получает url каптчи
|
||||
*/
|
||||
getUrl: function () {
|
||||
return this.options.url + '?security_ls_key=' + LIVESTREET_SECURITY_KEY + '&n=' + Math.random() + '&name=' + this.options.name;
|
||||
},
|
||||
|
||||
/**
|
||||
* Обновляет каптчу
|
||||
*/
|
||||
update: function () {
|
||||
this.element.css('background-image', 'url(' + this.getUrl() + ')');
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
|
@ -4,7 +4,7 @@
|
|||
* @param array $users
|
||||
*}
|
||||
|
||||
{include 'components/user_list_add/user_list_add.tpl'
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListTitle = $aLang.talk.blacklist.title
|
||||
sUserListNote = $aLang.talk.blacklist.note
|
||||
sUserListAddClasses = 'js-user-list-add-blacklist'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Расширяет основной шаблон с пользователем добавляя кнопку "Повторно отправить приглашение" в блоке "Пригласить пользователей в блог"
|
||||
*}
|
||||
|
||||
{extends 'components/user_list_small/user_list_small_item.tpl'}
|
||||
{extends 'components/user/user-list-small-item.tpl'}
|
||||
|
||||
{block 'components/user_list_small/user_list_small_item_classes'}
|
||||
{if $oUserContainer && $oUserContainer->getUserActive() != $TALK_USER_ACTIVE}inactive{/if}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Участники личного сообщения
|
||||
*}
|
||||
|
||||
{include 'components/user_list_add/user_list_add.tpl'
|
||||
{include 'components/user-list-add/user-list-add.tpl'
|
||||
sUserListAddClasses = "message-users js-message-users"
|
||||
sUserListAddAttributes = "data-param-i-target-id=\"{$oTalk->getId()}\""
|
||||
aUserList = $oTalk->getTalkUsers()
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* Toolbar
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
.toolbar { position: fixed; z-index: 100; }
|
||||
|
||||
/* Элемент тулбара */
|
||||
.toolbar-item { width: 34px; line-height: 14px; background: #fff; -webkit-box-shadow: 0 0 5px rgba(0,0,0,.05); box-shadow: 0 0 5px rgba(0,0,0,.05); margin-bottom: 10px; }
|
||||
.toolbar-item-button { display: block; padding: 10px; cursor: pointer; }
|
||||
.toolbar-item-button:hover { background: #fafafa; }
|
||||
.toolbar-item i { display: block; }
|
|
@ -0,0 +1,54 @@
|
|||
/**
|
||||
* Toolbar
|
||||
*
|
||||
* @module toolbar
|
||||
*
|
||||
* @license GNU General Public License, version 2
|
||||
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
||||
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
||||
*/
|
||||
|
||||
$.widget( "livestreet.toolbar", {
|
||||
/**
|
||||
* Дефолтные опции
|
||||
*/
|
||||
options: {
|
||||
// Селектор объекта относительно которого будет позиционироваться тулбар
|
||||
target: null,
|
||||
// Выравнивание по правой/левой стороне относителного целевого элемента
|
||||
// Возможные значения: 'left', 'right'
|
||||
align: 'right',
|
||||
// Смещение по оси X
|
||||
offsetX: 0,
|
||||
// Смещение по оси Y
|
||||
offsetY: 0,
|
||||
// Callback вызываемый при начале вычисления нового положения тулбара
|
||||
reposition: null
|
||||
},
|
||||
|
||||
/**
|
||||
* Конструктор
|
||||
*
|
||||
* @constructor
|
||||
* @private
|
||||
*/
|
||||
_create: function() {
|
||||
this.target = $(this.options.target);
|
||||
|
||||
this.window.on('ready resize scroll', this.reposition.bind(this));
|
||||
},
|
||||
|
||||
/**
|
||||
* Вычисление нового положения тулбара
|
||||
*/
|
||||
reposition: function () {
|
||||
this.targetPos = this.target.offset();
|
||||
|
||||
this._trigger('reposition', null, this);
|
||||
|
||||
this.element.css({
|
||||
'top': this.targetPos.top + this.options.offsetY,
|
||||
'left': (this.options.align == 'right' ? this.targetPos.left + this.target.outerWidth() + this.options.offsetX : this.targetPos.left - this.element.outerWidth() - this.options.offsetX) - this.document.scrollLeft()
|
||||
});
|
||||
}
|
||||
});
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
{* Список пользователей *}
|
||||
{* TODO: Изменить порядок вывода - сначало новые *}
|
||||
{include 'components/user_list_small/user_list_small.tpl'
|
||||
{include 'components/user/user-list-small.tpl'
|
||||
bHideableEmptyAlert = true
|
||||
aUserList = $aUserList
|
||||
bUserListSmallShowActions = true
|
|
@ -204,7 +204,7 @@
|
|||
*}
|
||||
{if $aUsersFriend}
|
||||
{capture 'user_info_friends'}
|
||||
{include 'components/user_list_avatar/user_list_avatar.tpl' aUsersList=$aUsersFriend}
|
||||
{include 'components/user/user-list-avatar.tpl' aUsersList=$aUsersFriend}
|
||||
{/capture}
|
||||
|
||||
{include 'components/user/info-group.tpl'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{* TODO: Костыль для блогов *}
|
||||
{if $oUser->getUser()}{$oUser = $oUser->getUser()}{/if}
|
||||
|
||||
<li>{include 'components/user_item/user_item.tpl' oUser=$oUser iUserItemAvatarSize=64}</li>
|
||||
<li>{include 'components/user/user-item.tpl' oUser=$oUser iUserItemAvatarSize=64}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
|
@ -11,7 +11,7 @@
|
|||
{/if}
|
||||
|
||||
{* Пользователь *}
|
||||
{include 'components/user_item/user_item.tpl' oUser=$oUser}
|
||||
{include 'components/user/user-item.tpl' oUser=$oUser}
|
||||
|
||||
{* Действия *}
|
||||
{if $bUserListSmallShowActions}
|
|
@ -26,7 +26,7 @@
|
|||
{/if}
|
||||
|
||||
{if ! $aUserListSmallExclude || ! in_array($oUser->getId(), $aUserListSmallExclude)}
|
||||
{include $sUserListSmallItemPath|default:'./user_list_small_item.tpl' bUserListItemShowRemove=! $aUserListSmallExcludeRemove || ! in_array($iUserId, $aUserListSmallExcludeRemove)}
|
||||
{include $sUserListSmallItemPath|default:'./user-list-small-item.tpl' bUserListItemShowRemove=! $aUserListSmallExcludeRemove || ! in_array($iUserId, $aUserListSmallExcludeRemove)}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
|
@ -22,7 +22,7 @@
|
|||
{/if}
|
||||
|
||||
{* Список *}
|
||||
{include 'components/user_list_small/user_list_small.tpl'
|
||||
{include 'components/user/user-list-small.tpl'
|
||||
aUserList = $aUserList
|
||||
bUserListSmallSelectable = $bSelectable
|
||||
bUserListSmallShowEmpty = true
|
||||
|
|
|
@ -45,6 +45,7 @@ $aCss = array(
|
|||
"___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/sort/css/sort.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",
|
||||
|
@ -55,22 +56,21 @@ $aCss = array(
|
|||
"___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/tags.css",
|
||||
"___path.skin.web___/components/tags/css/tags.css",
|
||||
"___path.skin.web___/components/user/css/user.css",
|
||||
"___path.skin.web___/components/user/css/user-item.css",
|
||||
"___path.skin.web___/components/user/css/user-list-small.css",
|
||||
"___path.skin.web___/components/user/css/user-list-avatar.css",
|
||||
"___path.skin.web___/components/user-list-add/css/user-list-add.css",
|
||||
"___path.skin.web___/components/talk/css/talk.css",
|
||||
|
||||
// Template's styles
|
||||
"___path.skin.assets.web___/css/icons.css",
|
||||
"___path.skin.assets.web___/css/tables.css",
|
||||
"___path.skin.assets.web___/css/blocks.css",
|
||||
"___path.skin.assets.web___/css/modals.css",
|
||||
"___path.skin.assets.web___/css/profile.css",
|
||||
"___path.skin.assets.web___/css/admin.css",
|
||||
"___path.skin.assets.web___/css/toolbar.css",
|
||||
"___path.skin.assets.web___/css/messages.css",
|
||||
"___path.skin.assets.web___/css/sort.css",
|
||||
"___path.skin.assets.web___/css/print.css",
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue