本文整理汇总了PHP中Ajax::tooltip方法的典型用法代码示例。如果您正苦于以下问题:PHP Ajax::tooltip方法的具体用法?PHP Ajax::tooltip怎么用?PHP Ajax::tooltip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ajax
的用法示例。
在下文中一共展示了Ajax::tooltip方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRightSymbol
/**
* Method for getting the right symbol(s)
* @see PluginPanel::getRightSymbol()
*/
protected function getRightSymbol()
{
$Links = '';
$Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.sportler.php" ' . Ajax::tooltip('', __('Add data'), true, true) . '>' . Icon::$ADD . '</a>') . '</li>';
$Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.sportler.table.php" ' . Ajax::tooltip('', __('Show table'), true, true) . '>' . Icon::$TABLE . '</a>') . '</li>';
return '<ul>' . $Links . '</ul>';
}
示例2: getToolbarNavigationLinks
/**
* Get own links for toolbar navigation
* @return array
*/
protected function getToolbarNavigationLinks()
{
$LinkList = array();
if ($this->Configuration()->value('for_weather')) {
$LinkList[] = '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.php">' . Ajax::tooltip(Icon::$LINE_CHART, __('Show temperature plots')) . '</a>') . '</li>';
}
return $LinkList;
}
示例3: FieldFor
/**
* Add field
* @param \Runalyze\Configuration\Handle $Handle
* @param array $options
* @return \FormularField
*/
public function FieldFor(Handle $Handle, array $options = array())
{
$options = array_merge(array('label' => $Handle->key(), 'tooltip' => '', 'unit' => '', 'size' => '', 'css' => '', 'layout' => ''), $options);
$label = !empty($options['tooltip']) ? \Ajax::tooltip($options['label'], $options['tooltip']) : $options['label'];
$Field = $this->createFieldFor($Handle, $label);
$this->setAttributesToField($Field, $options);
return $Field;
}
示例4: initToolbarLinks
/**
* Init toolbar links
*/
private function initToolbarLinks()
{
$Linker = new Linker($this->Context->activity());
if (!Request::isOnSharedPage()) {
$this->initShareLinks($Linker);
$this->initExportLinks();
$this->initEditLinks($Linker);
}
$this->ToolbarLinks[] = Ajax::tooltip($Linker->weekLink(), '<em>' . __('Show week') . '</em><br>' . $this->Context->dataview()->weekday() . ', ' . $this->Context->dataview()->dateAndDaytime());
}
示例5: getListLinkForCurrentUser
/**
* Get link to shared list for current user
* @param string $text [optional]
* @return string
*/
public static function getListLinkForCurrentUser($text = null)
{
if (!Configuration::Privacy()->listIsPublic()) {
return '';
}
if (is_null($text)) {
$text = Icon::$ATTACH;
}
return '<a href="shared/' . SessionAccountHandler::getUsername() . '/" target="_blank" ' . Ajax::tooltip('', __('Public list'), false, true) . '>' . $text . '</a>';
}
示例6: getToolbarNavigationLinks
/**
* Get own links for toolbar navigation
* @return array
*/
protected function getToolbarNavigationLinks()
{
$LinkList = array();
$LinkList[] = '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.php">' . Ajax::tooltip(Icon::$LINE_CHART, __('Show temperature plots')) . '</a>') . '</li>';
$LinkList[] = '<li class="with-submenu"><span class="link">' . __('Equipment types') . '</span><ul class="submenu">';
foreach ($this->EquipmentTypes as $EqType) {
$LinkList[] = '<li>' . $this->getInnerLink($EqType->name(), false, false, $EqType->id()) . '</li>';
}
$LinkList[] = '</ul></li>';
return $LinkList;
}
示例7: initToolbarLinks
/**
* Init toolbar links
*/
private function initToolbarLinks()
{
$Linker = new Linker($this->Context->activity());
if ($this->Context->activity()->isPublic()) {
$this->ToolbarLinks[] = '<a href="' . $Linker->publicUrl() . '" target="_blank">' . Icon::$ATTACH . ' ' . __('Public link') . '</a>';
}
if (!Request::isOnSharedPage()) {
$this->ToolbarLinks[] = Ajax::window('<a href="' . ExporterWindow::$URL . '?id=' . $this->Context->activity()->id() . '">' . Icon::$DOWNLOAD . ' ' . __('Export') . '</a> ', 'small');
$this->ToolbarLinks[] = Ajax::window('<a href="' . $Linker->editUrl() . '">' . Icon::$EDIT . ' ' . __('Edit') . '</a> ', 'small');
}
$this->ToolbarLinks[] = Ajax::tooltip($Linker->weekLink(), '<em>' . __('Show week') . '</em><br>' . $this->Context->dataview()->weekday() . ', ' . $this->Context->dataview()->dateAndDaytime());
}
示例8: getRightSymbol
/**
* Method for getting the right symbol(s)
*/
protected function getRightSymbol()
{
$Links = '';
$Links .= '<li class="with-submenu">' . Ajax::link(__('Type'), 'panel-' . $this->id(), Plugin::$DISPLAY_URL . '?id=' . $this->id());
$Links .= '<ul class="submenu">';
foreach ($this->AllTypes as $Type) {
$active = $Type['id'] == (int) $this->Configuration()->value('type');
$Links .= '<li' . ($active ? ' class="active"' : '') . '>' . Ajax::link($Type['name'], 'panel-' . $this->id(), Plugin::$DISPLAY_URL . '?id=' . $this->id() . '&type=' . $Type['id']) . '</li>';
}
$Links .= '</ul>';
$Links .= '</li>';
$Links .= '<li>' . Ajax::window('<a href="' . ConfigTabs::$CONFIG_URL . '?key=config_tab_equipment" ' . Ajax::tooltip('', __('Add/Edit equipment'), true, true) . '>' . Icon::$ADD . '</a>') . '</li>';
$Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.equipment.table.php" ' . Ajax::tooltip('', __('Show all equipment'), true, true) . '>' . Icon::$TABLE . '</a>') . '</li>';
return '<ul>' . $Links . '</ul>';
}
示例9: getCode
/**
* Get code
* @return string
*/
private function getCode()
{
$Code = '
<table class="c fullwidth zebra-style" id="conf-tab-dataset">
<thead>
<tr>
<th> </th>
<th>' . Ajax::tooltip(__('Display'), __('The information will be shown directly in the row.')) . '</th>
<th colspan="2">' . Ajax::tooltip(__('Summary'), __('The value will be summarized for the sport.')) . '</th>
<th>' . Ajax::tooltip(__('Order'), __('Indicates the order of appearance.')) . '</th>
<th>' . Ajax::tooltip(__('CSS-Class'), __('\'c\': centered<br>\'l\': left-aligned<br>\'small\': small<br>\'b\': bold')) . '</th>
<th>' . Ajax::tooltip(__('CSS-Style'), __('any CSS-Code')) . '</th>
<th>' . __('Example') . '</th>
</tr>
</thead>
<tbody>';
$Labels = new DatasetLabels();
$DatasetObject = new Dataset();
$DatasetObject->setActivityData($this->getExampleTraining());
$Dataset = DB::getInstance()->query('SELECT *, (`position` = 0) as `hidden` FROM `' . PREFIX . 'dataset` WHERE accountid = ' . SessionAccountHandler::getId() . ' ORDER BY (`position` > 0) DESC, `position` ASC')->fetchAll();
foreach ($Dataset as $pos => $Data) {
$disabled = $Data['modus'] == 3 ? ' disabled' : '';
$checked_2 = $Data['modus'] >= 2 ? ' checked' : '';
$checked = $Data['summary'] == 1 ? ' checked' : '';
$SummarySign = '';
switch ($Data['summary_mode']) {
case 'YES':
case 'NO':
$checked .= ' disabled';
break;
case 'AVG':
$SummarySign = 'Ø';
break;
case 'SUM':
$SummarySign = '∑';
break;
case 'MAX':
$SummarySign = 'max';
break;
}
$Example = $DatasetObject->getDataset($Data['name']);
$Code .= '
<tr class="r" id="' . $Data['id'] . '_tr">
<td class="l b">' . $Labels->get($Data['name']) . '</td>
<td class="c">
<input type="hidden" name="' . $Data['id'] . '_modus_3" value="' . $Data['modus'] . '">
<input type="checkbox" name="' . $Data['id'] . '_modus"' . $checked_2 . $disabled . '>
</td>
<td class="c"><input type="checkbox" name="' . $Data['id'] . '_summary"' . $checked . '></td>
<td class="c small">' . $SummarySign . '</td>
<td class="c">
<input class="dataset-position" type="text" name="' . $Data['id'] . '_position" value="' . ($pos + 1) . '" size="2">
<span class="link" onclick="datasetMove(' . $Data['id'] . ', \'up\')">' . Icon::$UP . '</span>
<span class="link" onclick="datasetMove(' . $Data['id'] . ', \'down\')">' . Icon::$DOWN . '</span>
</td>
<td class="c"><input type="text" name="' . $Data['id'] . '_class" value="' . $Data['class'] . '" size="7"></td>
<td class="c"><input type="text" name="' . $Data['id'] . '_style" value="' . $Data['style'] . '" size="15"></td>
<td class="' . $Data['class'] . '" style="' . $Data['style'] . '">' . $Example . '</td>
</tr>';
}
$Code .= '
</tbody>
</table>';
$Code .= Ajax::wrapJS('
function datasetMove(id, way) {
var pos = parseInt($("input[name=\'"+id+"_position\']").val()),
tr = $("#"+id+"_tr");
if (way == "up" && pos > 1) {
$("#"+id+"_tr .dataset-position").val(pos-1);
tr.prev().find(".dataset-position").val(pos);
tr.prev().toggleClass("swapped");
tr.prev().before(tr);
} else if (way == "down" && tr.next().find(".dataset-position").val() > 0) {
$("#"+id+"_tr .dataset-position").val(pos+1);
tr.next().find(".dataset-position").val(pos);
tr.next().toggleClass("swapped");
tr.next().after(tr);
}
tr.toggleClass("swapped");
}
');
return $Code;
}
示例10: getTableHeader
/**
* @return string
*/
protected function getTableHeader()
{
return '<table class="c fullwidth zebra-style" id="conf-tab-dataset">
<thead>
<tr>
<th> </th>
<th> </th>
<th>' . Ajax::tooltip(__('Display'), __('The information will be shown directly in the row.')) . '</th>
<th>' . Ajax::tooltip(__('Order'), __('Indicates the order of appearance.')) . '</th>
<th>' . Ajax::tooltip(__('CSS-Style'), __('any CSS-Code')) . '</th>
<th>' . __('Example') . '</th>
</tr>
</thead>
<tbody>';
}
示例11: editLinkFor
/**
* Get link for editing a shoe
* @param int $id
* @return string
*/
private function editLinkFor($id)
{
return Ajax::window('<a href="plugin/' . $this->key() . '/window.schuhe.php?id=' . $id . '">' . Ajax::tooltip(Icon::$EDIT, __('Edit')) . '</a>');
}
示例12: getNaviSearchLink
/**
* Get ajax-link for searching
* @return string
*/
protected function getNaviSearchLink()
{
return Ajax::window('<a href="' . SearchLink::$WINDOW_URL . '" ' . Ajax::tooltip('', __('Search for an activity'), false, true) . '>' . Icon::$SEARCH . '</a>', 'big');
}
示例13: showPaces
/**
* Show paces
*/
protected function showPaces()
{
echo '</div>';
echo '<div class="panel-content panel-sub-content">';
echo '<table class="fullwidth nomargin">';
$Paces = $this->getArrayForPaces();
$VDOT = new VDOT(Configuration::Data()->vdot());
foreach ($Paces as $Pace) {
$DisplayedString = '<strong>' . $Pace['short'] . '</strong>';
echo '<tr>';
echo '<td>' . Ajax::tooltip($DisplayedString, $Pace['description']) . '</td>';
echo '<td class="r"><em>' . Duration::format($VDOT->paceAt($Pace['limit-high'] / 100)) . '</em> - <em>' . Duration::format($VDOT->paceAt($Pace['limit-low'] / 100)) . '</em>/km</td>';
echo '</tr>';
}
echo '</table>';
}
示例14: getCode
/**
* Get code
* @return string
*/
private function getCode()
{
$Code = '
<table class="fullwidth zebra-style c">
<thead>
<tr class="b">
<th>' . __('Name') . '</th>
<th>' . __('Abbreviation') . '</th>
<th>' . Ajax::tooltip(__('Sport'), __('A type can only belong to one sport.')) . '</th>
<th>' . Ajax::tooltip('Ø ' . __('HR'), __('Average heart rate (used for calculation of TRIMP)')) . '</th>
<th>' . Ajax::tooltip(__('Quality?'), __('Quality sessions will be emphasized in your calendar.')) . '</th>
<th>' . Ajax::tooltip(__('Race'), __('You need to set one type for running as race type.')) . '</th>
<th>' . Ajax::tooltip(__('Calendar view'), __('Mode for displaying activities in calendar')) . '</th>
<th>' . Ajax::tooltip(Icon::$CROSS_SMALL, __('A type can only be deleted if no references exist.')) . '</th>
</tr>
</thead>
<tbody>';
$Types = DB::getInstance()->query('
SELECT ty.id, ty.name, ty.abbr, ty.sportid, ty.short, ty.hr_avg, ty.quality_session, ty.accountid, (
SELECT COUNT(*)
FROM `' . PREFIX . 'training` tr
WHERE tr.typeid = ty.id AND
`accountid`="' . SessionAccountHandler::getId() . '"
) AS tcount
FROM `' . PREFIX . 'type` ty
WHERE `accountid`="' . SessionAccountHandler::getId() . '"
ORDER BY `sportid` ASC, `tcount` DESC
')->fetchAll();
//TODO Change all locations where Typeid is used
$Types[] = array('id' => -1, 'sportid' => -1, 'name' => '', 'abbr' => '', 'short' => 0, 'hr_avg' => 120, 'quality_session' => 0);
$raceID = Configuration::General()->competitionType();
$sportid = false;
foreach ($Types as $Data) {
$id = $Data['id'];
if ($id == -1) {
$delete = '';
} elseif ($Data['tcount'] == 0) {
$delete = '<input type="checkbox" name="type[delete][' . $id . ']">';
} else {
$delete = SearchLink::to('typeid', $id, '<small>(' . $Data['tcount'] . ')</small>');
}
$Sports = SportFactory::AllSports();
$ShortOptions = array(0 => __('complete row'), 1 => __('only icon'));
$Code .= '
<tr class="' . ($sportid !== false && $sportid != $Data['sportid'] ? 'top-separated-light' : '') . ($id == -1 ? ' unimportant' : '') . '">
<td><input type="text" size="20" name="type[name][' . $id . ']" value="' . $Data['name'] . '"></td>
<td><input type="text" size="3" name="type[abbr][' . $id . ']" value="' . $Data['abbr'] . '"></td>
<td><select name="type[sportid][' . $id . ']">';
foreach ($Sports as $SData) {
$Code .= '<option value="' . $SData['id'] . '"' . HTML::Selected($SData['id'] == $Data['sportid']) . '>' . $SData['name'] . '</option>';
}
$Code .= '</select></td>
<td>
<span class="input-with-unit">
<input type="text" name="type[hr_avg][' . $id . ']" value="' . $Data['hr_avg'] . '" id="type_hr_avg_' . $id . '" class="small-size">
<label for="type_hr_avg_' . $id . '" class="input-unit">bpm</label>
</span>
</td>
<td><input type="checkbox" name="type[quality_session][' . $id . ']"' . ($Data['quality_session'] ? ' checked' : '') . '></td>
<td>' . ($id == -1 ? '' : '<input type="radio" name="racetype" value="' . $id . '"' . ($id == $raceID ? ' checked' : '') . '>') . '</td>
<td>' . HTML::selectBox('type[short][' . $id . ']', $ShortOptions, $Data['short']) . '</td>
<td>' . $delete . '</td>
</tr>';
$sportid = $Data['sportid'];
}
$Code .= '
</tbody>
</table>';
return $Code;
}
示例15: displayStandardValues
/**
* Display standard values
*/
protected function displayStandardValues()
{
if ($this->manualElevation != $this->calculatedElevation) {
$Linker = new Runalyze\View\Activity\Linker($this->Context->activity());
$useCalculatedValueLink = Ajax::window('<a class="small as-input" href="' . $Linker->urlToElevationInfo('use-calculated-value=true') . '">» ' . __('apply data') . '</a>', 'small');
} else {
$useCalculatedValueLink = '';
}
$Fieldset = new FormularFieldset(__('General data'));
$Fieldset->setHtmlCode('
<div class="w50">
<label>' . Ajax::tooltip(__('manual value'), __('If you did not insert a value by hand, this value has been calculated.')) . '</label>
<span class="as-input">' . $this->manualElevation . ' m</span>
</div>
<div class="w50">
<label>' . __('Lowest point') . '</label>
<span class="as-input">' . $this->lowestPoint . ' m</span>
</div>
<div class="w50">
<label>' . Ajax::tooltip(__('calculated value'), __('This value is calculated with your current configuration. The saved value may be outdated.')) . '</label>
<span class="as-input">' . $this->calculatedElevation . ' m</span> ' . $useCalculatedValueLink . '
</div>
<div class="w50">
<label>' . __('Highest point') . '</label>
<span class="as-input">' . $this->highestPoint . ' m</span>
</div>
<div class="w50">
<label>ø ' . __('Gradient') . '</label>
<span class="as-input">' . $this->Context->dataview()->gradientInPercent() . '</span>
</div>
<div class="w50">
<label>' . __('Up/Down') . '</label>
<span class="as-input">+' . $this->Context->route()->elevationUp() . 'm / -' . $this->Context->route()->elevationDown() . 'm</span>
</div>
');
$Fieldset->display();
}