Improved the custom code by adding the feature that shows where the manual custom code is used, including better placeholder information. Added component information to the compiler view.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 18 of this MVC
|
||||
@version @update number 25 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 1st February, 2017
|
||||
@package Component Builder
|
||||
@ -27,6 +27,7 @@
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$this->app->input->set('hidemainmenu', false);
|
||||
$selectNotice = '<h3>' . JText::_('COM_COMPONENTBUILDER_HI') . ' ' . $this->user->name . '</h3><p>' . JText::_('COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE') . '</p>';
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
@ -95,49 +96,55 @@ jQuery(document).ready(function($) {
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif; ?>
|
||||
<div id="form">
|
||||
<h1>Ready to compile your component</h1>
|
||||
<form action="index.php?option=com_componentbuilder&view=compiler" method="post" name="compilerForm" id="compilerForm" class="form-validate" enctype="multipart/form-data">
|
||||
<div>
|
||||
<span class="notice" style="display:none; color:red;">You must select a component!</span><br />
|
||||
<?php if ($this->form): ?>
|
||||
<?php foreach ($this->form as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
<button class="btn btn-small btn-success" onclick="Joomla.submitbutton('compiler.compiler')"><span class="icon-cog icon-white"></span>
|
||||
Compile Component
|
||||
</button>
|
||||
<input type="hidden" name="version" value="3" />
|
||||
<input type="hidden" name="task" value="compiler.compiler" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
<div id="clear" style="display:none;">
|
||||
<h1>Please wait! Clearing the tmp folder <span class="loading-dots">.</span></h1>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div id="compiler" style="display:none;">
|
||||
<h1>Please wait! Compiling the component <span class="loading-dots">.</span></h1>
|
||||
<img src="components/com_componentbuilder/assets/images/ajax-loader.gif" />
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="form">
|
||||
<div class="span6">
|
||||
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_YOUR_COMPONENT'); ?></h3>
|
||||
<form action="index.php?option=com_componentbuilder&view=compiler" method="post" name="compilerForm" id="compilerForm" class="form-validate" enctype="multipart/form-data">
|
||||
<div>
|
||||
<span class="notice" style="display:none; color:red;"><?php echo JText::_('COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT'); ?></span><br />
|
||||
<?php if ($this->form): ?>
|
||||
<?php foreach ($this->form as $field): ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label;?></div>
|
||||
<div class="controls"><?php echo $field->input;?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
<button class="btn btn-small btn-success" onclick="Joomla.submitbutton('compiler.compiler')"><span class="icon-cog icon-white"></span>
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_COMPILE_COMPONENT'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="version" value="3" />
|
||||
<input type="hidden" name="task" value="compiler.compiler" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
<div class="span6" id="component-details">
|
||||
<?php echo $selectNotice; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="clear" style="display:none;">
|
||||
<h1><?php echo JText::_('COM_COMPONENTBUILDER_PLEASE_WAIT_CLEARING_THE_TMP_FOLDER'); ?> <span class="loading-dots">.</span></h1>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div id="compiler" style="display:none;">
|
||||
<h1><?php echo JText::_('COM_COMPONENTBUILDER_PLEASE_WAIT_COMPILING_THE_COMPONENT'); ?> <span class="loading-dots">.</span></h1>
|
||||
<img src="components/com_componentbuilder/assets/images/ajax-loader.gif" />
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<script>
|
||||
// token
|
||||
var token = '<?php echo JSession::getFormToken(); ?>';
|
||||
jQuery('#compilerForm').on('change', '#component',function (e)
|
||||
{
|
||||
var component = jQuery('#component').val();
|
||||
if(component == ""){
|
||||
if(component == "") {
|
||||
jQuery('#component-details').html("<?php echo $selectNotice; ?>");
|
||||
jQuery('.notice').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
getComponentDetails(component);
|
||||
jQuery('.notice').hide();
|
||||
}
|
||||
});
|
||||
@ -153,6 +160,23 @@ jQuery(document).ready( function($) {
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<h1><?php echo JText::_('COM_COMPONENTBUILDER_NO_ACCESS_GRANTED'); ?></h1>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 18 of this MVC
|
||||
@version @update number 25 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 1st February, 2017
|
||||
@package Component Builder
|
||||
@ -198,7 +198,30 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
}
|
||||
}
|
||||
// add the document default css file
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css');
|
||||
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css');
|
||||
// Set the Custom JS script to view
|
||||
$this->document->addScriptDeclaration("
|
||||
function getComponentDetails_server(id){
|
||||
var getUrl = JRouter(\"index.php?option=com_componentbuilder&task=ajax.getComponentDetails&format=json\");
|
||||
if(token.length > 0 && id > 0){
|
||||
var request = 'token='+token+'&id='+id;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
url: getUrl,
|
||||
dataType: 'jsonp',
|
||||
data: request,
|
||||
jsonp: 'callback'
|
||||
});
|
||||
}
|
||||
function getComponentDetails(id) {
|
||||
getComponentDetails_server(id).done(function(result) {
|
||||
if(result.html) {
|
||||
jQuery('#component-details').html(result.html);
|
||||
}
|
||||
});
|
||||
}
|
||||
");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_closed_issues_the_closed_issues_on_github.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_main.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_open_issues_the_open_issues_on_github.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_readme_information.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vast_development_method_notice_board.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default_vdm.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -9,8 +9,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage submitbutton.js
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage edit.php
|
||||
@ -229,9 +229,12 @@ jQuery('#adminForm').on('change', '#jform_function_name',function (e)
|
||||
e.preventDefault();
|
||||
var target = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
if (target == 2) {
|
||||
jQuery('#usedin').show();
|
||||
var functioName = jQuery('#jform_function_name').val();
|
||||
// check if this function name is taken
|
||||
checkFunctionName(functioName);
|
||||
} else {
|
||||
jQuery('#usedin').hide();
|
||||
}
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
@ -239,9 +242,36 @@ jQuery('#adminForm').on('change', '#jform_target',function (e)
|
||||
e.preventDefault();
|
||||
var target = jQuery("#jform_target input[type='radio']:checked").val();
|
||||
if (target == 2) {
|
||||
jQuery('#usedin').show();
|
||||
var functioName = jQuery('#jform_function_name').val();
|
||||
// check if this function name is taken
|
||||
checkFunctionName(functioName);
|
||||
} else {
|
||||
jQuery('#usedin').hide();
|
||||
}
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_comment_type',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var type = jQuery("#jform_comment_type input[type='radio']:checked").val();
|
||||
if (type == 2) {
|
||||
jQuery('#html-comment-info').show();
|
||||
jQuery('#phpjs-comment-info').hide();
|
||||
} else {
|
||||
jQuery('#html-comment-info').hide();
|
||||
jQuery('#phpjs-comment-info').show();
|
||||
}
|
||||
});
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
var x=0;
|
||||
setInterval(function() {
|
||||
var dots = "";
|
||||
x++;
|
||||
for (var y=0; y < x%8; y++) {
|
||||
dots+=".";
|
||||
}
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
</script>
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_batch_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_batch_footer.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_body.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_foot.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_head.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage default_toolbar.php
|
||||
|
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 55 of this MVC
|
||||
@build 16th February, 2017
|
||||
@version @update number 79 of this MVC
|
||||
@build 17th February, 2017
|
||||
@created 11th October, 2016
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage default.php
|
||||
|
@ -11,7 +11,7 @@
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.3.5
|
||||
@build 16th February, 2017
|
||||
@build 17th February, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage view.html.php
|
||||
|
@ -9,7 +9,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
@ -10,7 +10,7 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 84 of this MVC
|
||||
@version @update number 94 of this MVC
|
||||
@build 16th February, 2017
|
||||
@created 6th May, 2015
|
||||
@package Component Builder
|
||||
|
Reference in New Issue
Block a user