replaced WZTooltip with JQuery

This commit is contained in:
Roland Gruber 2013-10-20 18:07:56 +00:00
parent b7629a40ef
commit 5932cffbd8
6 changed files with 33 additions and 1310 deletions

View File

@ -656,12 +656,11 @@ function printHelpLink($entry, $number, $module='', $scope='') {
// replace special characters // replace special characters
$message = preg_replace('/[\\\\]{2}/', '\\\\', $message); $message = preg_replace('/[\\\\]{2}/', '\\\\', $message);
$title = preg_replace('/[\\\\]{2}/', '\\\\', $title); $title = preg_replace('/[\\\\]{2}/', '\\\\', $title);
$message = str_replace(array('\\', "'", '"', "\n"), array('\\\\', "\\'", '"', ''), $message); $message = str_replace(array('\\', '"', "\n"), array('\\\\', '"', ''), $message);
$title = str_replace(array('\\', "'", '"', "\n"), array('\\\\', "\\'", '"', ''), $title); $title = str_replace(array('\\', "'", '"', "\n"), array('\\\\', "\\'", '"', ''), $title);
echo "<a class=\"margin2\" href=\"" . $helpPath . "help.php?module=$module&amp;HelpNumber=". $number . "&amp;scope=" . $scope . "\" "; echo "<a class=\"margin2\" href=\"" . $helpPath . "help.php?module=$module&amp;HelpNumber=". $number . "&amp;scope=" . $scope . "\" ";
echo "target=\"help\" "; echo "target=\"help\">";
echo "onmouseover=\"Tip('" . $message . "', TITLE, '" . $title . "')\" onmouseout=\"UnTip()\">"; echo "<img helptitle=\"" . $title . "\" helpdata=\"" . $message . "\" class=\"align-middle\" width=16 height=16 src=\"../$helpPath/graphics/help.png\" alt=\"" . _('Help') . "\">";
echo "<img class=\"align-middle\" width=16 height=16 src=\"../$helpPath/graphics/help.png\" alt=\"" . _('Help') . "\" title=\"" . _('Help') . "\">";
echo "</a>"; echo "</a>";
} }

View File

@ -297,13 +297,12 @@ class user extends baseType {
$tipContent .= '<br><img alt=&quot;hint&quot; src=&quot;../../graphics/light.png&quot;> '; $tipContent .= '<br><img alt=&quot;hint&quot; src=&quot;../../graphics/light.png&quot;> ';
$tipContent .= _('Please click to lock/unlock this account.'); $tipContent .= _('Please click to lock/unlock this account.');
} }
$tooltip = "'" . $tipContent . "', TITLE, '" . _('Account status') . "'";
$dialogDiv = $this->buildAccountStatusDialogDiv($unixAvailable, $unixLocked, $sambaAvailable, $sambaLocked, $ppolicyAvailable, $ppolicyLocked, $windowsAvailable, $windowsLocked); $dialogDiv = $this->buildAccountStatusDialogDiv($unixAvailable, $unixLocked, $sambaAvailable, $sambaLocked, $ppolicyAvailable, $ppolicyLocked, $windowsAvailable, $windowsLocked);
$onClick = ''; $onClick = '';
if (checkIfWriteAccessIsAllowed()) { if (checkIfWriteAccessIsAllowed()) {
$onClick = 'onclick="showConfirmationDialog(\'' . _('Change account status') . '\', \'' . _('Ok') . '\', \'' . _('Cancel') . '\', \'lam_accountStatusDialog\', \'inputForm\', \'lam_accountStatusResult\');"'; $onClick = 'onclick="showConfirmationDialog(\'' . _('Change account status') . '\', \'' . _('Ok') . '\', \'' . _('Cancel') . '\', \'lam_accountStatusDialog\', \'inputForm\', \'lam_accountStatusResult\');"';
} }
return $dialogDiv . '<a href="#"><img id="lam_accountStatus" alt="status" ' . $onClick . ' onmouseout="UnTip()" onmouseover="Tip(' . $tooltip . ')" height=16 width=16 src="../../graphics/' . $icon . '"></a>&nbsp;&nbsp;&nbsp;'; return $dialogDiv . '<a href="#"><img id="lam_accountStatus" alt="status" ' . $onClick . ' helptitle="' . _('Account status') . '" helpdata="' . $tipContent . '" height=16 width=16 src="../../graphics/' . $icon . '"></a>&nbsp;&nbsp;&nbsp;';
} }
/** /**
@ -845,8 +844,7 @@ class lamUserList extends lamList {
$tipContent .= '<tr><td>' . _('Windows') . '&nbsp;&nbsp;</td><td><img height=16 width=16 src=&quot;../../graphics/' . $windowsIcon . '&quot;></td></tr>'; $tipContent .= '<tr><td>' . _('Windows') . '&nbsp;&nbsp;</td><td><img height=16 width=16 src=&quot;../../graphics/' . $windowsIcon . '&quot;></td></tr>';
} }
$tipContent .= '</table>'; $tipContent .= '</table>';
$tooltip = "'" . $tipContent . "', TITLE, '" . _('Account status') . "'"; echo '<img helptitle="' . _('Account status') . '" helpdata="' . $tipContent . '" alt="status" height=16 width=16 src="../../graphics/' . $icon . '">';
echo '<img alt="status" onmouseout="UnTip()" onmouseover="Tip(' . $tooltip . ')" height=16 width=16 src="../../graphics/' . $icon . '">';
} }
else { else {
echo '<img alt="status" height=16 width=16 src="../../graphics/' . $icon . '">'; echo '<img alt="status" height=16 width=16 src="../../graphics/' . $icon . '">';

View File

@ -775,9 +775,10 @@ button.ui-button::-moz-focus-inner {
padding: 8px; padding: 8px;
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
max-width: 300px; max-width: 600px;
-webkit-box-shadow: 0 0 5px #aaa; -webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa; box-shadow: 0 0 5px #aaa;
background-color: #F5F5F5 !important;
} }
body .ui-tooltip { body .ui-tooltip {
border-width: 2px; border-width: 2px;

View File

@ -390,6 +390,16 @@ input.smallImageButton {
cursor:pointer; cursor:pointer;
} }
/* help tooltip */
th.help {
text-align: left;
padding-bottom: 10px;
font-size: 9pt;
}
td.help {
font-size: 10pt;
}
/* schema browser */ /* schema browser */

File diff suppressed because it is too large Load Diff

View File

@ -426,3 +426,19 @@ function saveScrollPosition(formName) {
}).appendTo(jQuery('#' + formName)); }).appendTo(jQuery('#' + formName));
} }
jQuery(document).ready(
function() {
jQuery(document).tooltip({
items: "[helpdata]",
content: function() {
var element = $(this);
var helpString = "<table><tr><th class=\"help\">";
helpString += element.attr("helptitle");
helpString += "</th></tr><td class=\"help\">";
helpString += element.attr("helpdata");
helpString += "</td></tr></table>";
return helpString;
}
})
}
);