当前位置: 首页>>代码示例>>PHP>>正文


PHP remote_function函数代码示例

本文整理汇总了PHP中remote_function函数的典型用法代码示例。如果您正苦于以下问题:PHP remote_function函数的具体用法?PHP remote_function怎么用?PHP remote_function使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了remote_function函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

    public function render($name, $value = null, $attributes = array(), $errors = array())
    {
        $size = isset($attributes['size']) ? $attributes['size'] : (isset($this->attributes['size']) ? $this->attributes['size'] : 10);
        $letters = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
        $text = '<div class="dcFinder">';
        $id = $this->generateId($name);
        $id_left = $id . '_left';
        $unassociated_name = 'unassociated_' . $id;
        $double_list = new sfWidgetFormSelectDoubleList(array('choices' => $this->getOption('choices')));
        $double_list->setOptions($this->getOptions());
        $custom_handler = $this->getOption('custom_handler');
        $widget_serialized = base64_encode(serialize($double_list));
        $text .= '<ul class="finder">';
        foreach ($letters as $letter) {
            $text .= '<li>';
            $text .= link_to_function($letter, remote_function(array('url' => '@dcWidgetFormSelectDoubleListFinderPropel', 'with' => "'?letter=" . $letter . "&size=" . $size . "&name=" . $unassociated_name . "&values=" . base64_encode(serialize($value)) . ($custom_handler ? "&custom_handler=" . base64_encode(serialize($custom_handler)) : '') . "&widget=" . $widget_serialized . "'", 'before' => "\$('{$id}_indicator').show(); dcFinder.setCurrent('{$id}', this);", 'complete' => "\$('{$id}_indicator').hide();", 'update' => $id_left)));
            $text .= '</li>';
        }
        $text .= '<li class="current">';
        $text .= link_to_function(__('All'), remote_function(array('url' => '@dcWidgetFormSelectDoubleListFinderPropel', 'with' => "'?letter=" . "&size=" . $size . "&values=" . base64_encode(serialize($value)) . ($custom_handler ? "&custom_handler=" . base64_encode(serialize($custom_handler)) : '') . "&name=" . $unassociated_name . "&widget=" . $widget_serialized . "'", 'update' => $id_left, 'before' => "\$('{$id}_indicator').show(); dcFinder.setCurrent('{$id}', this);", 'complete' => "\$('{$id}_indicator').hide();")));
        $text .= '</li>';
        $text .= '<li style="display: none;" id="' . $id . '_indicator">' . $this->getOption('loader') . '</li>';
        $text .= '</ul>';
        $this->addOption('template', <<<EOF
  <div class="%class%">
    <div style="float: left">
      <div class="double_list_label">%label_unassociated%</div>
      <div id="{$id_left}">%unassociated%</div>
    </div>
    <div style="float: left; margin-top: 2em">
      %associate%
    <br />
      %unassociate%
  </div>
  <div style="float: left">
    <div class="double_list_label">%label_associated%</div>
      %associated%
    </div>
    <br style="clear: both" />
    <script type="text/javascript">
      sfDoubleList.init(document.getElementById('%id%'), '%class_select%');
    </script>
  </div> 
EOF
);
        $text .= parent::render($name, $value, $attributes, $errors);
        $text .= '</div>';
        return $text;
    }
开发者ID:nvidela,项目名称:kimkelen,代码行数:49,代码来源:dcWidgetDoubleListFinderPropel.class.php

示例2: drop_receiving_element

function drop_receiving_element($element_id, $options = array())
{
    $obj =& get_instance();
    $obj->response->enqueue_js(array('prototype', 'builder', 'effects', 'dragdrop'));
    if (!isset($options['with'])) {
        $options['with'] = "'id=' + encodeURIComponent(element.id)";
    }
    if (!isset($options['onDrop'])) {
        $options['onDrop'] = "function(element){" . remote_function($options) . "}";
    }
    foreach (get_ajax_options() as $key) {
        unset($options[$key]);
    }
    if (isset($options['accept'])) {
        $options['accept'] = _array_or_string_for_javascript($options['accept']);
    }
    if (isset($options['hoverclass'])) {
        $options['hoverclass'] = "'{$options['hoverclass']}'";
    }
    return javascript_tag("Droppables.add('{$element_id}', " . _options_for_javascript($options) . ")");
}
开发者ID:qlixes,项目名称:springphp,代码行数:21,代码来源:scriptaculous_helper.php

