[Suiviobsmer-commits] r344 - trunk/suiviobsmer-ui/src/main/webapp/js
Author: fdesbois Date: 2010-02-10 15:43:48 +0000 (Wed, 10 Feb 2010) New Revision: 344 Modified: trunk/suiviobsmer-ui/src/main/webapp/js/wao.js Log: Change order for testing change comment or not Modified: trunk/suiviobsmer-ui/src/main/webapp/js/wao.js =================================================================== --- trunk/suiviobsmer-ui/src/main/webapp/js/wao.js 2010-02-10 14:17:59 UTC (rev 343) +++ trunk/suiviobsmer-ui/src/main/webapp/js/wao.js 2010-02-10 15:43:48 UTC (rev 344) @@ -14,13 +14,13 @@ var oldValue = hidden.getValue(); var newValue = $F(commentPopupId); var img = $(imgId); - if (oldValue != newValue) { + if (!newValue || (unfinishedState && oldValue == newValue)) { + img.setAttribute('src', context + '/img/comment-invalid-22px.png'); + img.setAttribute('title', 'Le commentaire est obligatoire pour un échec'); + } else if (oldValue != newValue) { img.setAttribute('src', context + '/img/comment-valid-22px.png'); img.setAttribute('title', 'Le commentaire a bien été ajouté'); - } else if (unfinishedState && oldValue == newValue) { - img.setAttribute('src', context + '/img/comment-invalid-22px.png'); - img.setAttribute('title', 'Le commentaire est obligatoire pour un échec'); - } + } hidden.setValue(newValue); window.close(); } \ No newline at end of file
participants (1)
-
fdesbois@users.labs.libre-entreprise.org