本文整理汇总了PHP中JDocumentHtml::addScript方法的典型用法代码示例。如果您正苦于以下问题:PHP JDocumentHtml::addScript方法的具体用法?PHP JDocumentHtml::addScript怎么用?PHP JDocumentHtml::addScript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JDocumentHtml
的用法示例。
在下文中一共展示了JDocumentHtml::addScript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareDocument
/**
* Prepare document
*/
protected function prepareDocument()
{
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
// Prepare page heading
$this->prepearePageHeading();
// Prepare page heading
$this->preparePageTitle();
// Meta Description
if ($this->params->get('menu-meta_description')) {
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// Meta keywords
if ($this->params->get('menu-meta_keywords')) {
$this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots')) {
$this->document->setMetaData('robots', $this->params->get('robots'));
}
// Scripts
JHtml::_('behavior.tooltip');
JHtml::_('Prism.ui.pnotify');
JHtml::_('Prism.ui.joomlaHelper');
$this->document->addScript('media/' . $this->option . '/js/site/' . JString::strtolower($this->getName()) . '.js');
}
示例2: setDocument
protected function setDocument()
{
// Add scripts
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . $this->getName() . '.js');
}
示例3: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle($this->documentTitle);
// Add scripts
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . String::strtolower($this->getName()) . '.js');
}
示例4: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle(JText::_('COM_GAMIFICATION_TOOLS'));
// Scripts
JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('Prism.ui.pnotify');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . strtolower($this->getName()) . '.js');
}
示例5: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle(JText::_('COM_EMAILTEMPLATES_IMPORT_MANAGER'));
// Scripts
JHtml::_('behavior.formvalidation');
JHtml::_('bootstrap.tooltip');
JHtml::_('Prism.ui.bootstrap2FileInput');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . JString::strtolower($this->getName()) . '.js');
}
示例6: setDocument
/**
* Method to set up the document properties
* @return void
*/
protected function setDocument()
{
$this->document->setTitle($this->documentTitle);
// Scripts
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.tooltip');
JHtml::_('formbehavior.chosen', 'select');
$this->document->addScript(JURI::root() . 'media/' . $this->option . '/js/admin/' . Joomla\String\String::strtolower($this->getName()) . '.js');
}
示例7: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle(JText::_('COM_VIRTUALCURRENCY_IMPORT_MANAGER'));
$this->legend = JText::_("COM_VIRTUALCURRENCY_IMPORT_REAL_CURRENCY_DATA");
// Scripts
JHtml::_('behavior.formvalidation');
JHtml::_('bootstrap.tooltip');
JHtml::_('itprism.ui.bootstrap_fileuploadstyle');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . JString::strtolower($this->getName()) . '.js');
}
示例8: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle(JText::_('COM_CROWDFUNDING_TOOLS'));
// Scripts
JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('Prism.ui.pnotify');
JHtml::_('Prism.ui.joomlaHelper');
JHtml::_('Prism.ui.serializeJson');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . JString::strtolower($this->getName()) . '.js');
}
示例9: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle($this->documentTitle);
// Add scripts
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
$d3Cdn = (bool) $this->params->get('d3_cdn', true);
JHtml::_('Prism.ui.d3', $d3Cdn);
$js = '
cfProjectId = ' . $this->item->id . ';
';
$this->document->addScriptDeclaration($js);
$this->document->addScript('../media/' . $this->option . '/js/admin/' . JString::strtolower($this->getName()) . '.js');
}
示例10: prepareCommentsScreen
protected function prepareCommentsScreen()
{
$this->commentsEnabled = $this->params->get('comments_enabled', 1);
// Initialize default comments functionality.
if ($this->commentsEnabled) {
$model = JModelLegacy::getInstance('Comments', 'CrowdfundingModel', $config = array('ignore_request' => false));
$this->items = $model->getItems();
$this->form = $model->getForm();
$this->userId = JFactory::getUser()->get('id');
$this->isOwner = $this->userId === $this->item->user_id;
// Get users IDs
$usersIds = Prism\Utilities\ArrayHelper::getIds($this->items, 'user_id');
// Prepare social integration.
$this->socialProfiles = CrowdfundingHelper::prepareIntegration($this->params->get('integration_social_platform'), $usersIds);
// Scripts
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('prism.ui.pnotify');
JHtml::_('Prism.ui.joomlaHelper');
$this->document->addScript('media/' . $this->option . '/js/site/comments.js');
}
// Trigger comments plugins.
$dispatcher = JEventDispatcher::getInstance();
$results = $dispatcher->trigger('onContentAfterDisplay', array('com_crowdfunding.comments', &$this->item, &$this->params));
$this->onCommentAfterDisplay = trim(implode("\n", $results));
}
示例11: prepareDocument
/**
* Prepare the document
*/
protected function prepareDocument()
{
// Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
// Prepare page heading
$this->preparePageHeading();
// Prepare page heading
$this->preparePageTitle();
if ($this->params->get('menu-meta_description')) {
$this->document->setDescription($this->params->get('menu-meta_description'));
} else {
$this->document->setDescription($this->item->short_desc);
}
if ($this->params->get('menu-meta_keywords')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots')) {
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// Breadcrumb
$pathway = $this->app->getPathWay();
$currentBreadcrumb = JHtmlString::truncate($this->item->title, 16);
$pathway->addItem($currentBreadcrumb, '');
// Scripts
JHtml::_('bootstrap.framework');
$this->document->addScript('media/' . $this->option . '/js/site/backing.js');
}
示例12: prepareCommentsScreen
protected function prepareCommentsScreen()
{
$this->commentsEnabled = $this->params->get("comments_enabled", 1);
// Initialize default comments functionality.
if ($this->commentsEnabled) {
$model = JModelLegacy::getInstance("Comments", "CrowdFundingModel", $config = array('ignore_request' => false));
$this->items = $model->getItems();
$this->form = $model->getForm();
$this->userId = JFactory::getUser()->get("id");
$this->isOwner = $this->userId != $this->item->user_id ? false : true;
// Get users IDs
$usersIds = array();
foreach ($this->items as $item) {
$usersIds[] = $item->user_id;
}
// Prepare integration. Load avatars and profiles.
$this->prepareIntegration($usersIds, $this->params);
// Scripts
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidation');
JHtml::_('itprism.ui.pnotify');
JHtml::_("itprism.ui.joomla_helper");
$this->document->addScript('media/' . $this->option . '/js/site/comments.js');
}
// Trigger comments plugins.
$dispatcher = JEventDispatcher::getInstance();
$results = $dispatcher->trigger('onContentAfterDisplay', array('com_crowdfunding.comments', &$this->item, &$this->params));
$this->onCommentAfterDisplay = trim(implode("\n", $results));
}
示例13: prepareDocument
/**
* Prepare document
*/
protected function prepareDocument()
{
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
// Prepare page heading
$this->preparePageHeading();
// Prepare page heading
$this->preparePageTitle();
// Meta Description
if ($this->params->get('menu-meta_description')) {
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// Meta keywords
if ($this->params->get('menu-meta_keywords')) {
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots')) {
$this->document->setMetadata('robots', $this->params->get('robots'));
}
// Include the translation of the confirmation question.
JText::script('COM_IDENTITYPROOF_DELETE_QUESTION');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.core');
JHtml::_('itprism.ui.bootstrap_fileuploadstyle');
JHtml::_('itprism.ui.bootstrap_modal');
JHtml::_("itprism.ui.pnotify");
JHtml::_('itprism.ui.joomla_helper');
$this->document->addScript('media/' . $this->option . '/js/site/proof.js');
}
示例14: prepareDocument
/**
* Prepare document
*/
protected function prepareDocument()
{
//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
// Prepare page heading
$this->preparePageHeading();
// Prepare page heading
$this->preparePageTitle();
// Meta Description
if ($this->params->get('menu-meta_description')) {
$this->document->setDescription($this->params->get('menu-meta_description'));
}
// Meta keywords
if ($this->params->get('menu-meta_keywords')) {
$this->document->setMetaData('keywords', $this->params->get('menu-meta_keywords'));
}
if ($this->params->get('robots')) {
$this->document->setMetaData('robots', $this->params->get('robots'));
}
// Scripts
JHtml::_('bootstrap.tooltip');
JHtml::_('Prism.ui.pnotify');
JHtml::_('Prism.ui.joomlaHelper');
$this->document->addScript('media/com_crowdfunding/js/site/reward_state.js');
}
示例15: setDocument
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$this->document->setTitle(JText::_('COM_CROWDFUNDING_IMPORT_MANAGER'));
// Scripts
JHtml::_('behavior.formvalidation');
JHtml::_('bootstrap.tooltip');
JHtml::_('prism.ui.bootstrapFileUploadStyle');
$this->document->addScript('../media/' . $this->option . '/js/admin/' . Joomla\String\String::strtolower($this->getName()) . '.js');
}