Skip to content
Snippets Groups Projects
Commit e38c1cf5 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #65075 fix rt comments on toggle visibility

parent fd1d29f4
Branches
Tags
2 merge requests!2347Dev#65075 nouvelles fonctionnalites dans bokeh,!2339Dev#65075 nouvelles fonctionnalites dans bokeh
Pipeline #2485 failed with stage
in 20 minutes and 8 seconds
......@@ -59,9 +59,9 @@ class ZendAfi_Form_Configuration_Widget_Articles extends ZendAfi_Form_Configurat
Class_ScriptLoader::getInstance()
->addJQueryReady(
'formSelectToggleVisibilityForElement("input[name=\'display_order\']", "#fieldset-display_settings_group tr:nth-child(2)", ["DateCreationDesc", "DebutPublicationDesc", "EventDebut", "Random", "CommentCount"]);'
'radioToggleVisibilityForElement("input[name=\'display_order\']", $("#nb_aff").closest("tr"), ["DateCreationDesc", "DebutPublicationDesc", "EventDebut", "Random", "CommentCount"]);'
. 'formSelectToggleVisibilityForElement("input[name=\'display_order\']", "#fieldset-display_settings_group tr:nth-child(3)", "Random");'
. 'radioToggleVisibilityForElement("input[name=\'display_order\']", $("#nb_analyse").closest("tr"), "Random");'
. 'checkBoxToggleVisibilityForElement("#allow_link_on_title", $("#anchor").closest("tr"), true);');
}
......
......@@ -80,6 +80,7 @@ function centrer_popup(oPopup)
oPopup.style.top=document.body.scrollTop + Math.floor((screen.height - oPopup.clientHeight)/2)-100;
}
function scroll_popup(sId,nPos,nStopY)
{
oPopup=document.getElementById(sId);
......@@ -95,6 +96,7 @@ function scroll_popup(sId,nPos,nStopY)
if(nY > nStopY) setTimeout("scroll_popup('"+sId+"',"+nY+","+nStopY+")",5);
}
function fermer_scroll_popup(sId,nPos)
{
oPopup=document.getElementById(sId);
......@@ -184,6 +186,17 @@ function formSelectToggleVisibilityForElement(eventSourceSelector, objectToShowS
}
function radioToggleVisibilityForElement(eventSourceSelector, objectToShowSelector, visibleForValues) {
if (!(visibleForValues instanceof Array))
visibleForValues = [visibleForValues];
return toggleVisibilityForElement(eventSourceSelector,
objectToShowSelector,
function(element) {
return ($(element).attr('checked') == 'checked') && (0 <= $.inArray(element.val(), visibleForValues));
});
}
function checkBoxToggleVisibilityForElement(eventSourceSelector, objectToShowSelector, visibleWhenChecked) {
return toggleVisibilityForElement(eventSourceSelector,
......@@ -194,7 +207,6 @@ function checkBoxToggleVisibilityForElement(eventSourceSelector, objectToShowSel
}
function toggleVisibilityForElement(eventSourceSelector, objectToShowSelector, testingAlgorithm) {
var objectToShow = $(objectToShowSelector);
var sourceObject = $(eventSourceSelector);
......@@ -213,13 +225,13 @@ function toggleVisibilityForElement(eventSourceSelector, objectToShowSelector, t
}
function showCmsAvis(idCmsAvis) {
avis = document.getElementById(idCmsAvis);
avis.style.display = 'block';
}
function hideCmsAvis(idCmsAvis) {
avis = document.getElementById(idCmsAvis);
......@@ -227,7 +239,6 @@ function hideCmsAvis(idCmsAvis) {
}
function openIFrameDialog(url, title) {
var iframe = $('<iframe style="padding: 0px"></iframe>');
iframe.dialog({title: title, modal: true, width: 600, height: 400 });
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment