Commit 714423c9 by sameer79 Committed by nixonrodrigues

ATLAS-3523: UI doesn't pick _CLASSIFIED , _NOT_CLASSIFIED on selecting the same.

parent a9672da0
......@@ -24,8 +24,9 @@ define([
'utils/Globals',
'utils/Utils',
'utils/UrlLinks',
'utils/Enums',
'collection/VGlossaryList'
], function($, _, Backbone, App, Globals, Utils, UrlLinks, VGlossaryList) {
], function($, _, Backbone, App, Globals, Utils, UrlLinks, Enums, VGlossaryList) {
var AppRouter = Backbone.Router.extend({
routes: {
// Define some URL routes
......@@ -323,6 +324,11 @@ define([
}
}
});
_.each(Enums.addOnClassification, function(classificationName) {
if (classificationName === tagValidate) {
isTagPresent = true;
}
});
if (!isTagPresent) {
paramObj.tag = null;
}
......@@ -373,4 +379,4 @@ define([
}
});
return AppRouter;
});
\ No newline at end of file
});
......@@ -35,7 +35,9 @@ define(['require'], function(require) {
ENTITY_IMPORT_UPDATE: "Entity Updated by import",
ENTITY_IMPORT_DELETE: "Entity Deleted by import",
TERM_ADD: "Term Added",
TERM_DELETE: "Term Deleted"
TERM_DELETE: "Term Deleted",
LABEL_ADD: "Label(s) Added",
LABEL_DELETE:"Label(s) Deleted"
}
Enums.entityStateReadOnly = {
......@@ -190,4 +192,4 @@ define(['require'], function(require) {
}
};
return Enums;
});
\ No newline at end of file
});
......@@ -405,10 +405,10 @@ define(['require',
val.entityGuid === that.id ? tag['self'].push(val) : tag['propagated'].push(val);
});
_.each(tag.self, function(val) {
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title=' + val.typeName + ' >' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Tag"></i></span>';
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title=' + val.typeName + ' >' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
});
_.each(tag.propagated, function(val) {
var crossButton = '<i class="fa fa-close" data-id="deleteTag" data-entityguid="' + val.entityGuid + '" data-type="tag" title="Remove Tag"></i>';
var crossButton = '<i class="fa fa-close" data-id="deleteTag" data-entityguid="' + val.entityGuid + '" data-type="tag" title="Remove Classification"></i>';
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + val.typeName + ' data-id="tagClick"><span>' + val.typeName + '</span>' + ((that.id !== val.entityGuid && val.entityStatus === "DELETED") ? crossButton : "") + '</span>';
});
propagatedTagListData !== "" ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide();
......
......@@ -301,7 +301,7 @@ define(['require',
var that = this,
tagData = "";
_.each(tagObject, function(val) {
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title=' + val.typeName + '>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Tag"></i></span>';
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title=' + val.typeName + '>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
});
this.ui.tagList.find("span.btn").remove();
this.ui.tagList.prepend(tagData);
......
......@@ -24,8 +24,9 @@ define([
"utils/Globals",
"utils/Utils",
"utils/UrlLinks",
'utils/Enums',
"collection/VGlossaryList"
], function($, _, Backbone, App, Globals, Utils, UrlLinks, VGlossaryList) {
], function($, _, Backbone, App, Globals, Utils, UrlLinks, Enums, VGlossaryList) {
var AppRouter = Backbone.Router.extend({
routes: {
// Define some URL routes
......@@ -300,6 +301,11 @@ define([
}
}
});
_.each(Enums.addOnClassification, function(classificationName) {
if (classificationName === tagValidate) {
isTagPresent = true;
}
});
if (!isTagPresent) {
paramObj.tag = null;
}
......
......@@ -36,8 +36,8 @@ define(['require'], function(require) {
ENTITY_IMPORT_DELETE: "Entity Deleted by import",
TERM_ADD: "Term Added",
TERM_DELETE: "Term Deleted",
LABEL_ADD: "Label Added",
LABEL_DELETE: "Label Deleted"
LABEL_ADD: "Label(s) Added",
LABEL_DELETE:"Label(s) Deleted"
}
Enums.entityStateReadOnly = {
......@@ -192,4 +192,4 @@ define(['require'], function(require) {
}
};
return Enums;
});
\ No newline at end of file
});
......@@ -414,10 +414,10 @@ define(['require',
val.entityGuid === that.id ? tag['self'].push(val) : tag['propagated'].push(val);
});
_.each(tag.self, function(val) {
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title=' + val.typeName + ' >' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Tag"></i></span>';
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClick"><span title=' + val.typeName + ' >' + val.typeName + '</span><i class="fa fa-close" data-id="deleteTag" data-type="tag" title="Remove Classification"></i></span>';
});
_.each(tag.propagated, function(val) {
var crossButton = '<i class="fa fa-close" data-id="deleteTag" data-entityguid="' + val.entityGuid + '" data-type="tag" title="Remove Tag"></i>';
var crossButton = '<i class="fa fa-close" data-id="deleteTag" data-entityguid="' + val.entityGuid + '" data-type="tag" title="Remove Classification"></i>';
propagatedTagListData += '<span class="btn btn-action btn-sm btn-icon btn-blue" title=' + val.typeName + ' data-id="tagClick"><span>' + val.typeName + '</span>' + ((that.id !== val.entityGuid && val.entityStatus === "DELETED") ? crossButton : "") + '</span>';
});
propagatedTagListData !== "" ? this.ui.propagatedTagDiv.show() : this.ui.propagatedTagDiv.hide();
......
......@@ -316,7 +316,7 @@ define(['require',
var that = this,
tagData = "";
_.each(tagObject, function(val) {
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title=' + val.typeName + '>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Tag"></i></span>';
tagData += '<span class="btn btn-action btn-sm btn-icon btn-blue" data-id="tagClickTerm"><span title=' + val.typeName + '>' + val.typeName + '</span><i class="fa fa-close" data-id="removeTagTerm" data-type="tag" title="Remove Classification"></i></span>';
});
this.ui.tagList.find("span.btn").remove();
this.ui.tagList.prepend(tagData);
......
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