</div> <div class="width-30 <?php echo $bar; ?> active" id="seblod-sidebar"> <div class="seblod" id="seblod-sideblock"> <div class="fltlft seblod-toolbar"><?php Helper_Workshop::displayToolbar('search', $this->item->master, $this->item->client, $this->uix, ''); ?> </div> <?php if (count($this->fieldsAv)) { echo '<div class="legend top center">' . $this->lists['af_t'] . $this->lists['af_a'] . '<br />' . $this->lists['af_c'] . $this->lists['af_f'] . '</div>'; echo '<div id="scroll"><ul class="sortable connected" id="sortable2" myid="2">'; $style = array('1' => ' hide', '2' => ' hide', '3' => ' hide', '4' => ' hide', '5' => ' hide', '6' => ' hide'); foreach ($this->fieldsAv as $field) { $type_field = ''; if (isset($this->type_fields[$field->id])) { $type_field = ' c-' . $this->type_fields[$field->id]->cc; } JCck::callFunc_Array('plgCCK_Field' . $field->type, 'onCCK_FieldConstruct_Search' . $this->item->master, array(&$field, $style, $data)); Helper_Workshop::displayField($field, $type_field); } echo '</ul></div><div id="sortable_original" style="display: none;"></div>'; } ?> </div> </div> </div> <div class="clr" id="seblod-cleaner"></div>
public function ajax_field_li($field = NULL, $client = '') { $app = JFactory::getApplication(); $lang = JFactory::getLanguage(); if (is_object($field)) { $return = true; $element = 'type'; $master = $client == 'content' || $client == 'intro' ? 'content' : 'form'; require_once JPATH_COMPONENT . '/helpers/helper_admin.php'; } else { $return = false; $fieldname = $app->input->get('fieldname', ''); $element = $app->input->get('element', 'type'); $client = $app->input->get('client', 'admin'); if ($element == 'search') { $master = $client == 'order' ? 'order' : ($client == 'list' || $client == 'item' ? 'content' : 'search'); $lang->load('plg_cck_field_field_x'); $lang->load('plg_cck_field_group_x'); } else { $master = $client == 'content' || $client == 'intro' ? 'content' : 'form'; } $field = JCckDatabase::loadObject('SELECT a.id, a.title, a.name, a.folder, a.type, a.label FROM #__cck_core_fields AS a WHERE a.name="' . $fieldname . '"'); if (!is_object($field)) { return; } require_once JPATH_COMPONENT . '/helpers/helper_admin.php'; require_once JPATH_COMPONENT . '/helpers/helper_workshop.php'; } require_once JPATH_SITE . '/plugins/cck_field/' . $field->type . '/' . $field->type . '.php'; $lang->load('plg_cck_field_' . $field->type); $style = array('1' => '', '2' => ' hide', '3' => ' hide', '4' => ' hide', '5' => ' hide', '6' => ' hide', '7' => ' hide'); $data = Helper_Workshop::getParams($element, $master, $client); JCck::callFunc_Array('plgCCK_Field' . $field->type, 'onCCK_FieldConstruct_' . $element . $master, array(&$field, $style, $data)); $json = array(); ob_start(); Helper_Workshop::displayField($field); $json["id"] = (int) $field->id; $json["html"] = ob_get_clean(); if ($return !== false) { return JCckDev::toJSON($json); } echo JCckDev::toJSON($json); }