Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.7' into 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Sep 14, 2015
2 parents ad7b060 + cceb8d9 commit 88bf528
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ define([
});

modal.open();
$('#gridViewName').focus();
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down
21 changes: 13 additions & 8 deletions src/Oro/Bundle/QueryDesignerBundle/Tests/JS/field-conditionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -56,6 +56,7 @@ define(function (require) {
});

it('renders empty filter', function (done) {
require('oro/filter/none-filter');
var $fieldsLoader = $('<input id="fields_loader"></input>');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
Expand All @@ -76,6 +77,7 @@ define(function (require) {
});

it('renders none filter', function (done) {
require('oro/filter/none-filter');
var $fieldsLoader = $('<input id="fields_loader"></input>');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
Expand Down Expand Up @@ -104,8 +106,9 @@ define(function (require) {
});
});

it('renders choice filter', function (done) {
var $fieldsLoader = $('<input id="fields_loader"></input>');
it('renders choice filter', function(done) {
require('oro/filter/choice-filter');
var $fieldsLoader = $('<input id="fields_loader" />');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
$fieldsLoader.data('fields', data);
Expand Down Expand Up @@ -195,8 +198,10 @@ define(function (require) {
});
});

it('replaces filter', function (done) {
var $fieldsLoader = $('<input id="fields_loader"></input>');
it('replaces filter', function(done) {
require('oro/filter/choice-filter');
require('oro/filter/datetime-filter');
var $fieldsLoader = $('<input id="fields_loader" />');
$el.append($fieldsLoader);
$fieldsLoader.val('OroCRM\\Bundle\\AccountBundle\\Entity\\Account');
$fieldsLoader.data('fields', data);
Expand Down

0 comments on commit 88bf528

Please sign in to comment.