示例3: use_helper

<?php

use_helper('Javascript');
echo javascript_tag(remote_function(array('update' => 'cuenta', 'url' => 'alumno/seleccionarCuenta?id=' . $id)));
开发者ID:mediasadc,项目名称:alba,代码行数:4,代码来源:grabarCuentaSuccess.php

示例4: build_observer

function build_observer($class, $id, $options = array())
{
    if (isset($options['update']) && !isset($options['with'])) {
        $options['with'] = 'value';
    }
    $callback = remote_function($options);
    $js = "new {$class}('{$id}', ";
    if (isset($options['frequency'])) {
        $js .= $options['frequency'] . ", ";
    }
    $js .= "function(element, value) {";
    $js .= "{$callback}})";
    return js_tag($js);
}
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:14,代码来源:ajax_helper.php

示例5: pagination_limit_select

 /**
  * Paging html functions
  *  @todo Document this API
  */
 function pagination_limit_select($object_name_or_object, $options = array())
 {
     $html = "";
     if (is_object($object_name_or_object)) {
         $object = $object_name_or_object;
     } else {
         $object = $this->object($object_name_or_object);
     }
     if (!is_object($object)) {
         return null;
     }
     if ($object->pages > 0) {
         $base_url = isset($options['base_url']) ? $options['base_url'] : '';
         $update = isset($options['update']) ? $options['update'] : '';
         $extra_params = isset($options['extra_params']) ? "&" . $options['extra_params'] : ($object->paging_extra_params ? "&" . $object->paging_extra_params : '');
         $default_text = isset($options['default_text']) ? $options['default_text'] : "per page:";
         if ($update && $base_url) {
             $on_change = remote_function(array("update" => $update, "url" => "{$base_url}?per_page=' + this.options[this.selectedIndex].value + '" . escape_javascript($extra_params) . "'"));
         } else {
             $on_change = "document.location = '{$base_url}?per_page=' + this.options[this.selectedIndex].value + '" . escape_javascript($extra_params) . "'";
         }
         $html .= "\n                <select name=\"per_page\" onChange=\"{$on_change}\">\n                    <option value=\"{$object->rows_per_page}\" selected>{$default_text}</option>\n                    <option value=10>10</option>\n                    <option value=20>20</option>\n                    <option value=50>50</option>\n                    <option value=100>100</option>\n                    <option value=200>200</option>\n                    <option value=999999999>ALL</option>\n                </select>\n            ";
     }
     return $html;
 }
开发者ID:phpontrax,项目名称:trax,代码行数:29,代码来源:active_record_helper.php

示例6: jq_submit_to_remote

/**
   *  Returns a button input tag that will submit form using XMLHttpRequest in the background instead of regular
   *  reloading POST arrangement. The '$options' argument is the same as in 'jq_form_remote_tag()'.
   */
function jq_submit_to_remote($name, $value, $options = array(), $options_html = array())
{
	$options = _parse_attributes($options);
	$options_html = _parse_attributes($options_html);

	if (!isset($options['with']))
	{
		$options['with'] = 'this.form.serialize()';
	}

	$options_html['type'] = 'button';
	$options_html['onclick'] = remote_function($options).'; return false;';
	$options_html['name'] = $name;
	$options_html['value'] = $value;

	return tag('input', $options_html, false);
}
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:21,代码来源:jQueryHelper.php

示例7: cargarParametros

</li>


<?php 
}
?>
</ul>
  
 
</fieldset>

<script lang="Javascript">
	function cargarParametros(ver_tipo_parametro,eslista){
		<?php 
if (Usuario::tienePermisos('parametros', 'listar_valor')) {
    ?>
			if (eslista) {
			<?php 
    echo remote_function(array('url' => "parametros/listar_valor", 'with' => "'ver_tipo_parametro='+ver_tipo_parametro", 'complete' => visual_effect("Hightlight", "datosTipoParametro")));
    ?>
	
			}
		<?php 
}
?>
	}
</script>



开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:27,代码来源:_tipos_parametros.php

