diff --git a/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/body.js b/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/body.js
index 11a6b5465c2..9f181297bd4 100644
--- a/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/body.js
+++ b/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/body.js
@@ -184,7 +184,7 @@ define([
var comparator = this.makeComparator(column.get("name"), order, extractorDelegate);
if (collection instanceof PageableCollection) {
- collection.setSorting(order && column.get("name"), order, {sortValue: column.sortValue()});
+ collection.setSorting(column.get('name'), order, {sortValue: column.sortValue()});
if (collection.fullCollection) {
if (collection.fullCollection.comparator == null) {
diff --git a/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/grid-views/view.js b/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/grid-views/view.js
index 3425ed54b5f..b797823831b 100644
--- a/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/grid-views/view.js
+++ b/src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/grid-views/view.js
@@ -269,6 +269,7 @@ define([
});
modal.open();
+ $('#gridViewName').focus();
},
/**
diff --git a/src/Oro/Bundle/QueryDesignerBundle/Resources/public/js/field-condition.js b/src/Oro/Bundle/QueryDesignerBundle/Resources/public/js/field-condition.js
index 94c374ea1d9..40ca066fc16 100644
--- a/src/Oro/Bundle/QueryDesignerBundle/Resources/public/js/field-condition.js
+++ b/src/Oro/Bundle/QueryDesignerBundle/Resources/public/js/field-condition.js
@@ -73,7 +73,7 @@ define(['jquery', 'underscore', 'orotranslation/js/translator', 'orofilter/js/ma
filterId = this._getApplicableFilterId(conditions),
filter = this.options.filters[filterId];
- if (!filterId) {
+ if (filterId === null) {
filter = {
type: 'none',
applicable: {},
diff --git a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js
index 3100bf96931..f50a3fb62c8 100644
--- a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js
+++ b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js
@@ -30,10 +30,10 @@ define(function (require) {
});
function waitForFilter(cb) {
- var timeout = 20,
- tick = 1,
- t = timeout,
- html = $el.find('.active-filter').html();
+ var timeout = 100;
+ var tick = 1;
+ var t = timeout;
+ var html = $el.find('.active-filter').html();
function wait() {
t -= tick;
var current = $el.find('.active-filter').html();
@@ -56,6 +56,7 @@ define(function (require) {
});
it('renders empty filter', function (done) {
+ require('oro/filter/none-filter');
var $fieldsLoader = $('');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
@@ -76,6 +77,7 @@ define(function (require) {
});
it('renders none filter', function (done) {
+ require('oro/filter/none-filter');
var $fieldsLoader = $('');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
@@ -104,8 +106,9 @@ define(function (require) {
});
});
- it('renders choice filter', function (done) {
- var $fieldsLoader = $('');
+ it('renders choice filter', function(done) {
+ require('oro/filter/choice-filter');
+ var $fieldsLoader = $('');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
$fieldsLoader.data('fields', data);
@@ -195,8 +198,10 @@ define(function (require) {
});
});
- it('replaces filter', function (done) {
- var $fieldsLoader = $('');
+ it('replaces filter', function(done) {
+ require('oro/filter/choice-filter');
+ require('oro/filter/datetime-filter');
+ var $fieldsLoader = $('');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
$fieldsLoader.data('fields', data);