Exemplo n.º 1
0
Arquivo: new.php Projeto: hamby/SEBLOD
* @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;
$elem = JText::_('COM_CCK_' . _C2_TEXT);
Helper_Include::addDependencies($this->getName(), $this->getLayout());
$options = array();
$options[] = JHtml::_('select.option', 0, '- ' . JText::_('COM_CCK_NONE') . ' -', 'value', 'text');
$options2 = Helper_Admin::getFolderOptions(false, false, true, true, '', true);
if (count($options2)) {
    $options = array_merge($options, $options2);
}
$template = Helper_Admin::getDefaultTemplate();
$lists['featured'] = JHtml::_('select.genericlist', $options, 'featured', 'class="inputbox" size="1"', 'value', 'text', 10, 'featured');
$doc = JFactory::getDocument();
$js = '
			(function ($){
				JCck.Dev = {
					submit: function() {
						var skeleton_id = $("#featured").val();
						var tpl_a = $("#tpl_admin").val();
						var tpl_s = $("#tpl_site").val();
						var tpl_c = $("#tpl_content").val();
						var tpl_i = $("#tpl_intro").val();
						var url = "index.php?option=com_cck&task=type.add&skeleton_id="+skeleton_id+"&tpl_a="+tpl_a+"&tpl_s="+tpl_s+"&tpl_c="+tpl_c+"&tpl_i="+tpl_i;
						top.location.href = url;
						return false;
					}