From 1ecde72811f6fd8d524868cdd7d88a6441f59b01 Mon Sep 17 00:00:00 2001 From: Mykhailo Kudelia Date: Thu, 27 Aug 2015 14:27:48 +0300 Subject: [PATCH 1/5] BAP-8845: Grid View - Save Filter focus should be on Name field in modal to name/save filter --- .../Resources/public/js/datagrid/grid-views/view.js | 1 + 1 file changed, 1 insertion(+) 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(); }, /** From 702e968a64beb08ce283aca5868baad554b2a774 Mon Sep 17 00:00:00 2001 From: Boris Furtuna Date: Mon, 10 Aug 2015 16:10:33 +0300 Subject: [PATCH 2/5] AEIV-189: Organization Create: Sorting does not function for the Data Grid in the Users section - fixed for version 1.7 (related bug BAP-7818) --- .../Bundle/DataGridBundle/Resources/public/js/datagrid/body.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 607c5d14f9c2eda0e3252b9c20bc90abcfe2c697 Mon Sep 17 00:00:00 2001 From: dmitrosh Date: Tue, 8 Sep 2015 20:49:47 +0300 Subject: [PATCH 3/5] BAP-8968: Fix JS tests --- .../QueryDesignerBundle/Tests/JS/field-conditionSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js index 3100bf96931..76ca312a2f2 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(); From 01f48d1b4f12cd578df975a8436442da409736bf Mon Sep 17 00:00:00 2001 From: dmitrosh Date: Tue, 8 Sep 2015 20:51:32 +0300 Subject: [PATCH 4/5] BAP-8968: preload field condition plugin dependency --- .../Tests/JS/field-conditionSpec.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js index 76ca312a2f2..9907ae892d4 100644 --- a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js +++ b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js @@ -104,8 +104,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 +196,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); From 81e0d62061e3eeaa67ed27f36cbb43a8b41ab0c0 Mon Sep 17 00:00:00 2001 From: dmitrosh Date: Wed, 9 Sep 2015 15:32:12 +0300 Subject: [PATCH 5/5] BAP-8968: fix js test --- .../QueryDesignerBundle/Resources/public/js/field-condition.js | 2 +- .../Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 9907ae892d4..f50a3fb62c8 100644 --- a/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js +++ b/src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js @@ -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');