Further gh-53 implementation of the export and import of complete components as JCB packages. Fixes gh-56
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@ -71,10 +71,10 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vxvfields = $this->get('Vxvfields');
|
||||
$this->vxwfields = $this->get('Vxwfields');
|
||||
|
||||
// Get Linked view data
|
||||
$this->vxwlinked_components = $this->get('Vxwlinked_components');
|
||||
$this->vxxlinked_components = $this->get('Vxxlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 104 of this MVC
|
||||
@build 6th March, 2017
|
||||
@version @update number 108 of this MVC
|
||||
@build 24th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 46 of this MVC
|
||||
@build 3rd March, 2017
|
||||
@version @update number 47 of this MVC
|
||||
@build 21st March, 2017
|
||||
@created 1st February, 2017
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
@ -144,6 +144,7 @@ jQuery(document).ready(function($) {
|
||||
<script type="text/javascript">
|
||||
// token
|
||||
var token = '<?php echo JSession::getFormToken(); ?>';
|
||||
var all_is_good = '<?php echo JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME'); ?>';
|
||||
jQuery('#compilerForm').on('change', '#component',function (e)
|
||||
{
|
||||
var component = jQuery('#component').val();
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 46 of this MVC
|
||||
@build 3rd March, 2017
|
||||
@version @update number 47 of this MVC
|
||||
@build 21st March, 2017
|
||||
@created 1st February, 2017
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@ -242,11 +242,11 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
}
|
||||
});
|
||||
} else {
|
||||
jQuery(\"#noticeboard-md\").html(\"'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME').'\");
|
||||
jQuery(\"#noticeboard-md\").html(all_is_good);
|
||||
}
|
||||
})
|
||||
.error(function(jqXHR, textStatus, errorThrown) {
|
||||
jQuery(\"#noticeboard-md\").html(\"'.JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IN_NO_NOTICE_AT_THIS_TIME').'\");
|
||||
jQuery(\"#noticeboard-md\").html(all_is_good);
|
||||
});
|
||||
});
|
||||
// to check is READ/NEW
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_closed_issues_the_closed_issues_on_github.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_main.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_open_issues_the_open_issues_on_github.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_readme_information.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vast_development_method_notice_board.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vdm.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -71,7 +71,7 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vyglinked_components = $this->get('Vyglinked_components');
|
||||
$this->vyhlinked_components = $this->get('Vyhlinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -71,7 +71,7 @@ class ComponentbuilderViewField extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzylinked_admin_views = $this->get('Vzylinked_admin_views');
|
||||
$this->vzzlinked_admin_views = $this->get('Vzzlinked_admin_views');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -71,7 +71,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vzzfields = $this->get('Vzzfields');
|
||||
$this->waafields = $this->get('Waafields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.7
|
||||
@build 20th March, 2017
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
1
admin/views/import_joomla_components/index.html
Normal file
1
admin/views/import_joomla_components/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
263
admin/views/import_joomla_components/tmpl/default.php
Normal file
263
admin/views/import_joomla_components/tmpl/default.php
Normal file
@ -0,0 +1,263 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@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::_('jquery.framework');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('script', 'system/core.js', false, true);
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList)) : ?>
|
||||
Joomla.continueBasicImport = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
var error = false;
|
||||
var therequired = [<?php $i = 0; foreach($this->headerList as $name => $title) { echo ($i != 0)? ', "vdm_'.$name.'"':'"vdm_'.$name.'"'; $i++; } ?>];
|
||||
for(i = 0; i < therequired.length; i++)
|
||||
{
|
||||
if(jQuery('#'+therequired[i]).val() == "" )
|
||||
{
|
||||
error = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// do field validation
|
||||
if (error)
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'continue-basic';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php elseif ($this->dataType === 'smart_package'): ?>
|
||||
Joomla.continueExtImport = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
var error = false;
|
||||
// do field validation
|
||||
if (error)
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'continue-ext';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php else: ?>
|
||||
Joomla.submitbutton = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
// do field validation
|
||||
if (form.import_package.value == "")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'upload';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
Joomla.submitbutton3 = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
// do field validation
|
||||
if (form.import_directory.value == ""){
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'folder';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
Joomla.submitbutton4 = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
|
||||
|
||||
// do field validation
|
||||
if (form.import_url.value == "" || form.import_url.value == "http://")
|
||||
{
|
||||
alert("<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL', true); ?>");
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#loading').css('display', 'block');
|
||||
form.gettype.value = 'url';
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
// Add spindle-wheel for importations:
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $('body');
|
||||
|
||||
|
||||
$('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - $(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - $(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php $formats = ($this->dataType === 'smart_package') ? '.zip' : '.csv .xls .ods'; ?>
|
||||
|
||||
<div id="installer-import" class="clearfix">
|
||||
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
|
||||
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($this->hasPackage && ComponentbuilderHelper::checkArray($this->headerList) && ComponentbuilderHelper::checkArray($this->headers)) : ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => $this->activeTab)); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic', JText::_('Basic Method', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS'); ?></h4></label>
|
||||
<div class="controls">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FILE_COLUMNS'); ?></h4></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach($this->headerList as $name => $title): ?>
|
||||
<div class="control-group">
|
||||
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
|
||||
<div class="controls">
|
||||
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
|
||||
<option value=""><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
|
||||
<option value="IGNORE"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_IGNORE_COLUMN'); ?></option>
|
||||
<?php foreach($this->headers as $value => $option): ?>
|
||||
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
|
||||
<option value="<?php echo ComponentbuilderHelper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ComponentbuilderHelper::htmlEscape($option); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueBasicImport()" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php elseif ($this->hasPackage && $this->dataType === 'smart_package') : ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'advanced')); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'advanced', JText::_('Smart JCB Components Import', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_HERE_YOU_CAN_ADD'); ?></legend>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueExtImport()" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
<input type="hidden" name="gettype" value="continue" />
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_package" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE'); ?></label>
|
||||
<div class="controls">
|
||||
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (<?php echo $formats; ?>)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_directory" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (<?php echo $formats; ?>)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_COMPONENTBUILDER_IMPORT_FROM_URL', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_url" class="control-label"><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" /> <small><?php echo JText::_('COM_COMPONENTBUILDER_IMPORT_FORMATS_ACCEPTED'); ?> (<?php echo $formats; ?>)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
<input type="hidden" name="gettype" value="upload" />
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="import_joomla_components.import" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
1
admin/views/import_joomla_components/tmpl/index.html
Normal file
1
admin/views/import_joomla_components/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
114
admin/views/import_joomla_components/view.html.php
Normal file
114
admin/views/import_joomla_components/view.html.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.8
|
||||
@build 27th March, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@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');
|
||||
|
||||
/**
|
||||
* Componentbuilder Import_joomla_components View
|
||||
*/
|
||||
class ComponentbuilderViewImport_joomla_components extends JViewLegacy
|
||||
{
|
||||
protected $headerList;
|
||||
protected $hasPackage = false;
|
||||
protected $headers;
|
||||
protected $hasHeader = 0;
|
||||
protected $dataType;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
// Include helper submenu
|
||||
ComponentbuilderHelper::addSubmenu('import');
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors'))){
|
||||
JError::raiseError(500, implode('<br />', $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$paths = new stdClass;
|
||||
$paths->first = '';
|
||||
$state = $this->get('state');
|
||||
|
||||
$this->paths = &$paths;
|
||||
$this->state = &$state;
|
||||
// get global action permissions
|
||||
$this->canDo = ComponentbuilderHelper::getActions('import');
|
||||
|
||||
// We don't need toolbar in the modal window.
|
||||
if ($this->getLayout() !== 'modal')
|
||||
{
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
}
|
||||
// load the application
|
||||
$app = JFactory::getApplication();
|
||||
// get the session object
|
||||
$session = JFactory::getSession();
|
||||
// check if it has package
|
||||
$this->hasPackage = $session->get('hasPackage', false);
|
||||
$this->dataType = $session->get('dataType', false);
|
||||
if($this->hasPackage && $this->dataType && $this->dataType !== 'smart_package')
|
||||
{
|
||||
$this->headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false),true);
|
||||
$this->headers = ComponentbuilderHelper::getFileHeaders($this->dataType);
|
||||
// clear the data type
|
||||
$session->clear('dataType');
|
||||
}
|
||||
elseif (!$this->dataType)
|
||||
{
|
||||
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', null);
|
||||
}
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_IMPORT_TITLE'), 'upload');
|
||||
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=import_joomla_components');
|
||||
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_componentbuilder');
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ComponentbuilderHelper::getHelpUrl('import_joomla_components');
|
||||
if (ComponentbuilderHelper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
}
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 132 of this MVC
|
||||
@build 20th March, 2017
|
||||
@version @update number 182 of this MVC
|
||||
@build 27th March, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
@ -135,10 +135,15 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
$dhtml = $layout->render(array('title' => $title));
|
||||
$bar->appendButton('Custom', $dhtml, 'batch');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.export_component'))
|
||||
if ($this->user->authorise('joomla_component.export_components'))
|
||||
{
|
||||
// add Export Component button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENT', false);
|
||||
// add Export Components button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENTS', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.import_components'))
|
||||
{
|
||||
// add Import Components button.
|
||||
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_COMPONENTS', false);
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
|
@ -71,7 +71,7 @@ class ComponentbuilderViewSite_view extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->vyrlinked_components = $this->get('Vyrlinked_components');
|
||||
$this->vyslinked_components = $this->get('Vyslinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
Reference in New Issue
Block a user