1 // -----------------------------------------------------------------------------
3 function SVGPlayerButtons(a
) {
5 SVGPlayerButtons
.prototype.connect
= Controle
.prototype.connect
;
11 this.previousBtn
= false;
12 this.speedupBtn
= false;
13 this.slowdownBtn
= false;
15 this.playBtnName
= "Lire";
16 this.stopBtnName
= "Stop";
17 this.startBtnName
= "Début";
18 this.endBtnName
= "Fin";
19 this.nextBtnName
= "Suiv.";
20 this.previousBtnName
= "Préc.";
21 this.speedupBtnName
= "+";
22 this.slowdownBtnName
= "-";
25 SVGPlayerButtons
.prototype = {
33 this.previousBtn
= true;
34 this.speedupBtn
= true;
35 this.slowdownBtn
= true;
38 names: function(lang
){
40 this.playBtnName
= "Play";
41 this.stopBtnName
= "Stop";
42 this.startBtnName
= "First";
43 this.endBtnName
= "Last";
44 this.nextBtnName
= "Next";
45 this.previousBtnName
= "Previous";
46 this.speedupBtnName
= "+";
47 this.slowdownBtnName
= "-";
52 // Surcharge de la méthode [Initialisation]
53 SVGPlayerButtons
.prototype.Initialisation = function() {
56 a
.image
.style
.display
= 'inline';
57 a
.message
.parentNode
.removeChild(a
.message
);
58 if(this.playBtn
== true){
59 var play
= document
.createElement('button');
60 play
.className
= "SVGplay playBtn"; // ajout de classe
61 play
.innerHTML
= this.playBtnName
; // texte
62 play
.onclick = function(){a
.action
= true; a
.rotate(self
.a
)};
63 a
.boutons
.appendChild(play
);
65 if(this.stopBtn
== true){
66 var stop
= document
.createElement('button');
67 stop
.className
= "SVGplay stopBtn";
68 stop
.innerHTML
= this.stopBtnName
;
69 stop
.onclick = function(){a
.action
= false; };
70 a
.boutons
.appendChild(stop
);
72 if(this.startBtn
== true){
73 var debut
= document
.createElement('button');
74 debut
.className
= "SVGplay startBtn";
75 debut
.innerHTML
= this.startBtnName
;
76 debut
.onclick = function(){a
.action
= false; a
.first(self
.a
)};
77 a
.boutons
.appendChild(debut
);
79 if(this.endBtn
== true){
80 var fin
= document
.createElement('button');
81 fin
.className
= "SVGplay endBtn";
82 fin
.innerHTML
= this.endBtnName
;
83 fin
.onclick = function(){a
.action
= false; a
.last(self
.a
)};
84 a
.boutons
.appendChild(fin
);
86 if(this.previousBtn
== true){
87 var precedent
= document
.createElement('button');
88 precedent
.className
= "SVGplay previousBtn";
89 precedent
.innerHTML
= this.previousBtnName
;
90 precedent
.onclick = function(){a
.action
= false; a
.previous(self
.a
)};
91 a
.boutons
.appendChild(precedent
);
93 if(this.nextBtn
== true){
94 var suivant
= document
.createElement('button');
95 suivant
.className
= "SVGplay nextBtn";
96 suivant
.innerHTML
= this.nextBtnName
;
97 suivant
.onclick = function(){a
.action
= false; a
.next(self
.a
)};
98 a
.boutons
.appendChild(suivant
);
100 if(this.slowdownBtn
== true){
101 var moins
= document
.createElement('button');
102 moins
.className
= "SVGplay slowdownBtn";
103 moins
.innerHTML
= this.slowdownBtnName
;
104 moins
.onclick = function(){a
.delai
= a
.delai
> 2000 ? 2000 : a
.delai
* 1.414};
105 a
.boutons
.appendChild(moins
);
107 if(this.speedupBtn
== true){
108 var plus
= document
.createElement('button');
109 plus
.className
= "SVGplay speedupBtn";
110 plus
.innerHTML
= this.speedupBtnName
;
111 plus
.onclick = function(){a
.delai
= a
.delai
< 30 ? 30 : a
.delai
/ 1.414};
112 a
.boutons
.appendChild(plus
);
Les fichiers de Syracuse sont mis à
disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.