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

Merge pull request #853 from Xmk/chiffa

Tooltips
This commit is contained in:
Maxim Mzhelskiy 2017-03-13 10:17:37 +07:00 committed by GitHub
commit 96b1bc2a2f
8 changed files with 31 additions and 12 deletions

View file

@ -11,8 +11,13 @@
{component 'activity' template='recent-item'
user = $comment->getUser()
comment = $comment
topic = $topic
date = $comment->getDate()}
date = $comment->getDate()
classes = 'js-title-comment'
attributes = [
title => {$comment->getText()|strip_tags|trim|truncate:100:'...'|escape}
]}
{foreachelse}
{component 'blankslate' text={lang 'common.empty'} mods='no-background'}
{/foreach}

View file

@ -23,4 +23,5 @@
image=[
'path' => $user->getProfileAvatarPath(48),
'url' => $user->getUserWebPath()
]}
]
params=$params}

View file

@ -10,7 +10,11 @@
{component 'activity' template='recent-item'
user = $topic->getUser()
topic = $topic
date = $topic->getDatePublish()}
date = $topic->getDatePublish()
classes = 'js-title-topic'
attributes = [
title => {$topic->getText()|strip_tags|trim|truncate:150:'...'|escape}
]}
{foreachelse}
{component 'blankslate' text={lang 'common.empty'} mods='no-background'}
{/foreach}

View file

@ -155,7 +155,7 @@ jQuery(document).ready(function($){
$('.js-popover-default').lsTooltip({
useAttrTitle: false,
trigger: 'click',
classes: 'tooltip-light'
classes: 'ls-tooltip-light'
});
if (ls.registry.get('block_stream_show_tip')) {
@ -163,7 +163,7 @@ jQuery(document).ready(function($){
$(this).lsTooltip({
position: {
my: "right center",
at: "left left"
at: "left center"
},
show: {
delay: 1500

View file

@ -141,15 +141,15 @@ jQuery(document).ready(function($){
$('.js-popover-default').lsTooltip({
useAttrTitle: false,
trigger: 'click',
classes: 'tooltip-light'
classes: 'ls-tooltip-light'
});
if (ls.registry.get('block_stream_show_tip')) {
$('.js-title-comment, .js-title-topic').livequery(function () {
$(this).lsTooltip({
position: {
my: "right center",
at: "left left"
my: "right-15 center",
at: "left center"
},
show: {
delay: 1500

View file

@ -11,8 +11,13 @@
{component 'activity' template='recent-item'
user = $comment->getUser()
comment = $comment
topic = $topic
date = $comment->getDate()}
date = $comment->getDate()
classes = 'js-title-comment'
attributes = [
title => {$comment->getText()|strip_tags|trim|truncate:100:'...'|escape}
]}
{foreachelse}
{component 'blankslate' text={lang 'common.empty'} mods='no-background'}
{/foreach}

View file

@ -1,6 +1,6 @@
{component_define_params params=[ 'user', 'topic', 'date' ]}
{component_define_params params=[ 'user', 'topic', 'date', 'classes', 'attributes' ]}
<div class="ls-activity-block-recent-item">
<div class="ls-activity-block-recent-item {$classes}" {cattr list=$attributes}>
<a href="{$user->getUserWebPath()}" class="ls-activity-block-recent-user">{$user->getDisplayName()}</a>
<time datetime="{date_format date=$date format='c'}" class="ls-activity-block-recent-date">

View file

@ -10,7 +10,11 @@
{component 'activity' template='recent-item'
user = $topic->getUser()
topic = $topic
date = $topic->getDatePublish()}
date = $topic->getDatePublish()
classes = 'js-title-topic'
attributes = [
title => {$topic->getText()|strip_tags|trim|truncate:150:'...'|escape}
]}
{foreachelse}
{component 'blankslate' text={lang 'common.empty'} mods='no-background'}
{/foreach}