Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 58849CC90 for ; Thu, 20 Jun 2013 01:17:28 +0000 (UTC) Received: (qmail 19332 invoked by uid 500); 20 Jun 2013 01:17:23 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 19247 invoked by uid 500); 20 Jun 2013 01:17:23 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 18894 invoked by uid 99); 20 Jun 2013 01:17:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 01:17:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0FAF081C3BB; Thu, 20 Jun 2013 01:17:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: commits@cloudstack.apache.org Date: Thu, 20 Jun 2013 01:17:38 -0000 Message-Id: <5a0d888c7d7a45d08d3372341a5d268f@git.apache.org> In-Reply-To: <5768606a320f457c9d9537f862890850@git.apache.org> References: <5768606a320f457c9d9537f862890850@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/51] [abbrv] git commit: updated refs/heads/object_store to 9aec9c6 CLOUDSTACK-2716: Truncate long values For cases such as in global setting values, truncate long text if new option 'truncate: true' is specified in field properties. This will reduce td's max-width and add ellipses. Edit field on truncate: true columns will overflow into action column, to prevent input area from being too cramped. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/231c4b5b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/231c4b5b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/231c4b5b Branch: refs/heads/object_store Commit: 231c4b5b10849edfc06a884bfb8d4f6cc7453536 Parents: 2f2bb6b Author: Brian Federle Authored: Tue Jun 18 15:16:32 2013 -0700 Committer: Brian Federle Committed: Tue Jun 18 15:16:35 2013 -0700 ---------------------------------------------------------------------- ui/css/cloudstack3.css | 19 ++++++++++++++++++- ui/scripts/globalSettings.js | 2 +- ui/scripts/ui/widgets/listView.js | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/231c4b5b/ui/css/cloudstack3.css ---------------------------------------------------------------------- diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index e145603..7113dbc 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -140,6 +140,17 @@ table tbody td.loading { border-top: 1px solid #FBFBFB; } +table tbody td.truncated { + overflow: visible; + max-width: 88px; +} + +table tbody td.truncated > span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + /** Actions table cell*/ table tbody td.actions { width: 130px; @@ -441,7 +452,7 @@ body.login { div.list-view table tbody td span { display: block; float: left; - max-width: 100%; + max-width: 89%; word-wrap: break-word; text-indent: 0; margin-left: 12px; @@ -3457,6 +3468,12 @@ div.view table td.editable div.edit { top: 0px; } +div.view table td.truncated.editable div.edit { + top: 1px; + width: 285px; + left: 1px; +} + div.view table td.editable div.edit input { float: left; width: 66%; http://git-wip-us.apache.org/repos/asf/cloudstack/blob/231c4b5b/ui/scripts/globalSettings.js ---------------------------------------------------------------------- diff --git a/ui/scripts/globalSettings.js b/ui/scripts/globalSettings.js index 2687fca..1ae73b7 100644 --- a/ui/scripts/globalSettings.js +++ b/ui/scripts/globalSettings.js @@ -57,7 +57,7 @@ fields: { name: { label: 'label.name', id: true }, description: { label: 'label.description' }, - value: { label: 'label.value', editable: true } + value: { label: 'label.value', editable: true, truncate: true } }, dataProvider: function(args) { var data = { http://git-wip-us.apache.org/repos/asf/cloudstack/blob/231c4b5b/ui/scripts/ui/widgets/listView.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js index 8dbc2f6..bc68a72 100644 --- a/ui/scripts/ui/widgets/listView.js +++ b/ui/scripts/ui/widgets/listView.js @@ -949,6 +949,10 @@ .appendTo($tr); var content = dataItem[key]; + if (field.truncate) { + $td.addClass('truncated'); + } + if (field.indicator) { $td.addClass('state').addClass(field.indicator[content]);