Skip to content

Commit

Permalink
DCT-62793 Add setupAutocomplete back in to test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Travis authored and Thomas Travis committed Jun 18, 2024
1 parent 8eca07b commit e93e985
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 50 deletions.
31 changes: 4 additions & 27 deletions build/visualsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1025,9 +1025,7 @@ VS.ui.SearchInput = Backbone.View.extend({
this.box.bind('updated.autogrow', this.moveAutocomplete);
this.box.bind('blur', this.deferDisableEdit);
this.box.bind('focus', this.addFocus);

console.log('this.box', this.box);
// this.setupAutocomplete();
this.setupAutocomplete();

return this;
},
Expand Down Expand Up @@ -1967,12 +1965,9 @@ VS.model.SearchQuery = Backbone.Collection.extend({
})();
(function(){
window.JST = window.JST || {};
// window.JST['search_box'] = function (readOnly) {

// };

window.JST['search_box'] = function ({readOnly}) {
let template = `
return `
<div class="VS-search${readOnly ? ' VS-readonly' : ''}">
<div class="VS-search-box-wrapper VS-search-box">
<div class="VS-icon VS-icon-search">
Expand All @@ -1986,10 +1981,9 @@ VS.model.SearchQuery = Backbone.Collection.extend({
</div>
</div>
`;
return template;
};
window.JST['search_facet'] = function ({model, readOnly}) {
let template = `
return `
${model.has('category') ? `<div class="category">${model.get('category')}: </div>` : ''}
<div class="search_facet_input_container">
<input type="text" class="search_facet_input ui-menu VS-interface" value="" ${readOnly ? 'disabled="disabled"' : ''} />
Expand All @@ -1998,25 +1992,8 @@ VS.model.SearchQuery = Backbone.Collection.extend({
<i class="fa fa-times-circle"></i>
</div>
`;
return template;
};
window.JST['search_input'] = function ({readOnly}) {
let template = `<input type="text" class="ui-menu" ${readOnly ? 'disabled="disabled"' : ''} />`;
return template;
return `<input type="text" class="ui-menu" ${readOnly ? 'disabled="disabled"' : ''} />`;
};


// window.JST = window.JST || {};

// window.JST['search_box'] = _.template('<div class="VS-search <% if (readOnly) { %>VS-readonly<% } %>">\n <div class="VS-search-box-wrapper VS-search-box">\n <div class="VS-icon VS-icon-search"><i class="fa fa-search"></i></div>\n <div class="VS-placeholder"></div>\n <div class="VS-search-inner"></div>\n <div class="VS-icon VS-icon-cancel VS-cancel-search-box" title="clear search"><i class="fa fa-times-circle"></i></div>\n </div>\n</div>');
// window.JST['search_facet'] = _.template('<% if (model.has(\'category\')) { %>\n <div class="category"><%- model.get(\'category\') %>:</div>\n<% } %>\n\n<div class="search_facet_input_container">\n <input type="text" class="search_facet_input ui-menu VS-interface" value="" <% if (readOnly) { %>disabled="disabled"<% } %> />\n</div>\n\n<div class="search_facet_remove VS-icon VS-icon-cancel"><i class="fa fa-times-circle"></i></div>');
// window.JST['search_input'] = _.template('<input type="text" class="ui-menu" <% if (readOnly) { %>disabled="disabled"<% } %> />');

// window["JST"] = window["JST"] || {};

// window["JST"]["search_box"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) {__p += '<div class="VS-search '; if (readOnly) { ;__p += 'VS-readonly'; } ;__p += '">\n <div class="VS-search-box-wrapper VS-search-box">\n <div class="VS-icon VS-icon-search"></div>\n <div class="VS-placeholder"></div>\n <div class="VS-search-inner"></div>\n <div class="VS-icon VS-icon-cancel VS-cancel-search-box" title="clear search"></div>\n </div>\n</div>';}return __p};

// window["JST"]["search_facet"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) { if (model.has('category')) { ;__p += '\n <div class="category">' +__e( model.get('category') ) +':</div>\n'; } ;__p += '\n\n<div class="search_facet_input_container">\n <input type="text" class="search_facet_input ui-menu VS-interface" value="" '; if (readOnly) { ;__p += 'disabled="disabled"'; } ;__p += ' />\n</div>\n\n<div class="search_facet_remove VS-icon VS-icon-cancel"></div>';}return __p};

// window["JST"]["search_input"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) {__p += '<input type="text" class="ui-menu" '; if (readOnly) { ;__p += 'disabled="disabled"'; } ;__p += ' />';}return __p};
})();
30 changes: 7 additions & 23 deletions lib/js/templates/templates.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
(function(){
// window.JST = window.JST || {};
window.JST = window.JST || {};

// window.JST['search_box'] = _.template('<div class="VS-search <% if (readOnly) { %>VS-readonly<% } %>">\n <div class="VS-search-box-wrapper VS-search-box">\n <div class="VS-icon VS-icon-search"><i class="fa fa-search"></i></div>\n <div class="VS-placeholder"></div>\n <div class="VS-search-inner"></div>\n <div class="VS-icon VS-icon-cancel VS-cancel-search-box" title="clear search"><i class="fa fa-times-circle"></i></div>\n </div>\n</div>');
// window.JST['search_facet'] = _.template('<% if (model.has(\'category\')) { %>\n <div class="category"><%- model.get(\'category\') %>:</div>\n<% } %>\n\n<div class="search_facet_input_container">\n <input type="text" class="search_facet_input ui-menu VS-interface" value="" <% if (readOnly) { %>disabled="disabled"<% } %> />\n</div>\n\n<div class="search_facet_remove VS-icon VS-icon-cancel"><i class="fa fa-times-circle"></i></div>');
// window.JST['search_input'] = _.template('<input type="text" class="ui-menu" <% if (readOnly) { %>disabled="disabled"<% } %> />');

// window["JST"] = window["JST"] || {};

// window["JST"]["search_box"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) {__p += '<div class="VS-search '; if (readOnly) { ;__p += 'VS-readonly'; } ;__p += '">\n <div class="VS-search-box-wrapper VS-search-box">\n <div class="VS-icon VS-icon-search"></div>\n <div class="VS-placeholder"></div>\n <div class="VS-search-inner"></div>\n <div class="VS-icon VS-icon-cancel VS-cancel-search-box" title="clear search"></div>\n </div>\n</div>';}return __p};

// window["JST"]["search_facet"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) { if (model.has('category')) { ;__p += '\n <div class="category">' +__e( model.get('category') ) +':</div>\n'; } ;__p += '\n\n<div class="search_facet_input_container">\n <input type="text" class="search_facet_input ui-menu VS-interface" value="" '; if (readOnly) { ;__p += 'disabled="disabled"'; } ;__p += ' />\n</div>\n\n<div class="search_facet_remove VS-icon VS-icon-cancel"></div>';}return __p};

// window["JST"]["search_input"] = function(obj) {obj || (obj = {});var __t, __p = '', __e = _.escape, __j = Array.prototype.join;function print() { __p += __j.call(arguments, '') }with (obj) {__p += '<input type="text" class="ui-menu" '; if (readOnly) { ;__p += 'disabled="disabled"'; } ;__p += ' />';}return __p};

window.JST = window.JST || {};
window.JST['search_box'] = function (readOnly) {
let template = `
window.JST['search_box'] = function ({readOnly}) {
return `
<div class="VS-search${readOnly ? ' VS-readonly' : ''}">
<div class="VS-search-box-wrapper VS-search-box">
<div class="VS-icon VS-icon-search">
Expand All @@ -29,10 +16,9 @@ window.JST = window.JST || {};
</div>
</div>
`;
return _.escape(template);
};
window.JST['search_facet'] = function (model, readOnly) {
let template = `
window.JST['search_facet'] = function ({model, readOnly}) {
return `
${model.has('category') ? `<div class="category">${model.get('category')}: </div>` : ''}
<div class="search_facet_input_container">
<input type="text" class="search_facet_input ui-menu VS-interface" value="" ${readOnly ? 'disabled="disabled"' : ''} />
Expand All @@ -41,10 +27,8 @@ window.JST = window.JST || {};
<i class="fa fa-times-circle"></i>
</div>
`;
return _.escape(template);
};
window.JST['search_input'] = function (readOnly) {
let template = `<input type="text" class="ui-menu" ${readOnly ? 'disabled="disabled"' : ''} />`;
return _.escape(template);
window.JST['search_input'] = function ({readOnly}) {
return `<input type="text" class="ui-menu" ${readOnly ? 'disabled="disabled"' : ''} />`;
};
})();

0 comments on commit e93e985

Please sign in to comment.