mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Группировка по дате на странице активности, облегченная тема light для шаблонов без теней и закруглений, исправлены мелкие баги
This commit is contained in:
parent
38fd2dfc38
commit
d5d8150946
|
@ -169,6 +169,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -209,6 +210,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
@ -253,6 +255,7 @@ class ActionStream extends Action {
|
|||
|
||||
$oViewer=$this->Viewer_GetLocalViewer();
|
||||
$oViewer->Assign('aStreamEvents', $aEvents);
|
||||
$oViewer->Assign('sDateLast', getRequest('date_last'));
|
||||
if (count($aEvents)) {
|
||||
$oEvenLast=end($aEvents);
|
||||
$this->Viewer_AssignAjax('iStreamLastId', $oEvenLast->getId());
|
||||
|
|
|
@ -59,6 +59,7 @@ ls.blog = (function ($) {
|
|||
}
|
||||
var listItem = $('<li><a href="'+item.sUserWebPath+'" class="user">'+item.sUserLogin+'</a></li>');
|
||||
$('#invited_list').append(listItem);
|
||||
$('#blog-invite-empty').hide();
|
||||
ls.hook.run('ls_blog_add_invite_user_after',[idBlog,item],listItem);
|
||||
}
|
||||
});
|
||||
|
@ -103,6 +104,7 @@ ls.blog = (function ($) {
|
|||
} else {
|
||||
$('#blog-invite-remove-item-'+idBlog+'-'+idUser).remove();
|
||||
ls.msg.notice(null, result.sMsg);
|
||||
if ($('#invited_list li').length == 0) $('#blog-invite-empty').show();
|
||||
ls.hook.run('ls_blog_remove_invite_after',[idUser,idBlog,result]);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,6 +2,7 @@ var ls = ls || {};
|
|||
|
||||
ls.stream =( function ($) {
|
||||
this.isBusy = false;
|
||||
this.dateLast = null;
|
||||
|
||||
this.subscribe = function (iTargetUserId) {
|
||||
var url = aRouter['stream']+'subscribe/';
|
||||
|
@ -85,7 +86,7 @@ ls.stream =( function ($) {
|
|||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['stream']+'get_more/';
|
||||
var params = {'last_id':lastId};
|
||||
var params = {'last_id':lastId,'date_last':this.dateLast};
|
||||
|
||||
ls.hook.marker('getMoreBefore');
|
||||
ls.ajax(url, params, function(data) {
|
||||
|
@ -112,7 +113,7 @@ ls.stream =( function ($) {
|
|||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['stream']+'get_more_all/';
|
||||
var params = {'last_id':lastId};
|
||||
var params = {'last_id':lastId,'date_last':this.dateLast};
|
||||
|
||||
ls.hook.marker('getMoreAllBefore');
|
||||
ls.ajax(url, params, function(data) {
|
||||
|
@ -139,7 +140,7 @@ ls.stream =( function ($) {
|
|||
this.isBusy = true;
|
||||
|
||||
var url = aRouter['stream']+'get_more_user/';
|
||||
var params = {'last_id':lastId, user_id: iUserId};
|
||||
var params = {'last_id':lastId, user_id: iUserId,'date_last':this.dateLast};
|
||||
|
||||
ls.hook.marker('getMoreByUserBefore');
|
||||
ls.ajax(url, params, function(data) {
|
||||
|
|
|
@ -1143,5 +1143,6 @@ return array(
|
|||
'date_minutes_back_less' => 'Less than a minute ago',
|
||||
'date_hours_back' => '%%hours%% hours ago; %%hours%% hours ago; %%hours%% hours ago',
|
||||
'date_hours_back_less' => 'Less than an hour ago',
|
||||
'today' => 'Today',
|
||||
);
|
||||
?>
|
|
@ -1145,5 +1145,6 @@ return array(
|
|||
'date_minutes_back_less' => 'Менее минуты назад',
|
||||
'date_hours_back' => '%%hours%% час назад; %%hours%% часа назад; %%hours%% часов назад',
|
||||
'date_hours_back_less' => 'Менее часа назад',
|
||||
'today' => 'Сегодня',
|
||||
);
|
||||
?>
|
|
@ -27,9 +27,9 @@
|
|||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="notice-empty">{$aLang.blog_admin_user_add_empty}</span>
|
||||
{/if}
|
||||
|
||||
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
|
@ -1,7 +1,26 @@
|
|||
{if count($aStreamEvents)}
|
||||
{foreach from=$aStreamEvents item=oStreamEvent}
|
||||
{assign var=oTarget value=$oStreamEvent->getTarget()}
|
||||
<li class="stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
|
||||
{if {date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"} != $sDateLast}
|
||||
{assign var=sDateLast value={date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
|
||||
<li class="stream-header-date">
|
||||
{if {date_format date=$smarty.now format="j F Y"} == $sDateLast}
|
||||
{$aLang.today}
|
||||
{else}
|
||||
{date_format date=$oStreamEvent->getDateAdded() format="j F Y"}
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
ls.stream.dateLast = '{$sDateLast}';
|
||||
});
|
||||
</script>
|
||||
|
||||
<li class="stream-item stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
<a href="{$oStreamEvent->getUser()->getUserWebPath()}"><img src="{$oStreamEvent->getUser()->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
<span class="date" title="{date_format date=$oStreamEvent->getDateAdded()}">{date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}</span>
|
||||
|
||||
|
|
|
@ -82,11 +82,12 @@ h2.header-table { margin-bottom: 0; border-bottom: 1px solid #eee; padding-botto
|
|||
.stream-comment-preview { padding: 5px 10px; background: #f3f3f3; margin-top: 5px; }
|
||||
|
||||
.stream-list { margin: 0 0 20px; }
|
||||
.stream-list li { margin-bottom: 5px; min-height: 48px; _height: 48px; background: #fafafa; padding: 10px 15px 10px 70px; position: relative; }
|
||||
.stream-list li .avatar { position: absolute; top: 10px; left: 10px; }
|
||||
.stream-list li .date { display: block; color: #999; }
|
||||
.stream-list li a { text-decoration: none; }
|
||||
.stream-list li a:hover { text-decoration: underline; }
|
||||
.stream-list li.stream-item { margin-bottom: 5px; min-height: 48px; _height: 48px; background: #fafafa; padding: 10px 15px 10px 70px; position: relative; }
|
||||
.stream-list li.stream-item .avatar { position: absolute; top: 10px; left: 10px; }
|
||||
.stream-list li.stream-item .date { display: block; color: #999; }
|
||||
.stream-list li.stream-item a { text-decoration: none; }
|
||||
.stream-list li.stream-item a:hover { text-decoration: underline; }
|
||||
.stream-list li.stream-header-date { font-size: 12px; color: #777; margin-top: 30px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -165,7 +165,6 @@
|
|||
white-space: -o-pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ dl.form-item dd { float: left; width: 300px; }
|
|||
.form-profile .avatar-change { position: absolute; top: 40px; right: 0; padding: 10px; background: #f7f7f7; font-size: 11px; }
|
||||
|
||||
/* Placeholder */
|
||||
input:-moz-placeholder { color: #aaa; }
|
||||
:-moz-placeholder { color: #aaa; }
|
||||
.placeholder { color: #aaa; }
|
||||
|
||||
.mceEditor { display: block; margin-bottom: 20px; }
|
||||
|
|
4
templates/skin/developer/themes/light/README
Normal file
4
templates/skin/developer/themes/light/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
Light Theme
|
||||
-----------
|
||||
|
||||
Легковесная тема для шаблона, убирает закругления и тени.
|
4
templates/skin/developer/themes/light/style.css
Normal file
4
templates/skin/developer/themes/light/style.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
* {
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
|
@ -21,15 +21,18 @@
|
|||
{assign var='oUser' value=$oBlogUser->getUser()}
|
||||
|
||||
<li id="blog-invite-remove-item-{$oBlogEdit->getId()}-{$oUser->getId()}">
|
||||
<a href="{$oUser->getUserWebPath()}" class="user">{$oUser->getLogin()}</a> -
|
||||
<span class="user-avatar user-avatar-n">
|
||||
<a href="{$oUser->getUserWebPath()}"><img src="{$oUser->getProfileAvatarPath(24)}" alt="avatar" /></a>
|
||||
<a href="{$oUser->getUserWebPath()}">{$oUser->getLogin()}</a>
|
||||
</span> -
|
||||
<a href="#" onclick="return ls.blog.repeatInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_readd}</a>
|
||||
<a href="#" onclick="return ls.blog.removeInvite({$oUser->getId()}, {$oBlogEdit->getId()});">{$aLang.blog_user_invite_remove}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<span class="notice-empty">{$aLang.blog_admin_user_add_empty}</span>
|
||||
{/if}
|
||||
|
||||
<span id="blog-invite-empty" class="notice-empty" {if $aBlogUsersInvited}style="display: none"{/if}>{$aLang.blog_admin_user_add_empty}</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
|
@ -1,7 +1,26 @@
|
|||
{if count($aStreamEvents)}
|
||||
{foreach from=$aStreamEvents item=oStreamEvent}
|
||||
{assign var=oTarget value=$oStreamEvent->getTarget()}
|
||||
<li class="stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
|
||||
{if {date_format date=$oStreamEvent->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y"} != $sDateLast}
|
||||
{assign var=sDateLast value={date_format date=$oStreamEvent->getDateAdded() format="j F Y"}}
|
||||
|
||||
<li class="stream-header-date">
|
||||
{if {date_format date=$smarty.now format="j F Y"} == $sDateLast}
|
||||
{$aLang.today}
|
||||
{else}
|
||||
{date_format date=$oStreamEvent->getDateAdded() format="j F Y"}
|
||||
{/if}
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
ls.stream.dateLast = '{$sDateLast}';
|
||||
});
|
||||
</script>
|
||||
|
||||
<li class="stream-item stream-item-type-{$oStreamEvent->getEventType()}">
|
||||
<a href="{$oStreamEvent->getUser()->getUserWebPath()}"><img src="{$oStreamEvent->getUser()->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
|
||||
|
||||
<p class="info"><a href="{$oStreamEvent->getUser()->getUserWebPath()}"><strong>{$oStreamEvent->getUser()->getLogin()}</strong></a> ·
|
||||
|
|
|
@ -180,13 +180,14 @@ h2.header-table span { color: #949aa1; }
|
|||
.stream-comment-preview:after { display: block; content: ""; position: absolute; top: -12px; left: 15px; width: 0; height: 0; border-width: 6px; border-color: transparent transparent #e8e8c0 transparent; border-style: solid; }
|
||||
|
||||
.stream-list { margin: 0 0 20px; }
|
||||
.stream-list li { margin-bottom: 23px; min-height: 48px; _height: 48px; border-bottom: 1px solid #e7ebed; padding: 0 0 20px 60px; position: relative; }
|
||||
.stream-list li:last-child { border: none; }
|
||||
.stream-list li .info { color: #b9c2c2; font-size: 11px; line-height: 1em; margin-bottom: 8px; }
|
||||
.stream-list li .info a { color: #275ec2; }
|
||||
.stream-list li .info .date { color: #818189; }
|
||||
.stream-list li .avatar { position: absolute; top: 0; left: 0; }
|
||||
.stream-list li .user-avatar { margin-left: 3px; }
|
||||
.stream-list li.stream-item { margin-bottom: 23px; min-height: 48px; _height: 48px; border-bottom: 1px solid #e7ebed; padding: 0 0 20px 60px; position: relative; }
|
||||
.stream-list li.stream-item:last-child { border: none; }
|
||||
.stream-list li.stream-item .info { color: #b9c2c2; font-size: 11px; line-height: 1em; margin-bottom: 8px; }
|
||||
.stream-list li.stream-item .info a { color: #275ec2; }
|
||||
.stream-list li.stream-item .info .date { color: #818189; }
|
||||
.stream-list li.stream-item .avatar { position: absolute; top: 0; left: 0; }
|
||||
.stream-list li.stream-item .user-avatar { margin-left: 3px; }
|
||||
.stream-list li.stream-header-date { font-size: 16px; color: #999; font-family: 'PT Sans', sans-serif; margin-top: 50px; margin-bottom: 20px; padding-bottom: 5px; border-bottom: 1px solid #eee; }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
.block.block-type-stream .block-content .latest-list li { margin-bottom: 15px; color: #818189; }
|
||||
.block.block-type-stream .block-content .latest-list p { font-size: 11px; }
|
||||
.block.block-type-stream .block-content .latest-list .stream-topic { text-decoration: underline; }
|
||||
.block.block-type-stream .block-content .latest-list .stream-blog { font-weight: bold; }
|
||||
.block.block-type-stream .block-content .latest-list .stream-blog { color: #4128B1; }
|
||||
.block.block-type-stream .block-content .latest-list .stream-blog:hover { color: #f00; }
|
||||
.block.block-type-stream .block-content .latest-list .author { color: #4c4c4c; text-decoration: underline; }
|
||||
.block.block-type-stream .block-content .latest-list .author:hover { color: #f00; }
|
||||
.block.block-type-stream .block-content .latest-list .block-item-comments { font-size: 11px; text-decoration: none; color: #818189; white-space: nowrap; }
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
.comment-wrapper { position: relative; }
|
||||
.comment-wrapper .comment-wrapper { padding-left: 40px; }
|
||||
|
||||
.comment-preview { padding: 5px 10px 6px; margin-bottom: 10px; background: #fafafa; border: 1px solid #eee; border-radius: 3px; }
|
||||
.comment-preview { font-size: 13px; line-height: 1.6em; }
|
||||
.comment-preview { padding: 5px 10px 6px; margin-bottom: 10px; background: #fafafa; border: 1px solid #eee; border-radius: 3px; font-size: 13px; line-height: 1.6em; }
|
||||
|
||||
|
||||
/* Комментарий */
|
||||
|
|
|
@ -62,7 +62,7 @@ dl.form-item dd { float: left; width: 250px; }
|
|||
.form-profile .avatar-change a { color: #727a90; border-color: #727a90; }
|
||||
|
||||
/* Placeholder */
|
||||
input:-moz-placeholder { color: #aaa; }
|
||||
:-moz-placeholder { color: #aaa; }
|
||||
.placeholder { color: #aaa; }
|
||||
|
||||
|
||||
|
|
4
templates/skin/synio/themes/light/README
Normal file
4
templates/skin/synio/themes/light/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
Light Theme
|
||||
-----------
|
||||
|
||||
Легковесная тема для шаблона, убирает закругления и тени.
|
4
templates/skin/synio/themes/light/style.css
Normal file
4
templates/skin/synio/themes/light/style.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
* {
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
Loading…
Reference in a new issue