tidy display of config
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/aaef6dec Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/aaef6dec Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/aaef6dec Branch: refs/heads/0.5.0 Commit: aaef6decbed9ddaad837cf01c4ec5d51aa953fc6 Parents: ea45c01 Author: Alex Heneveld <[email protected]> Authored: Wed Feb 27 23:45:30 2013 +0000 Committer: Alex Heneveld <[email protected]> Committed: Thu Feb 28 05:59:15 2013 +0000 ---------------------------------------------------------------------- .../src/main/webapp/assets/css/prettybrook.css | 22 ++++++++++++++++++++ .../assets/js/view/application-add-wizard.js | 7 ++++--- .../app-add-wizard/required-config-entry.html | 11 +++++----- 3 files changed, 32 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/aaef6dec/usage/jsgui/src/main/webapp/assets/css/prettybrook.css ---------------------------------------------------------------------- diff --git a/usage/jsgui/src/main/webapp/assets/css/prettybrook.css b/usage/jsgui/src/main/webapp/assets/css/prettybrook.css index 8e7fb25..f9182f7 100644 --- a/usage/jsgui/src/main/webapp/assets/css/prettybrook.css +++ b/usage/jsgui/src/main/webapp/assets/css/prettybrook.css @@ -691,8 +691,30 @@ div.for-empty-table { border-radius: 4px; } +#app-locations select { + height: 22px; +} +#app-locations #selector-container { + margin-bottom: 4px; +} +div.application-name-label { + margin-bottom: 4px; +} +table.config-table { + margin-bottom: 6px; + margin-left: 2px; +} .app-add-wizard-config-entry input { margin-bottom: 0px; + height: 11px; +} +tr.app-add-wizard-config-entry:nth-child(odd) { + background-color: #f8f8f8; +} +tr.app-add-wizard-config-entry:nth-child(even) { +} +tr.app-add-wizard-config-entry { + height: 20px; } .app-add-wizard-config-entry { margin-bottom: 9px; http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/aaef6dec/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js ---------------------------------------------------------------------- diff --git a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js index adfad0b..01c3579 100644 --- a/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js +++ b/usage/jsgui/src/main/webapp/assets/js/view/application-add-wizard.js @@ -463,7 +463,10 @@ define([ if (catalogEntryItem!=null && catalogEntryItem.config!=null) { var that = this _.each(catalogEntryItem.config, function (cfg) { - that.$('.config-table').append(_.template(RequiredConfigEntryHtml, cfg)) + if (cfg.label) + // only include items with labels + that.$('.config-table').append(_.template(RequiredConfigEntryHtml, {data:cfg})) + // (others might be included in future with an "expand" option, or priority option) }) } } @@ -476,8 +479,6 @@ define([ $('#checkboxValue',elt).length ? $('#checkboxValue',elt).is(':checked') : $('#value',elt).val() }) - log("CONFIG") - log(map) return map; }, selection:function (event) { http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/aaef6dec/usage/jsgui/src/main/webapp/assets/tpl/app-add-wizard/required-config-entry.html ---------------------------------------------------------------------- diff --git a/usage/jsgui/src/main/webapp/assets/tpl/app-add-wizard/required-config-entry.html b/usage/jsgui/src/main/webapp/assets/tpl/app-add-wizard/required-config-entry.html index fb1f2d1..87facf3 100644 --- a/usage/jsgui/src/main/webapp/assets/tpl/app-add-wizard/required-config-entry.html +++ b/usage/jsgui/src/main/webapp/assets/tpl/app-add-wizard/required-config-entry.html @@ -1,14 +1,15 @@ <tr class="controls app-add-wizard-config-entry"> - <td><% if (label) { %><%= label %><% } else { %><%= name %><% } %> - <input id="key" type="text" class="input-medium" name="key" value="<%= name %>" style="display: none;"> + <td><% if (data.label) { %><%= data.label %><% } else { %><%= data.name %><% } %> + <input id="key" type="text" class="input-medium" name="key" value="<%= data.name %>" style="display: none;"> </td> <td> - <% if (type==="java.lang.Boolean" || type==="boolean") { %> + <% if (data.type==="java.lang.Boolean" || data.type==="boolean") { %> <input id="checkboxValue" type="checkbox" class="input-medium" name="checkboxValue" - <% if (defaultValue===true) { %> checked="checked" <% } %> > + <% if (data.defaultValue===true) { %> checked="checked" <% } %> > <% } else { %> - <input id="value" type="text" class="input-medium" name="value" value="<%= defaultValue %>" style="width: 250px"> + <input id="value" type="text" class="input-medium" name="value" value="<% + if (typeof data.defaultValue !== "undefined") { %><%= data.defaultValue %><% } %>" style="width: 250px"> <% } %> </td> <td></td>
