Commit e3e7f2e0 by sameer79 Committed by nixonrodrigues

ATLAS-3526 :- UI doesn't pick the classification from Saved search body if it has *.

parent 09118ca7
......@@ -462,6 +462,7 @@ define(['require',
},
manualRender: function(paramObj) {
this.updateQueryObject(paramObj);
this.renderTypeTagList(paramObj);
this.setValues(paramObj);
},
getFilterBox: function() {
......@@ -489,10 +490,13 @@ define(['require',
tagStr = typeStr,
foundNewClassification = false,
optionsValue = this.options.value;
if (options && options.tag) {
optionsValue = options;
}
this.typeHeaders.fullCollection.each(function(model) {
var name = Utils.getName(model.toJSON(), 'name');
if (model.get('category') == 'ENTITY' && (serviceTypeToBefiltered && serviceTypeToBefiltered.length ? _.contains(serviceTypeToBefiltered, model.get('serviceType')) : true)) {
var entityCount = (that.entityCountObj.entity.entityActive[name] + (that.entityCountObj.entity.entityDeleted[name] ? that.entityCountObj.entity.entityDeleted[name] : 0));
var entityCount = (that.entityCountObj.entity.entityActive[name] || 0) + (that.entityCountObj.entity.entityDeleted[name] || 0);
typeStr += '<option value="' + (name) + '" data-name="' + (name) + '">' + (name) + ' ' + (entityCount ? "(" + _.numberFormatWithComa(entityCount) + ")" : '') + '</option>';
}
if (isTypeOnly == undefined && model.get('category') == 'CLASSIFICATION') {
......
......@@ -114,7 +114,7 @@ define([
}
if (code == 13) {
var tagValue = this.ui.wildCardValue.val();
if(tagValue.indexOf("*")!= -1 ){
if (tagValue.indexOf("*") != -1) {
that.findSearchResult(tagValue);
}
......@@ -247,6 +247,10 @@ define([
this.ui.classificationSearchTree.jstree(true).deselect_all();
this.tagId = null;
} else {
if ((that.options.value.tag.indexOf('*') != -1)) {
that.ui.classificationSearchTree.jstree(true).deselect_all();
that.ui.wildCardValue.val(that.options.value.tag);
}
var dataFound = this.classificationDefCollection.fullCollection.find(function(obj) {
return obj.get("name") === that.options.value.tag
});
......@@ -779,4 +783,4 @@ define([
});
return ClassificationTreeLayoutView;
});
});
\ No newline at end of file
......@@ -282,10 +282,8 @@ define([
}
if (categoryType == "ENTITY") {
var entityCount =
that.entityCountObj.entity.entityActive[model.get("name")] +
(that.entityCountObj.entity.entityDeleted[model.get("name")] ?
that.entityCountObj.entity.entityDeleted[model.get("name")] :
0),
(that.entityCountObj.entity.entityActive[model.get("name")] || 0) +
(that.entityCountObj.entity.entityDeleted[model.get("name")] || 0),
modelname = entityCount ? model.get("name") + " (" + _.numberFormatWithComa(entityCount) + ")" : model.get("name");
if (that.options.value) {
isSelected = that.options.value.type ? that.options.value.type == model.get("name") : false;
......
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