global search changes
This commit is contained in:
@@ -63,7 +63,7 @@ Espo.define('views/global-search/global-search', 'view', function (Dep) {
|
||||
|
||||
runSearch: function (text) {
|
||||
var text = this.$input.val().trim();
|
||||
if (text != '' && text.length > 2) {
|
||||
if (text != '' && text.length >= 2) {
|
||||
text = text;
|
||||
this.search(text);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ Espo.define('views/global-search/global-search', 'view', function (Dep) {
|
||||
|
||||
$container.appendTo(this.$el.find('.global-search-panel-container'));
|
||||
|
||||
this.createView('panel', 'GlobalSearch.Panel', {
|
||||
this.createView('panel', 'views/global-search/panel', {
|
||||
el: '#global-search-panel',
|
||||
collection: this.collection,
|
||||
}, function (view) {
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('Views.GlobalSearch.NameField', 'Views.Fields.Base', function (Dep) {
|
||||
Espo.define('views/global-search/name-field', 'views/fields/base', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
listTemplate: 'global-search.name-field',
|
||||
|
||||
|
||||
listTemplate: 'global-search/name-field',
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
scope: this.model.get('_scope'),
|
||||
@@ -41,6 +41,6 @@ Espo.define('Views.GlobalSearch.NameField', 'Views.Fields.Base', function (Dep)
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('Views.GlobalSearch.Panel', 'View', function (Dep) {
|
||||
Espo.define('views/global-search/panel', 'view', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
template: 'global-search.panel',
|
||||
template: 'global-search/panel',
|
||||
|
||||
afterRender: function () {
|
||||
|
||||
this.listenToOnce(this.collection, 'sync', function () {
|
||||
this.createView('list', 'Record.ListExpanded', {
|
||||
this.createView('list', 'views/record/list-expanded', {
|
||||
el: this.options.el + ' .list-container',
|
||||
collection: this.collection,
|
||||
listLayout: {
|
||||
@@ -43,7 +43,7 @@ Espo.define('Views.GlobalSearch.Panel', 'View', function (Dep) {
|
||||
[
|
||||
{
|
||||
name: 'name',
|
||||
view: 'GlobalSearch.NameField',
|
||||
view: 'views/global-search/name-field',
|
||||
params: {
|
||||
containerEl: this.options.el
|
||||
},
|
||||
@@ -52,7 +52,7 @@ Espo.define('Views.GlobalSearch.Panel', 'View', function (Dep) {
|
||||
],
|
||||
right: {
|
||||
name: 'read',
|
||||
view: 'GlobalSearch.ScopeBadge',
|
||||
view: 'views/global-search/scope-badge',
|
||||
width: '80px'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('Views.GlobalSearch.ScopeBadge', 'View', function (Dep) {
|
||||
Espo.define('views/global-search/scope-badge', 'view', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
template: 'global-search.scope-badge',
|
||||
|
||||
|
||||
template: 'global-search/scope-badge',
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
label: this.translate(this.model.get('_scope'), 'scopeNames')
|
||||
@@ -39,6 +39,6 @@ Espo.define('Views.GlobalSearch.ScopeBadge', 'View', function (Dep) {
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user