本文整理汇总了PHP中Ajax::createTablesorterFor方法的典型用法代码示例。如果您正苦于以下问题:PHP Ajax::createTablesorterFor方法的具体用法?PHP Ajax::createTablesorterFor怎么用?PHP Ajax::createTablesorterFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ajax
的用法示例。
在下文中一共展示了Ajax::createTablesorterFor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayTableEnd
/**
* Display table end
* @param string $id
*/
private function displayTableEnd($id)
{
echo '</tbody>';
echo '</table>';
Ajax::createTablesorterFor('#' . $id, true);
}
示例2: displayTable
/**
* Display table
*/
public function displayTable()
{
if (is_null($this->schuhe)) {
$this->initTableData();
}
echo '<table id="list-of-all-shoes" class="fullwidth zebra-style">
<thead>
<tr>
<th class="{sorter: \'x\'} small">' . __('x-times') . '</th>
<th class="{sorter: false}"></th>
<th>' . __('Name') . '</th>
<th class="{sorter: \'germandate\'} small">' . __('since') . '</th>
<th class="{sorter: \'distance\'}">Ø km</th>
<th>Ø ' . __('Pace') . '</th>
<th class="{sorter: \'distance\'} small"><small>' . __('max.') . '</small> km</th>
<th class="small"><small>' . __('min.') . '</small> ' . __('Pace') . '</th>
<th class="{sorter: \'resulttime\'}">' . __('Time') . '</th>
<th class="{sorter: \'distance\'}">' . __('Distance') . '</th>
<th>' . __('Weight') . '</th>
</tr>
</thead>
<tbody>';
if (!empty($this->schuhe)) {
foreach ($this->schuhe as $schuh) {
$Shoe = new Shoe($schuh);
$in_use = $Shoe->isInUse() ? '' : ' unimportant';
$Pace = new Pace($Shoe->getTime(), $Shoe->getKmInDatabase());
$MaxPace = new Pace($schuh['pace_in_s'], 1);
echo '<tr class="' . $in_use . ' r" style="position: relative">
<td class="small">' . $schuh['num'] . 'x</td>
<td>' . $this->editLinkFor($schuh['id']) . '</td>
<td class="b l">' . ShoeFactory::getSearchLink($schuh['id']) . '</td>
<td class="small">' . $Shoe->getSince() . '</td>
<td>' . ($schuh['num'] != 0 ? Distance::format($Shoe->getKmInDatabase() / $schuh['num']) : '-') . '</td>
<td>' . ($schuh['num'] != 0 ? $Pace->asMinPerKm() . '/km' : '-') . '</td>
<td class="small">' . Distance::format($schuh['dist']) . '</td>
<td class="small">' . $MaxPace->asMinPerKm() . '/km' . '</td>
<td>' . $Shoe->getTimeString() . '</td>
<td>' . $Shoe->getKmString() . '</td>
<td class="small">' . $Shoe->getWeightString() . '</td>
</tr>';
}
} else {
echo '<tr><td colspan="9">' . __('You don\'t have any shoes') . '</td></tr>';
}
echo '</tbody>';
echo '</table>';
Ajax::createTablesorterFor("#list-of-all-shoes", true);
}
示例3: displayTable
/**
* Display table
*/
public function displayTable()
{
if (is_null($this->Equipment)) {
$this->initTableData();
}
echo '<table id="list-of-all-equipment" class="fullwidth zebra-style">
<thead>
<tr>
<th class="{sorter: \'x\'} small">' . __('x-times') . '</th>
<th>' . __('Name') . '</th>
<th class="{sorter: \'germandate\'} small">' . __('since') . '</th>
<th class="{sorter: \'distance\'}">Ø ' . Runalyze\Configuration::General()->distanceUnitSystem()->distanceUnit() . '</th>
<th>Ø ' . __('Pace') . '</th>
<th class="{sorter: \'distance\'} small"><small>' . __('max.') . '</small> ' . Runalyze\Configuration::General()->distanceUnitSystem()->distanceUnit() . '</th>
<th class="small"><small>' . __('min.') . '</small> ' . __('Pace') . '</th>
<th class="{sorter: \'resulttime\'}">' . __('Time') . '</th>
<th class="{sorter: \'distance\'}">' . __('Distance') . '</th>
<th>' . __('Notes') . '</th>
</tr>
</thead>
<tbody>';
if (!empty($this->Equipment)) {
foreach ($this->Equipment as $data) {
$Object = new Model\Equipment\Object($data);
$in_use = $Object->isInUse() ? '' : ' unimportant';
$Pace = new Pace($Object->duration(), $Object->distance());
$MaxPace = new Pace($data['pace_in_s'], 1);
echo '<tr class="' . $in_use . ' r" style="position: relative">
<td class="small">' . $data['num'] . 'x</td>
<td class="b l">' . SearchLink::to('equipmentid', $Object->id(), $Object->name()) . '</td>
<td class="small">' . $this->formatData($Object->startDate()) . '</td>
<td>' . ($data['num'] != 0 ? Distance::format($Object->distance() / $data['num']) : '-') . '</td>
<td>' . ($Object->duration() > 0 ? $Pace->asMinPerKm() . '/km' : '-') . '</td>
<td class="small">' . Distance::format($data['dist']) . '</td>
<td class="small">' . $MaxPace->asMinPerKm() . '/km' . '</td>
<td>' . Duration::format($Object->duration()) . '</td>
<td>' . Distance::format($Object->totalDistance()) . '</td>
<td class="small">' . $Object->notes() . '</td>
</tr>';
}
} else {
echo '<tr><td colspan="9">' . __('You don\'t have any shoes') . '</td></tr>';
}
echo '</tbody>';
echo '</table>';
Ajax::createTablesorterFor("#list-of-all-equipment", true);
}