當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Ajax::createTablesorterFor方法代碼示例

本文整理匯總了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);
 }
開發者ID:rob-st,項目名稱:Runalyze,代碼行數:10,代碼來源:class.RunalyzePluginStat_Wettkampf.php

示例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\'}">&Oslash; km</th>
					<th>&Oslash; ' . __('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);
    }
開發者ID:n0rthface,項目名稱:Runalyze,代碼行數:52,代碼來源:class.RunalyzePluginPanel_Schuhe.php

示例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\'}">&Oslash; ' . Runalyze\Configuration::General()->distanceUnitSystem()->distanceUnit() . '</th>
					<th>&Oslash; ' . __('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);
    }
開發者ID:Nugman,項目名稱:Runalyze,代碼行數:50,代碼來源:class.RunalyzePluginPanel_Equipment.php


注:本文中的Ajax::createTablesorterFor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。