本文整理汇总了PHP中Helper_Include::addScriptDeclaration方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper_Include::addScriptDeclaration方法的具体用法?PHP Helper_Include::addScriptDeclaration怎么用?PHP Helper_Include::addScriptDeclaration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper_Include
的用法示例。
在下文中一共展示了Helper_Include::addScriptDeclaration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* @version SEBLOD 3.x Core ~ $Id: default.php sebastienheraud $
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
Helper_Include::addScriptDeclaration($this->config['javascript']);
if (JCck::getConfig_Param('validation', 2) > 1 && $this->config['validation'] != '') {
Helper_Include::addValidation($this->config['validation'], $this->config['validation_options']);
$js = 'if (task == "form.cancel") { Joomla.submitform(task, document.getElementById("seblod_form")); } else { if (jQuery("#seblod_form").validationEngine("validate",task) === true) { if (jQuery("#seblod_form").isStillReady() === true) { jQuery("#seblod_form input[name=\'config[unique]\']").val("seblod_form"); Joomla.submitform(task, document.getElementById("seblod_form")); } } }';
} else {
$js = 'if (jQuery("#seblod_form").isStillReady() === true) { jQuery("#seblod_form input[name=\'config[unique]\']").val("seblod_form"); Joomla.submitform(task, document.getElementById("seblod_form")); }';
}
?>
<script type="text/javascript">
<?php
echo $this->config['submit'];
?>
= function(task) { <?php
echo $js;
?>
}
</script>