brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [19/50] [abbrv] brooklyn-ui git commit: render tags on tasks as wee gift-label style tags
Date Mon, 01 Feb 2016 17:52:03 GMT
render tags on tasks as wee gift-label style tags


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/commit/108cdfdf
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/tree/108cdfdf
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-ui/diff/108cdfdf

Branch: refs/heads/0.6.0
Commit: 108cdfdf94b51ca0b1dd76f258e05bfce6d4a7e1
Parents: 063b342
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Sat Sep 14 00:53:28 2013 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Sep 18 09:30:05 2013 +0100

----------------------------------------------------------------------
 usage/jsgui/src/main/webapp/assets/css/base.css       | 14 +++++++++++++-
 .../main/webapp/assets/js/view/activity-details.js    |  7 ++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/108cdfdf/usage/jsgui/src/main/webapp/assets/css/base.css
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/css/base.css b/usage/jsgui/src/main/webapp/assets/css/base.css
index 7e50885..d294b12 100644
--- a/usage/jsgui/src/main/webapp/assets/css/base.css
+++ b/usage/jsgui/src/main/webapp/assets/css/base.css
@@ -1165,4 +1165,16 @@ input[type="file"] {
 .activity-detail-panel .toggler-region.tasks-submitted .table-scroll-wrapper,
 .activity-detail-panel .toggler-region.tasks-children .table-scroll-wrapper {
 	margin-bottom: 18px;
-}
\ No newline at end of file
+}
+
+.activity-tag-giftlabel {
+    background-color: #E0E4E0;
+    padding: 2px 4px 2px 4px;
+    margin-bottom: 4px;
+    margin-right: 5px;
+    -webkit-border-radius: 3px 3px 3px 3px !important;
+    -moz-border-radius: 3px 3px 3px 3px !important;
+    border-radius: 3px 3px 3px 3px !important;
+    display: inline-block;
+    white-space: nowrap;
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-ui/blob/108cdfdf/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js b/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
index 8e768a7..45de74d 100644
--- a/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
+++ b/usage/jsgui/src/main/webapp/assets/js/view/activity-details.js
@@ -107,7 +107,12 @@ define([
                 function(v) { 
                     return "<a class='showDrillDownBlockerOfAnchor handy' link='"+_.escape(v.link)+"'>"+
                         that.displayTextForLinkedTask(v)+"</a>" })
-            this.updateFieldWith('tags', function(tags) { return _.escape(tags.join(", "))
})
+            this.updateFieldWith('tags', function(tags) {
+                var tagBody = "";
+                for (var tag in tags)
+                    tagBody += "<div class='activity-tag-giftlabel'>"+_.escape(tags[tag])+"</div>";
+                return tagBody;
+            })
             
             var submitTimeUtc = this.updateFieldWith('submitTimeUtc',
                 function(v) { return v <= 0 ? "-" : moment(v).format('D MMM YYYY H:mm:ss.SSS')+"
&nbsp; <i>"+moment(v).fromNow()+"</i>" })


Mime
View raw message