cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject git commit: refs/heads/4.1 - Dashboard UI: Fix line breaks
Date Wed, 20 Mar 2013 00:49:30 GMT
Updated Branches:
  refs/heads/4.1 7734650bf -> 2d7c6aa58


Dashboard UI: Fix line breaks

Move line break tags from API calls to widget code; otherwise they
were not rendering correctly due to sanitization process.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/2d7c6aa5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/2d7c6aa5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/2d7c6aa5

Branch: refs/heads/4.1
Commit: 2d7c6aa582cff9a3811eafcfca9ad966c71990c6
Parents: 7734650
Author: Brian Federle <brian.federle@citrix.com>
Authored: Thu Mar 14 15:54:37 2013 -0700
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Wed Mar 20 00:49:08 2013 +0000

----------------------------------------------------------------------
 ui/scripts/dashboard.js           |    4 ++--
 ui/scripts/ui-custom/dashboard.js |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2d7c6aa5/ui/scripts/dashboard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js
index 5f49e61..88c3cd1 100644
--- a/ui/scripts/dashboard.js
+++ b/ui/scripts/dashboard.js
@@ -273,11 +273,11 @@
                 complete($.extend(data, {
                   zoneCapacities: $.map(capacities, function(capacity) {
                     if (capacity.podname) {
-                      capacity.zonename = capacity.zonename.concat('<br/>' + _l('label.pod')
+ ': ' + capacity.podname);
+                      capacity.zonename = capacity.zonename.concat(', ' + _l('label.pod')
+ ': ' + capacity.podname);
                     }
 
                     if (capacity.clustername) {
-                      capacity.zonename = capacity.zonename.concat('<br/>' + _l('label.cluster')
+ ': ' + capacity.clustername);
+                      capacity.zonename = capacity.zonename.concat(', ' + _l('label.cluster')
+ ': ' + capacity.clustername);
                     }
 
                     capacity.zonename.replace('Zone:', _l('label.zone') + ':');

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2d7c6aa5/ui/scripts/ui-custom/dashboard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/dashboard.js b/ui/scripts/ui-custom/dashboard.js
index 960d100..6d92318 100644
--- a/ui/scripts/ui-custom/dashboard.js
+++ b/ui/scripts/ui-custom/dashboard.js
@@ -80,15 +80,15 @@
                         });
                       } else {
                         if ($li.attr('concat-value')) {
-                          var val = $(_l(arrayValue).toString().split('<br/>')).map(function()
{
-                            var val = this.toString();
+                          var val = $(_l(arrayValue).toString().split(', ')).map(function()
{
+                            var val = _s(this.toString());
                             var concatValue = parseInt($li.attr('concat-value'));
 
                             return val.length >= concatValue ?
                               val.substring(0, concatValue).concat('...') : val;
-                          }).toArray().join('<br/>');
+                          }).toArray().join('<br />');
 
-                          $arrayElem.html(_s(val));
+                          $arrayElem.html(val);
                         } else {
                           $arrayElem.html(_s(_l(arrayValue)));
                         }


Mime
View raw message