Removed required from all code/editor field to improve the behavior of the codemirror editor. Improved the token validation via Ajax.
This commit is contained in:
@ -130,5 +130,22 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -103,4 +103,27 @@ $componentParams = $this->params; // will be removed just use $this->params inst
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -67,20 +67,21 @@ Joomla.submitbutton = function(task)
|
||||
}
|
||||
// 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);
|
||||
|
||||
// waiting spinner
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<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 - 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.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
});
|
||||
</script>
|
||||
<?php if(!empty( $this->sidebar)): ?>
|
||||
|
@ -233,7 +233,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
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;
|
||||
var request = token+'=1&id='+id;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
@ -278,7 +278,7 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
var getUrl = JRouter(\"index.php?option=com_componentbuilder&task=ajax.isRead&format=json\");
|
||||
}
|
||||
if(token.length > 0 && notice.length){
|
||||
var request = \"token=\"+token+\"¬ice=\"+notice;
|
||||
var request = token+\"=1¬ice=\"+notice;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: \"POST\",
|
||||
|
@ -103,4 +103,27 @@ $componentParams = $this->params; // will be removed just use $this->params inst
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -396,7 +396,24 @@ 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;
|
||||
}
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(document).on('subform-row-add', function(event, row){
|
||||
getIconImage(jQuery(row).find('.icomoon342'));
|
||||
|
@ -266,5 +266,22 @@ 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>
|
||||
|
@ -663,20 +663,17 @@ jQuery(document).ready(function(){
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
<?php foreach($fieldNames as $fieldName => $funcName): ?>jQuery('#adminForm').on('change', '#jform_<?php echo $fieldName ?>_table_main',function (e) {
|
||||
// get options
|
||||
var value_<?php echo $fieldName ?> = jQuery("#jform_<?php echo $fieldName ?>_table_main option:selected").val();
|
||||
get<?php echo $funcName; ?>TableColumns(value_<?php echo $fieldName ?>, 'a', '<?php echo $fieldName ?>', 3, true, '', '');
|
||||
});
|
||||
<?php endforeach; ?>
|
||||
|
||||
// #jform_add_php_router_parse listeners
|
||||
jQuery('#jform_add_php_router_parse').on('change',function() {
|
||||
var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val();
|
||||
getDynamicScripts(valueSwitch);
|
||||
});
|
||||
|
||||
jQuery('#adminForm').on('change', '#jform_select_all',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
@ -685,7 +682,23 @@ jQuery('#adminForm').on('change', '#jform_select_all',function (e)
|
||||
setSelectAll(select_all);
|
||||
|
||||
});
|
||||
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
|
@ -492,4 +492,23 @@ jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -57,7 +57,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->warfields = $this->get('Warfields');
|
||||
$this->vxqfields = $this->get('Vxqfields');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -226,7 +226,24 @@ 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>
|
||||
|
@ -85,6 +85,7 @@ if ($this->saveOrder)
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// languages footer script
|
||||
|
||||
// waiting spinner
|
||||
var outerDiv = jQuery('body');
|
||||
jQuery('<div id="loading"></div>')
|
||||
@ -99,7 +100,6 @@ jQuery('<div id="loading"></div>')
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
|
||||
// when the build button is clicked
|
||||
jQuery('#toolbar').on('click',"button.button-joomla", function(e){
|
||||
jQuery('#loading').show();
|
||||
|
@ -160,6 +160,36 @@ jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
|
||||
e.preventDefault();
|
||||
getSnippets();
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_snippet',function (e) {
|
||||
e.preventDefault();
|
||||
// get type value
|
||||
var snippetId = jQuery("#jform_snippet option:selected").val();
|
||||
getSnippetDetails(snippetId);
|
||||
});
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
var snippetId = jQuery("#jform_snippet option:selected").val();
|
||||
getSnippetDetails(snippetId);
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_dynamic_get',function (e) {
|
||||
e.preventDefault();
|
||||
// get type value
|
||||
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
|
||||
getDynamicValues(dynamicId);
|
||||
});
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
|
||||
getDynamicValues(dynamicId);
|
||||
});
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(<?php echo ($this->item->id) ? $this->item->id:9999; ?>);
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
|
||||
jQuery.fn.selText = function() {
|
||||
var obj = this[0];
|
||||
@ -179,38 +209,21 @@ jQuery.fn.selText = function() {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
jQuery('#adminForm').on('change', '#jform_snippet',function (e) {
|
||||
e.preventDefault();
|
||||
// get type value
|
||||
var snippetId = jQuery("#jform_snippet option:selected").val();
|
||||
getSnippetDetails(snippetId);
|
||||
});
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
var snippetId = jQuery("#jform_snippet option:selected").val();
|
||||
getSnippetDetails(snippetId);
|
||||
});
|
||||
|
||||
jQuery('#adminForm').on('change', '#jform_dynamic_get',function (e) {
|
||||
e.preventDefault();
|
||||
// get type value
|
||||
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
|
||||
getDynamicValues(dynamicId);
|
||||
});
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
|
||||
getDynamicValues(dynamicId);
|
||||
});
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
// get type value
|
||||
getLayoutDetails(<?php echo ($this->item->id) ? $this->item->id:9999; ?>);
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -319,5 +319,5 @@ jQuery(document).ready( function($) {
|
||||
}
|
||||
$(".loading-dots").text(dots);
|
||||
} , 500);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -134,5 +134,22 @@ 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>
|
||||
|
@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy
|
||||
}
|
||||
|
||||
// Get Linked view data
|
||||
$this->wbblinked_components = $this->get('Wbblinked_components');
|
||||
$this->vyalinked_components = $this->get('Vyalinked_components');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -414,7 +414,24 @@ 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;
|
||||
}
|
||||
jQuery(document).ready(function(){
|
||||
jQuery(document).on('subform-row-add', function(event, row){
|
||||
getIconImage(jQuery(row).find('.icomoon342'));
|
||||
|
@ -213,5 +213,22 @@ jQuery(document).ready(function() {
|
||||
});
|
||||
// some lang strings
|
||||
var select_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
var create_a_snippet = '<?php echo JText::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
|
||||
|
||||
<?php
|
||||
$app = JFactory::getApplication();
|
||||
?>
|
||||
function JRouter(link) {
|
||||
<?php
|
||||
if ($app->isSite())
|
||||
{
|
||||
echo 'var url = "'.JURI::root().'";';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'var url = "";';
|
||||
}
|
||||
?>
|
||||
return url+link;
|
||||
}
|
||||
</script>
|
||||
|
@ -121,14 +121,12 @@ jQuery('#componentbuilder_loader').on('change', '#jform_inherit',function (e) {
|
||||
var rulefilename = jQuery("#jform_inherit option:selected").val();
|
||||
getExistingValidationRuleCode(rulefilename);
|
||||
});
|
||||
|
||||
jQuery('#componentbuilder_loader').on('change', '#jform_name',function (e)
|
||||
{
|
||||
var ruleName = jQuery('#jform_name').val();
|
||||
// check if this rule name is taken
|
||||
checkRuleName(ruleName);
|
||||
});
|
||||
|
||||
|
||||
// nice little dot trick :)
|
||||
jQuery(document).ready( function($) {
|
||||
@ -141,5 +139,22 @@ 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>
|
||||
|
Reference in New Issue
Block a user