本文整理匯總了PHP中JCck::on方法的典型用法代碼示例。如果您正苦於以下問題:PHP JCck::on方法的具體用法?PHP JCck::on怎麽用?PHP JCck::on使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JCck
的用法示例。
在下文中一共展示了JCck::on方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display
function display($tpl = null)
{
switch ($this->getlayout()) {
case 'delete':
$this->prepareDelete();
break;
case 'edit':
case 'error':
$this->prepareDisplay();
break;
case 'edit2':
$this->prepareDisplay();
$this->prepareDisplay_Ajax();
break;
default:
break;
}
if (JCck::on()) {
$this->css = array('_' => '', 'panel_height' => '89px', 'w30' => 'span4', 'w70' => 'span8', 'wrapper' => 'container', 'wrapper2' => 'row-fluid', 'wrapper_tmpl' => 'span');
$this->js = array('_' => '', 'tooltip' => '$(".hasTooltip").tooltip({});');
} else {
$this->css = array('_' => '', 'panel_height' => '65px', 'w30' => 'width-30', 'w70' => 'width-70 fltlft', 'wrapper' => 'sebwrapper', 'wrapper2' => 'seb-wrapper workshop', 'wrapper_tmpl' => 'width-100 bg-dark fltlft');
$this->js = array('_' => '', 'tooltip' => '');
}
$this->uix = 'full';
parent::display($tpl);
}
示例2: prepareToolbar
public function prepareToolbar()
{
Helper_Admin::addToolbar($this->vName, $this->vTitle, $this->state->get('filter.folder'));
if (JCck::on()) {
JHtmlSidebar::setAction('index.php?option=com_cck&view=templates');
}
}
示例3: onCCK_Storage_LocationAfterRender
public static function onCCK_Storage_LocationAfterRender(&$buffer, &$data, $uri = array())
{
$app = JFactory::getApplication();
if ($uri['layout']) {
return;
}
if ($uri['view'] == 'featured') {
$data['return_view'] = 'featured';
$tag = '&return=featured';
} else {
$data['return_view'] = '';
$tag = '';
}
$class = JCck::on('3.4') ? ' class="hasTooltip"' : '';
$data['doIntegration'] = false;
$data['multilanguage'] = $data['options']->get('multilanguage', 0);
if ($data['multilanguage']) {
$data['search'] = '#<a' . $class . ' href="(.*)index.php\\?option=com_content&task=article.edit' . $tag . '&id=([0-9]*)" (.*)>#U';
} else {
$data['search'] = '#<a' . $class . ' href="(.*)index.php\\?option=com_content&task=article.edit' . $tag . '&id=([0-9]*)"#';
}
$data['search_alt'] = '#<a href = "javascript://" onclick="listItemTask\\(\'cb([0-9]*)\', \'articles.archive\'\\)">(.*)</a>#sU';
if (JCckDevHelper::hasLanguageAssociations() && $data['multilanguage']) {
$query = 'SELECT a.pk, a.cck, b.key, c.language FROM #__cck_core AS a' . ' LEFT JOIN #__associations AS b ON ( b.id = a.pk AND context = "com_content.item" )' . ' LEFT JOIN #__content AS c ON c.id = a.pk' . ' WHERE storage_location="joomla_article"';
$list_assoc = JCckDatabase::loadObjectListArray('SELECT a.id, a.key, b.language FROM #__associations AS a LEFT JOIN #__content AS b ON ( b.id = a.id AND a.context = "com_content.item" )', 'key', 'language');
} else {
$query = 'SELECT pk, cck FROM #__cck_core WHERE storage_location="joomla_article"';
$list_assoc = array();
}
$list = JCckDatabase::loadObjectList($query, 'pk');
$buffer = JCckDevIntegration::rewriteBuffer($buffer, $data, $list, $list_assoc);
}
示例4: setHead
public static function setHead(&$head)
{
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
if (isset($app->cck_document)) {
if (isset($app->cck_document['styleSheets']) && count($app->cck_document['styleSheets'])) {
foreach ($app->cck_document['styleSheets'] as $k => $v) {
$head['styleSheets'][$k] = $v;
}
if (JCck::on()) {
$doc->setHeadData(array('styleSheets' => $head['styleSheets']));
} else {
$doc->_styleSheets = $head['styleSheets'];
}
}
if (isset($app->cck_document['scripts']) && count($app->cck_document['scripts'])) {
foreach ($app->cck_document['scripts'] as $k => $v) {
$head['scripts'][$k] = $v;
}
if (JCck::on()) {
$doc->setHeadData(array('scripts' => $head['scripts']));
} else {
$doc->_scripts = $head['scripts'];
}
}
}
}
示例5: display
function display($tpl = NULL)
{
$app = JFactory::getApplication();
$this->item = new stdClass();
$this->state = $this->get('State');
$this->option = $app->input->get('option', '');
$this->file = $this->state->get('file', '');
$this->item->id = $this->state->get('bx.id', '');
$this->item->name = $this->state->get('bx.name', '');
$this->item->alt = $this->state->get('alt', 0);
if ($this->getLayout() != 'raw') {
$this->function = $this->state->get('function', '');
$this->item->title = $this->state->get('bx.title', '');
$this->item->type = $this->state->get('bx.type', '');
$this->item->params = $this->state->get('bx.params', '');
$this->doValidation = $this->state->get('validation', 0);
}
if (JCck::on()) {
$this->css = array('items' => 'seblod-manager', 'table' => 'table table-striped', 'wrapper_tmpl' => 'span12');
} else {
$this->css = array('items' => 'seblod', 'table' => 'adminlist', 'wrapper_tmpl' => 'width-100 bg-dark fltlft');
}
JFactory::getApplication()->input->set('hidemainmenu', true);
parent::display($tpl);
}
示例6: prepareUI
public function prepareUI()
{
if (JCck::on()) {
$this->css = array('w30' => 'span4', 'w70' => 'span8', 'wrapper' => 'container', 'wrapper2' => 'row-fluid', 'wrapper_tmpl' => 'span');
} else {
$this->css = array('w30' => 'width-30', 'w70' => 'width-70 fltlft', 'wrapper' => 'sebwrapper', 'wrapper2' => 'seb-wrapper', 'wrapper_tmpl' => 'width-100 bg-dark fltlft');
}
}
示例7: prepareUI
protected function prepareUI()
{
if (JCck::on()) {
$this->css = array('items' => 'seblod-manager', 'table' => 'table table-striped', 'w33' => 'span4', 'w50' => 'span6', 'w66' => 'span8', 'w100' => 'span12', 'wrapper' => 'row-fluid');
} else {
$this->css = array('items' => 'seblod', 'table' => 'adminlist', 'w33' => 'width-30', 'w50' => 'width-50 fltlft', 'w66' => 'width-100', 'w100' => 'width-100', 'wrapper' => 'sebwrapper');
}
}
示例8: _getHTML
protected function _getHTML($text, $url, $class = '')
{
if (JCck::on()) {
$html = '<a href="' . $url . '" class="btn' . $class . '">' . '<span class="icon-download"></span>' . "\n" . $text . '</a>';
} else {
$html = '<a href="' . $url . '">' . $text . ' ⇓</a>';
}
return $html;
}
示例9: prepareUI
public function prepareUI()
{
if (JCck::on()) {
$this->css = array('batch' => 'modal modal-small hide fade', 'filter' => 'btn-toolbar', 'filter_search' => 'filter-search btn-group pull-left hidden-phone input-append', 'filter_search_button' => 'tip hasTooltip', 'filter_search_buttons' => 'btn-group pull-left hidden-phone', 'filter_search_list' => 'pull-right hidden-phone', 'filter_select' => 'filter-select hidden-phone hidden-important', 'items' => 'seblod-manager clearfix', 'joomla3' => ' hide', 'table' => 'table table-striped', 'w50' => 'span6', 'wrapper' => 'row-fluid');
$this->html = array('filter_select_header' => '<h4 class="page-header">' . JText::_('JSEARCH_FILTER_LABEL') . '</h4>', 'filter_select_header_custom' => '<h4 class="page-header">*title*</h4>', 'filter_select_separator' => '<hr class="hr-condensed" />');
$this->js = array('filter' => 'jQuery(document).ready(function($) { $("#sidebar div.sidebar-nav").append("<hr />"); $("div.filter-select").appendTo("#sidebar div.sidebar-nav").removeClass("hidden-important");' . 'var w = $("div.sidebar-nav").width()-28; $("div.filter-select,div.sidebar-nav div.chzn-container").css("width",w+"px"); $("div.sidebar-nav div.chzn-drop").css("width",(w)+"px"); $("div.sidebar-nav div.chzn-search > input").css("width",(w-10)+"px"); });');
$this->sidebar = JHtmlSidebar::render();
} else {
$this->css = array('batch' => 'seblod', 'filter' => 'seblod first', 'filter_search' => 'filter-search fltlft', 'filter_search_button' => 'inputbutton', 'filter_search_buttons' => 'filter-search fltlft', 'filter_search_list' => 'hide', 'filter_select' => 'filter-select fltrt', 'items' => 'seblod', 'joomla3' => '', 'table' => 'adminlist', 'w50' => 'width-50 fltlft', 'wrapper' => 'sebwrapper');
$this->html = array('filter_select_header' => '', 'filter_select_header_custom' => '', 'filter_select_separator' => '');
$this->js = array('filter' => '');
}
}
示例10: addLavalamp
public static function addLavalamp($elem, $js = '')
{
if (JCck::on()) {
return;
}
$doc = JFactory::getDocument();
$doc->addStyleSheet(JROOT_MEDIA_CCK . '/scripts/jquery-lavalamp/css/lavalamp.css');
$doc->addScript(JROOT_MEDIA_CCK . '/scripts/jquery-lavalamp/js/jquery.easing.min.js');
$doc->addScript(JROOT_MEDIA_CCK . '/scripts/jquery-lavalamp/js/jquery.lavalamp.min.js');
if ($js != '') {
$js .= ' ';
}
$js = 'jQuery(document).ready(function($){ ' . $js . '$("' . $elem . '").lavaLamp({ fx: "easeOutBack", speed: 888, }); });';
$doc->addScriptDeclaration($js);
}
示例11: prepareToolbar
protected function prepareToolbar()
{
$bar = JToolBar::getInstance('toolbar');
$canDo = Helper_Admin::getActions();
if (JCck::on()) {
JToolBarHelper::title(CCK_LABEL, 'cck-seblod');
} else {
JToolBarHelper::title(' ', 'seblod.png');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences(CCK_COM, 560, 840, 'JTOOLBAR_OPTIONS');
}
Helper_Admin::addToolbarHistoryButton();
// Helper_Admin::addToolbarSupportButton();
}
示例12: array
public static function &getButtons()
{
$uix = JCck::getUIX();
if (empty(self::$buttons)) {
if ($uix == 'compact') {
self::$buttons = array(array('link' => JRoute::_('index.php?option=com_cck&view=types'), 'icon' => 'icon-48-types.png', 'image' => 'cck-form', 'label' => JText::_('MOD_CCK_QUICKICON_FORM_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_FORM_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=folders'), 'icon' => 'icon-48-folders.png', 'image' => 'cck-application', 'label' => JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('http://www.seblod.com/products'), 'target' => '_blank', 'icon' => 'icon-48-seblod.png', 'image' => 'cck-products', 'label' => JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET_EXTEND')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_SEBLOD_MARKET'));
} else {
self::$buttons = array(array('link' => JRoute::_('index.php?option=com_cck&view=types'), 'icon' => 'icon-48-types.png', 'image' => 'cck-form', 'label' => JText::_('MOD_CCK_QUICKICON_CONTENT_TYPE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_CONTENT_TYPE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=fields'), 'icon' => 'icon-48-fields.png', 'image' => 'cck-plugin', 'label' => JText::_('MOD_CCK_QUICKICON_FIELD_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_FIELD_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=searchs'), 'icon' => 'icon-48-searchs.png', 'image' => 'cck-search', 'label' => JText::_('MOD_CCK_QUICKICON_SEARCH_TYPE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEARCH_TYPE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'), array('link' => JRoute::_('index.php?option=com_cck&view=templates'), 'icon' => 'icon-48-templates.png', 'image' => 'cck-template', 'label' => JText::_('MOD_CCK_QUICKICON_TEMPLATE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_TEMPLATE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION'));
if (!JCck::on()) {
self::$buttons[] = array('link' => JRoute::_('index.php?option=com_cck&view=folders'), 'icon' => 'icon-48-folders.png', 'image' => 'cck-application', 'label' => JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_APP_FOLDER_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION');
self::$buttons[] = array('link' => JRoute::_('index.php?option=com_cck&view=sites'), 'icon' => 'icon-48-sites.png', 'image' => 'cck-multisite', 'label' => JText::_('MOD_CCK_QUICKICON_SITE_MANAGER'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SITE_MANAGER')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_CONSTRUCTION');
}
self::$buttons[] = array('link' => JRoute::_('http://www.seblod.com/products'), 'target' => '_blank', 'icon' => 'icon-48-seblod.png', 'image' => 'cck-products', 'label' => JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET'), 'text' => str_replace('<br />', ' ', JText::_('MOD_CCK_QUICKICON_SEBLOD_MARKET_EXTEND')), 'access' => array('core.manage', 'com_cck'), 'group' => 'MOD_CCK_QUICKICON_SEBLOD_MARKET');
}
}
return self::$buttons;
}
示例13: addTooltip
public static function addTooltip($elem = '', $pos_my = 'top left', $pos_at = 'bottom right', $classes = '', $script = true, $tmpl = '')
{
if (!JCck::on()) {
$doc = JFactory::getDocument();
if ($script === true) {
$doc->addStyleSheet(JROOT_MEDIA_CCK . '/scripts/jquery-qtip/css/jquery.qtip.css');
$doc->addScript(JROOT_MEDIA_CCK . '/scripts/jquery-qtip/js/jquery.qtip.min.js');
}
if ($elem) {
$js = 'jQuery(document).ready(function($){ $("' . $elem . '").qtip({ style: {classes: "' . $classes . '"}, position: {my: "' . $pos_my . '", at: "' . $pos_at . '"} }); });';
if ($tmpl == 'ajax') {
echo '<script type="text/javascript">' . $js . '</script>';
} else {
$doc->addScriptDeclaration($js);
}
}
}
}
示例14: addDependencies
public static function addDependencies($view, $layout, $tmpl = '')
{
$doc = JFactory::getDocument();
$script = $tmpl == 'ajax' ? false : true;
Helper_Include::addStyleSheets(true);
// Additional
switch ($view) {
case 'box':
JCck::loadjQuery(true, true, array('cck.dev-3.6.0.min.js', 'jquery.ui.effects.min.js', 'jquery.json.min.js'));
Helper_Include::addSmoothScrool(500);
break;
case 'folder':
JCck::loadjQuery(true, true, true);
break;
case 'template':
JCck::loadjQuery(true, true, true);
Helper_Include::addJSTree('cck_tree', $script);
break;
case 'site':
JCck::loadjQuery(true, true, true);
break;
case 'field':
if ($script === true) {
JCck::loadjQuery(true, true, array('cck.dev-3.6.0.min.js'));
JCck::loadjQueryUI();
}
Helper_Include::addTooltip('span[title].qtip_cck', 'left center', 'right center', 'ui-tooltip-cck-indigo_dye ui-tooltip-shadow', $script, $tmpl);
Helper_Include::addTooltip('img[title].qtip_cck', 'right center', 'left center', 'ui-tooltip-cck-indigo_dye ui-tooltip-shadow', false, $tmpl);
break;
case 'type':
case 'search':
if ($script === true) {
JCck::loadjQuery(true, true, array('cck.dev-3.6.0.min.js', 'jquery.biscuit.min.js'));
JCck::loadjQueryUI();
$doc->addStyleSheet(JROOT_CCK . '/administrator/components/com_' . CCK_NAME . '/assets/css/ui-construction.css');
$doc->addStyleSheet(JROOT_CCK . '/administrator/components/com_' . CCK_NAME . '/assets/styles/seblod/ui-construction.css');
}
Helper_Include::addColorbox_Live('930', '550', $script, 'cbox', ', onLoad: function(){ $("#cboxClose").remove();}');
Helper_Include::addColorpicker($script);
Helper_Include::addTooltip('', '', '', '', $script);
break;
case 'session':
case 'version':
JCck::loadjQuery(true, true, true);
break;
// --------
// --------
case 'templates':
case 'types':
case 'fields':
case 'searchs':
case 'folders':
case 'sites':
case 'variations':
case 'sessions':
case 'versions':
if ($view == 'folders') {
JCck::loadjQuery(true, true, array('cck.dev-3.6.0.min.js'));
} else {
JCck::loadjQuery();
}
if (JCck::on()) {
JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select:not(.no-chosen)');
}
Helper_Include::addLavalamp('#submenu');
Helper_Include::addSmoothScrool();
if ($view == 'fields') {
Helper_Include::addColorbox('500', '300', $script, 'cbox', ', onLoad: function(){ $("#cboxClose").remove();}');
} elseif ($view == 'templates') {
Helper_Include::addColorbox('850', '585', $script, 'cbox', ', scrolling:false, onLoad: function(){ $("#cboxClose").remove();}');
} elseif ($view == 'types' || $view == 'searchs') {
Helper_Include::addColorbox('850', '430', true, 'cbox_button', ', scrolling:false');
} elseif ($view == 'variations') {
JHtml::_('behavior.framework', false);
}
if ($view == 'searchs' || $view == 'sites') {
$doc->addStyleSheet(JROOT_MEDIA_CCK . '/css/jquery.sly.css');
$doc->addScript(JROOT_MEDIA_CCK . '/js/jquery.sly.min.js');
}
if ($view == 'sessions') {
$doc->addStyleDeclaration('#system-message-container.j-toggle-main.span10{width: 100%;}');
}
break;
case 'list':
JHtml::_('formbehavior.chosen', 'select:not(.no-chosen)');
break;
case 'cck':
$doc->addStyleSheet(JROOT_CCK . '/administrator/components/com_' . CCK_NAME . '/assets/css/cpanel.css');
JCck::loadjQuery();
Helper_Include::addColorbox('930', '430', true, 'cbox_button');
Helper_Include::addLavalamp('#submenu');
break;
default:
break;
}
}
示例15: defined
/**
* @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) 2009 - 2016 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$doc = JFactory::getDocument();
$user = JFactory::getUser();
$userId = $user->id;
$listOrder = $this->state->get('list.ordering');
$listDir = $this->state->get('list.direction');
$title2 = JText::_('COM_CCK_DOWNLOAD_THIS_VARIATION');
$top = !JCck::on() ? 'border-top' : 'content';
$config = JCckDev::init(array('42', 'button_submit', 'select_simple', 'text'), true, array('vName' => $this->vName));
$cck = JCckDev::preload(array('core_filter_input', 'core_filter_go', 'core_filter_search', 'core_filter_clear', 'core_location_filter'));
JText::script('COM_CCK_CONFIRM_DELETE');
Helper_Include::addDependencies($this->getName(), $this->getLayout());
?>
<form action="<?php
echo JRoute::_('index.php?option=' . $this->option . '&view=' . $this->getName());
?>
" method="post" id="adminForm" name="adminForm">
<?php
if (!empty($this->sidebar)) {
?>
<div id="j-sidebar-container" class="span2">
<?php