Commit 6ad7a5a8 by pratik24mac Committed by nixonrodrigues

ATLAS-2504 : UI , Tag propagation : When an entity has the same tag propagated…

ATLAS-2504 : UI , Tag propagation : When an entity has the same tag propagated and directly associated , update window shows the values of propagated tags. Signed-off-by: 's avatarnixonrodrigues <nixon@apache.org>
parent 6e02ec5b
...@@ -119,8 +119,8 @@ define(['require', ...@@ -119,8 +119,8 @@ define(['require',
sortable: false, sortable: false,
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
if (that.guid !== model.get('entityGuid') ) { if (that.guid !== model.get('entityGuid')) {
var propagtedFrom = ' <span class="btn btn-action btn-sm btn-icon btn-blue" title="Propagated From" data-guid='+ model.get('entityGuid') +' data-id="propagatedFromClick"><span> Propagated From </span></span>'; var propagtedFrom = ' <span class="btn btn-action btn-sm btn-icon btn-blue" title="Propagated From" data-guid=' + model.get('entityGuid') + ' data-id="propagatedFromClick"><span> Propagated From </span></span>';
return '<a title="" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>' + propagtedFrom; return '<a title="" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>' + propagtedFrom;
} else { } else {
return '<a title="' + model.get('typeName') + '" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>'; return '<a title="' + model.get('typeName') + '" href="#!/tag/tagAttribute/' + model.get('typeName') + '">' + model.get('typeName') + '</a>';
...@@ -233,7 +233,9 @@ define(['require', ...@@ -233,7 +233,9 @@ define(['require',
editTagDataModal: function(e) { editTagDataModal: function(e) {
var that = this, var that = this,
tagName = $(e.currentTarget).data('name'), tagName = $(e.currentTarget).data('name'),
tagModel = _.findWhere(that.collectionObject.classifications, { typeName: tagName }); tagModel = _.find(that.collectionObject.classifications, function(tag) {
return (tagName === tag.typeName && that.guid === tag.entityGuid);
});
require([ require([
'views/tag/AddTagModalView' 'views/tag/AddTagModalView'
], function(AddTagModalView) { ], function(AddTagModalView) {
...@@ -256,7 +258,7 @@ define(['require', ...@@ -256,7 +258,7 @@ define(['require',
if (e.target.checked) { if (e.target.checked) {
that.tagCollection.reset(tags); that.tagCollection.reset(tags);
} else { } else {
unPropagatedTags = _.filter(tags,function(val){ unPropagatedTags = _.filter(tags, function(val) {
return that.guid === val.entityGuid; return that.guid === val.entityGuid;
}); });
that.tagCollection.reset(unPropagatedTags); that.tagCollection.reset(unPropagatedTags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment