本文整理匯總了PHP中JCck::loadModalBox方法的典型用法代碼示例。如果您正苦於以下問題:PHP JCck::loadModalBox方法的具體用法?PHP JCck::loadModalBox怎麽用?PHP JCck::loadModalBox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JCck
的用法示例。
在下文中一共展示了JCck::loadModalBox方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _addScripts
protected static function _addScripts($inline, $params = array(), &$config = array())
{
$doc = JFactory::getDocument();
$height = isset($params['height']) && $params['height'] ? $params['height'] + 140 : '420';
$doc->addStyleSheet(self::$path . 'assets/css/cck_wysiwyg_editor.css');
if (!$inline) {
if (empty($config['client'])) {
if (!(isset($config['tmpl']) && $config['tmpl'] == 'ajax')) {
$doc->addScript(JURI::root(true) . '/media/cck' . '/scripts/jquery-colorbox/js/jquery.colorbox-min.js');
}
$doc->addStyleSheet(JURI::root(true) . '/media/cck' . '/scripts/jquery-colorbox/css/colorbox.css');
$js = ' $(".wysiwyg_editor_box").live("click", function(e) { e.preventDefault();' . ' $.fn.colorbox({href:$(this).attr(\'href\'), open:true, iframe:true, innerWidth:820, innerHeight:' . $height . ', scrolling:false, overlayClose:false, fixed:true, onLoad: function(){ $("#cboxClose").remove();}}); return false; });';
$doc->addScriptDeclaration('(function ($){' . $js . '})(jQuery);');
} elseif ($params['inherited'] == true) {
JCck::loadModalBox();
$js = ' $(".wysiwyg_editor_box").live("click", function(e) { e.preventDefault();' . ' $.fn.colorbox({href:$(this).attr(\'href\'), open:true, iframe:true, innerWidth:820, innerHeight:' . $height . ', scrolling:false, overlayClose:false, fixed:true, onLoad: function(){ $("#cboxClose").remove();}}); return false; });';
$doc->addScriptDeclaration('(function ($){' . $js . '})(jQuery);');
} else {
JCck::loadModalBox();
$js = '
jQuery(document).ready(function($){
$(".wysiwyg_editor_box").colorbox({iframe:true, innerWidth:820, innerHeight:' . $height . ', scrolling:false, overlayClose:false, fixed:true, onLoad: function(){$("#cboxClose").remove();}});
});
';
$doc->addScriptDeclaration($js);
}
}
}
示例2: _addScripts
protected static function _addScripts($params, $options)
{
$doc = JFactory::getDocument();
$height = '';
$width = '';
if ($options['image_custom'] > 0) {
$dim = array('w' => array(1 => 'width', 2 => 'innerWidth', 3 => 'maxWidth'), 'h' => array(1 => 'height', 2 => 'innerHeight', 3 => 'maxHeight'));
$width = $dim['w'][$options['image_custom']] . ':' . $options['image_width'];
$height = ', ' . $dim['h'][$options['image_custom']] . ':' . $options['image_height'];
}
$options = '{' . $width . $height . '}';
JCck::loadjQuery();
JCck::loadModalBox();
if ($params['id']) {
$js = 'jQuery(document).ready(function($){ $("a[rel=\'colorBox' . $params['id'] . '\']").colorbox(' . $options . '); });';
$doc->addScriptDeclaration($js);
}
}
示例3: _addScripts
protected function _addScripts($id, $params = array())
{
$doc = JFactory::getDocument();
if ($params['image_colorbox']) {
JCck::loadjQuery();
JCck::loadModalBox();
$js = 'jQuery(document).ready(function($){ $("a[rel=\'colorBox' . $id . '\']").colorbox(); });';
$doc->addScriptDeclaration($js);
}
static $loaded = 0;
if ($loaded) {
return;
}
if ($params['custom_path']) {
$loaded = 1;
JCck::loadjQuery();
$doc->addStyleSheet(self::$path . 'assets/css/' . self::$type . '.css');
$doc->addScript(self::$path . 'assets/js/' . self::$type . '.js');
}
}