本文整理汇总了PHP中jq_link_to_remote函数的典型用法代码示例。如果您正苦于以下问题:PHP jq_link_to_remote函数的具体用法?PHP jq_link_to_remote怎么用?PHP jq_link_to_remote使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jq_link_to_remote函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: a_sub_crud_edit
function a_sub_crud_edit($label, $type, $subtype, $object)
{
$editButton = $type . '-form-edit-' . $subtype;
$displayData = $type . '-' . $subtype;
$url = sfContext::getInstance()->getRouting()->generate($type . '_edit', $object, true);
return jq_link_to_remote('edit', array('url' => $url, 'method' => 'get', 'update' => $displayData, 'with' => '"form=' . $subtype . '"', 'before' => sprintf("\$('#%s').data('a-form-swap', \$('#%s').html()); aBusy(this)", $displayData, $displayData), 'complete' => sprintf("aReady('#%s'); \$('#%s').hide()", $editButton, $editButton)), array('class' => 'a-form-edit-button', 'id' => $editButton));
}
示例2: a_remote_dialog_toggle
function a_remote_dialog_toggle($options)
{
if (!isset($options['id'])) {
throw new sfException("Required id option not passed to a_dialog_toggle");
}
if (!isset($options['label'])) {
throw new sfException("Required label option not passed to a_dialog_toggle");
}
if (!isset($options['action'])) {
throw new sfException("Required action option not passed to a_dialog_toggle");
}
$id = $options['id'];
$action = $options['action'];
$label = $options['label'];
if (isset($options['chadFrom'])) {
$chadFrom = $options['chadFrom'];
}
if (isset($options['loading'])) {
$loading = $options['loading'];
}
if (isset($options['hideToggle']) && $options['hideToggle'] == true) {
$before = " \$('.{$id}-loading').show();";
} else {
$before = "\$('.{$id}-button.open').hide(); \$('.{$id}-loading').show();";
}
$s = '';
$s .= jq_link_to_remote(__($label, null, 'apostrophe'), array("url" => $action, "update" => $id, "script" => true, "before" => $before, "complete" => "\$('#{$id}').fadeIn();\n \t\t\t\t\t\t\t\t\t \$('.{$id}-loading').hide();\n\t\t\t\t\t\t\t\t\t\t \t\$('.{$id}-button.open').hide();\n \t\t\t\t\t\t\t\t\t \$('#{$id}-button-close').show();" . (isset($chadFrom) ? "var arrowPosition = parseInt(\$('{$chadFrom}').offset().left);\n \t\t\t\t\t\t\t\t \$('#{$id} .a-chad').css('left',arrowPosition+'px'); " : "") . "\n \t\t\t\t\t\t\t\t\t aUI('#{$id}');\n \t\t\t\t\t\t\t\t\t\$('.a-page-overlay').show();"), array('class' => "{$id}-button open", 'id' => "{$id}-button-open"));
$s .= jq_link_to_function(__($label, null, 'apostrophe'), "\$('#{$id}-button-close').hide(); \n\t\t \$('#{$id}-button-open').show(); \n\t\t \$('#{$id}').hide();\n\t\t \$('.a-page-overlay').hide();", array('class' => "{$id}-button close", 'id' => "{$id}-button-close", 'style' => 'display:none;'));
if (isset($loading)) {
$s .= image_tag($loading, array('class' => "{$id}-loading", 'style' => 'display:none;'));
}
return $s;
}
示例3: link_to_comment_delete
/**
* Ссылка на удаление комментария
*
* @param Comment $comment
*/
function link_to_comment_delete($comment, $title = null)
{
$user = sfContext::getInstance()->getUser();
if ($user->isAuthenticated() && $user->getGuardUser()->getId() == $comment->getUserId() && $comment->hasDeletable()) {
return jq_link_to_remote($title ? $title : 'Удалить', array('method' => 'post', 'url' => url_for('comment_delete', $comment), 'success' => 'jQuery("#comment-' . $comment->id . '").remove();', 'confirm' => 'Вы точно хотите удалить свой комментарий?'));
}
}
示例4: link_to_add_new_comment
function link_to_add_new_comment($name, $record, $comment = null)
{
use_helper('jQuery');
$params = array();
$params['update'] = $comment && $comment->getId() ? 'add_new_comment_form_holder_' . $comment->getId() : 'add_new_comment_form_holder';
$params['url'] = '@cscomments_comments_add';
$comment_id = $comment ? $comment->getId() : null;
$params['with'] = "'comment_id=" . $comment_id . "&model=" . get_class($record) . "&record_id=" . $record->getId() . "&return_uri=" . urlencode(sfContext::getInstance()->getRequest()->getUri()) . "'";
// $params['complete'] = "setRatingListeners();";
return jq_link_to_remote($name, $params);
}
示例5: foreach
echo $form->renderFormTag(url_for('@list_create'));
?>
<?php
echo $form;
?>
<div id='list-items'>
<?php
foreach ($item_forms as $item_form) {
?>
<?php
echo $item_form;
?>
<?php
}
?>
</div>
<input type="submit" class="button" value="Add"></input>
<?php
echo markdown_preview_link('community_list[description]');
?>
<?php
echo jq_link_to_remote('Add List Item', array('update' => 'list-items', 'url' => 'list_item_add_ajax', 'position' => 'bottom'));
?>
</form>
<?php
echo markdown_preview();
示例6: use_helper
<?php
use_helper('jQuery', 'I18N');
?>
<ul>
<?php
foreach ($pages as $p) {
?>
<li class="unhighlighted" id="menu_page_item_<?php
echo $p->getId();
?>
">
<?php
echo jq_link_to_remote($p->getUrl(), array('update' => 'theContent', 'method' => 'GET', 'url' => '@cms_page_view?idPage=' . $p->getId(), '404error' => "alert('Nao pude carregar!')", 'after' => "\$('#loading').fadeOut()", 'before' => "highlightme('#menu_page_item_" . $p->getId() . "');\$('#loading').fadeIn()"));
?>
</li>
<?php
}
?>
</ul>
示例7: jq_link_to_remote
<?php
echo jq_link_to_remote(image_tag($ssStaus . ".gif?id=" . rand()), array('update' => 'idActive' . $snId, 'url' => $oAppCommon->ssModuleName . '/' . (isset($ssAction) ? $ssAction : 'active'), 'with' => "'cValue=" . ($ssStaus == 'Yes' ? 'No' : 'Yes') . "&" . $oAppCommon->ssBaseId . "=" . $snId . "'", 'confirm' => __("Are you sure, you want to %sstitle%?", array('%sstitle%' => $ssTitle))), array('title' => isset($ssTitle) ? __('Click here to') . " " . $ssTitle : ''));
?>
示例8: if_javascript
?>
</ul>
</div>
</li>
<?php
}
?>
<li class="signup_button">
<div class="response">
</div>
<div class="form">
</div>
<h5>
<img src="/images/icons/add.png" alt="toevoegen" />
<?php
if_javascript();
echo jq_link_to_remote('Meld je ook aan »', array('update' => '.signup_button .form', 'url' => 'expertbank/new', 'complete' => 'Cufon.refresh(); $(".signup_button .form").effect("highlight", {}, 2000);'));
end_if_javascript();
?>
<noscript>
<?php
echo link_to('Meld je ook aan »', 'expertbank/new');
?>
</noscript>
</h5>
</li>
</ul>
示例9: jq_link_to_remote
?>
">
<span class="a-btn alt a-disabled icon a-checked nobg"><?php
echo $settings['label'];
?>
</span>
</li>
<li id="<?php
echo $id;
?>
-inactive" class="inactive" style="<?php
echo !$active ? '' : 'display: none';
?>
">
<?php
echo jq_link_to_remote(__($settings['label'], null, 'apostrophe'), array('url' => url_for('a/setVariant?' . http_build_query(array('id' => $pageid, 'name' => $name, 'permid' => $permid, 'variant' => $variant))), 'update' => "a-slot-content-{$pageid}-{$name}-{$permid}"), array('class' => 'a-btn alt icon a-unchecked nobg'));
?>
</li>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
<?php
// When the link to activate an inactive variant is clicked...
?>
$('<?php
echo "#a-{$pageid}-{$name}-{$permid}-variant-{$variant}-inactive a";
?>
').click(function() {
<?php
// Add the loading class...
?>
$('<?php
示例10: jq_link_to_remote
}
$calendar = $c->getEventCalendar();
?>
<table class="calendar_table">
<tr>
<th class="th"><?php
echo jq_link_to_remote('◄', array('update' => 'inner_content_' . $slot->getId(), 'url' => '@plop-cms-module-calendar', 'with' => "'slug=" . $page_slug . "&slot_id=" . $slot->getId() . "&sf_culture=" . $culture . "&date=" . $prev_month . "'"), array('class' => 'link', 'title' => __('Previous month')));
?>
</th>
<th class="th" colspan="5"><?php
echo format_date($page_date, 'MMMM yyyy', $culture);
?>
</th>
<th class="th"><?php
echo jq_link_to_remote('►', array('update' => 'inner_content_' . $slot->getId(), 'url' => '@plop-cms-module-calendar', 'with' => "'slug=" . $page_slug . "&slot_id=" . $slot->getId() . "&sf_culture=" . $culture . "&date=" . $next_month . "'"), array('class' => 'link', 'title' => __('Next month')));
?>
</th>
</tr>
<?php
$i = 0;
foreach ($calendar as $week) {
?>
<tr>
<?php
foreach ($week as $day => $events) {
$month = explode('-', $day);
?>
<td class="td <?php
echo in_array(date('N', strtotime($day)), array('6', '7')) ? 'weekend' : 'week';
示例11: strlen
?>
</td>
<td><?php
echo $personal_flight->getReturnDate('m/d/Y');
?>
</td>
<td><?php
echo strlen($personal_flight->getName()) > 10 ? substr($personal_flight->getName(), 0, 10) . '...' : $personal_flight->getName();
?>
</td>
<td>
<?php
echo link_to('edit', 'account/editPersonalFlight?id=' . $personal_flight->getId());
?>
<?php
echo jq_link_to_remote('remove', array('url' => 'account/ajaxDeletePersonalFlight?id=' . $personal_flight->getId(), 'success' => "\$('#personal_flight_{$personal_flight->getId()}').remove();"), array('confirm' => 'Are you sure?'));
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</div>
</div>
<?php
// js and css for datePicker
$sf_response->addStylesheet('jquery-ui.custom.css');
$sf_response->addJavascript('jquery-ui.custom.min.js');
示例12: jq_link_to_remote
<div>
<?php
if ($oPager->haveToPaginate()) {
if ($sf_params->get('page') && $sf_params->get('page') != $oPager->getFirstPage()) {
echo jq_link_to_remote(image_tag('/images/admin/pag-first-icon.gif', array('title' => __('First'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getFirstPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('First'), 'class' => 'pager'));
echo jq_link_to_remote(image_tag('/images/admin/pag-pre-icon.gif', array('title' => __('Previous'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getPreviousPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Previous'), 'class' => 'pager'));
} else {
echo '<span class="pager" >' . image_tag('/images/admin/pag-first-icon-gray.gif', array('title' => __('First'))) . '</span>';
echo '<span class="pager" >' . image_tag('/images/admin/pag-pre-icon-gray.gif', array('title' => __('Previous'))) . '</span>';
}
$snLinks = $oPager->getLinks($oPager->getLastPage());
$aPager = array();
foreach ($snLinks as $snPage) {
$aPager[$snPage] = $snPage;
}
echo select_tag('pageBox', options_for_select($aPager, $oPager->getPage()), array('onChange' => "jQuery.ajax({type:'POST',dataType:'html',data:'page='+this.value+'&" . $ssParams . "',success:function(data, textStatus){jQuery('#" . $ssDivId . "').html(data);},url:'" . $ssLink . "'" . (isset($onCompelte) ? ",complete:function (){" . $onCompelte . "}" : "") . "})"));
if ($sf_params->get('page') != $oPager->getLastPage()) {
echo jq_link_to_remote(image_tag('/images/admin/pag-next-icon.gif', array('title' => __('Next'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getNextPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Next'), 'class' => 'pager'));
echo jq_link_to_remote(image_tag('/images/admin/pag-last-icon.gif', array('title' => __('Last'))), array('url' => $ssLink . (!strpos($ssLink, '?') ? '?' : '&') . 'page=' . $oPager->getLastPage(), 'update' => $ssDivId, 'with' => "'" . $ssParams . "'", 'complete' => isset($onCompelte) ? $onCompelte : ""), array('title' => __('Last'), 'class' => 'pager'));
} else {
echo '<span class="pager" >' . image_tag('/images/admin/pag-next-icon-gray.gif', array('title' => __('Next'))) . '</span>';
echo '<span class="pager" >' . image_tag('/images/admin/pag-last-icon-gray.gif', array('title' => __('Last'))) . '</span>';
}
}
?>
</div>
示例13: use_helper
<?php
use_helper('jQuery');
?>
<ul id="images-list">
<?php
foreach ($photos as $image) {
?>
<li id="listItem_<?php
echo $image->getId();
?>
">
<?php
echo image_tag('/uploads/gallery/thumb_' . $image->getPath());
?>
<?php
echo jq_link_to_remote(image_tag('/images/delete.png', array()), array('url' => 'gallery/deletePhoto?photo_id=' . $image->getId(), 'complete' => '$("#listItem_' . $image->getId() . '").remove();'));
?>
</li>
<?php
}
?>
</ul>
示例14: use_helper
<?php
use_helper('jQuery');
?>
<div id="sf_admin_container">
<div>
<?php
if ($sf_request->isXmlHttpRequest()) {
?>
<?php
echo jq_link_to_remote(__('Back to list', array(), 'sf_admin'), array('url' => url_for('@sympal_assets_select'), 'update' => 'sympal_assets_container', 'title' => __('Back to list', array(), 'sf_admin'), 'method' => 'get'));
?>
<?php
} else {
?>
<?php
echo link_to(__('Back to list', array(), 'sf_admin'), '@sympal_assets');
?>
<?php
}
?>
</div>
<h1><?php
echo __('Editing Asset "%asset%"', array('%asset%' => $asset->getName()));
?>
</h1>
<div id="sympal_edit_asset">
<div class="sf_admin_form">
<?php
if ($isAjax) {
示例15: use_helper
use_helper('I18N');
use_helper('jQuery');
use_helper('SfReview');
?>
<?php
if ($reviewType) {
?>
<div class="review-current">
<h5>
<strong><?php
echo __('Tu voto');
?>
:</strong> <?php
echo $reviewValue == 1 ? __('A favor') : __('En contra');
?>
<br />
<span class="sf-review-action">
<?php
echo jq_link_to_remote(__('Hacer cambios en tu voto'), array('update' => $reviewBox ? $reviewBox : 'sf_review', 'url' => "@sf_review_form?t={$reviewType}&e={$reviewEntityId}&v={$reviewValue}&b=" . ($reviewBox ? $reviewBox : 'sf_review'), 'before' => "re_loading('" . ($reviewBox ? $reviewBox : 'sf_review') . "')"));
?>
</span>
</h5>
<p><?php
echo review_text($review);
?>
</p>
</div>
<?php
}