Changeset d92ba08
- Timestamp:
- 05/27/11 17:04:33 (2 years ago)
- Branches:
- master
- Children:
- 6cac7d2
- Parents:
- 66fc4db
- git-author:
- Tomas Edwardsson <tommi@…> (05/27/11 17:04:33)
- git-committer:
- Tomas Edwardsson <tommi@…> (05/27/11 17:04:33)
- Location:
- adagios
- Files:
-
- 2 edited
-
media/css/style.css (modified) (1 diff)
-
templates/configurator/addhost.html (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adagios/media/css/style.css
r63cbec6 rd92ba08 119 119 display: none; 120 120 } 121 122 123 124 fieldset .subtemplate { 125 display: none; 126 } -
adagios/templates/configurator/addhost.html
r63cbec6 rd92ba08 2 2 {% extends "configurator/base.html" %} 3 3 4 {% block title %} Characters{% endblock %}4 {% block title %}Adagios - Add Host{% endblock %} 5 5 6 6 {% block sidebar %}arg {% endblock %} … … 9 9 $(document).ready(function() { 10 10 $('#hostname').focus(); 11 $.getJSON("/adagios/api/get_templates.json", function(json) { 12 deferred = []; 13 $.each(json.templates, function(key, object) { 14 if (object.parents.length == 0) { 15 16 $('#os').append($('<option></option>').val(key).text(object.name)); 17 $('#subtemplates').append("<fieldset class='subtemplate' id='subtemplate_" + key + "'><legend>Templates</legend></fieldset>"); 18 } else { 19 deferred.push(key); 20 } 21 /* <p><input type="checkbox" class="left" /> <label>Microsoft Exchange</p> 22 <p style="clear: both"><input type="checkbox" class="left" /> <label>Microsoft SQL Server</p> 23 <fieldset class="subtemplates" id="subtemplates"> 24 <legend>Templates</legend> 25 </fieldset> */ 26 }); 27 $.each(deferred, function(key, template) { 28 $.each(json.templates[template].parents, function(i, parent) { 29 $('#subtemplate_' + parent).append('<p style="clear: both"><input type="checkbox" name="' + template + ' class="left" /> <label>' + json.templates[template].name + '</p>'); 30 }); 31 }); 32 }); 11 33 }); 12 34 … … 108 130 <select id="os"> 109 131 <option value="none">-- select --</option> 110 <option value="windows">Microsoft Windows</option>111 <option value="linux">Linux</option>112 <option value="switch">Switch</option>113 132 </select> 114 133 </p> 115 <p> 116 <fieldset id="subtemplates"> 117 <legend>Templates</legend> 118 <p><input type="checkbox" class="left" /> <label>Microsoft Exchange</p> 119 <p style="clear: both"><input type="checkbox" class="left" /> <label>Microsoft SQL Server</p> 120 </fieldset> 134 <p id="subtemplates"> 135 121 136 </p> 122 137 </fieldset> … … 137 152 <button class="custom prev">« Previous</button> 138 153 <button class="custom next">Next »</button> 139 140 154 </p> 141 155 … … 174 188 175 189 $('#os').change(function() { 176 $('#subtemplates').show(); 190 $('.subtemplate').hide(); 191 $('#subtemplate_' + $('#os').val()).show(); 177 192 }); 178 193
Note: See TracChangeset
for help on using the changeset viewer.
