improved the redirect option to work even if the parent method returns false. Resolved gh-330 by addig a full width class
This commit is contained in:
@ -9,15 +9,12 @@
|
||||
*/
|
||||
|
||||
// Some Global Values
|
||||
jform_vvvvwagvzu_required = false;
|
||||
jform_vvvvwamvzv_required = false;
|
||||
jform_vvvvwahvzv_required = false;
|
||||
jform_vvvvwanvzw_required = false;
|
||||
|
||||
// Initial Script
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
var how_vvvvwaf = jQuery("#jform_how").val();
|
||||
vvvvwaf(how_vvvvwaf);
|
||||
|
||||
var how_vvvvwag = jQuery("#jform_how").val();
|
||||
vvvvwag(how_vvvvwag);
|
||||
|
||||
@ -36,48 +33,13 @@ jQuery(document).ready(function()
|
||||
var how_vvvvwal = jQuery("#jform_how").val();
|
||||
vvvvwal(how_vvvvwal);
|
||||
|
||||
var type_vvvvwam = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwam(type_vvvvwam);
|
||||
var how_vvvvwam = jQuery("#jform_how").val();
|
||||
vvvvwam(how_vvvvwam);
|
||||
|
||||
var type_vvvvwan = jQuery("#jform_type input[type='radio']:checked").val();
|
||||
vvvvwan(type_vvvvwan);
|
||||
});
|
||||
|
||||
// the vvvvwaf function
|
||||
function vvvvwaf(how_vvvvwaf)
|
||||
{
|
||||
if (isSet(how_vvvvwaf) && how_vvvvwaf.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvwaf = how_vvvvwaf;
|
||||
var how_vvvvwaf = [];
|
||||
how_vvvvwaf.push(temp_vvvvwaf);
|
||||
}
|
||||
else if (!isSet(how_vvvvwaf))
|
||||
{
|
||||
var how_vvvvwaf = [];
|
||||
}
|
||||
var how = how_vvvvwaf.some(how_vvvvwaf_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwaf Some function
|
||||
function how_vvvvwaf_SomeFunc(how_vvvvwaf)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwaf == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwag function
|
||||
function vvvvwag(how_vvvvwag)
|
||||
{
|
||||
@ -97,28 +59,11 @@ function vvvvwag(how_vvvvwag)
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').show();
|
||||
if (jform_vvvvwagvzu_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',0);
|
||||
jQuery('#jform_php_setdocument').prop('required','required');
|
||||
jQuery('#jform_php_setdocument').attr('aria-required',true);
|
||||
jQuery('#jform_php_setdocument').addClass('required');
|
||||
jform_vvvvwagvzu_required = false;
|
||||
}
|
||||
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').hide();
|
||||
if (!jform_vvvvwagvzu_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',1);
|
||||
jQuery('#jform_php_setdocument').removeAttr('required');
|
||||
jQuery('#jform_php_setdocument').removeAttr('aria-required');
|
||||
jQuery('#jform_php_setdocument').removeClass('required');
|
||||
jform_vvvvwagvzu_required = true;
|
||||
}
|
||||
jQuery('#jform_addconditions-lbl').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,7 +71,7 @@ function vvvvwag(how_vvvvwag)
|
||||
function how_vvvvwag_SomeFunc(how_vvvvwag)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwag == 3)
|
||||
if (how_vvvvwag == 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -152,11 +97,28 @@ function vvvvwah(how_vvvvwah)
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('.note_display_library_config').closest('.control-group').show();
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').show();
|
||||
if (jform_vvvvwahvzv_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',0);
|
||||
jQuery('#jform_php_setdocument').prop('required','required');
|
||||
jQuery('#jform_php_setdocument').attr('aria-required',true);
|
||||
jQuery('#jform_php_setdocument').addClass('required');
|
||||
jform_vvvvwahvzv_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_display_library_config').closest('.control-group').hide();
|
||||
jQuery('#jform_php_setdocument').closest('.control-group').hide();
|
||||
if (!jform_vvvvwahvzv_required)
|
||||
{
|
||||
updateFieldRequired('php_setdocument',1);
|
||||
jQuery('#jform_php_setdocument').removeAttr('required');
|
||||
jQuery('#jform_php_setdocument').removeAttr('aria-required');
|
||||
jQuery('#jform_php_setdocument').removeClass('required');
|
||||
jform_vvvvwahvzv_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,7 +126,7 @@ function vvvvwah(how_vvvvwah)
|
||||
function how_vvvvwah_SomeFunc(how_vvvvwah)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwah == 2 || how_vvvvwah == 3)
|
||||
if (how_vvvvwah == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -190,11 +152,11 @@ function vvvvwai(how_vvvvwai)
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
|
||||
jQuery('.note_display_library_config').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
|
||||
jQuery('.note_display_library_config').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,7 +164,7 @@ function vvvvwai(how_vvvvwai)
|
||||
function how_vvvvwai_SomeFunc(how_vvvvwai)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwai == 1 || how_vvvvwai == 2 || how_vvvvwai == 3)
|
||||
if (how_vvvvwai == 2 || how_vvvvwai == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -228,15 +190,11 @@ function vvvvwaj(how_vvvvwaj)
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').show();
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
|
||||
jQuery('.note_display_library_files_folders_urls').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,7 +202,7 @@ function vvvvwaj(how_vvvvwaj)
|
||||
function how_vvvvwaj_SomeFunc(how_vvvvwaj)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwaj == 0)
|
||||
if (how_vvvvwaj == 1 || how_vvvvwaj == 2 || how_vvvvwaj == 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -270,13 +228,15 @@ function vvvvwak(how_vvvvwak)
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').show();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_three').closest('.control-group').hide();
|
||||
jQuery('.note_no_behaviour_two').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,7 +244,7 @@ function vvvvwak(how_vvvvwak)
|
||||
function how_vvvvwak_SomeFunc(how_vvvvwak)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwak == 1)
|
||||
if (how_vvvvwak == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -307,6 +267,46 @@ function vvvvwal(how_vvvvwal)
|
||||
var how = how_vvvvwal.some(how_vvvvwal_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').show();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('.note_yes_behaviour_one').closest('.control-group').hide();
|
||||
jQuery('.note_yes_behaviour_two').closest('.control-group').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwal Some function
|
||||
function how_vvvvwal_SomeFunc(how_vvvvwal)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwal == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwam function
|
||||
function vvvvwam(how_vvvvwam)
|
||||
{
|
||||
if (isSet(how_vvvvwam) && how_vvvvwam.constructor !== Array)
|
||||
{
|
||||
var temp_vvvvwam = how_vvvvwam;
|
||||
var how_vvvvwam = [];
|
||||
how_vvvvwam.push(temp_vvvvwam);
|
||||
}
|
||||
else if (!isSet(how_vvvvwam))
|
||||
{
|
||||
var how_vvvvwam = [];
|
||||
}
|
||||
var how = how_vvvvwam.some(how_vvvvwam_SomeFunc);
|
||||
|
||||
|
||||
// set this function logic
|
||||
if (how)
|
||||
{
|
||||
@ -322,44 +322,44 @@ function vvvvwal(how_vvvvwal)
|
||||
}
|
||||
}
|
||||
|
||||
// the vvvvwal Some function
|
||||
function how_vvvvwal_SomeFunc(how_vvvvwal)
|
||||
// the vvvvwam Some function
|
||||
function how_vvvvwam_SomeFunc(how_vvvvwam)
|
||||
{
|
||||
// set the function logic
|
||||
if (how_vvvvwal == 4)
|
||||
if (how_vvvvwam == 4)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// the vvvvwam function
|
||||
function vvvvwam(type_vvvvwam)
|
||||
// the vvvvwan function
|
||||
function vvvvwan(type_vvvvwan)
|
||||
{
|
||||
// set the function logic
|
||||
if (type_vvvvwam == 2)
|
||||
if (type_vvvvwan == 2)
|
||||
{
|
||||
jQuery('#jform_libraries').closest('.control-group').show();
|
||||
if (jform_vvvvwamvzv_required)
|
||||
if (jform_vvvvwanvzw_required)
|
||||
{
|
||||
updateFieldRequired('libraries',0);
|
||||
jQuery('#jform_libraries').prop('required','required');
|
||||
jQuery('#jform_libraries').attr('aria-required',true);
|
||||
jQuery('#jform_libraries').addClass('required');
|
||||
jform_vvvvwamvzv_required = false;
|
||||
jform_vvvvwanvzw_required = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery('#jform_libraries').closest('.control-group').hide();
|
||||
if (!jform_vvvvwamvzv_required)
|
||||
if (!jform_vvvvwanvzw_required)
|
||||
{
|
||||
updateFieldRequired('libraries',1);
|
||||
jQuery('#jform_libraries').removeAttr('required');
|
||||
jQuery('#jform_libraries').removeAttr('aria-required');
|
||||
jQuery('#jform_libraries').removeClass('required');
|
||||
jform_vvvvwamvzv_required = true;
|
||||
jform_vvvvwanvzw_required = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user