本文整理汇总了PHP中Action::showScripts方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::showScripts方法的具体用法?PHP Action::showScripts怎么用?PHP Action::showScripts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::showScripts方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showScripts
function showScripts()
{
parent::showScripts();
$this->autofocus('nickname');
}
示例2: showScripts
/**
* Add the jCrop scripts
*
* @return void
*/
function showScripts()
{
parent::showScripts();
if ($this->mode == 'crop') {
$jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js');
$jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js');
$this->element('script', array('type' => 'text/javascript', 'src' => $jcropPack));
$this->element('script', array('type' => 'text/javascript', 'src' => $jcropGo));
}
}
示例3: showScripts
function showScripts()
{
parent::showScripts();
if (!common_logged_in()) {
$this->autofocus('nickname');
}
}
示例4: showScripts
function showScripts()
{
parent::showScripts();
if (common_config('openid', 'trusted_provider')) {
if (common_config('openid', 'append_username')) {
$this->autofocus('openid_username');
} else {
$this->autofocus('rememberme');
}
} else {
$this->autofocus('openid_url');
}
}
示例5: showScripts
function showScripts()
{
parent::showScripts();
$this->element('script', null, 'document.getElementById(\'' . $this->form_id . '\').submit();');
}
示例6: showScripts
/**
* Add a confirm script for Consumer key/secret reset
*
* @return void
*/
function showScripts()
{
parent::showScripts();
// TRANS: Text in confirmation dialog to reset consumer key and secret for an OAuth application.
$msg = _('Are you sure you want to reset your consumer key and secret?');
$js = 'function confirmReset() { ';
$js .= ' var agree = confirm("' . $msg . '"); ';
$js .= ' return agree;';
$js .= '}';
$this->inlineScript($js);
}
示例7: showScripts
/**
* Hook for adding extra JavaScript
*
* @param Action $action Action object for the page
*
* @return boolean event handler return
*/
function showScripts()
{
parent::showScripts();
$jsonArray = array();
while ($this->notice->fetch()) {
try {
$notloc = Notice_location::locFromStored($this->notice);
$jsonArray[] = $this->noticeAsJson($this->notice);
} catch (ServerException $e) {
// no location data
}
}
$this->inlineScript('$(document).ready(function() { ' . ' var _notices = ' . json_encode($jsonArray) . '; ' . 'showMapstraction($("#map_canvas"), _notices); });');
return true;
}
示例8: showScripts
/**
* Hook for adding extra JavaScript
*
* @param Action $action Action object for the page
*
* @return boolean event handler return
*/
function showScripts()
{
parent::showScripts();
$jsonArray = array();
while ($this->notice->fetch()) {
if (!empty($this->notice->lat) && !empty($this->notice->lon)) {
$jsonNotice = $this->noticeAsJson($this->notice);
$jsonArray[] = $jsonNotice;
}
}
$this->inlineScript('$(document).ready(function() { ' . ' var _notices = ' . json_encode($jsonArray) . '; ' . 'showMapstraction($("#map_canvas"), _notices); });');
return true;
}