fixes in tooltips.css, pure-css tooltips in part.choosecalendar

This commit is contained in:
Michał 'rysiek' Woźniak 2014-01-25 20:27:16 +01:00
parent 3b0dd87109
commit f26bbc9cbb
5 changed files with 76 additions and 5 deletions

65
css/tooltips.css Normal file
View file

@ -0,0 +1,65 @@
/* +-----------------------------------------------------------------------+ *\
|* | tooltips styling | *|
|* | (c) 2014 Michał "rysiek" Woźniak <rysiek@hackerspace.pl> | *|
|* | Licensed under AGPL | *|
\* +-----------------------------------------------------------------------+ */
*[data-tooltip] {
position:relative;
}
*[data-tooltip]::before {
content:attr(data-tooltip);
top:-3em;
left:-2em;
height:1.5em;
min-width:5em;
max-width:20em;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
padding:0.5em 0.7em 0.7em 0.7em;
display:block;
border-radius:0.3em;
text-align:center;
color:white;
background:#060606;
}
*[data-tooltip]::before,
*[data-tooltip]::after {
position:absolute;
opacity:0.2;
visibility:hidden;
font-size:80%;
font-family:sans-serif;
transition-duration:0s;
-moz-transition-duration:0s;
-webkit-transition-duration:0s;
}
*[data-tooltip]:hover::before,
*[data-tooltip]:hover::after {
opacity:0.8;
visibility:visible;
transition:opacity 0.3s ease-out;
-moz-transition:opacity 0.3s ease-out;
-webkit-transition:opacity 0.3s ease-out;
}
*[data-tooltip]::after {
content:" ";
background:transparent;
width:1px;
height:1px;
border:solid 0.4em #060606;
display:block;
border-bottom:none;
border-left:solid 0.3em transparent;
border-right:solid 0.3em transparent;
top:-0.3em;
left:50%;
margin-left:-0.5em;
}

View file

@ -36,6 +36,7 @@ if(OCP\Config::getUserValue(OCP\USER::getUser(), "calendar", "timezone") == null
OCP\Util::addscript('calendar', 'calendar');
OCP\Util::addStyle('calendar', 'style');
OCP\Util::addStyle('calendar', 'linkshare');
OCP\Util::addStyle('calendar', 'tooltips');
OCP\Util::addscript('', 'jquery.multiselect');
OCP\Util::addStyle('', 'jquery.multiselect');
OCP\Util::addscript('calendar','jquery.multi-autocomplete');

View file

@ -1239,4 +1239,7 @@ $(document).ready(function(){
});
}
})
/*
$('a.action').each(function(){$(this).tipsy('disable')})
*/
});

View file

@ -139,6 +139,7 @@ if (isset($rootLinkItem)) {
OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker');
OCP\Util::addscript('calendar', 'calendar');
OCP\Util::addStyle('calendar', 'style');
OCP\Util::addStyle('calendar', 'tooltips');
OCP\Util::addscript('', 'jquery.multiselect');
OCP\Util::addStyle('', 'jquery.multiselect');
OCP\Util::addscript('calendar','jquery.multi-autocomplete');
@ -154,6 +155,7 @@ if (isset($rootLinkItem)) {
// Display the event
} elseif ($linkItem['item_type'] === 'event') {
OCP\Util::addStyle('calendar', 'style');
OCP\Util::addStyle('calendar', 'tooltips');
//OCP\Util::addscript('', 'jquery.multiselect');
//OCP\Util::addStyle('', 'jquery.multiselect');
//OCP\Util::addscript('calendar','jquery.multi-autocomplete');

View file

@ -13,7 +13,7 @@
for="outer-share-link-calendar-<?php p($_['calendar']['id']) ?>"
title="<?php p($l->t('Share Calendar')) ?>"
class="action permanent"
original-title="<?php p($l->t('Share Calendar')) ?>"
data-tooltip="<?php p($l->t('Share Calendar')) ?>"
style="cursor: pointer; width:20px; height:20px; display:block; background-repeat:no-repeat; background-image: url(<?php print_unescaped($_['share_icon']); ?>);"></label>
<?php endif; ?>
</td>
@ -26,19 +26,19 @@ if($_['calendar']['userid'] == OCP\USER::getUser()){
$caldav = rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) . '_shared_by_' . $_['calendar']['userid'];
}
?>
<a href="#" id="chooseCalendar-showCalDAVURL" data-user="<?php p(OCP\USER::getUser()) ?>" data-caldav="<?php p($caldav) ?>" title="<?php p($l->t('CalDav Link')) ?>" class="action permanent"><img class="svg" src="<?php p(OCP\Util::imagePath('core', 'actions/public.svg')) ?>"></a>
<a href="#" id="chooseCalendar-showCalDAVURL" data-user="<?php p(OCP\USER::getUser()) ?>" data-caldav="<?php p($caldav) ?>" title="<?php p($l->t('CalDav Link')) ?>" data-tooltip="<?php p($l->t('CalDav Link')) ?>" class="permanent"><img class="svg" src="<?php p(OCP\Util::imagePath('core', 'actions/public.svg')) ?>"></a>
</td>
<td width="20px">
<a href="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php') . '?calid=' . $_['calendar']['id']) ?>" title="<?php p($l->t('Download')) ?>" class="action"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/download.svg')) ?>"></a>
<a href="<?php print_unescaped(OCP\Util::linkTo('calendar', 'export.php') . '?calid=' . $_['calendar']['id']) ?>" title="<?php p($l->t('Download')) ?>" data-tooltip="<?php p($l->t('Download')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/download.svg')) ?>"></a>
</td>
<td width="20px">
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_UPDATE) { ?>
<a href="#" id="chooseCalendar-edit" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Edit')) ?>" class="action"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/rename.svg')) ?>"></a>
<a href="#" id="chooseCalendar-edit" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Edit')) ?>" data-tooltip="<?php p($l->t('Edit')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/rename.svg')) ?>"></a>
<?php } ?>
</td>
<td width="20px">
<?php if($_['calendar']['permissions'] & OCP\PERMISSION_DELETE) { ?>
<a href="#" id="chooseCalendar-delete" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Delete')) ?>" class="action"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')) ?>"></a>
<a href="#" id="chooseCalendar-delete" data-id="<?php p($_['calendar']['id']) ?>" title="<?php p($l->t('Delete')) ?>" data-tooltip="<?php p($l->t('Delete')) ?>"><img class="svg action" src="<?php p(OCP\Util::imagePath('core', 'actions/delete.svg')) ?>"></a>
<?php } ?>
</td>
<?php /* calendar sharing interface */ ?>