Commit 2ef0fc46 by kalyanikk Committed by Suma Shivaprasad

ATLAS-1099 : UI : multiple tag assign button hides wrongly

parent 1abd5a24
...@@ -31,9 +31,12 @@ ...@@ -31,9 +31,12 @@
} }
} }
.sidebar-wrapper .form-control { .sidebar-wrapper {
z-index: 9 !important;
.form-control {
background-color: $white; background-color: $white;
border: 1px $white solid; border: 1px $white solid;
}
} }
.well { .well {
......
...@@ -222,6 +222,10 @@ ...@@ -222,6 +222,10 @@
cursor: pointer; cursor: pointer;
} }
.popover {
z-index: 99;
}
.popover-content { .popover-content {
ul { ul {
color: $dark_gray; color: $dark_gray;
......
...@@ -96,3 +96,7 @@ input { ...@@ -96,3 +96,7 @@ input {
.labelShowRecord { .labelShowRecord {
line-height: 40px; line-height: 40px;
} }
.btnAssign {
margin-bottom: 15px;
}
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
--> -->
<a href="javascript:void(0)" class="inputAssignTag multiSelectTerm" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i> Assign Term</a> <div class="clearfix">
<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i> Assign Tag</a> <a href="javascript:void(0)" class="inputAssignTag multiSelectTerm btnAssign" style="display:none" data-id="addTerm"><i class="fa fa-folder-o"></i> Assign Term</a>
<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag btnAssign" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i> Assign Tag</a>
</div>
<div id="r_tagLayoutView"></div> <div id="r_tagLayoutView"></div>
...@@ -310,7 +310,7 @@ define(['require', ...@@ -310,7 +310,7 @@ define(['require',
var totalRecords = collState.totalRecords || 0; var totalRecords = collState.totalRecords || 0;
var pageStartIndex = totalRecords ? (collState.currentPage * collState.pageSize) : 0; var pageStartIndex = totalRecords ? (collState.currentPage * collState.pageSize) : 0;
var pageEndIndex = pageStartIndex + this.collection.length; var pageEndIndex = pageStartIndex + this.collection.length;
this.$('[data-id="r_footerRecords"]').html('<h5>Showing ' + (totalRecords ? pageStartIndex + 1 : 1) + ' - ' + pageEndIndex + '</h5>'); this.$('[data-id="r_footerRecords"]').html('<h5>Showing ' + (totalRecords ? pageStartIndex + 1 : (this.collection.length === 0) ? 0 : 1) + ' - ' + pageEndIndex + '</h5>');
return this; return this;
}, },
/** /**
......
...@@ -223,10 +223,10 @@ define(['require', ...@@ -223,10 +223,10 @@ define(['require',
'modules/Modal', 'modules/Modal',
'views/audit/CreateAuditTableLayoutView', 'views/audit/CreateAuditTableLayoutView',
], function(Modal, CreateAuditTableLayoutView) { ], function(Modal, CreateAuditTableLayoutView) {
that.action = $(e.target).data("action");
var eventModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid') }).toJSON(), var eventModel = that.entityCollection.findWhere({ 'eventKey': $(e.currentTarget).data('modalid') }).toJSON(),
collectionModel = new that.entityCollection.model(eventModel), collectionModel = new that.entityCollection.model(eventModel),
view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel: collectionModel, action: that.action }); view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel: collectionModel, action: that.action });
that.action = $(e.target).data("action");
var modal = new Modal({ var modal = new Modal({
title: that.action, title: that.action,
content: view, content: view,
......
...@@ -112,14 +112,8 @@ define(['require', ...@@ -112,14 +112,8 @@ define(['require',
this.listenTo(this.schemaCollection, 'backgrid:selected', function(model, checked) { this.listenTo(this.schemaCollection, 'backgrid:selected', function(model, checked) {
if (checked === true) { if (checked === true) {
model.set("isEnable", true); model.set("isEnable", true);
if (Globals.taxonomy) {
this.$('.multiSelectTerm').show();
}
this.$('.multiSelectTag').show();
} else { } else {
model.set("isEnable", false); model.set("isEnable", false);
this.$('.multiSelectTerm').hide();
this.$('.multiSelectTag').hide();
} }
this.arr = []; this.arr = [];
var that = this; var that = this;
...@@ -132,6 +126,17 @@ define(['require', ...@@ -132,6 +126,17 @@ define(['require',
}); });
} }
}); });
if (this.arr.length > 0) {
if (Globals.taxonomy) {
this.$('.multiSelectTerm').show();
}
this.$('.multiSelectTag').show();
} else {
if (Globals.taxonomy) {
this.$('.multiSelectTerm').hide();
}
this.$('.multiSelectTag').hide();
}
}); });
this.listenTo(this.schemaCollection, "error", function(value) { this.listenTo(this.schemaCollection, "error", function(value) {
$('.schemaTable').hide(); $('.schemaTable').hide();
......
...@@ -202,6 +202,9 @@ define(['require', ...@@ -202,6 +202,9 @@ define(['require',
this.$('.typeLOV').hide(); this.$('.typeLOV').hide();
this.type = "fulltext"; this.type = "fulltext";
} }
if (this.query[this.type].query !== Utils.getUrlState.getQueryParams().query && this.type == Utils.getUrlState.getQueryParams().searchType) {
this.query[this.type].query = Utils.getUrlState.getQueryParams().query;
}
Utils.setUrl({ Utils.setUrl({
url: '#!/search/searchResult', url: '#!/search/searchResult',
urlParams: { urlParams: {
......
...@@ -141,16 +141,12 @@ define(['require', ...@@ -141,16 +141,12 @@ define(['require',
bindEvents: function() { bindEvents: function() {
var that = this; var that = this;
this.listenTo(this.searchCollection, 'backgrid:selected', function(model, checked) { this.listenTo(this.searchCollection, 'backgrid:selected', function(model, checked) {
this.arr = [];
if (checked === true) { if (checked === true) {
model.set("isEnable", true); model.set("isEnable", true);
this.$('.searchResult').find(".inputAssignTag.multiSelect").show();
this.$('.searchResult').find(".inputAssignTag.multiSelectTag").show();
} else { } else {
model.set("isEnable", false); model.set("isEnable", false);
this.$('.searchResult').find(".inputAssignTag.multiSelect").hide();
this.$('.searchResult').find(".inputAssignTag.multiSelectTag").hide();
} }
this.arr = [];
this.searchCollection.find(function(item) { this.searchCollection.find(function(item) {
if (item.get('isEnable')) { if (item.get('isEnable')) {
var term = []; var term = [];
...@@ -160,6 +156,13 @@ define(['require', ...@@ -160,6 +156,13 @@ define(['require',
}); });
} }
}); });
if (this.arr.length > 0) {
this.$('.searchResult').find(".inputAssignTag.multiSelect").show();
this.$('.searchResult').find(".inputAssignTag.multiSelectTag").show();
} else {
this.$('.searchResult').find(".inputAssignTag.multiSelect").hide();
this.$('.searchResult').find(".inputAssignTag.multiSelectTag").hide();
}
}); });
this.listenTo(this.searchCollection, "error", function(value, responseData) { this.listenTo(this.searchCollection, "error", function(value, responseData) {
this.$('.fontLoader').hide(); this.$('.fontLoader').hide();
......
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ATLAS-1060 Add composite indexes for exact match performance improvements for all attributes (sumasai via shwethags) ATLAS-1060 Add composite indexes for exact match performance improvements for all attributes (sumasai via shwethags)
ALL CHANGES: ALL CHANGES:
ATLAS-1099 UI : multiple tag assign button hides wrongly (Kalyanikashikar via sumasai)
ATLAS-1087 Provide an option to turn off persisting entity definition in audits (sumasai, shwethags) ATLAS-1087 Provide an option to turn off persisting entity definition in audits (sumasai, shwethags)
ATLAS-1097 Fix a potential NPE issue flagged by Coverity scan (mneethiraj via shwethags) ATLAS-1097 Fix a potential NPE issue flagged by Coverity scan (mneethiraj via shwethags)
ATLAS-1090 UI: Multi-Select Tagging. (Kalyanikashikar via kevalbhatt) ATLAS-1090 UI: Multi-Select Tagging. (Kalyanikashikar via kevalbhatt)
......
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