comparison ape.js @ 271:99faf6d80c8d Dev_main

Feature #1327: Elements start out grey until the audioObject states it is ready. Requires all interfaceDOM nodes to have member enable().
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Thu, 23 Jul 2015 09:51:26 +0100
parents 2e19ac736876
children 1077ea830706
comparison
equal deleted inserted replaced
270:10fac2ffe7d1 271:99faf6d80c8d
432 432
433 document.getElementById('interface-buttons').appendChild(outsideReferenceHolder); 433 document.getElementById('interface-buttons').appendChild(outsideReferenceHolder);
434 } 434 }
435 435
436 436
437 testWaitIndicator(); 437 //testWaitIndicator();
438 } 438 }
439 439
440 function sliderObject(audioObject) { 440 function sliderObject(audioObject) {
441 // Create a new slider object; 441 // Create a new slider object;
442 this.parent = audioObject; 442 this.parent = audioObject;
443 this.trackSliderObj = document.createElement('div'); 443 this.trackSliderObj = document.createElement('div');
444 this.trackSliderObj.className = 'track-slider'; 444 this.trackSliderObj.className = 'track-slider track-slider-disabled';
445 this.trackSliderObj.id = 'track-slider-'+audioObject.id; 445 this.trackSliderObj.id = 'track-slider-'+audioObject.id;
446 446
447 this.trackSliderObj.setAttribute('trackIndex',audioObject.id); 447 this.trackSliderObj.setAttribute('trackIndex',audioObject.id);
448 this.trackSliderObj.innerHTML = '<span>'+audioObject.id+'</span>'; 448 this.trackSliderObj.innerHTML = '<span>'+audioObject.id+'</span>';
449 this.trackSliderObj.draggable = true; 449 this.trackSliderObj.draggable = true;
473 $('.comment-div').removeClass('comment-box-playing'); 473 $('.comment-div').removeClass('comment-box-playing');
474 $('#comment-div-'+id).addClass('comment-box-playing'); 474 $('#comment-div-'+id).addClass('comment-box-playing');
475 var outsideReference = document.getElementById('outside-reference'); 475 var outsideReference = document.getElementById('outside-reference');
476 if (outsideReference != undefined) 476 if (outsideReference != undefined)
477 $(outsideReference).removeClass('track-slider-playing'); 477 $(outsideReference).removeClass('track-slider-playing');
478 }
479 };
480
481 this.enable = function() {
482 if (this.parent.state == 1)
483 {
484 $(this.trackSliderObj).removeClass('track-slider-disabled');
478 } 485 }
479 }; 486 };
480 487
481 this.exportXMLDOM = function(audioObject) { 488 this.exportXMLDOM = function(audioObject) {
482 // Called by the audioObject holding this element. Must be present 489 // Called by the audioObject holding this element. Must be present