本文整理汇总了PHP中CMS_view::getJavascript方法的典型用法代码示例。如果您正苦于以下问题:PHP CMS_view::getJavascript方法的具体用法?PHP CMS_view::getJavascript怎么用?PHP CMS_view::getJavascript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMS_view
的用法示例。
在下文中一共展示了CMS_view::getJavascript方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
?>
/modules/polymod/fckplugin.php',
params: {
winId: 'FCKPolymod',
id: id,
content: content
},
nocache: true,
scope: this
}
});
}
</script>
<?php
echo CMS_view::getCSS(array('ext', 'main'));
echo CMS_view::getJavascript(array('ext', 'main', 'initConfig'));
?>
<script type="text/javascript">
if (parent.parent) {
//Declare Automne namespace
Ext.namespace('Automne');
pr = parent.parent.pr;
Automne.locales = parent.parent.Automne.locales;
Automne.message = parent.parent.Automne.message;
Ext.MessageBox = parent.parent.Ext.MessageBox;
Automne.server = parent.parent.Automne.server;
Automne.context = parent.parent.Automne.context;
Ext.Ajax = parent.parent.Ext.Ajax;
Ext.BLANK_IMAGE_URL = '<?php
echo PATH_ADMIN_IMAGES_WR;
?>
示例2: array
$jsfiles = array('ext', 'debug', 'codemirror', 'main');
} else {
$jsfiles = array('ext', 'codemirror', 'main');
}
//set title
$view->setTitle($language->getMessage(MESSAGE_PAGE_TITLE, array(APPLICATION_LABEL)));
$content = '
<div id="atm-loading-mask"></div>
<div id="atm-center">
<div class="atm-loading-indicator">' . $language->getMessage(MESSAGE_PAGE_LOADING) . '</div>
<noscript class="atm-alert">You must have Javascript enabled to access Automne.<hr />Vous devez avoir Javascript actif pour accéder à Automne.</noscript>
</div>
<script type="text/javascript">
var CKEDITOR_BASEPATH = \'' . PATH_MAIN_WR . '/ckeditor/\';
</script>
' . CMS_view::getJavascript($jsfiles) . CMS_view::getJavascript(array('launch'));
if (io::request('cms_action') == 'logout') {
//append logout info
$content .= '<script type="text/javascript">Automne.logout = true;</script>';
}
if (APPLICATION_GCF_SUPPORT) {
//GCF prompt for IE
$content .= '
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style type="text/css">
.chromeFrameOverlayContent {
z-index:200001;
}
</style>
<script type="text/javascript">
示例3: array
$jsfiles = array('ext', 'debug', 'codemirror', 'main');
} else {
$jsfiles = array('ext', 'codemirror', 'main');
}
//set title
$view->setTitle($language->getMessage(MESSAGE_PAGE_TITLE, array(APPLICATION_LABEL)));
$content = '
<div id="atm-loading-mask"></div>
<div id="atm-center">
<div class="atm-loading-indicator">' . $language->getMessage(MESSAGE_PAGE_LOADING) . '</div>
<noscript class="atm-alert">You must have Javascript enabled to access Automne.<hr />Vous devez avoir Javascript actif pour accéder à Automne.</noscript>
</div>
<script type="text/javascript">
var CKEDITOR_BASEPATH = \'' . PATH_MAIN_WR . '/ckeditor/\';
</script>
' . CMS_view::getJavascript($jsfiles) . CMS_view::getJavascript(array('popup'));
if (APPLICATION_GCF_SUPPORT) {
//GCF prompt for IE
$content .= '
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style type="text/css">
.chromeFrameOverlayContent {
z-index:200001;
}
</style>
<script type="text/javascript">
CFInstall.check({mode: "overlay"});
</script>';
}
//Page content
示例4: _showHead
/**
* Writes html header
*
* @return void
* @access private
*/
private function _showHead($returnValue = false)
{
switch ($this->_displayMode) {
case self::SHOW_JSON:
case self::SHOW_RAW:
case self::SHOW_XML:
$return = '';
if ($this->hasErrors()) {
$return .= ' <error>1</error>' . "\n" . ' <errormessage><![CDATA[' . $this->_espaceCdata($this->getErrors(true)) . ']]></errormessage>' . "\n";
} else {
$return .= ' <error>0</error>' . "\n";
}
if ($this->_secure && CMS_session::tokenIsExpired('admin')) {
$token = CMS_session::getToken('admin');
//pr('new token : '.$token);
$return .= ' <token><![CDATA[' . $token . ']]></token>' . "\n";
}
if ($this->hasRawDatas()) {
$return .= ' <rawdatas><![CDATA[' . $this->_espaceCdata($this->getRawDatas(true)) . ']]></rawdatas>' . "\n";
}
if ($this->_actionmessage) {
$return .= ' <message><![CDATA[' . $this->_espaceCdata($this->_actionmessage) . ']]></message>' . "\n";
}
if ($this->_title) {
$return .= ' <title><![CDATA[' . $this->_espaceCdata($this->_title) . ']]></title>' . "\n";
}
if ($this->_disconnected) {
$return .= ' <disconnected>1</disconnected>' . "\n";
}
$scripts = CMS_scriptsManager::getScriptsNumberLeft();
if ($scripts) {
$return .= ' <scripts>' . $scripts . '</scripts>' . "\n";
}
if (SYSTEM_DEBUG && STATS_DEBUG) {
$return .= ' <stats><![CDATA[' . $this->_espaceCdata(CMS_stats::view(true)) . ']]></stats>' . "\n";
}
$jsfiles = CMS_view::getJavascript(array(), 'screen', true);
if ($jsfiles) {
$files = array('files' => $jsfiles, 'manager' => CMS_view::getJSManagerURL());
$return .= ' <jsfiles><![CDATA[' . $this->_espaceCdata(sensitiveIO::jsonEncode($files)) . ']]></jsfiles>' . "\n";
}
$cssfiles = CMS_view::getCSS(array(), 'screen', true);
if ($cssfiles) {
$files = array('files' => $cssfiles, 'manager' => CMS_view::getCSSManagerURL());
$return .= ' <cssfiles><![CDATA[' . $this->_espaceCdata(sensitiveIO::jsonEncode($files)) . ']]></cssfiles>' . "\n";
}
if (!$returnValue) {
echo $return;
} else {
return $return;
}
break;
case self::SHOW_HTML:
default:
$title = $this->_title ? '<title>' . APPLICATION_LABEL . ' :: ' . $this->_title . '</title>' : '';
echo '<head>
<meta http-equiv="Content-Type" content="text/html; charset=' . APPLICATION_DEFAULT_ENCODING . '" />
' . $title . '
' . $this->_copyright() . '
<meta name="generator" content="' . CMS_grandFather::SYSTEM_LABEL . '" />
' . CMS_view::getCSS() . '
' . CMS_view::getJavascript();
if (APPLICATION_GCF_SUPPORT) {
echo '<meta http-equiv="X-UA-Compatible" content="chrome=1">';
}
echo '</head>';
break;
}
}