示例8: use_helper

<?php

use_helper('I18N');
use_helper('Javascript');
?>
<span id="sf_countable_<?php 
echo $token;
?>
">
  <?php 
echo format_number_choice('[0]Never viewed|[1]Viewed one time|(1,+Inf]Viewed %1% times', array('%1%' => $counter), $counter);
?>
</span>
<?php 
if (!$sf_request->getCookie($token) == $token) {
    ?>
  <?php 
    echo javascript_tag(remote_function(array('update' => 'sf_countable_' . $token, 'url' => '@sf_counter?sf_countable_token=' . $token)));
}
开发者ID:sgrove,项目名称:cothinker,代码行数:19,代码来源:_counter.php

示例9: use_helper

<?php

use_helper("Javascript");
$c = new Criteria();
$paises = PaisPeer::doSelect($c);
if ($establecimiento->getFkProvinciaId()) {
    $pais_selected = $establecimiento->getProvincia()->getPais()->getId();
    $provincia_id = $establecimiento->getFkProvinciaId();
} else {
    $pais_selected = $paises[0]->getId();
    $provincia_id = 0;
}
echo select_tag('pais_id', objects_for_select(PaisPeer::getEnOrden(), 'getId', 'getNombreLargo', $pais_selected));
echo observe_field('pais_id', array('update' => 'item_provincia', 'url' => 'establecimiento/cambiarPais', 'with' => "'pais_id=' + value"));
echo javascript_tag(remote_function(array('update' => 'item_provincia', 'url' => 'establecimiento/cambiarPais?pais_id=' . $pais_selected . '&provincia_id=' . $provincia_id)));
开发者ID:mediasadc,项目名称:alba,代码行数:15,代码来源:_pais_id.php

示例10: __

	<?php 
        if (!$nuevo) {
            ?>
	<li><a href="#" class="sf_admin_action_save" onclick="if (confirm('<?php 
            echo __('Se dispone a guardar los datos como un objeto nuevo. ¿Estas seguro?');
            ?>
')) {document.getElementById('guardarcomonuevo').value='1';tinyMCE.triggerSave();document.getElementById('formulario_guardar').onsubmit();}"><?php 
            echo __("Guardar como nuevo");
            ?>
</a></li>
	<?php 
        }
        ?>
	
	<li><a href="#" class="sf_admin_action_cancelar" onclick="if (confirm('<?php 
        echo __('Va a cancelar todos los cambios que haya podido hacer, esta seguro de continuar?');
        ?>
')) <?php 
        echo remote_function(array('url' => 'parametros/nuevo_valor?ver_tipo_parametro=' . $DefParametro->getTipoParametro(), 'update' => 'datos_parametro'));
        ?>
"><?php 
        echo __("Cancelar");
        ?>
</a></li>
	<?php 
    }
    ?>
	</ul>
</div>
<?php 
}
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:31,代码来源:_datos_edit_actions.php

示例11: hideLoginBtn

			function hideLoginBtn()
			{
				document.getElementById('connectBtn').style.display="none";
				document.getElementById('postLink').style.display="block";
			}
            </script>
            <fb:login-button v="2" id="connectBtn" onlogin="hideLoginBtn()" size="medium">Connect</fb:login-button>
            
            <a href="javascript:;" id="postLink" onClick="postthis();" style="display:none;">Post On Wall</a>
            <script type="text/javascript">
			function stream_callback (post_id, exception) 
			{
              if(post_id!="null")
			  {
				 <?php 
echo remote_function(array('update' => 'message_success', 'url' => '@fbpost'));
?>
				  //alert(post_id);
				  document.getElementById('postLink').style.display='none';
				  document.getElementById('connectBtn').style.display='none';
				  document.getElementById('message_success').style.display='block'
				  //FB.Connect.logout(alert("Thanks"));
			  }
            }
            function postthis()
            {
			var message = 'Check out this cool site.';
			var attachment = {
				'name': 'JoTag',
				'href': 'http://'+document.domain+'/jotag/web',
				'description': 'Jotag is a simple method to share all your contact details. To keep in touch, just tell them your Jotag!',
开发者ID:psskhal,项目名称:symfony-sample,代码行数:31,代码来源:inviteSuccess.php

示例12: configureJavascripts

 public function configureJavascripts()
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array("Url", "Javascript"));
     $student_id = $this->getObject()->getStudentId();
     $this->getWidget('career_id')->setAttribute('onChange', remote_function(array('url' => 'student/updateCareerStudentStatus', 'with' => "'career_id=' + jQuery('#career_student_career_id').val() + '&student_id= {$student_id} '", 'script' => true, 'update' => 'javascript_div')));
 }
