Changed the compiler gif image, and improved the overall compiler GUI experience. Added the feature for dynamic hashing of strings and or files.

This commit is contained in:
2021-02-19 02:35:54 +02:00
parent 9f59578f8c
commit e579cd421a
33 changed files with 599 additions and 142 deletions

View File

@ -50,10 +50,23 @@ Joomla.submitbutton = function(task, key)
form.submit();
// some ui movements
if (task == 'compiler.compiler'){
jQuery('#compiler').show();
// get the component name
let component_name = jQuery("#component option:selected").text();
// set the component name
jQuery(".component-name").text(component_name);
// wait a little since to much is happening...
setTimeout(function() {
jQuery('#compiler').show();
jQuery('#compiling').css('display', 'block');
// wait a little since to much is happening...
setTimeout(function() {
jQuery('#compiler-spinner').show();
jQuery('#compiler-notice').show();
}, 100);
}, 100);
} else if (task == 'compiler.clearTmp'){
jQuery('#loading').css('display', 'block');
jQuery('#clear').show();
jQuery('#loading').css('display', 'block');
} else {
jQuery('#loading').css('display', 'block');
}
@ -81,6 +94,20 @@ jQuery('<div id="loading"></div>')
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// for the compiler
var outerDiv = jQuery('body');
jQuery('<div id="compiling"></div>')
.css("background", "rgba(16, 164, 230, .4)")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.40")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 40)")
.css("filter", "alpha(opacity = 40)")
.css("display", "none")
.appendTo(outerDiv);
});
</script>
<?php if(!empty( $this->sidebar)): ?>
@ -93,15 +120,15 @@ jQuery('<div id="loading"></div>')
<?php endif; ?>
<div id="form">
<div class="span4">
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT'); ?></h3>
<h3><?= JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT') ?></h3>
<div id="compilerForm">
<div>
<span class="notice" style="display:none; color:red;"><?php echo JText::_('COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT'); ?></span><br />
<span class="notice" style="display:none; color:red;"><?= 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 class="control-label"><?= $field->label ?></div>
<div class="controls"><?= $field->input ?></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
@ -109,36 +136,44 @@ jQuery('<div id="loading"></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'); ?>
<?= JText::_('COM_COMPONENTBUILDER_COMPILE_COMPONENT') ?>
</button>
<input type="hidden" name="install_item_id" value="0">
<input type="hidden" name="version" value="3" />
</div>
</div>
<div class="span7">
<div id="component-details"><?php echo $selectNotice; ?></div>
<?php echo JLayoutHelper::render('jcbnoticeboardtabs', null); ?>
<div id="component-details"><?= $selectNotice ?></div>
<?= JLayoutHelper::render('jcbnoticeboardtabs', 'noticeboard') ?>
</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>
<h1><?= 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::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT_THE_COMPONENT_IS_BEING_COMPILED', $this->user->name); ?><span class="loading-dots">.</span></h1>
<?php echo ComponentbuilderHelper::getDynamicContent('builder-gif', '707-400'); ?>
<div class="clearfix"></div>
<div id="compiler-spinner" class="span4" style="display:none;">
<h3><?= JText::sprintf('COM_COMPONENTBUILDER_S_PLEASE_WAIT', $this->user->name) ?></h3>
<div style="font-size: smaller;"><?= JText::_('COM_COMPONENTBUILDER_THIS_MAY_TAKE_A_WHILE_DEPENDING_ON_THE_SIZE_OF_YOUR_PROJECT') ?></div>
<h4><b><span class="component-name"><?= JText::_('COM_COMPONENTBUILDER_THE_COMPONENT') ?></span></b> <?= JText::_('COM_COMPONENTBUILDER_IS_BEING_COMPILED') ?><span class="loading-dots">.</span></h4>
<div style="text-align: center;"><?= ComponentbuilderHelper::getDynamicContent('builder-gif', '480-540') ?></div>
<div class="clearfix"></div>
</div>
<div id="compiler-notice" class="span7" style="display:none;">
<?= JLayoutHelper::render('jcbnoticeboardvdm', null) ?>
<div class="jcb-sponsor-banner"><?= ComponentbuilderHelper::getDynamicContent('banner', '728-90') ?></div>
</div>
</div>
</div>
<script type="text/javascript">
// token
var token = '<?php echo JSession::getFormToken(); ?>';
var all_is_good = '<?php echo JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME'); ?>';
var token = '<?= JSession::getFormToken() ?>';
var all_is_good = '<?= JText::_('COM_COMPONENTBUILDER_ALL_IS_GOOD_THERE_IS_NO_NOTICE_AT_THIS_TIME') ?>';
jQuery('#compilerForm').on('change', '#component',function (e)
{
var component = jQuery('#component').val();
if(component == "") {
jQuery('#component-details').html("<?php echo $selectNotice; ?>");
jQuery('#component-details').html("<?= $selectNotice ?>");
jQuery("#noticeboard").show();
jQuery('.notice').show();
} else {

View File

@ -60,8 +60,8 @@ class ComponentbuilderViewCompiler extends JViewLegacy
}
// These are subform layouts used in JCB
// JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout is loaded
// JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout is loaded
// JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout are loaded
// JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout are loaded
public function setForm()
{
@ -277,30 +277,30 @@ class ComponentbuilderViewCompiler extends JViewLegacy
jQuery.get(noticeboard)
.success(function(board) {
if (board.length > 5) {
jQuery(\"#noticeboard-md\").html(marked(board));
jQuery(\".noticeboard-md\").html(marked(board));
getIS(1,board).done(function(result) {
if (result){
jQuery(\"#vdm-new-notice\").show();
jQuery(\".vdm-new-notice\").show();
getIS(2,board);
}
});
} else {
jQuery(\"#noticeboard-md\").html(all_is_good);
jQuery(\".noticeboard-md\").html(all_is_good);
}
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery(\"#noticeboard-md\").html(all_is_good);
jQuery(\".noticeboard-md\").html(all_is_good);
});
jQuery.get(proboard)
.success(function(board) {
if (board.length > 5) {
jQuery(\"#proboard-md\").html(marked(board));
jQuery(\".proboard-md\").html(marked(board));
} else {
jQuery(\"#proboard-md\").html(all_is_good);
jQuery(\".proboard-md\").html(all_is_good);
}
})
.error(function(jqXHR, textStatus, errorThrown) {
jQuery(\"#proboard-md\").html(all_is_good);
jQuery(\".proboard-md\").html(all_is_good);
});
});
// to check is READ/NEW