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.

54 lines
1.7 KiB

  1. define(["viewpalettetemplate",
  2. "text!viewpalette.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. this.projectionobjects = document.getElementsByClassName("view");
  16. var that = this;
  17. for (var i=0; i<this.projectionobjects.length; i++){
  18. this.projectionobjects[i].addEventListener('click', function(){
  19. var viewobj = document.getElementsByClassName("view");
  20. for (var j=0; j<viewobj.length; j++){
  21. viewobj[j].style.backgroundColor = "black";
  22. }
  23. this.style.backgroundColor = "grey";
  24. document.getElementById('projection-view').innerHTML = this.id;
  25. that.popDown();
  26. });
  27. var currentview = document.getElementById(document.getElementById('projection-view').innerHTML);
  28. if (currentview == null) currentview = document.getElementById("stereo");
  29. //currentview.style.backgroundColor = "grey";
  30. }
  31. };
  32. activitypalette.ActivityPalette.prototype =
  33. Object.create(palette.Palette.prototype, {
  34. setTitleDescription: {
  35. value: "Projection View Select:",
  36. enumerable: true,
  37. configurable: true,
  38. writable: true
  39. }
  40. });
  41. return activitypalette;
  42. });