public static function addDependencies($view, $layout, $tmpl = '') { $doc = JFactory::getDocument(); $script = $tmpl == 'ajax' ? false : true; if ($script !== false) { if (JCck::on()) { JHtml::_('behavior.framework', false); JHtml::_('bootstrap.tooltip'); } JCck::loadjQuery(true, true, true); } Helper_Include::addStyleSheets(true); }
public function display($tpl = NULL) { $app = JFactory::getApplication(); if ($this->getlayout() != 'select') { $preconfig = array(); $preconfig['action'] = ''; $preconfig['client'] = 'admin'; $preconfig['formId'] = 'seblod_form'; $preconfig['submit'] = 'JCck.Core.submit'; $preconfig['task'] = $app->input->get('task', ''); $preconfig['type'] = $app->input->get('type', ''); $preconfig['url'] = JFactory::getURI()->toString(); JCck::loadjQuery(); Helper_Include::addStyleSheets(false); $this->prepareDisplay($preconfig); } parent::display($tpl); }
<?php /** * @version SEBLOD 3.x Core ~ $Id: edit.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; $uix = JCck::getUIX(); $config = JCckDev::init(array('42', 'checkbox', 'colorpicker', 'jform_rules', 'radio', 'text', 'wysiwyg_editor'), true, array('item' => $this->item)); Helper_Include::addDependencies($this->getName(), $this->getLayout()); ?> <form action="<?php echo JRoute::_('index.php?option=' . $this->option . '&view=' . $this->getName() . '&layout=edit&id=' . (int) $this->item->id); ?> " method="post" id="adminForm" name="adminForm"> <div class="<?php echo $this->css['wrapper']; ?> "> <div class="seblod first"> <ul class="spe spe_title"> <?php echo JCckDev::renderForm('core_title_folder', $this->item->title, $config); ?> </ul>
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.3.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.3.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.3.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 'version': JCck::loadjQuery(true, true, true); break; // -------- // -------- case 'templates': case 'types': case 'fields': case 'searchs': case 'folders': case 'sites': case 'variations': case 'versions': if ($view == 'folders') { JCck::loadjQuery(true, true, array('cck.dev-3.3.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); } 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'); } 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; } }
<?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>
// Prepare $field = JCckDatabase::loadObject('SELECT * FROM #__cck_core_fields WHERE name = "' . $this->item->name . '"'); $field->required_alert = ''; $field->selectlabel = trim($field->selectlabel) ? $field->selectlabel : ''; $field->variation = ''; $field->variation_override = ''; $field->restriction = ''; if ($field->type == 'checkbox' || $field->type == 'radio') { $field->bool = 1; } // Set $doc = JFactory::getDocument(); $doc->addStyleSheet(JURI::root(true) . '/media/cck/css/cck.admin.css'); $doc->addStyleDeclaration('div.cck_forms.cck_admin div.cck_form {float:none;}'); $doc->addScriptDeclaration('jQuery(document).ready(function($){ $("#titlebox").html("' . JText::_('COM_CCK_PREVIEW') . '"); $("#submitBox,#resetBox").hide(); });'); Helper_Include::addDependencies('box', 'edit'); ?> <div class="seblod preview"> <div align="center" style="text-align:center;"> <div class="cck_forms cck_admin cck_<?php echo $field->type; ?> "> <div class="cck_form cck_form_<?php echo $field->type; ?> "> <?php echo JCckDevField::getForm($field, '', $config); ?>
<?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; if ((int) $config['error'] == 1) { return; } if (JCck::getConfig_Param('validation', 2) > 1 && $config['validation'] != '') { Helper_Include::addValidation($config['validation'], $config['validation_options'], $formId); $js = 'if (jQuery("#' . $formId . '").validationEngine("validate",task) === true) { if (jQuery("#' . $formId . '").isStillReady() === true) { jQuery("#' . $formId . ' input[name=\'config[unique]\']").val("' . $formId . '"); JCck.Core.submitForm("save", document.getElementById("' . $formId . '")); } }'; } else { $js = 'if (jQuery("#' . $formId . '").isStillReady() === true) { jQuery("#' . $formId . ' input[name=\'config[unique]\']").val("' . $formId . '"); JCck.Core.submitForm("save", document.getElementById("' . $formId . '")); }'; } ?> <script type="text/javascript"> <?php echo $config['submit']; ?> = function(task) { <?php echo $js; ?> } </script> <?php
var data = $("#adminForm").serializeObject(); var encoded = $.toJSON(data); parent.jQuery("#"+elem).val(encoded); this.close(); return; } } $(document).ready(function(){ var elem = "pos-' . $this->item->id . '_variation_options"; var encoded = parent.jQuery("#"+elem).val(); var data = (encoded != "") ? $.evalJSON(encoded) : ""; $.each(data, function(k, v) { $("#"+k).val( v ); }); }); })(jQuery); '; $doc->addScriptDeclaration($js); require_once JPATH_ADMINISTRATOR . '/components/' . CCK_COM . '/helpers/helper_workshop.php'; Helper_Include::addTooltip('label[title]', 'top left', 'bottom left'); JFactory::getLanguage()->load('files_var_cck_' . $this->item->name . '.sys', JPATH_SITE); JFactory::getLanguage()->load('files_var_cck_seb_css3.sys', JPATH_SITE); $template = isset($this->item->type) && $this->item->type != '' ? $this->item->type : 'seb_one'; $path = JPATH_SITE . '/templates/' . $template . '/variations/' . $this->item->name . '/options.xml'; if (!file_exists($path)) { $path = JPATH_LIBRARIES_CCK . '/rendering/variations/' . $this->item->name . '/options.xml'; } else { JFactory::getLanguage()->load('tpl_' . $template, JPATH_SITE); } $xml = JPath::clean($path); Helper_Workshop::getTemplateParams($xml, '//form');
<input type="hidden" name="return_v" id="return_v" value="templates" /> <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $listDir; ?> " /> <?php echo JHtml::_('form.token'); ?> </div> <?php Helper_Include::addStyleDeclaration(implode('', $css)); Helper_Display::quickCopyright(); ?> </div> </form> <script type="text/javascript"> (function ($){ Joomla.orderTable = function() { table = document.getElementById("sortTable"); direction = document.getElementById("directionTable"); order = table.options[table.selectedIndex].value; if (order != '<?php echo $listOrder; ?>
/** * @version SEBLOD 3.x Core ~ $Id: match.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; $name = $this->item->name; $lang = JFactory::getLanguage(); $lang->load('plg_cck_field_field_x', JPATH_ADMINISTRATOR, null, false, true); $lang->load('plg_cck_field_group_x', JPATH_ADMINISTRATOR, null, false, true); Helper_Include::addDependencies('box', 'edit'); Helper_Include::addTooltip('span[title].qtip_cck', 'left center', 'right center'); $doc = JFactory::getDocument(); $doc->addStyleSheet(JROOT_MEDIA_CCK . '/scripts/jquery-colorbox/css/colorbox.css'); $doc->addScript(JROOT_MEDIA_CCK . '/scripts/jquery-colorbox/js/jquery.colorbox-min.js'); $js = ' (function ($){ JCck.Dev = { reset: function() { parent.jQuery("#' . $name . '_match_collection").val(""); parent.jQuery("#' . $name . '_match_value").val(""); parent.jQuery("#' . $name . '_match_options").val(""); this.close(); }, submit: function() { var data = $("#match_collection").val(); parent.jQuery("#' . $name . '_match_collection").val(data);
public static function validate($config, $id = 'adminForm') { $config['validation'] = count($config['validation']) ? implode(',', $config['validation']) : '"null":{}'; $config['validation_options'] = new JRegistry(array('validation_background_color' => '#242424', 'validation_color' => '#ffffff', 'validation_position' => 'topRight', 'validation_scroll' => 0)); Helper_Include::addValidation($config['validation'], $config['validation_options'], $id); if (isset($config['fields']) && count($config['fields'])) { JFactory::getDocument()->addScriptDeclaration('var cck_dev = ' . json_encode($config['fields']) . ';'); } }
public static function validate($config, $id = 'adminForm') { $config['validation'] = count($config['validation']) ? implode(',', $config['validation']) : '"null":{}'; $config['validation_options'] = new JRegistry(array('validation_background_color' => '#242424', 'validation_color' => '#ffffff', 'validation_position' => 'topRight', 'validation_scroll' => 0)); // require_once JPATH_BASE.'/components/com_cck/helpers/helper_include.php'; // todo: include for manual use of JCckDev (but not for add-on.. :/) Helper_Include::addValidation($config['validation'], $config['validation_options'], $id); if (isset($config['fields']) && count($config['fields'])) { JFactory::getDocument()->addScriptDeclaration('var cck_dev = ' . json_encode($config['fields']) . ';'); } }
<?php /** * @version SEBLOD 3.x Core ~ $Id: default_toolbar.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(); if ($app->input->get('tmpl', '') == 'component') { // Add Toolbar (Html) } if (JCck::getConfig_Param('autosave', 0)) { Helper_Include::autoSave(JCck::getConfig_Param('autosave_interval', 2)); ?> <div id="ajaxToolbar" style="float: right; text-align: right; padding-right: 8px; padding-bottom: 8px; font-weight: bold;"> <div style="float: left; padding-right: 8px;" id="ajaxMessage"></div> </div> <?php }
$legacy = $options->get('add_alt', 2); } } if ($legacy == 1) { $legend = JText::sprintf('LIB_CCK_INTEGRATION_MODAL_BOX_LEGEND', '<a id="standard-content" href="javascript:void(0);" style="color:#808080">' . JString::strtolower(JText::_('LIB_CCK_INTEGRATION_CLICK_HERE')) . '</a>', '<span style="color:#808080">' . JString::strtolower(JText::_('LIB_CCK_INTEGRATION_SELECT_A_FORM')) . '</span>'); $legend2 = ''; } elseif ($legacy == 2) { $legend = JText::_('LIB_CCK_INTEGRATION_SELECT_A_FORM'); $legend2 = JText::sprintf('LIB_CCK_INTEGRATION_MODAL_BOX_LEGEND2', '<a id="standard-content" href="javascript:void(0);" style="color:#808080">' . JString::strtolower(JText::_('LIB_CCK_INTEGRATION_CLICK_HERE')) . '</a>'); } else { $legend = JText::_('LIB_CCK_INTEGRATION_SELECT_A_FORM'); $legend2 = ''; } // Set JCck::loadjQuery(); Helper_Include::addStyleSheets(true); if (JCck::on()) { JHtml::_('stylesheet', 'administrator/components/com_cck/assets/css/cpanel.css', array(), false); } $doc = JFactory::getDocument(); $js = 'jQuery(document).ready(function($){ $("#standard-content").attr("onclick","parent."+parent.jQuery("#toolbar-new a").attr("onclick2")); });'; $doc->addScriptDeclaration($js); ?> <form action="<?php echo JRoute::_('index.php'); ?> " method="post" id="adminForm" name="adminForm"> <div class="seblod"> <?php