cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [3/50] [abbrv] git commit: refs/heads/gslb-wip - Dashboard UI: Fix line breaks
Date Wed, 20 Mar 2013 01:41:18 GMT
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/345114d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/345114d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/345114d0

Branch: refs/heads/gslb-wip
Commit: 345114d0ca901de4754dd1d8e743ff3c9db5d764
Parents: effb4ed
Author: Brian Federle <brian.federle@citrix.com>
Authored: Thu Mar 14 15:54:37 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Thu Mar 14 15:54:37 2013 -0700

----------------------------------------------------------------------
 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/345114d0/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/345114d0/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