Revision afa2ebd2 ui/templates/machines.html
b/ui/templates/machines.html | ||
---|---|---|
27 | 27 |
<div class="modal" id="wizard"> |
28 | 28 |
<!-- status bar --> |
29 | 29 |
<ul id="status"> |
30 |
<li class="active"><span class="headernumber">1</span><div class="headerbody">{% trans "Image" %}</div></li>
|
|
30 |
<li class="active"><span class="headernumber" class="first">1</span><div class="headerbody first">{% trans "Image" %}</div></li>
|
|
31 | 31 |
<li><span class="headernumber">2</span><div class="headerbody">{% trans "Flavor" %}</div></li> |
32 | 32 |
<li><span class="headernumber">3</span><div class="headerbody">{% trans "Name" %}</div></li> |
33 | 33 |
</ul> |
... | ... | |
47 | 47 |
<a> |
48 | 48 |
<div class="image-container"> |
49 | 49 |
<div class="image"> |
50 |
<input class="radio" type="radio" name="image-id" id="image-id" />
|
|
50 |
<input class="radio" type="radio" name="imageGroup" id="image-id" />
|
|
51 | 51 |
<img src="" class="image-logo"/> |
52 | 52 |
<strong class="image-title">image.title</strong> |
53 | 53 |
<br /> |
54 | 54 |
<span class="description">image.description</span> |
55 |
<span class="size">?? MB</span>
|
|
55 |
<span id="size" class="size">?? MB</span><span class="size">MB</span>
|
|
56 | 56 |
</div> |
57 | 57 |
</div> |
58 | 58 |
</a> |
... | ... | |
77 | 77 |
<div class="machine-type"> |
78 | 78 |
<label for="small" id="small"> |
79 | 79 |
<input type="radio" id="small" name="machine-type" value="small" checked="true" /> |
80 |
<strong>{% trans "small" %}</strong>
|
|
80 |
<span class="typebody" id="small-body">{% trans "small" %}</span>
|
|
81 | 81 |
</label> |
82 | 82 |
</div> |
83 | 83 |
<div class="machine-type"> |
84 | 84 |
<label for="medium" id="medium"> |
85 | 85 |
<input type="radio" id="medium" name="machine-type" value="medium" /> |
86 |
<strong>{% trans "medium" %}</strong>
|
|
86 |
<span class="typebody" id="medium-body">{% trans "medium" %}</span>
|
|
87 | 87 |
</label> |
88 | 88 |
</div> |
89 | 89 |
<div class="machine-type"> |
90 | 90 |
<label for="large" id="large"> |
91 | 91 |
<input type="radio" id="large" name="machine-type" value="large" /> |
92 |
<strong>{% trans "large" %}</strong>
|
|
92 |
<span class="typebody" id="large-body">{% trans "large" %}</span>
|
|
93 | 93 |
</label> |
94 | 94 |
</div> |
95 | 95 |
<div class="machine-type"> |
96 | 96 |
<label for="custom" id="custom"> |
97 | 97 |
<input type="radio" name="machine-type" id="custom" value="large" /> |
98 |
<strong>{% trans "custom" %}</strong>
|
|
98 |
<span class="typebody" id="custom-body">{% trans "custom" %}</span>
|
|
99 | 99 |
</label> |
100 | 100 |
</div> |
101 | 101 |
</li> |
... | ... | |
133 | 133 |
<h2>{% trans "Confirm your settings" %}</h2> |
134 | 134 |
<hr class="topruler" /> |
135 | 135 |
<ul id="page3-container"> |
136 |
<li class="required"> |
|
136 |
<li class="required" id="label-name">
|
|
137 | 137 |
<label> |
138 | 138 |
<strong>Name:</strong> |
139 | 139 |
<input type="text" class="text" name="machine_name" id="name" value="My Ubuntu 10.04 x86_64 server"/> |
... | ... | |
195 | 195 |
<div id="machines" class="separator"></div> |
196 | 196 |
|
197 | 197 |
<script> |
198 |
//add hover to labels |
|
199 |
$('span.typebody').mouseover(function() { |
|
200 |
$(this).addClass('typehover') |
|
201 |
}); |
|
202 |
$('span.typebody').mouseout(function() { |
|
203 |
$(this).removeClass('typehover') |
|
204 |
}); |
|
205 |
|
|
198 | 206 |
// return value from metadata key "OS", if it exists |
199 | 207 |
function os_icon(metadata) { |
200 | 208 |
if (!metadata) { |
... | ... | |
208 | 216 |
} |
209 | 217 |
} |
210 | 218 |
|
211 |
|
|
212 | 219 |
// switch to list view |
213 | 220 |
$("a#list").click(function(){ |
214 | 221 |
list_view(); |
215 | 222 |
return false; |
216 | 223 |
}); |
217 | 224 |
|
225 |
|
|
218 | 226 |
// switch to standard view |
219 | 227 |
$("a#standard").click(function(){ |
220 | 228 |
standard_view(); |
... | ... | |
316 | 324 |
$("#storage").attr('disabled',true); |
317 | 325 |
} |
318 | 326 |
|
327 |
if($('.radio:checked').val() == 'true') { |
|
328 |
$(this).parent().addClass('selecteddiv'); |
|
329 |
} |
|
330 |
|
|
331 |
//update radio button when clicking on text |
|
332 |
$("#small-body").live('click' ,function() { |
|
333 |
$(this).parent().find("#small").click(); |
|
334 |
}); |
|
335 |
$("#medium-body").live('click' ,function() { |
|
336 |
$(this).parent().find("#medium").click(); |
|
337 |
}); |
|
338 |
$("#large-body").live('click' ,function() { |
|
339 |
$(this).parent().find("#large").click(); |
|
340 |
}); |
|
341 |
$("#custom-body").live('click' ,function() { |
|
342 |
$(this).parent().find("#custom").click(); |
|
343 |
}); |
|
344 |
|
|
345 |
//select image div on radio button select |
|
346 |
$('.radio').live('click' ,function() { |
|
347 |
$(this).parents("div").find(".image").removeClass('selecteddiv'); |
|
348 |
if($(this).is(':checked')) { |
|
349 |
$(this).parent().addClass('selecteddiv'); |
|
350 |
} |
|
351 |
}); |
|
352 |
|
|
319 | 353 |
// confirm all actions |
320 | 354 |
$("div.confirm_multiple .yes").live('click', function(){ |
321 | 355 |
while(pending_actions.length > 0){ // if there is a pending action for this server execute it |
Also available in: Unified diff