Author: tchemit Date: 2012-05-24 14:59:21 +0200 (Thu, 24 May 2012) New Revision: 3382 Url: http://chorem.org/repositories/revision/pollen/3382 Log: refs #154: [Poll] Impossible de choisir l'ordre des choix (images) Modified: trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js Modified: trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js =================================================================== --- trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js 2012-05-24 09:19:30 UTC (rev 3381) +++ trunk/pollen-ui-struts2/src/main/webapp/js/createPoll.js 2012-05-24 12:59:21 UTC (rev 3382) @@ -527,11 +527,23 @@ var choiceTI = $('[name="' + choicePrefix + choiceNumber + '.thumb"]'); var newChoiceTI = $('[name="' + choicePrefix + newChoiceNumber + '.thumb"]'); - var choiceTIVal = choiceTI.val(); - var newChoiceTIVal = newChoiceTI.val(); + var choiceTIVal = choiceTI.attr("alt"); + var newChoiceTIVal = newChoiceTI.attr("alt"); console.info("switch " + choiceTIVal + " to " + newChoiceTIVal); - choiceTI.val(newChoiceTIVal); - newChoiceTI.val(choiceTIVal); + choiceTI.attr("alt", newChoiceTIVal); + newChoiceTI.attr("alt", choiceTIVal); + + choiceTIVal = choiceTI.attr("title"); + newChoiceTIVal = newChoiceTI.attr("title"); + console.info("switch " + choiceTIVal + " to " + newChoiceTIVal); + choiceTI.attr("title", newChoiceTIVal); + newChoiceTI.attr("title", choiceTIVal); + + choiceTIVal = choiceTI.attr("src"); + newChoiceTIVal = newChoiceTI.attr("src"); + console.info("switch " + choiceTIVal + " to " + newChoiceTIVal); + choiceTI.attr("src", newChoiceTIVal); + newChoiceTI.attr("src", choiceTIVal); } function confirmClose() {
participants (1)
-
tchemit@users.chorem.org