Skip to content

Commit

Permalink
Release 18.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
BingoRUS committed Apr 25, 2019
1 parent 1275d2f commit 91d7c9a
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 31 deletions.
4 changes: 0 additions & 4 deletions build/gulp/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ var DIST_GLOBS = [
'!artifacts/js/jquery*',
'!artifacts/js/jszip*',
'!artifacts/js/dx.custom*',
'!artifacts/js/quill*',
'!artifacts/js/Quill*',
'!artifacts/js/turndown*',
'!artifacts/js/showdown*',
'!artifacts/ts/jquery*',
'!artifacts/ts/knockout*',
'!artifacts/ts/globalize*',
Expand Down
9 changes: 0 additions & 9 deletions build/gulp/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ const VENDORS = [
path: '/globalize/dist/globalize/@(number|currency|date|message).js',
noUglyFile: true,
base: '/globalize/dist/'
},
{
path: '/quill/dist/quill.js'
},
{
path: '/showdown/dist/showdown.js'
},
{
path: '/turndown/lib/turndown.browser.umd.js'
}
];

Expand Down
2 changes: 1 addition & 1 deletion js/data/odata/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ var errorFromResponse = function(obj, textStatus, ajaxOptions) {
}
}

if(httpStatus >= 400) {
if(httpStatus >= 400 || httpStatus === 0) {
errorData.httpStatus = httpStatus;
return extend(Error(message), errorData);
}
Expand Down
2 changes: 1 addition & 1 deletion js/ui/grid_core/ui.grid_core.selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ exports.SelectionController = gridCore.Controller.inherit((function() {
if(this.isSelectionWithCheckboxes()) {
keys.control = true;
}
return this._selection.changeItemSelection(itemIndex, keys);
return this._selection.changeItemSelection(this._dataController.getRowIndexDelta() + itemIndex, keys);
},

focusedItemIndex: function(itemIndex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@
* @paletteColorOpacity .25
*/
@list-item-selected-bg: @base-select-bg; // #f05b41 => #ffb5a8
@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);
@list-focused-bg: @base-focus-bg;
@list-item-color: @base-text-color;
@list-item-hover-color: @base-hover-color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@base-hover-color: @base-accent;
@base-focus-color: @base-accent;
@base-shadow-color: transparent;
@base-select-color: @base-text-color;

@base-default: #52BBE7;
@base-success: #71C35E;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@
* @paletteColorOpacity .25
*/
@list-item-selected-bg: @base-select-bg;
@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);
@list-focused-bg: @base-focus-bg;
@list-item-color: @base-text-color;
@list-item-hover-color: @base-hover-color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
* @paletteColorOpacity .25
*/
@list-item-selected-bg: @base-select-bg;
@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);
@list-focused-bg: @base-focus-bg;
@list-item-color: @base-text-color;
@list-item-hover-color: @base-hover-color;
Expand Down
6 changes: 3 additions & 3 deletions styles/widgets/generic/color-schemes/light/generic.light.less
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@
*/
@list-item-selected-bg: @base-select-bg;

@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);
@list-focused-bg: @base-focus-bg;
@list-item-color: @base-text-color;
@list-item-hover-color: @base-hover-color;
Expand Down Expand Up @@ -1525,8 +1525,8 @@
* @group navigations.treeview
* @paletteColorOpacity 1
*/
@treeview-focused-bg: @base-focus-color;
@treeview-focus-color: @base-inverted-text-color;
@treeview-focused-bg: @base-focus-bg;
@treeview-focus-color: @base-focus-color;
@treeview-hover-bg: @base-hover-bg;
@treeview-item-hover-color: @treeview-color;
@treeview-border-color: @base-border-color;
Expand Down
2 changes: 1 addition & 1 deletion styles/widgets/generic/list.generic.less
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

&.dx-state-focused.dx-list-item-selected {
background-color: @list-item-focused-selected-bg;
color: @base-select-color;
color: @base-inverted-text-color;
}

&.dx-state-active {
Expand Down
2 changes: 1 addition & 1 deletion styles/widgets/material/color-schemes/material.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
* @paletteColorOpacity .25
*/
@list-item-selected-bg: lighten(@base-bg, 12%);
@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);

@list-item-hover-color: @base-hover-color;
@list-item-selected-color: fade(@base-text-color, 100%);
Expand Down
2 changes: 1 addition & 1 deletion styles/widgets/material/color-schemes/material.light.less
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@
* @paletteColorOpacity .25
*/
@list-item-selected-bg: darken(@base-bg, 12%);
@list-item-focused-selected-bg: fade(@base-focus-color, 70%);
@list-item-focused-selected-bg: fade(@base-focus-bg, 70%);

