Repository: cloudstack Updated Branches: refs/heads/master 100a91122 -> d896aedcc
LDAP Account Wizard: cleanup layout -Fix table column sizing -Add ellipses/alt tags to fields to help overflow Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d896aedc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d896aedc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d896aedc Branch: refs/heads/master Commit: d896aedccd36a8bad859654f6a3ae9f4a7f1eb5b Parents: 100a911 Author: Brian Federle <[email protected]> Authored: Fri Feb 28 08:36:25 2014 -0800 Committer: Brian Federle <[email protected]> Committed: Fri Feb 28 08:36:25 2014 -0800 ---------------------------------------------------------------------- ui/css/cloudstack3.css | 27 +++++++++++++++++++++++ ui/index.jsp | 8 +++---- ui/scripts/ui-custom/accountsWizard.js | 33 +++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d896aedc/ui/css/cloudstack3.css ---------------------------------------------------------------------- diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 2d09f59..2d49c04 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -12450,10 +12450,37 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it display: inline-block; } +.accounts-wizard .content td { + white-space: nowrap; + text-overflow: ellipsis; +} + +.accounts-wizard .content td.select, +.accounts-wizard .content th.select { + background: none; + border-right: 1px solid #BFBFBF; + width: 60px !important; + min-width: 60px !important; + max-width: 60px !important; +} + +.accounts-wizard .content .select input { + padding: 0; + width: auto; + height: auto; + margin: 18px 0 0 24px; +} + .accounts-wizard .content:last-child { margin-left: 14px; } +.accounts-wizard table thead th:first-child { + width: 50px; + min-width: 50px; + max-width: 50px; +} + .accounts-wizard .input-area { width: 320px; font-size: 13px; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d896aedc/ui/index.jsp ---------------------------------------------------------------------- diff --git a/ui/index.jsp b/ui/index.jsp index 096747b..c638f93 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -516,10 +516,10 @@ <table> <thead> <tr> - <th style="width:40px">Select</th> - <th style="width:110px">Realname</th> - <th style="width:70px">Username</th> - <th>Email</th> + <th><fmt:message key="label.select"/></th> + <th><fmt:message key="label.name"/></th> + <th><fmt:message key="label.username"/></th> + <th><fmt:message key="label.email"/></th> </tr> </thead> <tbody> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d896aedc/ui/scripts/ui-custom/accountsWizard.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui-custom/accountsWizard.js b/ui/scripts/ui-custom/accountsWizard.js index f2017f8..5ef0fa9 100644 --- a/ui/scripts/ui-custom/accountsWizard.js +++ b/ui/scripts/ui-custom/accountsWizard.js @@ -132,17 +132,32 @@ success: function(json) { if (json.ldapuserresponse.count > 0) { $(json.ldapuserresponse.LdapUser).each(function() { - var result = $("<tr>"); - result.append("<td><input type=\"checkbox\" name=\"username\" value=\"" + this.username + "\"></td>"); - result.append("<td>" + this.firstname + " " + this.lastname + "</td>"); - result.append("<td>" + this.username + "</td>"); - result.append("<td>" + this.email + "</td>"); - $table.append(result); + var $result = $('<tr>'); + + $result.append( + $('<td>').addClass('select').append( + $('<input>').attr({ + type: 'checkbox', name: 'username', value: this.username + }) + ), + $('<td>').addClass('name').html(this.firstname + ' ' + this.lastname) + .attr('title', this.firstname + ' ' + this.lastname), + $('<td>').addClass('username').html(this.username) + .attr('title', this.username), + $('<td>').addClass('email').html(this.email) + .attr('title', this.email) + ) + + $table.append($result); }); } else { - var result = $("<tr>"); - result.append("<td colspan=\"4\">No data to show</td>"); - $table.append(result); + var $result = $('<tr>'); + + $result.append( + $('<td>').attr('colspan', 4).html(_l('label.no.data')) + ); + + $table.append($result); } } });
