This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coser. See http://git.codelutin.com/coser.git commit 139975b8e0ee8be0bbf92c395ea52b2dabb5d72b Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Jan 12 15:22:12 2015 +0100 fixes #6441: Amélioration de la cinématique sur le formulaire d'extraction de données --- .../WEB-INF/content/search/extract-input.jsp | 72 +++++++++++----------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp b/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp index ae6286d..7301740 100644 --- a/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp +++ b/coser-web/src/main/webapp/WEB-INF/content/search/extract-input.jsp @@ -30,44 +30,46 @@ } </style> <script type="text/javascript"> - <s:if test="!selectZones.empty"> - var f = function() { + var checkNextAction= function() { + + var valid = $('#selectZones option:selected').length>0; + if (valid) { + valid = $('#selectTypes option:selected').length >0; + } + var action = $('#nextAction'); + if (valid) { + action.removeAttr('disabled'); + } else { + action.attr('disabled', 'disabled'); + } + return valid; + }; + var checkSubmitAction = function() { + + var valid = checkNextAction(); - var valid = $('#selectZones option:selected').length>0; - if (valid) { - valid = $('#selectTypes option:selected').length >0; - } - if (valid) { - valid = $('#selectSpecies option:selected').length >0; - } - if (valid) { - valid = ($('#selectPopIndicators option:selected').length + - $('#selectComIndicators option:selected').length) >0; - } - var action = $('#submitAction'); - if (valid) { - action.removeAttr('disabled'); - } else { - action.attr('disabled', 'disabled'); - } - }; - $('select').change(f).trigger( "change" ); - f(); + if (valid) { + valid = $('#selectSpecies option:selected').length > 0; + } + if (valid && $('#selectComIndicators').is(":visible")) { + valid = $('#selectComIndicators option:selected').length > 0; + } + if (valid && $('#selectPopIndicators ').is(":visible")) { + valid = $('#selectPopIndicators option:selected').length > 0; + } + var action = $('#submitAction'); + if (valid) { + action.removeAttr('disabled'); + } else { + action.attr('disabled', 'disabled'); + } + return valid; + }; + <s:if test="!selectZones.empty"> + var f = checkSubmitAction; </s:if> <s:else> - var f = function() { - - var valid = $('#selectZones option:selected').length>0; - if (valid) { - valid = $('#selectTypes option:selected').length >0; - } - var action = $('#nextAction'); - if (valid) { - action.removeAttr('disabled'); - } else { - action.attr('disabled', 'disabled'); - } - }; + var f = checkNextAction; </s:else> $(document).ready(function () { $('select').change(f).trigger( "change" ); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.