开发者ID:nvidela,项目名称:kimkelen,代码行数:6,代码来源:CareerStudentStatusForm.class.php

示例13: use_helper

<?php

use_helper('I18N', 'Object', 'Javascript');
?>

<?php 
if ($sf_request->hasError('filters{id_fase}')) {
    ?>
  <?php 
    echo form_error('filters{id_fase}', array('class' => 'form-error-msg'));
}
?>
  
<?php 
$value = select_tag('filters[id_fase]', objects_for_select($fases, 'getIdFase', 'getNombre', '', array('include_blank' => true), array('control_name' => 'filters[id_fase]')));
echo $value ? $value : '&nbsp;';
?>

<?php 
echo observe_field('filters_id_fase', array('frequency' => 1, 'script' => 'true', 'update' => 'reuniones', 'url' => 'documentos/elegirfasefilters', 'with' => "'id_proyecto='+\$('filters_id_proyecto').value+'id_fase='+\$('filters_id_fase').value"));
?>

<?php 
echo javascript_tag(remote_function(array('script' => 'true', 'update' => 'reuniones', 'url' => 'documentos/elegirfasefilters', 'with' => "'id_proyecto='+\$('filters_id_proyecto').value+'id_fase='+\$('filters_id_fase').value")));
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:24,代码来源:elegirproyectofiltersSuccess.php

示例14: custom_remote_function

/**
 * Replaces the remote_function function
 *
 * Adds the following options:
 *  'wrapperClass'    : the class of the id that wraps the ajax loader html.
 *  'loadingHtml'     : the html of the ajax_loader. The text '%%image%%' and '%%text%%' will be replaced.
 *  'loadingImage'    : the image url of the ajax loader that will replace the %%image%% text inthe loadingHtml.
 *  'loadingText'     : the text of the ajax loader that will replace the %%text%% text in the loadingHtml.
 *  'disableElements' : an array of ids to disable while loading and enable in complete.
 *  'hideElements'    : an array of ids to hide while loading and show in complete.
 *
 * None of this options are required. See _custom_set_custom_options to see the defaults.
 */
function custom_remote_function($options)
{
    _load_requirements();
    _custom_set_custom_options($options);
    $loadingJavascript = _custom_get_loading_javascript($options);
    $completeJavascript = _custom_get_complete_javascript($options);
    _custom_concatenate_javascript($options, 'loading', $loadingJavascript);
    _custom_concatenate_javascript($options, 'complete', $completeJavascript);
    _custom_unset_custom_options($options);
    return remote_function($options);
}
开发者ID:nvidela,项目名称:kimkelen,代码行数:24,代码来源:AjaxHelper.php

示例15: form_error

    echo form_error('alcance{ver_todos_registros}', array('class' => 'form-error-msg'));
    ?>
  <?php 
}
?>

  <?php 
$value = checkbox_tag('alcance[ver_todos_registros]', '1', $alcance->getVerTodosRegistros(), array('control_name' => 'alcance[ver_todos_registros]'));
echo $value ? $value : '&nbsp;';
?>
  
  <div class="sf_edit_help"><?php 
echo __('Si no marca esta opción el usuario solo podrá ver aquellos registros que haya creado');
?>
</div>
    </div>
</div>

</fieldset>

<?php 
include_partial('alcance/edit_actions', array('alcance' => $alcance));
?>

</form>

<?php 
echo javascript_tag("\n  function recargar_selects()\n  {\n    var empresa = document.getElementById('alcance_id_empresa').value;\n    \n    " . remote_function(array('update' => 'grupo_selects', 'url' => 'alcance/update_selects', 'with' => "'id_empresa='+empresa")) . "\n  }\n");
?>

开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:29,代码来源:_edit_form.php


注:本文中的remote_function函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。