Commit 43c134dd by kevalbhatt

ATLAS-3634:Betal UI: Add refresh button for basic search / Advance Search

parent 58a58956
...@@ -131,16 +131,20 @@ define(['require', ...@@ -131,16 +131,20 @@ define(['require',
dropdownWithSearch.prototype.render = function() { dropdownWithSearch.prototype.render = function() {
// Copy and modify default search render method // Copy and modify default search render method
var $rendered = Dropdown.prototype.render.call(this); var $rendered = Dropdown.prototype.render.call(this),
dropdownCssClass = this.options.get("dropdownCssClass")
if (dropdownCssClass) {
$rendered.addClass(dropdownCssClass);
}
// Add ability for a placeholder in the search box // Add ability for a placeholder in the search box
var placeholder = this.options.get("placeholderForSearch") || ""; var placeholder = this.options.get("placeholderForSearch") || "";
var $search = $( var $search = $(
'<span class="select2-search select2-search--dropdown"><div class="row">' + '<span class="select2-search select2-search--dropdown"><div class="clearfix">' +
'<div class="col-md-10"><input class="select2-search__field" placeholder="' + placeholder + '" type="search"' + '<div class="col-md-10 no-padding" style="width: calc(100% - 30px);"><input class="select2-search__field" placeholder="' + placeholder + '" type="search"' +
' tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off"' + ' tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off"' +
' spellcheck="false" role="textbox" /></div>' + ' spellcheck="false" role="textbox" /></div>' +
'<div class="col-md-2"><button type="button" style="margin-left: -20px" class="btn btn-action btn-sm filter " title="Type Filter"><i class="fa fa-filter"></i></button></div>' + '<div class="col-md-2 no-padding" style="width: 30px;"><button type="button" style="padding: 3px 6px;margin: 0px 4px;" class="btn btn-action btn-sm filter " title="Type Filter"><i class="fa fa-filter"></i></button></div>' +
'</div></span>' '</div></span>'
); );
if (!this.options.options.getFilterBox) { if (!this.options.options.getFilterBox) {
......
...@@ -203,12 +203,7 @@ define(['require', ...@@ -203,12 +203,7 @@ define(['require',
}); });
} }
}); });
this.updateMultiSelect();
if (this.multiSelectEntity.length > 0) {
this.$('.multiSelectTag,.multiSelectTerm').show();
} else {
this.$('.multiSelectTag,.multiSelectTerm').hide();
}
}); });
this.listenTo(this.searchCollection, "error", function(model, response) { this.listenTo(this.searchCollection, "error", function(model, response) {
this.hideLoader({ type: 'error' }); this.hideLoader({ type: 'error' });
...@@ -339,6 +334,13 @@ define(['require', ...@@ -339,6 +334,13 @@ define(['require',
updateTabState: true updateTabState: true
}, options)); }, options));
}, },
updateMultiSelect: function() {
if (this.multiSelectEntity.length > 0) {
this.$('.multiSelectTag,.multiSelectTerm').show();
} else {
this.$('.multiSelectTag,.multiSelectTerm').hide();
}
},
updateColumnList: function(updatedList) { updateColumnList: function(updatedList) {
if (updatedList) { if (updatedList) {
var listOfColumns = []; var listOfColumns = [];
...@@ -388,13 +390,13 @@ define(['require', ...@@ -388,13 +390,13 @@ define(['require',
if (that.isDestroyed) { if (that.isDestroyed) {
return; return;
} }
that.ui.gotoPage.val('');
that.ui.gotoPage.parent().removeClass('has-error');
that.ui.gotoPagebtn.prop("disabled", true);
Globals.searchApiCallRef = undefined; Globals.searchApiCallRef = undefined;
var isFirstPage = that.offset === 0, var isFirstPage = that.offset === 0,
dataLength = 0, dataLength = 0,
goToPage = that.ui.gotoPage.val(); goToPage = that.ui.gotoPage.val();
that.ui.gotoPage.val('');
that.ui.gotoPage.parent().removeClass('has-error');
that.ui.gotoPagebtn.prop("disabled", true);
if (!(that.ui.pageRecordText instanceof jQuery)) { if (!(that.ui.pageRecordText instanceof jQuery)) {
return; return;
} }
...@@ -414,6 +416,7 @@ define(['require', ...@@ -414,6 +416,7 @@ define(['require',
pageNumber = goToPage; pageNumber = goToPage;
that.offset = (that.activePage - 1) * that.limit; that.offset = (that.activePage - 1) * that.limit;
} else { } else {
that.finalPage = that.activePage;
that.ui.nextData.attr('disabled', true); that.ui.nextData.attr('disabled', true);
that.offset = that.offset - that.limit; that.offset = that.offset - that.limit;
} }
...@@ -475,6 +478,9 @@ define(['require', ...@@ -475,6 +478,9 @@ define(['require',
that.ui.activePage.attr('title', "Page " + that.activePage); that.ui.activePage.attr('title', "Page " + that.activePage);
that.ui.activePage.text(that.activePage); that.ui.activePage.text(that.activePage);
that.renderTableLayoutView(); that.renderTableLayoutView();
that.multiSelectEntity = [];
that.updateMultiSelect();
if (dataLength > 0) { if (dataLength > 0) {
that.$('.searchTable').removeClass('noData') that.$('.searchTable').removeClass('noData')
} }
...@@ -523,6 +529,7 @@ define(['require', ...@@ -523,6 +529,7 @@ define(['require',
Globals.searchApiCallRef = this.searchCollection.fetch(apiObj); Globals.searchApiCallRef = this.searchCollection.fetch(apiObj);
} }
} else { } else {
_.extend(this.searchCollection.queryParams, { 'limit': this.limit, 'offset': this.offset });
if (isPostMethod) { if (isPostMethod) {
apiObj['data'] = _.extend(checkBoxValue, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification', 'termName')); apiObj['data'] = _.extend(checkBoxValue, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification', 'termName'));
Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj); Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj);
...@@ -1214,6 +1221,13 @@ define(['require', ...@@ -1214,6 +1221,13 @@ define(['require',
var that = this; var that = this;
var goToPage = parseInt(this.ui.gotoPage.val()); var goToPage = parseInt(this.ui.gotoPage.val());
if (!(_.isNaN(goToPage) || goToPage <= -1)) { if (!(_.isNaN(goToPage) || goToPage <= -1)) {
if (this.finalPage && this.finalPage < goToPage) {
Utils.notifyInfo({
html: true,
content: Messages.search.noRecordForPage + '<b>' + Utils.getNumberSuffix({ number: goToPage, sup: true }) + '</b> page'
});
return;
}
this.offset = (goToPage - 1) * this.limit; this.offset = (goToPage - 1) * this.limit;
if (this.offset <= -1) { if (this.offset <= -1) {
this.offset = 0; this.offset = 0;
......
...@@ -276,7 +276,7 @@ define(['require', ...@@ -276,7 +276,7 @@ define(['require',
return '<li class="parent-node" data-id="tags">' + return '<li class="parent-node" data-id="tags">' +
'<div><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div>' + '<div><div class="tools"><i class="fa fa-ellipsis-h tagPopover"></i></div>' +
(hasChild ? '<i class="fa toggleArrow fa-angle-right" data-id="expandArrow" data-name="' + name + '"></i>' : '') + (hasChild ? '<i class="fa toggleArrow fa-angle-right" data-id="expandArrow" data-name="' + name + '"></i>' : '') +
'<a href="#!/tag/tagAttribute/' + name + '?viewType=' + (isTree ? 'tree' : 'flat') + '" data-name="' + name + '">' + name + '</a></div>' + '<a href="#!/tag/tagAttribute/' + name + '?viewType=' + (isTree ? 'tree' : 'flat') + '&searchType=basic" data-name="' + name + '">' + name + '</a></div>' +
(isTree && hasChild ? '<ul class="child hide">' + that.generateTree({ 'data': options.children, 'isTree': isTree }) + '</ul>' : '') + '</li>'; (isTree && hasChild ? '<ul class="child hide">' + that.generateTree({ 'data': options.children, 'isTree': isTree }) + '</ul>' : '') + '</li>';
}; };
if (isTree) { if (isTree) {
......
...@@ -494,4 +494,10 @@ div.columnmanager-dropdown-container { ...@@ -494,4 +494,10 @@ div.columnmanager-dropdown-container {
.table-hover>tbody>tr:hover { .table-hover>tbody>tr:hover {
background-color: #fafafa; background-color: #fafafa;
}
.input-group {
.form-control {
z-index: 1;
}
} }
\ No newline at end of file
...@@ -398,18 +398,22 @@ hr.hr-filter { ...@@ -398,18 +398,22 @@ hr.hr-filter {
height: 100%; height: 100%;
width: 100%; width: 100%;
opacity: 0.5; opacity: 0.5;
z-index: 1; z-index: 2;
background: white; background: white;
} }
.searchResultContainer {
z-index: 1;
}
.attributeResultContainer { .attributeResultContainer {
&.overlay { &.overlay {
z-index: 2; z-index: 3;
} }
.attribute-filter-container { .attribute-filter-container {
position: absolute; position: absolute;
z-index: 1; z-index: 3;
left: 21px; left: 21px;
width: 75%; width: 75%;
right: 0; right: 0;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</div> </div>
</div> </div>
<div class="col-sm-12 attributeResultContainer form-group"> <div class="col-sm-12 attributeResultContainer form-group">
<button title="Refresh Search Result" class="btn-action btn-sm" data-id="refreshSearchResult" data-original-title="Refresh Search Result"><i class="fa fa-refresh"></i></button>
<button class="btn-action btn-sm attribute-filter-text" data-id='attrFilter'> <i class="fa fa-angle-right"></i> Filters</button> <button class="btn-action btn-sm attribute-filter-text" data-id='attrFilter'> <i class="fa fa-angle-right"></i> Filters</button>
<button class='btn-action btn-sm' data-id='clearQuerySearch'>Clear</button> <button class='btn-action btn-sm' data-id='clearQuerySearch'>Clear</button>
<div class="attribute-filter-container hide"> <div class="attribute-filter-container hide">
......
...@@ -212,16 +212,20 @@ define(['require', ...@@ -212,16 +212,20 @@ define(['require',
dropdownWithSearch.prototype.render = function() { dropdownWithSearch.prototype.render = function() {
// Copy and modify default search render method // Copy and modify default search render method
var $rendered = Dropdown.prototype.render.call(this); var $rendered = Dropdown.prototype.render.call(this),
dropdownCssClass = this.options.get("dropdownCssClass")
if (dropdownCssClass) {
$rendered.addClass(dropdownCssClass);
}
// Add ability for a placeholder in the search box // Add ability for a placeholder in the search box
var placeholder = this.options.get("placeholderForSearch") || ""; var placeholder = this.options.get("placeholderForSearch") || "";
var $search = $( var $search = $(
'<span class="select2-search select2-search--dropdown"><div class="row">' + '<span class="select2-search select2-search--dropdown"><div class="clearfix">' +
'<div class="col-md-10"><input class="select2-search__field" placeholder="' + placeholder + '" type="search"' + '<div class="col-md-10 no-padding" style="width: calc(100% - 30px);"><input class="select2-search__field" placeholder="' + placeholder + '" type="search"' +
' tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off"' + ' tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off"' +
' spellcheck="false" role="textbox" /></div>' + ' spellcheck="false" role="textbox" /></div>' +
'<div class="col-md-2"><button type="button" style="margin-left: -20px" class="btn btn-action btn-sm filter " title="Type Filter"><i class="fa fa-filter"></i></button></div>' + '<div class="col-md-2 no-padding" style="width: 30px;"><button type="button" style="padding: 3px 6px;margin: 0px 4px;" class="btn btn-action btn-sm filter " title="Type Filter"><i class="fa fa-filter"></i></button></div>' +
'</div></span>' '</div></span>'
); );
if (!this.options.options.getFilterBox) { if (!this.options.options.getFilterBox) {
......
...@@ -88,9 +88,7 @@ define(["require", ...@@ -88,9 +88,7 @@ define(["require",
var that = this; var that = this;
$("body").on("click", function(e) { $("body").on("click", function(e) {
if (!that.isDestroyed && that.$(e.target).data("id") !== "detailSearch") { if (!that.isDestroyed && that.$(e.target).data("id") !== "detailSearch") {
if ($(e.target).hasClass("modal") || $(e.target).parents(".modal-backdrop").length != 0 || $(e.target).parents(".modal").length != 0) { if ($(e.target).parents(".searchLayoutView").length === 0 && that.ui.searchLayoutView.hasClass("open")) {
// console.log("modal");
} else if ($(e.target).parents(".searchLayoutView").length === 0 && that.ui.searchLayoutView.hasClass("open")) {
that.ui.searchLayoutView.removeClass("open"); that.ui.searchLayoutView.removeClass("open");
} }
} }
......
...@@ -48,7 +48,8 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa ...@@ -48,7 +48,8 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
entityName: ".entityName", entityName: ".entityName",
classificationName: ".classificationName", classificationName: ".classificationName",
createNewEntity: '[data-id="createNewEntity"]', createNewEntity: '[data-id="createNewEntity"]',
clearQuerySearch: "[data-id='clearQuerySearch']" clearQuerySearch: "[data-id='clearQuerySearch']",
refreshSearchQuery: "[data-id='refreshSearchResult']"
}, },
/** ui events hash */ /** ui events hash */
events: function() { events: function() {
...@@ -65,6 +66,10 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa ...@@ -65,6 +66,10 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide'); this.$('.attribute-filter-container, .attr-filter-overlay').toggleClass('hide');
}; };
events["click " + this.ui.refreshSearchQuery] = function(e) {
this.options.searchVent.trigger('search:refresh');
};
events["click " + this.ui.attrApply] = function(e) { events["click " + this.ui.attrApply] = function(e) {
that.okAttrFilterButton(e); that.okAttrFilterButton(e);
}; };
...@@ -360,7 +365,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa ...@@ -360,7 +365,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
if (_.has(obj, "condition")) { if (_.has(obj, "condition")) {
return that.getIdFromRuleObj(obj); return that.getIdFromRuleObj(obj);
} else { } else {
if (obj && obj.data && obj.data.entityType === "namespace") { if ((obj && obj.data && obj.data.entityType === "namespace") || obj.id.indexOf(".") > -1) {
return col.add("namespace"); return col.add("namespace");
} else { } else {
return col.add(obj.id); return col.add(obj.id);
...@@ -377,7 +382,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa ...@@ -377,7 +382,7 @@ define(["require", "backbone", "utils/Globals", "hbs!tmpl/search/SearchDefaultLa
if (!this.options.searchTableColumns[this.options.value.type]) { if (!this.options.searchTableColumns[this.options.value.type]) {
this.options.searchTableColumns[this.options.value.type] = ["selected", "name", "description", "typeName", "owner", "tag", "term"]; this.options.searchTableColumns[this.options.value.type] = ["selected", "name", "description", "typeName", "owner", "tag", "term"];
} }
this.options.searchTableColumns[this.options.value.type] = _.sortBy(_.union(this.options.searchTableColumns[this.options.value.type], this.getIdFromRuleObj(rule))); this.options.searchTableColumns[this.options.value.type] = _.sortBy(_.union(_.without(this.options.searchTableColumns[this.options.value.type], "namespace"), this.getIdFromRuleObj(rule)));
} }
}, },
renderQueryBuilder: function(obj, rQueryBuilder) { renderQueryBuilder: function(obj, rQueryBuilder) {
......
...@@ -487,6 +487,7 @@ define(['require', ...@@ -487,6 +487,7 @@ define(['require',
placeholder: "Select Type", placeholder: "Select Type",
dropdownAdapter: $.fn.select2.amd.require("ServiceTypeFilterDropdownAdapter"), dropdownAdapter: $.fn.select2.amd.require("ServiceTypeFilterDropdownAdapter"),
allowClear: true, allowClear: true,
dropdownCssClass: "searchLayoutView",
getFilterBox: this.getFilterBox.bind(this), getFilterBox: this.getFilterBox.bind(this),
onFilterSubmit: function(options) { onFilterSubmit: function(options) {
that.filterTypeSelected = options.filterVal; that.filterTypeSelected = options.filterVal;
......
...@@ -209,12 +209,7 @@ define(['require', ...@@ -209,12 +209,7 @@ define(['require',
}); });
} }
}); });
this.updateMultiSelect();
if (this.multiSelectEntity.length > 0) {
this.$('.multiSelectTag,.multiSelectTerm').show();
} else {
this.$('.multiSelectTag,.multiSelectTerm').hide();
}
}); });
this.listenTo(this.searchCollection, "error", function(model, response) { this.listenTo(this.searchCollection, "error", function(model, response) {
this.hideLoader({ type: 'error' }); this.hideLoader({ type: 'error' });
...@@ -348,6 +343,13 @@ define(['require', ...@@ -348,6 +343,13 @@ define(['require',
updateTabState: true updateTabState: true
}, options)); }, options));
}, },
updateMultiSelect: function() {
if (this.multiSelectEntity.length > 0) {
this.$('.multiSelectTag,.multiSelectTerm').show();
} else {
this.$('.multiSelectTag,.multiSelectTerm').hide();
}
},
updateColumnList: function(updatedList) { updateColumnList: function(updatedList) {
if (updatedList) { if (updatedList) {
var listOfColumns = []; var listOfColumns = [];
...@@ -363,7 +365,7 @@ define(['require', ...@@ -363,7 +365,7 @@ define(['require',
this.searchTableColumns[this.value.type] = listOfColumns.length ? listOfColumns : null; this.searchTableColumns[this.value.type] = listOfColumns.length ? listOfColumns : null;
} }
} else if (this.value && this.value.type && this.searchTableColumns && this.value.attributes) { } else if (this.value && this.value.type && this.searchTableColumns && this.value.attributes) {
this.searchTableColumns[this.value.type] = this.value.attributes.split(","); this.searchTableColumns[this.value.type] = this.value.entityFilters ? this.value.attributes.split(",") : this.value.attributes.replace("namespace,", "").split(",");
} }
}, },
fetchCollection: function(value, options) { fetchCollection: function(value, options) {
...@@ -397,13 +399,13 @@ define(['require', ...@@ -397,13 +399,13 @@ define(['require',
if (that.isDestroyed) { if (that.isDestroyed) {
return; return;
} }
that.ui.gotoPage.val('');
that.ui.gotoPage.parent().removeClass('has-error');
that.ui.gotoPagebtn.prop("disabled", true);
Globals.searchApiCallRef = undefined; Globals.searchApiCallRef = undefined;
var isFirstPage = that.offset === 0, var isFirstPage = that.offset === 0,
dataLength = 0, dataLength = 0,
goToPage = that.ui.gotoPage.val(); goToPage = that.ui.gotoPage.val();
that.ui.gotoPage.val('');
that.ui.gotoPage.parent().removeClass('has-error');
that.ui.gotoPagebtn.prop("disabled", true);
if (!(that.ui.pageRecordText instanceof jQuery)) { if (!(that.ui.pageRecordText instanceof jQuery)) {
return; return;
} }
...@@ -423,6 +425,7 @@ define(['require', ...@@ -423,6 +425,7 @@ define(['require',
pageNumber = goToPage; pageNumber = goToPage;
that.offset = (that.activePage - 1) * that.limit; that.offset = (that.activePage - 1) * that.limit;
} else { } else {
that.finalPage = that.activePage;
that.ui.nextData.attr('disabled', true); that.ui.nextData.attr('disabled', true);
that.offset = that.offset - that.limit; that.offset = that.offset - that.limit;
} }
...@@ -484,6 +487,8 @@ define(['require', ...@@ -484,6 +487,8 @@ define(['require',
that.ui.activePage.attr('title', "Page " + that.activePage); that.ui.activePage.attr('title', "Page " + that.activePage);
that.ui.activePage.text(that.activePage); that.ui.activePage.text(that.activePage);
that.renderTableLayoutView(); that.renderTableLayoutView();
that.multiSelectEntity = [];
that.updateMultiSelect();
if (dataLength > 0) { if (dataLength > 0) {
that.$('.searchTable').removeClass('noData') that.$('.searchTable').removeClass('noData')
...@@ -536,6 +541,7 @@ define(['require', ...@@ -536,6 +541,7 @@ define(['require',
Globals.searchApiCallRef = this.searchCollection.fetch(apiObj); Globals.searchApiCallRef = this.searchCollection.fetch(apiObj);
} }
} else { } else {
_.extend(this.searchCollection.queryParams, { 'limit': this.limit, 'offset': this.offset });
if (isPostMethod) { if (isPostMethod) {
apiObj['data'] = _.extend(checkBoxValue, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification', 'termName')); apiObj['data'] = _.extend(checkBoxValue, filterObj, _.pick(this.searchCollection.queryParams, 'query', 'excludeDeletedEntities', 'limit', 'offset', 'typeName', 'classification', 'termName'));
Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj); Globals.searchApiCallRef = this.searchCollection.getBasicRearchResult(apiObj);
...@@ -794,6 +800,7 @@ define(['require', ...@@ -794,6 +800,7 @@ define(['require',
editable: false, editable: false,
resizeable: true, resizeable: true,
orderable: true, orderable: true,
alwaysVisible: true, //Backgrid.ColumnManager.js -> render() to hide the name in dropdownlist
renderable: _.contains(columnToShow, 'namespace'), renderable: _.contains(columnToShow, 'namespace'),
formatter: _.extend({}, Backgrid.CellFormatter.prototype, { formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
fromRaw: function(rawValue, model) { fromRaw: function(rawValue, model) {
...@@ -1271,6 +1278,13 @@ define(['require', ...@@ -1271,6 +1278,13 @@ define(['require',
var that = this; var that = this;
var goToPage = parseInt(this.ui.gotoPage.val()); var goToPage = parseInt(this.ui.gotoPage.val());
if (!(_.isNaN(goToPage) || goToPage <= -1)) { if (!(_.isNaN(goToPage) || goToPage <= -1)) {
if (this.finalPage && this.finalPage < goToPage) {
Utils.notifyInfo({
html: true,
content: Messages.search.noRecordForPage + '<b>' + Utils.getNumberSuffix({ number: goToPage, sup: true }) + '</b> page'
});
return;
}
this.offset = (goToPage - 1) * this.limit; this.offset = (goToPage - 1) * this.limit;
if (this.offset <= -1) { if (this.offset <= -1) {
this.offset = 0; this.offset = 0;
......
...@@ -67,7 +67,7 @@ define(['require', ...@@ -67,7 +67,7 @@ define(['require',
} else { } else {
this.modal = modal = new Modal({ this.modal = modal = new Modal({
titleHtml: true, titleHtml: true,
title: '<span>' + (this.selectedModel && this.rename ? 'Rename' : 'Save/Save As..') + (this.isBasic ? " Basic" : " Advanced") + ' Custom Filter</span>', title: '<span>' + (this.selectedModel && this.rename ? 'Rename' : 'Save') + (this.isBasic ? " Basic" : " Advanced") + ' Custom Filter</span>',
content: this, content: this,
cancelText: "Cancel", cancelText: "Cancel",
okCloses: false, okCloses: false,
...@@ -112,7 +112,7 @@ define(['require', ...@@ -112,7 +112,7 @@ define(['require',
that.ui.saveAsName.append(options); that.ui.saveAsName.append(options);
that.ui.saveAsName.val(""); that.ui.saveAsName.val("");
that.ui.saveAsName.select2({ that.ui.saveAsName.select2({
placeholder: "Save/Save As.. filter", placeholder: "Enter filter name ",
allowClear: false, allowClear: false,
tags: true, tags: true,
multiple: false, multiple: false,
...@@ -121,9 +121,9 @@ define(['require', ...@@ -121,9 +121,9 @@ define(['require',
return state.text; return state.text;
} }
if (!state.element) { if (!state.element) {
return $("<span><span class='option-title-light'>Save:</span> <strong> " + _.escape(state.text) + "</strong></span>"); return $("<span><span class='option-title-light'>New:</span> <strong>" + _.escape(state.text) + "</strong></span>");
} else { } else {
return $("<span><span class='option-title-light'>Save As:</span> <strong>" + _.escape(state.text) + "</strong></span>"); return $("<span><span class='option-title-light'>Update:</span> <strong>" + _.escape(state.text) + "</strong></span>");
} }
} }
}).on("change", function() { }).on("change", function() {
......
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