-
Notifications
You must be signed in to change notification settings - Fork 0
/
WaveRetrospect.xml
103 lines (81 loc) · 2.73 KB
/
WaveRetrospect.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Wave Bidding" height="250">
<Require feature="wave-preview" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript">
function clearDebug() {
document.getElementById('debug').firstChild.nodeValue = "";
}
function debug( textString ) {
document.getElementById('debug').firstChild.nodeValue = document.getElementById('debug').firstChild.nodeValue + " " +textString;
}
function showAddSign() {
dogument.getElementById('thMere').bgcolor="Red";
}
function buttonClicked() {
var viewerId = wave.getViewer().getId();
var state = wave.getState();
var retro = document.getElementById('yourRetro').value;
var type = document.getElementById('yourType').value;
delta = {};
delta[type] = state.get(type) + " " + retro ;
state.submitDelta(delta);
}
function renderInfo() {
if (!wave.getState()) {
return;
}
var keys = wave.getState().getKeys();
document.getElementById('Mere av').firstChild.nodeValue = wave.getState().get("Mere av");
document.getElementById('Mindre av').firstChild.nodeValue = wave.getState().get("Mindre av");
document.getElementById('Fortsette med').firstChild.nodeValue = wave.getState().get("Fortsette med");
document.getElementById('Starte med').firstChild.nodeValue = wave.getState().get("Starte med");
document.getElementById('Slutte med').firstChild.nodeValue = wave.getState().get("Slutte med");
}
function init() {
if (wave && wave.isInWaveContainer()) {
wave.setStateCallback(renderInfo);
wave.setParticipantCallback(renderInfo);
}
}
gadgets.util.registerOnLoadHandler(init);
</script>
DEBUG: <span id="debug">DEBUG</span>
<img id="bidderThumbnail" src="http://gadget-doc-examples.googlecode.com/svn/trunk/images/unknown.gif" width="50" height="50"/><br/>
Din retrospect:<textarea id="yourRetro">Fyll inn her</textarea><button id="butCount" onclick="buttonClicked()">Retro</button>
<button id="clrDbg" onclick="clearDebug()">Clear Debug</button><br/>
Type:<select id="yourType">
<option> Mere av
<option> Mindre av
<option selected> Fortsette med
<option> Starte med
<option> Slutte med
</select>
<table>
<tr>
<th id="thMere" onMouseOver="showAddSign()">Gjore mere av</th>
<td><span id="Mere av">Litt av hvert</span></td>
</tr>
<tr>
<th>Gjore mindre av</th>
<td><span id="Mindre av">Litt av hvert</span></td>
</tr>
<tr>
<th>Fortsette med</th>
<td><span id="Fortsette med">Litt av hvert</span></td>
</tr>
<tr>
<th>Starte med</th>
<td><span id="Starte med">Litt av hvert</span></td>
</tr>
<tr>
<th>Slutte med</th>
<td><span id="Slutte med">Litt av hvert</span></td>
</tr>
</table>
]]>
</Content>
</Module>