@list-item-hover-color: @base-hover-color;
@list-item-selected-color: fade(@base-text-color, 100%);
Expand Down
5 changes: 3 additions & 2 deletions testing/helpers/ajaxMock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var ajax = require("core/utils/ajax");
var extend = require("core/utils/extend").extend;
var typeUtils = require("core/utils/type");
var $ = require("jquery");
var originSendRequest = ajax.sendRequest;
var urlMap = {};
Expand Down Expand Up @@ -28,7 +29,7 @@ exports.setup = function(options) {
var mockOptions = findUrlOptions(request.url);
var jQueryTextStatus = mockOptions.jQueryTextStatus;

response.status = mockOptions.status || 200;
response.status = typeUtils.isDefined(mockOptions.status) ? mockOptions.status : 200;
response.statusText = mockOptions.statusText || "200 OK";
response.responseText = mockOptions.responseText;

Expand All @@ -37,7 +38,7 @@ exports.setup = function(options) {
}

timers.push(setTimeout(function() {
if(response.status === 404 || jQueryTextStatus === "parsererror") {
if(response.status === 0 || response.status === 404 || jQueryTextStatus === "parsererror") {
response.error = jQueryTextStatus ? {} : { message: response.statusText };
deferred.rejectWith(response, [ response, jQueryTextStatus || "error", mockOptions]);
} else {
Expand Down
6 changes: 3 additions & 3 deletions testing/runner/Views/Main/RunSuite.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@
'knockout': '@Url.Content("~/node_modules/knockout/build/output/knockout-latest.debug.js")',
'angular': '@Url.Content("~/artifacts/js/angular.js")',
'jszip': '@Url.Content("~/artifacts/js/jszip.js")',
'quill': '@Url.Content("~/artifacts/js/quill.js")',
'turndown': '@Url.Content("~/artifacts/js/turndown.browser.umd.js")',
'showdown': '@Url.Content("~/artifacts/js/showdown.js")',
'quill': '@Url.Content("~/node_modules/quill/dist/quill.js")',
'turndown': '@Url.Content("~/node_modules/turndown/lib/turndown.browser.umd.js")',
'showdown': '@Url.Content("~/node_modules/showdown/dist/showdown.js")',

// Global CSS
'style-compiler-test-server': '@Model.StyleCompilerTestServerUrl',
Expand Down
21 changes: 21 additions & 0 deletions testing/tests/DevExpress.data/odataStore.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,27 @@ QUnit.test("error handlers (check params)", function(assert) {
}, done, assert);
});

QUnit.test("non HTTP failure", function(assert) {
var done = assert.async();
ajaxMock.setup({
url: "odata.org/get",
status: 0
});

var store = new ODataStore({
url: "odata.org/get"
});

store.load()
.fail((e) => {
assert.equal(e.httpStatus, 0);
})
.done(() => {
assert.ok(false, MUST_NOT_REACH_MESSAGE);
})
.always(done);
});

QUnit.test("error handlers (query evaluation)", function(assert) {
var done = assert.async();

Expand Down
35 changes: 35 additions & 0 deletions testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6802,6 +6802,41 @@ QUnit.test("selectAll should works correctly if selectAllMode is page and row re
assert.equal(dataGrid.getSelectedRowKeys().length, 20, "selected row key count equals pageSize");
});

// T726385
QUnit.test("selection after scrolling should works correctly if row rendering mode is virtual", function(assert) {
// arrange, act
var array = [],
dataGrid;

for(var i = 1; i <= 30; i++) {
array.push({ id: i });
}

dataGrid = $("#dataGrid").dxDataGrid({
height: 100,
dataSource: array,
keyExpr: "id",
loadingTimeout: undefined,
selection: {
mode: "single"
},
scrolling: {
rowRenderingMode: "virtual",
useNative: false
}
}).dxDataGrid("instance");

// act
dataGrid.getScrollable().scrollTo({ y: 10000 });
$(dataGrid.getRowElement(0)).trigger("dxclick");

// assert
var visibleRows = dataGrid.getVisibleRows();
assert.equal(visibleRows.length, 10, "visible row count");
assert.equal(visibleRows[0].isSelected, true, "first visible row is selected");
assert.deepEqual(dataGrid.getSelectedRowKeys(), [11], "selected row key count equals pageSize");
});

// T644981
QUnit.test("grouping should works correctly if row rendering mode is virtual and dataSource is remote", function(assert) {
// arrange, act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6700,7 +6700,7 @@ QUnit.test("Get width of horizontal scrollbar when both scrollbars are shown", f

// T606944
QUnit.test("The vertical scrollbar should not be shown when there is a horizontal scrollbar", function(assert) {
if(browser.msie && browser.version === "18.17763") {
if(browser.msie && browser.version === "18.18362") {
assert.ok(true);
return;
}
Expand Down

0 comments on commit 91d7c9a

Please sign in to comment.