not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB

  1. define(["widepalette",
  2. "text!facepalette.html"], function (palette, template) {
  3. 'use strict';
  4. var activitypalette = {};
  5. activitypalette.ActivityPalette = function (activityButton,
  6. datastoreObject) {
  7. palette.Palette.call(this, activityButton);
  8. var activityTitle;
  9. var descriptionLabel;
  10. var descriptionBox;
  11. this.getPalette().id = "activity-palette";
  12. var containerElem = document.createElement('div');
  13. containerElem.innerHTML = template;
  14. this.setContent([containerElem]);
  15. var eyevalue = document.getElementById("eyevalue");
  16. eyevalue.min = 1;
  17. eyevalue.max = 5;
  18. eyevalue.value = document.getElementById('numeyes').innerHTML;
  19. eyevalue.onclick = function() {
  20. document.getElementById('numeyes').innerHTML = eyevalue.value;
  21. }
  22. document.getElementById('eyes').onclick = function() {
  23. document.getElementById('eyetype').innerHTML = 1;
  24. document.getElementById('eyes').src = "icons/eyes-selected.svg";
  25. document.getElementById('glasses').src = "icons/glasses.svg";
  26. }
  27. document.getElementById('glasses').onclick = function() {
  28. document.getElementById('eyetype').innerHTML = 2;
  29. document.getElementById('eyes').src = "icons/eyes.svg";
  30. document.getElementById('glasses').src = "icons/glasses-selected.svg";
  31. }
  32. };
  33. activitypalette.ActivityPalette.prototype =
  34. Object.create(palette.Palette.prototype, {
  35. setTitleDescription: {
  36. value: "Face Palette:",
  37. enumerable: true,
  38. configurable: true,
  39. writable: true
  40. }
  41. });
  42. return activitypalette;
  43. });