diff --git a/css/tooltips.css b/css/tooltips.css new file mode 100644 index 00000000..e4fc0367 --- /dev/null +++ b/css/tooltips.css @@ -0,0 +1,65 @@ +/* +-----------------------------------------------------------------------+ *\ +|* | tooltips styling | *| +|* | (c) 2014 Michał "rysiek" Woźniak | *| +|* | 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; +} \ No newline at end of file diff --git a/index.php b/index.php index 35fa3c96..da5e7911 100644 --- a/index.php +++ b/index.php @@ -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'); diff --git a/js/calendar.js b/js/calendar.js index 03450c2a..12f1c73d 100644 --- a/js/calendar.js +++ b/js/calendar.js @@ -1239,4 +1239,7 @@ $(document).ready(function(){ }); } }) + /* + $('a.action').each(function(){$(this).tipsy('disable')}) + */ }); diff --git a/share.php b/share.php index dd2bd75e..5ef42c2e 100644 --- a/share.php +++ b/share.php @@ -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'); diff --git a/templates/part.choosecalendar.rowfields.php b/templates/part.choosecalendar.rowfields.php index 36d118f0..1da4532c 100644 --- a/templates/part.choosecalendar.rowfields.php +++ b/templates/part.choosecalendar.rowfields.php @@ -13,7 +13,7 @@ for="outer-share-link-calendar-" title="t('Share Calendar')) ?>" class="action permanent" - original-title="t('Share Calendar')) ?>" + data-tooltip="t('Share Calendar')) ?>" style="cursor: pointer; width:20px; height:20px; display:block; background-repeat:no-repeat; background-image: url();"> @@ -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']; } ?> - + - + - + - +