-
Notifications
You must be signed in to change notification settings - Fork 24
/
pleasure.js
10 lines (10 loc) · 4.62 KB
/
pleasure.js
1
2
3
4
5
6
7
8
9
10
Qualtrics.SurveyEngine.addOnload(function()
{
var qid = this.questionId;
console.log('working to build question: ' + qid);
var labels = $(qid).descendants().grep(new Selector('.statement-container'));
labels[0].hide()
var cont = labels[0].getOffsetParent();
cont.update('<table style="width:100%;background-color:transparent">\n<tr>\n<td align="right">\n<svg version="1.1" viewBox="0 0 77.952756 77.952756" xmlns="http://www.w3.org/2000/svg" width="75px" height="75px">\n<g transform="translate(0 -974.41)">\n<g transform="matrix(1.25 0 0 -1.25 -45.703 1123.2)">\n<g transform="translate(67.543 115.56)">\n<path d="m0 0c-15.27 0-27.693-12.423-27.693-27.693 0-15.271 12.423-27.694 27.693-27.694 15.271 0 27.693 12.423 27.693 27.694 0 15.27-12.422 27.693-27.693 27.693m0-57.887c-16.648 0-30.193 13.545-30.193 30.194 0 16.648 13.545 30.193 30.193 30.193s30.193-13.545 30.193-30.193c0-16.649-13.545-30.194-30.193-30.194" fill="#505050" />\n</g>\n<g transform="translate(78.027 68.261)">\n<path d="m0 0c-4.293 6.925-10.559 6.659-13.053 6.224-3.937-0.688-7.086-3.083-7.489-5.697l-3.983 0.518c0.648 4.194 5.056 7.815 10.719 8.805 6.97 1.214 13.435-1.785 17.302-8.026l-3.496-1.824z" fill="#505050" />\n</g>\n<g transform="translate(87.981 99.373)">\n<path d="m0 0c-0.36 0.041-8.901 1.063-13.741 5.736l1.222 1.449c4.405-4.253 12.63-5.235 12.713-5.245l-0.194-1.94z" fill="#505050" />\n</g>\n<g transform="translate(78.889 99.763)">\n<path d="m0 0c2.08 0 3.767-2.177 3.767-4.862 0-2.686-1.687-4.863-3.767-4.863s-3.766 2.177-3.766 4.863c0 2.685 1.686 4.862 3.766 4.862" fill="#505050" />\n</g>\n<g transform="translate(54.722 99.763)">\n<path d="m0 0c2.08 0 3.767-2.177 3.767-4.862 0-2.686-1.687-4.863-3.767-4.863s-3.766 2.177-3.766 4.863c0 2.685 1.686 4.862 3.766 4.862" fill="#505050" />\n</g>\n<g transform="translate(47.394 98.815)">\n<path d="M 0,0 -0.669,1.937 C 2.982,3.121 9.254,5.684 10.537,7.519 L 12.283,6.374 C 10.182,3.366 1.036,0.335 0,0" fill="#505050" />\n</g>\n</g>\n</g>\n</svg>\n<td style="width:99%">'+cont.innerHTML+'</td>\n<td align="left">\n<svg version="1.1" viewBox="0 0 77.952756 77.952756" xmlns="http://www.w3.org/2000/svg" width="75px" height="75px">\n<g transform="translate(0 -974.41)">\n<g transform="matrix(1.25 0 0 -1.25 -959.57 1121.7)">\n<g transform="translate(816.73 96.748)">\n<path d="m0 0-3.463 0.331c0.221 2.298-1.26 4.326-3.297 4.521-2.029 0.196-3.875-1.52-4.095-3.82l-3.461 0.333c0.404 4.209 3.955 7.327 7.886 6.95 3.948-0.377 6.832-4.107 6.43-8.315" fill="#505050" />\n</g>\n<g transform="translate(820.83 86.867)">\n<path d="m0 0c0-12.312-9.797-22.297-21.881-22.297-12.085 0-21.882 9.985-21.882 22.297 8.835 0.256 9.797 0 21.882 0h21.881z" fill="#68696b" />\n</g>\n<path d="m777.07 86.867h43.419v-4.921h-43.419v4.921z" fill="#fff" />\n<g transform="translate(778.09 85.867)">\n<path d="m0 0c0.514-11.28 9.674-20.297 20.859-20.297 11.184 0 20.344 9.017 20.858 20.297h-41.717zm20.859-22.297c-12.617 0-22.881 10.451-22.881 23.297v1h45.762v-1c0-12.846-10.265-23.297-22.881-23.297" fill="#505050" />\n</g>\n<g transform="translate(779.74 96.648)">\n<path d="m0 0c-0.465 4.201 2.332 7.971 6.233 8.405 3.898 0.439 7.456-2.637 7.921-6.839l-3.457-0.382c-0.254 2.296-2.082 3.982-4.081 3.764-1.995-0.222-3.413-2.271-3.159-4.566l-3.457-0.382z" fill="#505050" />\n</g>\n<g transform="translate(798.95 114.2)">\n<path d="m0 0c-15.271 0-27.694-12.423-27.694-27.693 0-15.271 12.423-27.694 27.694-27.694 15.27 0 27.693 12.423 27.693 27.694 0 15.27-12.423 27.693-27.693 27.693m0-57.887c-16.649 0-30.194 13.545-30.194 30.194 0 16.648 13.545 30.193 30.194 30.193 16.648 0 30.193-13.545 30.193-30.193 0-16.649-13.545-30.194-30.193-30.194" fill="#505050" />\n</g>\n</g>\n</g>\n</svg>\n</td>\n</tr>\n<tr>\n<td></td>\n<td>\n<svg version="1.1" viewBox="0 0 806.10233 53.149605" xmlns="http://www.w3.org/2000/svg">\n<defs>\n<linearGradient id="b" x2="1" gradientTransform="matrix(322.55 0 0 -322.55 432.61 66.842)" gradientUnits="userSpaceOnUse">\n<stop stop-color="#fff" offset="0" />\n<stop stop-color="#231f20" offset="1" />\n</linearGradient>\n<linearGradient id="a" x2="1" gradientTransform="matrix(-322.55 0 0 322.55 432.61 65.842)" gradientUnits="userSpaceOnUse">\n<stop stop-color="#fff" offset="0" />\n<stop stop-color="#231f20" offset="1" />\n</linearGradient>\n</defs>\n<g transform="translate(0 -999.21)">\n<g transform="matrix(1.25 0 0 -1.25 -137.4 1109.4)">\n<path d="m593.88 76.923-161.27-10.585 161.27-10.081 161.27-10.082v20.667 20.667l-161.27-10.586z" fill="url(#b)" />\n<path d="m110.06 65.842v-20.666l161.27 10.585 161.27 10.584-161.27 10.082-161.27 10.082v-20.667z" fill="url(#a)" />\n</g>\n</g>\n</svg>\n</td>\n<td></td>\n</tr>\n</table>');
console.log('finished building question: '+qid);
});