Commit eaad45bd by pratik pandey Committed by kevalbhatt

ATLAS-2208 : Include historical entities in Schema tab checked by default for DELETED tables

Signed-off-by: 's avatarkevalbhatt <kbhatt@apache.org>
parent 81296b5e
......@@ -68,9 +68,14 @@
.with-nav-tabs {
.tab-content {
>.tab-pane.active {
>.tab-pane {
&>div {
position: relative;
}
&.active {
padding: 20px 10px 0px 10px;
min-height: 50px;
}
}
}
}
\ No newline at end of file
......@@ -69,10 +69,6 @@ $color_celeste_approx: #1D1F2B;
line-height: 40px;
}
.btnAssign {
margin-bottom: 15px;
}
.srchType {
margin: 5px 0px;
.srchTitle {
......
......@@ -372,3 +372,8 @@ fieldset.fieldset-child-pd>div {
border-color: $color_apple_blossom_approx;
}
}
.table-action-btn {
position: absolute;
right: 0px;
}
\ No newline at end of file
......@@ -16,13 +16,15 @@
-->
<div>
<div class="tableOverlay"></div>
<div style="margin-left: 20px" data-id="checkDeletedEntity">
<label class="checkbox">
<input type="checkbox" class="input" name="queryType" value="text" name="check" value="1" />Include historical entities</label>
<div class="inline-content-fr table-action-btn">
<div class="inline" data-id="checkDeletedEntity">
<label class="checkbox-inline btn">
<input type="checkbox" class="input" name="queryType" value="text" name="check" value="1" />Show historical entities</label>
</div>
<div class="clearfix inline">
<a href="javascript:void(0)" class="inputAssignTag multiSelectTerm btn btn-action btn-sm" style="display:none" data-id="addTerm"><i class="fa fa-plus"></i> Assign Term</a>
<a href="javascript:void(0)" class="inputAssignTag multiSelectTag assignTag btn btn-action btn-sm" style="display:none" data-id="addAssignTag"><i class="fa fa-plus"></i> Assign Tag</a>
</div>
<div class="clearfix">
<a href="javascript:void(0)" class="inputAssignTag multiSelectTerm btnAssign" style="display:none" data-id="addTerm"><i class="fa fa-plus"></i></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_schemaTableLayoutView">
</div>
......
......@@ -73,6 +73,8 @@ define(['require', 'utils/Utils', 'marionette', 'backgrid', 'asBreadcrumbs', 'jq
var isPopOverEl = getPopoverEl(e)
if (!isPopOverEl) {
$('.popover').popover('hide');
} else if (isPopOverEl.$tip) {
$('.popover').not(isPopOverEl.$tip).popover('hide');
}
}
});
......
......@@ -106,14 +106,14 @@ define(['require',
this.bradCrumbList = [];
},
bindEvents: function() {
var that = this;
this.listenTo(this.schemaCollection, 'backgrid:selected', function(model, checked) {
this.arr = [];
if (checked === true) {
model.set("isEnable", true);
} else {
model.set("isEnable", false);
}
this.arr = [];
var that = this;
this.schemaCollection.find(function(item) {
var obj = item.toJSON();
if (item.get('isEnable')) {
......@@ -167,7 +167,7 @@ define(['require',
});
if (this.schemaCollection.length === 0 && this.deleteObj.length) {
this.ui.checkDeletedEntity.find("input").prop('checked', true);
this.schemaCollection.fullCollection.reset(this.deleteObj, { silent: true });
this.schemaCollection.fullCollection.reset(this.deleteObj);
}
if (this.activeObj.length === 0 && this.deleteObj.length === 0) {
this.ui.checkDeletedEntity.hide();
......@@ -240,7 +240,7 @@ define(['require',
if (key === "name" && model.get('guid')) {
var nameHtml = '<a href="#!/detailPage/' + model.get('guid') + '">' + value + '</a>';
if (model.get('status') && Enums.entityStateReadOnly[model.get('status')]) {
nameHtml += '<button type="button" title="Deleted" class="btn btn-atlasAction btn-atlas deleteBtn"><i class="fa fa-trash"></i></button>';
nameHtml += '<button type="button" title="Deleted" class="btn btn-action btn-md deleteBtn"><i class="fa fa-trash"></i></button>';
return '<div class="readOnly readOnlyLink">' + nameHtml + '</div>';
} else {
return nameHtml;
......@@ -304,17 +304,19 @@ define(['require',
e.stopPropagation();
}
var guid = "",
that = this;
var multiSelectTag = $(e.currentTarget).hasClass('assignTag');
if (multiSelectTag) {
if (this.arr && this.arr.length && multiSelectTag) {
that = this,
isTagMultiSelect = $(e.currentTarget).hasClass('multiSelectTag'),
isTermMultiSelect = $(e.currentTarget).hasClass('multiSelectTerm'),
isTagButton = $(e.currentTarget).hasClass('assignTag');
if (isTagButton) {
if (isTagMultiSelect && this.arr && this.arr.length) {
that.addTagModalView(guid, this.arr);
} else {
guid = that.$(e.currentTarget).data("guid");
that.addTagModalView(guid);
}
} else {
if (this.arr && this.arr.length) {
if (isTermMultiSelect && this.arr && this.arr.length) {
that.addTermModalView(guid, this.arr);
} else {
guid = that.$(e.currentTarget).data("guid");
......
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