comparison js/core.js @ 2580:a6b32c473577

Added minimum (left) and maximum (right) slider markers to the comment slider element
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 31 Oct 2016 15:14:53 +0000
parents d83b38564fbb
children 5f7c11fa5f83
comparison
equal deleted inserted replaced
2579:d83b38564fbb 2580:a6b32c473577
2642 this.slider.max = commentQuestion.max; 2642 this.slider.max = commentQuestion.max;
2643 this.slider.step = commentQuestion.step; 2643 this.slider.step = commentQuestion.step;
2644 this.slider.value = commentQuestion.value; 2644 this.slider.value = commentQuestion.value;
2645 var br = document.createElement('br'); 2645 var br = document.createElement('br');
2646 2646
2647 var textHolder = document.createElement("div");
2648 textHolder.className = "comment-slider-text-holder";
2649
2650 this.leftText = document.createElement("span");
2651 this.leftText.textContent = commentQuestion.leftText;
2652 this.rightText = document.createElement("span");
2653 this.rightText.textContent = commentQuestion.rightText;
2654 textHolder.appendChild(this.leftText);
2655 textHolder.appendChild(this.rightText);
2656
2647 this.holder.appendChild(this.string); 2657 this.holder.appendChild(this.string);
2648 this.holder.appendChild(br); 2658 this.holder.appendChild(br);
2649 this.holder.appendChild(this.slider); 2659 this.holder.appendChild(this.slider);
2660 this.holder.appendChild(textHolder);
2650 2661
2651 this.exportXMLDOM = function (storePoint) { 2662 this.exportXMLDOM = function (storePoint) {
2652 var root = storePoint.parent.document.createElement('comment'); 2663 var root = storePoint.parent.document.createElement('comment');
2653 root.id = this.specification.id; 2664 root.id = this.specification.id;
2654 root.setAttribute('type', this.specification.type); 2665 root.setAttribute('type', this.specification.type);