first commit of free version

This commit is contained in:
2016-01-30 22:28:43 +02:00
commit ecf47809f9
1834 changed files with 447351 additions and 0 deletions

View File

@ -0,0 +1,50 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.8
@build 30th January, 2016
@created 30th April, 2015
@package Component Builder
@subpackage submitbutton.js
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@my wife Roline van der Merwe <http://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true;
} else {
alert(Joomla.JText._('component, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}

View File

@ -0,0 +1,313 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.8
@build 30th January, 2016
@created 30th April, 2015
@package Component Builder
@subpackage edit.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@my wife Roline van der Merwe <http://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_componentbuilder');
?>
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('component.details_above', $this); ?><div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'componentTab', array('active' => 'details')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'details', JText::_('COM_COMPONENTBUILDER_COMPONENT_DETAILS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('component.details_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('component.details_right', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'settings', JText::_('COM_COMPONENTBUILDER_COMPONENT_SETTINGS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('component.settings_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('component.settings_right', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'scripts', JText::_('COM_COMPONENTBUILDER_COMPONENT_SCRIPTS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('component.scripts_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'readme', JText::_('COM_COMPONENTBUILDER_COMPONENT_README', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('component.readme_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('component.readme_right', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'admin_views', JText::_('COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('component.admin_views_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'site_views', JText::_('COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('component.site_views_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'componentTab', 'publishing', JText::_('COM_COMPONENTBUILDER_COMPONENT_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('component.publishing', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('component.publlshing', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<div>
<input type="hidden" name="task" value="component.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
<div class="clearfix"></div>
<?php echo JLayoutHelper::render('component.details_under', $this); ?>
</form>
<script type="text/javascript">
// #jform_add_php_helper_admin listeners for add_php_helper_admin_YKWupwW function
jQuery('#jform_add_php_helper_admin').on('keyup',function()
{
var add_php_helper_admin_YKWupwW = jQuery("#jform_add_php_helper_admin input[type='radio']:checked").val();
YKWupwW(add_php_helper_admin_YKWupwW);
});
jQuery('#adminForm').on('change', '#jform_add_php_helper_admin',function (e)
{
e.preventDefault();
var add_php_helper_admin_YKWupwW = jQuery("#jform_add_php_helper_admin input[type='radio']:checked").val();
YKWupwW(add_php_helper_admin_YKWupwW);
});
// #jform_add_php_helper_site listeners for add_php_helper_site_IRJfnCW function
jQuery('#jform_add_php_helper_site').on('keyup',function()
{
var add_php_helper_site_IRJfnCW = jQuery("#jform_add_php_helper_site input[type='radio']:checked").val();
IRJfnCW(add_php_helper_site_IRJfnCW);
});
jQuery('#adminForm').on('change', '#jform_add_php_helper_site',function (e)
{
e.preventDefault();
var add_php_helper_site_IRJfnCW = jQuery("#jform_add_php_helper_site input[type='radio']:checked").val();
IRJfnCW(add_php_helper_site_IRJfnCW);
});
// #jform_add_css listeners for add_css_lVqqJOv function
jQuery('#jform_add_css').on('keyup',function()
{
var add_css_lVqqJOv = jQuery("#jform_add_css input[type='radio']:checked").val();
lVqqJOv(add_css_lVqqJOv);
});
jQuery('#adminForm').on('change', '#jform_add_css',function (e)
{
e.preventDefault();
var add_css_lVqqJOv = jQuery("#jform_add_css input[type='radio']:checked").val();
lVqqJOv(add_css_lVqqJOv);
});
// #jform_add_sql listeners for add_sql_OIgJWDf function
jQuery('#jform_add_sql').on('keyup',function()
{
var add_sql_OIgJWDf = jQuery("#jform_add_sql input[type='radio']:checked").val();
OIgJWDf(add_sql_OIgJWDf);
});
jQuery('#adminForm').on('change', '#jform_add_sql',function (e)
{
e.preventDefault();
var add_sql_OIgJWDf = jQuery("#jform_add_sql input[type='radio']:checked").val();
OIgJWDf(add_sql_OIgJWDf);
});
// #jform_emptycontributors listeners for emptycontributors_BNadRnM function
jQuery('#jform_emptycontributors').on('keyup',function()
{
var emptycontributors_BNadRnM = jQuery("#jform_emptycontributors input[type='radio']:checked").val();
BNadRnM(emptycontributors_BNadRnM);
});
jQuery('#adminForm').on('change', '#jform_emptycontributors',function (e)
{
e.preventDefault();
var emptycontributors_BNadRnM = jQuery("#jform_emptycontributors input[type='radio']:checked").val();
BNadRnM(emptycontributors_BNadRnM);
});
// #jform_add_license listeners for add_license_KqbIvUZ function
jQuery('#jform_add_license').on('keyup',function()
{
var add_license_KqbIvUZ = jQuery("#jform_add_license input[type='radio']:checked").val();
KqbIvUZ(add_license_KqbIvUZ);
});
jQuery('#adminForm').on('change', '#jform_add_license',function (e)
{
e.preventDefault();
var add_license_KqbIvUZ = jQuery("#jform_add_license input[type='radio']:checked").val();
KqbIvUZ(add_license_KqbIvUZ);
});
// #jform_add_admin_event listeners for add_admin_event_tVqRLZX function
jQuery('#jform_add_admin_event').on('keyup',function()
{
var add_admin_event_tVqRLZX = jQuery("#jform_add_admin_event input[type='radio']:checked").val();
tVqRLZX(add_admin_event_tVqRLZX);
});
jQuery('#adminForm').on('change', '#jform_add_admin_event',function (e)
{
e.preventDefault();
var add_admin_event_tVqRLZX = jQuery("#jform_add_admin_event input[type='radio']:checked").val();
tVqRLZX(add_admin_event_tVqRLZX);
});
// #jform_add_site_event listeners for add_site_event_DQvHlnH function
jQuery('#jform_add_site_event').on('keyup',function()
{
var add_site_event_DQvHlnH = jQuery("#jform_add_site_event input[type='radio']:checked").val();
DQvHlnH(add_site_event_DQvHlnH);
});
jQuery('#adminForm').on('change', '#jform_add_site_event',function (e)
{
e.preventDefault();
var add_site_event_DQvHlnH = jQuery("#jform_add_site_event input[type='radio']:checked").val();
DQvHlnH(add_site_event_DQvHlnH);
});
// #jform_addreadme listeners for addreadme_aQmcEOY function
jQuery('#jform_addreadme').on('keyup',function()
{
var addreadme_aQmcEOY = jQuery("#jform_addreadme input[type='radio']:checked").val();
aQmcEOY(addreadme_aQmcEOY);
});
jQuery('#adminForm').on('change', '#jform_addreadme',function (e)
{
e.preventDefault();
var addreadme_aQmcEOY = jQuery("#jform_addreadme input[type='radio']:checked").val();
aQmcEOY(addreadme_aQmcEOY);
});
// #jform_add_license listeners for add_license_lWrKOfJ function
jQuery('#jform_add_license').on('keyup',function()
{
var add_license_lWrKOfJ = jQuery("#jform_add_license input[type='radio']:checked").val();
lWrKOfJ(add_license_lWrKOfJ);
});
jQuery('#adminForm').on('change', '#jform_add_license',function (e)
{
e.preventDefault();
var add_license_lWrKOfJ = jQuery("#jform_add_license input[type='radio']:checked").val();
lWrKOfJ(add_license_lWrKOfJ);
});
<?php $fieldNrs = range(1,10,1); ?>
<?php foreach($fieldNrs as $nr): ?>jQuery('body').on('change', 'select[name="icomoon-<?php echo $nr; ?>"]',function (e) {
// update the icon if changed
var val_<?php echo $nr; ?> = jQuery('select[name="icomoon-<?php echo $nr; ?>"] option:selected').val();
var key_<?php echo $nr; ?> = jQuery('select[name="icomoon-<?php echo $nr; ?>"]').attr('id').split('-');
var target_<?php echo $nr; ?> = key_<?php echo $nr; ?>[0]+'_'+key_<?php echo $nr; ?>[1]+'_chzn';
var div_<?php echo $nr; ?> = jQuery('#'+target_<?php echo $nr; ?>);
// build new span
var span = '<span id="icon_'+target_<?php echo $nr; ?>+'" class="icon-'+val_<?php echo $nr; ?>+'"></span>';
// remove old one
jQuery('#icon_'+target_<?php echo $nr; ?>).remove();
// add the new icon
div_<?php echo $nr; ?>.closest("td").append(span);
});
jQuery(document).ready(function() {
// get type value
var val_<?php echo $nr; ?> = jQuery('select[name="icomoon-<?php echo $nr; ?>"] option:selected').val();
var key_<?php echo $nr; ?> = jQuery('select[name="icomoon-<?php echo $nr; ?>"]').attr('id').split('-');
var target_<?php echo $nr; ?> = key_<?php echo $nr; ?>[0]+'_'+key_<?php echo $nr; ?>[1]+'_chzn';
var div_<?php echo $nr; ?> = jQuery('#'+target_<?php echo $nr; ?>);
// build new span
var span = '<span id="icon_'+target_<?php echo $nr; ?>+'" class="icon-'+val_<?php echo $nr; ?>+'"></span>';
// remove old one
jQuery('#icon_'+target_<?php echo $nr; ?>).remove();
// add the new icon
div_<?php echo $nr; ?>.closest("td").append(span);
});
<?php endforeach; ?>
</script>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,226 @@
<?php
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.0.8
@build 30th January, 2016
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
@my wife Roline van der Merwe <http://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
/**
* Component View class
*/
class ComponentbuilderViewComponent extends JViewLegacy
{
/**
* display method of View
* @return void
*/
public function display($tpl = null)
{
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = ComponentbuilderHelper::getActions('component',$this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$this->referral = '';
if ($this->refid)
{
// return to the item that refered to this item
$this->referral = '&ref='.(string)$this->ref.'&refid='.(int)$this->refid;
}
elseif($this->ref)
{
// return to the list view that refered to this item
$this->referral = '&ref='.(string)$this->ref;
}
// Get Linked view data
$this->mdyadmin_views = $this->get('Mdyadmin_views');
// Get Linked view data
$this->ibusite_views = $this->get('Ibusite_views');
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->id;
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_EDIT'), 'pencil-2 article-add');
// Built the actions for new and existing records.
if ($this->refid || $this->ref)
{
if ($this->canDo->get('core.create') && $isNew)
{
// We can create the record.
JToolBarHelper::save('component.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('core.edit'))
{
// We can save the record.
JToolBarHelper::save('component.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// Do not creat but cancel.
JToolBarHelper::cancel('component.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// We can close it.
JToolBarHelper::cancel('component.cancel', 'JTOOLBAR_CLOSE');
}
}
else
{
if ($isNew)
{
// For new records, check the create permission.
if ($this->canDo->get('core.create'))
{
JToolBarHelper::apply('component.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('component.save', 'JTOOLBAR_SAVE');
JToolBarHelper::custom('component.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
};
JToolBarHelper::cancel('component.cancel', 'JTOOLBAR_CANCEL');
}
else
{
if ($this->canDo->get('core.edit'))
{
// We can save the new record
JToolBarHelper::apply('component.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('component.save', 'JTOOLBAR_SAVE');
// We can save this record, but check the create permission to see
// if we can return to make a new one.
if ($this->canDo->get('core.create'))
{
JToolBarHelper::custom('component.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
}
if ($this->canDo->get('core.create'))
{
JToolBarHelper::custom('component.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
JToolBarHelper::cancel('component.cancel', 'JTOOLBAR_CLOSE');
}
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('component');
if (ComponentbuilderHelper::checkString($help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
}
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$isNew = ($this->item->id < 1);
$document = JFactory::getDocument();
$document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_EDIT'));
$document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component.css");
// Add the CSS for Footable.
$document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable/css/footable.core.min.css');
// Use the Metro Style
if (!isset($this->fooTableStyle) || 0 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable/css/footable.metro.min.css');
}
// Use the Legacy Style.
elseif (isset($this->fooTableStyle) && 1 == $this->fooTableStyle)
{
$document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable/css/footable.standalone.min.css');
}
// Add the JavaScript for Footable
$document->addScript(JURI::root() .'media/com_componentbuilder/footable/js/footable.js');
$document->addScript(JURI::root() .'media/com_componentbuilder/footable/js/footable.sort.js');
$document->addScript(JURI::root() .'media/com_componentbuilder/footable/js/footable.filter.js');
$document->addScript(JURI::root() .'media/com_componentbuilder/footable/js/footable.paginate.js');
$footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable(); }); jQuery('.nav-tabs').on('click', 'li', function() { setTimeout(tableFix, 10); }); }); function tableFix() { jQuery('.footable').trigger('footable_resize'); }";
$document->addScriptDeclaration($footable);
$document->addScript(JURI::root() . $this->script);
$document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component/submitbutton.js");
JText::script('view not acceptable. Error');
}
}