本文整理汇总了PHP中js::scrollTop方法的典型用法代码示例。如果您正苦于以下问题:PHP js::scrollTop方法的具体用法?PHP js::scrollTop怎么用?PHP js::scrollTop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类js
的用法示例。
在下文中一共展示了js::scrollTop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showTicketDetails
private function showTicketDetails(&$ticket)
{
$tabs = [];
$crumbs = base::crumbs([['url' => '#', 'text' => "({$ticket['id']}) {$ticket['ticket_title']}"]]);
// Tab #1 is going to be split. So lets create the span6 that we will need.
// Update Active Queue
$_SESSION['activeQueue'] = $ticket['queue_id'];
$replyContent = "\n\t\t\t\t<div class='row-fluid'>\n\t\t\t\t\t\t\t<div class='span6'>" . $this->getTicketReplies($ticket) . "</div>\n\t\t\t\t\t\t\t<div class='span6'>" . $this->getFiles($ticket) . $this->getCompanyNotes($ticket) . $this->getTicketBilled($ticket) . $this->getIncidentStanding($ticket) . "</div>\n\t\t\t\t\t\t</div>";
// Counter Init
$maincount = $this->returnCountFromTable("replies", "ticket_id='{$ticket['id']}' AND reply_isinternal = false");
$subcount = $this->returnCountFromTable("subtickets", "ticket_id='{$ticket['id']}' AND subticket_isclosed = false");
$ttlcount = $this->returnCountFromTable("tickets", "company_id='{$ticket['company_id']}'");
// Tab Creation
$tabs[] = ['class' => 'active', 'id' => 'ticketTrail', 'title' => "<i class='icon-comments'></i> <span class='badge badge-success'>{$maincount}</span> Main Communication", 'content' => $replyContent];
if ($this->isProvidingCompany()) {
$tabs[] = ['id' => 'subTickets', 'title' => "<i class='icon-tasks'></i> <span class='badge badge-warning'>{$subcount}</span> Ticket Tasks", 'content' => $this->getSubTickets($ticket)];
}
$tabs[] = ['id' => 'history', 'title' => "<i class='icon-calendar'></i> <span class='badge badge-inverse'>{$ttlcount}</span> History", 'content' => $this->getHistory($ticket)];
if ($this->canSeeBilling() || !$this->isProvidingCompany()) {
$tabs[] = ['id' => 'sow', 'title' => "<i class='icon-bookmark'></i> Statement of Work", 'content' => $this->getStatementOfWork($ticket)];
}
if ($this->canSeeBilling() && $this->isProvidingCompany()) {
$tabs[] = ['id' => 'billing', 'title' => "<i class='icon-money'></i> Billing", 'content' => $this->getBillingTab($ticket)];
}
$buttons = button::init()->text('Add Reply')->isModalLauncher()->url('#createReplyModal')->addStyle('btn-inverse')->icon('comment')->render();
$buttons .= button::init()->text('Upload File')->isModalLauncher()->url('#uploadFile')->addStyle('btn-info')->icon('arrow-up')->render();
$buttons .= button::init()->text('Close Ticket')->url("/close/{$ticket['id']}/")->addStyle('btn-danger')->addStyle('get')->icon('remove')->render();
$fbuttons = $buttons;
$fbuttons .= button::init()->text('Back to Top')->url("#")->addStyle('btn-warning')->addStyle('top')->icon('arrow-up')->render();
$fbuttons .= button::init()->text('Ticket List')->url("/")->addStyle('btn-primary')->icon('arrow-left')->render();
$widget = widget::init()->span(12)->icon('edit')->header($ticket['ticket_title'])->isTabs($tabs)->rightHeader($buttons)->footer($fbuttons)->render();
$data = base::row($widget);
$save = button::init()->formid('newReplyForm')->addStyle('mpost')->postVar('createReply')->text('Add Reply')->addStyle('btn-success')->icon('ok')->message('Submitting..')->id($ticket['id'])->render();
$this->exportModal(modal::init()->id('createReplyModal')->header('Add Reply')->content($this->createReplyForm($ticket))->footer($save)->render());
$saveFile = button::init()->formid('newUploadForm')->addStyle('mpost')->postVar('createAttachment')->text('Save Attachment')->addStyle('btn-success')->icon('ok')->message('Submitting..')->id($ticket['id'])->render();
$this->exportModal(modal::init()->id('uploadFile')->header('Upload Attachment')->content($this->createUploadForm($ticket))->footer($saveFile)->render());
$this->export($data);
$this->exportjs(js::scrollBottom());
$this->exportjs(js::scrollTop('top'));
}