1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Tooltips working again on frontend

This commit is contained in:
Cameron
2012-11-28 18:56:52 -08:00
parent 54ac401647
commit 0b03f8ed5a
6 changed files with 105 additions and 22 deletions

View File

@@ -0,0 +1,72 @@
.tooltip {
position: absolute;
z-index: 1030;
display: block;
visibility: visible;
padding: 5px;
font-size: 11px;
opacity: 0;
filter: alpha(opacity=0);
}
.tooltip.in {
opacity: 0.8;
filter: alpha(opacity=80);
}
.tooltip.top {
margin-top: -3px;
}
.tooltip.right {
margin-left: 3px;
}
.tooltip.bottom {
margin-top: 3px;
}
.tooltip.left {
margin-left: -3px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
background-color: #000000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}

View File

@@ -2,31 +2,31 @@
$(document).ready(function()
{
// $(":input").tipsy({gravity: 'w',fade: true, live: true});
$(":input").tooltip();
/*
$(":input,label,.e-tip").each(function() {
var field = $(this).nextAll(".field-help");
if(field.length == 0)
{
$(this).tipsy({gravity: 'sw',fade: true, live: true}); // Normal 'title' attribute
$(this).tooltip({placement: 'right',fade: true}); // Normal 'title' attribute
return;
}
field.hide();
$(this).tipsy({
$(this).tooltip({
title: function() {
return field.html(); // field-help when HTML is required.
},
fade: true,
live: true,
html: true,
gravity: 'sw'
placement: 'right'
});
});
*/
// var color = $(".divider").parents().css("background-color");
@@ -50,7 +50,7 @@ $(document).ready(function()
data: data,
success: function(data) {
// alert(data);
// alert(data);
// console.log(data);
var a = $.parseJSON(data);
@@ -62,11 +62,11 @@ $(document).ready(function()
}
else if(sort == 'desc')
{
$(a.html).prependTo('#comments-container').hide().slideDown(800);
$(a.html).prependTo('#comments-container').hide().slideDown(800); // FIXME - works in jquery 1.7, not 1.8
}
else
{
$(a.html).appendTo('#comments-container').hide().slideDown(800);
$(a.html).appendTo('#comments-container').hide().slideDown(800); // FIXME - works in jquery 1.7, not 1.8
alert('Thank you for commenting'); // possibly needed as the submission may go unoticed by the user
}