本文整理汇总了PHP中Ajax::window方法的典型用法代码示例。如果您正苦于以下问题:PHP Ajax::window方法的具体用法?PHP Ajax::window怎么用?PHP Ajax::window使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ajax
的用法示例。
在下文中一共展示了Ajax::window方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToRoundsInfo() . '">' . __('More details about your laps') . '</a>', 'normal');
$this->Header = HTML::info($InfoLink);
}
}
示例3: inlineDropdownWithRealLinks
/**
* @param \Runalyze\Dataset\Context $context
* @return string
* @codeCoverageIgnore
*/
protected function inlineDropdownWithRealLinks(Context $context)
{
$id = $context->activity()->id();
$html = '<li>' . \Ajax::window('<a href="' . $context->linker()->editUrl() . '">' . \Icon::$EDIT . ' ' . __('Edit') . '</a> ', 'small') . '</li>';
$html .= '<li><span class="link" data-action="privacy" data-activityid="' . $id . '">' . $this->privacyIconAndLabel($context) . '</span></li>';
$html .= '<li><span class="link" data-action="delete" data-activityid="' . $id . '" data-confirm="' . __('Do you really want to delete this activity?') . '"><i class="fa fa-fw fa-trash"></i> ' . __('Delete activity') . '</span></li>';
$html .= $context->activity()->isPublic() ? '<li><a href="' . $context->linker()->publicUrl() . '" target="_blank" onclick="(arguments[0] || window.event).stopPropagation();">' . \Icon::$ATTACH . ' ' . __('Public link') . '</a></li>' : '';
return $html;
}
示例4: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if ($this->Context->dataview()->vdot()->value() > 0 || $this->Context->activity()->jdIntensity() > 0) {
if (!Request::isOnSharedPage()) {
$Linker = new Activity\Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToVDOTInfo() . '">' . __('More about VDOT calculation') . '</a>', 'small');
$this->Footer = HTML::info($InfoLink);
}
}
}
示例5: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if ($this->Context->trackdata()->has(Trackdata\Entity::DISTANCE) && $this->Context->trackdata()->has(Trackdata\Entity::TIME)) {
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToRoundsInfo() . '">' . __('More details about your laps') . '</a>', 'big');
$this->Header = HTML::info($InfoLink);
}
}
}
示例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: displayHeader
/**
* Display header
*/
protected function displayHeader()
{
$name = $this->Plugin instanceof PluginTool ? $this->Plugin->getWindowLink() : $this->Plugin->name();
$Links = array();
$Links[] = array('tag' => Ajax::window('<a href="' . ConfigTabPlugins::getExternalUrl() . '">' . __('back to overview') . '</a>'));
echo '<div class="panel-heading">';
echo '<div class="panel-menu">';
echo Ajax::toolbarNavigation($Links);
echo '</div>';
echo '<h1>' . __('Plugin configuration') . ': ' . $name . '</h1>';
echo '</div>';
}
示例8: 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());
}
示例9: addInfoLink
/**
* Add info link
*/
protected function addInfoLink()
{
if (!Request::isOnSharedPage()) {
$Linker = new Linker($this->Context->activity());
$InfoLink = Ajax::window('<a href="' . $Linker->urlToElevationInfo() . '">' . __('More about elevation') . '</a>', 'normal');
$this->Footer = HTML::info($InfoLink);
} else {
$this->Footer = '';
}
if ($this->Context->route()->hasCorrectedElevations()) {
$this->Footer .= HTML::info(__('Elevation data were corrected.'));
} elseif ($this->Context->route()->hasOriginalElevations() && Configuration::ActivityForm()->correctElevation()) {
$this->Footer .= HTML::warning(__('Elevation data are not corrected.'));
}
// TODO: Add link to correct them now!
}
示例10: getDeleteLinkFor
/**
* Get delete link for an entry
* @param int $id
* @return string
*/
public static function getDeleteLinkFor($id)
{
return Ajax::window('<a href="plugin/RunalyzePluginPanel_Sportler/window.sportler.php?id=' . $id . '&delete=true">' . Icon::$DELETE . '</a>');
}
示例11: uninstallLink
/**
* Get uninstall link
* @param string $name [optional] default: delete-icon
* @return string
*/
public static function uninstallLink($key, $name = '')
{
if ($name == '') {
$name = Icon::$DELETE;
}
return Ajax::window('<a href="' . self::UNINSTALL_URL . '?key=' . $key . '">' . Ajax::tooltip($name, __('Uninstall plugin')) . '</a>');
}
示例12: link
/**
* Link to plot
* @param string $text
* @param int $year
* @param int $sportid
* @param string $group
* @param boolean $current
* @return string
*/
private function link($text, $year, $sportid, $group, $current = false, $analysis = false)
{
if (!$analysis) {
$analysis = $this->Analysis;
}
if (FrontendShared::$IS_SHOWN) {
return Ajax::window('<li' . ($current ? ' class="active"' : '') . '><a href="' . DataBrowserShared::getBaseUrl() . '?view=' . (Request::param('type') == 'week' ? 'weekkm' : 'monthkm') . '&type=' . Request::param('type') . '&y=' . $year . '&sportid=' . $sportid . '&group=' . $group . '&analysis=' . $analysis . '">' . $text . '</a></li>');
} else {
return Ajax::window('<li' . ($current ? ' class="active"' : '') . '><a href="' . self::$URL . '?type=' . Request::param('type') . '&y=' . $year . '&sportid=' . $sportid . '&group=' . $group . '&analysis=' . $analysis . '">' . $text . '</a></li>');
}
}
示例13: 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>');
}
示例14: displayExportedFiles
/**
* Display exported files
*/
protected function displayExportedFiles()
{
$ListOfFiles = $this->getExistingFiles();
$Fieldset = new FormularFieldset(sprintf(__('Up to now you have exported <strong>%d</strong> trainings.'), count($ListOfFiles)));
if (strlen(Request::param('delete')) > 0) {
$index = (int) Request::param('delete');
if (!isset($ListOfFiles[$index - 1])) {
$Fieldset->addWarning('Don\' do that!');
} else {
$Fieldset->addInfo(__('The file has been removed.'));
Filesystem::deleteFile('export/files/' . $ListOfFiles[$index - 1]);
unset($ListOfFiles[$index - 1]);
}
} else {
$Fieldset->setCollapsed();
}
if (empty($ListOfFiles)) {
$Fieldset->addFileBlock('<em>' . __('You did not export any training.') . '</em>');
} else {
foreach ($ListOfFiles as $i => $File) {
$String = $File . ', ' . Filesystem::getFilesize(FRONTEND_PATH . 'export/files/' . $File);
$Link = '<a href="inc/export/files/' . $File . '" target="_blank">' . $String . '</a>';
$Delete = Ajax::window('<a class="right small" href="' . self::$URL . '?id=' . $this->TrainingID . '&delete=' . ($i + 1) . '">[' . __('delete') . ']</a>', 'small');
$Fieldset->addFileBlock($Delete . $Link);
}
}
$Formular = new Formular();
$Formular->setId('export-list');
$Formular->addFieldset($Fieldset);
$Formular->display();
}
示例15: 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.plot.php" ' . Ajax::tooltip('', __('Show form'), true, true) . '>' . Icon::$LINE_CHART . '</a>') . '</li>';
$Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.php" ' . Ajax::tooltip('', __('How are these values calculated?'), true, true) . '>' . Icon::$MAGIC . '</a>') . '</li>';
$Links .= '<li>' . Ajax::window('<a href="plugin/' . $this->key() . '/window.info.php" ' . Ajax::tooltip('', __('Explanations: What are VDOT and TRIMP?'), true, true) . '>' . Icon::$INFO . '</a>') . '</li>';
return '<ul>' . $Links . '</ul>';
}