Skip to content

Commit

Permalink
Sync with Kendo UI Professional
Browse files Browse the repository at this point in the history
  • Loading branch information
Kendo Bot committed Feb 18, 2020
1 parent 5aa177a commit 99e6681
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 43 deletions.
11 changes: 7 additions & 4 deletions docs-aspnet/redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ rewrite ^/{{ site.platform }}/$
/{{ site.platform }}/introduction
permanent;

rewrite ^/{{ site.platform }}/knowledge-base$
/{{ site.platform }}/knowledge-base.html
permanent;

rewrite ^/{{ site.platform }}/vs-integration/(.*)$
/{{ site.platform }}/getting-started/vs-integration/$1
permanent;
Expand Down Expand Up @@ -106,3 +102,10 @@ rewrite ^/{{ site.platform }}/{{ directory.path }}/?$
/{{ site.platform }}/{{ directory.url }}
redirect;
{% endfor %}

##
# Remove HTML extension
##
rewrite ^(/.*)\.html(\?.*)?$
$1$2
permanent;
7 changes: 7 additions & 0 deletions docs/redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,10 @@ rewrite ^/kendo-ui/{{ directory.path }}/?$
/kendo-ui/{{ directory.url }}
redirect;
{% endfor %}

##
# Remove HTML extension
##
rewrite ^(/.*)\.html(\?.*)?$
$1$2
permanent;
2 changes: 1 addition & 1 deletion src/kendo.combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ var __meta__ = { // jshint ignore:line

that._toggleCloseVisibility();
}
else if (value === "") {
else if (value === "" && that._prev !== "") {
that._clearValue();
that.search("");
}
Expand Down
45 changes: 36 additions & 9 deletions src/kendo.listbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,25 @@ var __meta__ = { // jshint ignore:line
var that = this;
var items = dataItems && dataItems.length ? dataItems : [dataItems];
var itemsLength = items.length;
var list = that._getList();
var i;

that._unbindDataSource();
that._unbindDataChange();
for (i = 0; i < itemsLength; i++) {
that._addItem(items[i]);
that._addItem(items[i], list);
}
that._bindDataChange();
that._bindDataSource();
that._syncElement();
},

_addItem: function (dataItem) {
_addItem: function (dataItem, list) {
var that = this;
var item = that.templates.itemTemplate({ item: dataItem, r: that.templates.itemContent });

$(item).attr(kendoAttr(UNIQUE_ID), dataItem.uid).appendTo(that._getList());
$(item).attr(kendoAttr(UNIQUE_ID), dataItem.uid).appendTo(list);

if (typeof dataItem === typeof "") {
that.dataSource._data.push(dataItem);
} else {
Expand Down Expand Up @@ -729,9 +733,11 @@ var __meta__ = { // jshint ignore:line
var i;

that._unbindDataSource();
that._unbindDataChange();
for (i = 0; i < itemsLength; i++) {
that._removeItem($(listItems[i]));
}
that._bindDataChange();
that._bindDataSource();
that._syncElement();
that._updateToolbar();
Expand Down Expand Up @@ -879,6 +885,21 @@ var __meta__ = { // jshint ignore:line
}
},

_bindDataChange: function () {
var dataSource = this.dataSource;
if (dataSource._data && dataSource._changeHandler) {
dataSource._data.bind(CHANGE, dataSource._changeHandler);
dataSource._data.trigger(CHANGE);
}
},

_unbindDataChange: function () {
var dataSource = this.dataSource;
if (dataSource._data && dataSource._changeHandler) {
dataSource._data.unbind(CHANGE, dataSource._changeHandler);
}
},

_bindDataSource: function() {
var that = this;
var dataSource = that.dataSource;
Expand Down Expand Up @@ -1287,14 +1308,19 @@ var __meta__ = { // jshint ignore:line
},

getUpdatedSelection: function(items) {

if (items.length !== 1) {
return null;
}

var that = this;
var itemFilter = that.options.filter;
var sourceListBox = that.getSourceListBox();
var lastEnabledItem = sourceListBox ? sourceListBox.items().filter(itemFilter).last() : null;
var containsLastItem = $(items).filter(lastEnabledItem).length > 0;
var itemToSelect = containsLastItem ? $(items).prevAll(itemFilter)[0] : $(items).nextAll(itemFilter)[0];

if ($(items).length === 1 && itemToSelect) {
if (itemToSelect) {
return itemToSelect;
} else {
return null;
Expand Down Expand Up @@ -1364,7 +1390,7 @@ var __meta__ = { // jshint ignore:line
canExecute: function() {
var sourceListBox = this.getSourceListBox();

return (sourceListBox ? sourceListBox.items().filter(ENABLED_ITEM_SELECTOR).length > 0 : false);
return (sourceListBox ? sourceListBox.wrapper.find(ENABLED_ITEMS_SELECTOR).length > 0 : false);
},

getItems: function() {
Expand All @@ -1381,7 +1407,7 @@ var __meta__ = { // jshint ignore:line
canExecute: function() {
var sourceListBox = this.getSourceListBox();

return (sourceListBox ? sourceListBox.items().filter(ENABLED_ITEM_SELECTOR).length > 0 : false);
return (sourceListBox ? sourceListBox.wrapper.find(ENABLED_ITEMS_SELECTOR).length > 0 : false);
},

getItems: function() {
Expand Down Expand Up @@ -1496,13 +1522,14 @@ var __meta__ = { // jshint ignore:line
_updateToolState: function(toolName) {
var that = this;
var command = CommandFactory.current.create(toolName, { listBox: that.listBox });
var toolElement = that.element.find("[data-command='" + toolName + "']")[0];
var tool = that.element.find("[data-command='" + toolName + "']");
var toolElement = tool[0];

if (toolElement && command && command.canExecute) {
if (command.canExecute()) {
$(toolElement).removeClass(DISABLED_STATE_CLASS).removeAttr(TABINDEX);
tool.removeClass(DISABLED_STATE_CLASS).removeAttr(TABINDEX);
} else {
$(toolElement).addClass(DISABLED_STATE_CLASS).attr(TABINDEX, "-1");
tool.addClass(DISABLED_STATE_CLASS).attr(TABINDEX, "-1");
}
}
}
Expand Down
74 changes: 74 additions & 0 deletions src/messages/kendo.messages.nl-BE.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,80 @@ $.extend(true, kendo.ui.Scheduler.prototype.options.messages,{
});
}

/* FileManager messages */

if (kendo.ui.FileManager) {
kendo.ui.FileManager.prototype.options.messages = $.extend(true, kendo.ui.FileManager.prototype.options.messages, {
"toolbar": {
"createFolder": "Nieuwe map",
"upload": "Uploaden",
"sortDirection": "Sorteer richting",
"sortDirectionAsc": "Sorteer richting oplopend",
"sortDirectionDesc": "Sorteer richting aflopend",
"sortField": "Sorteren op",
"nameField": "Naam",
"sizeField": "Bestandsgrootte",
"typeField": "Type",
"dateModifiedField": "Datum gewijzigd",
"dateCreatedField": "Datum gecreeërd",
"listView": "Lijstweergave",
"gridView": "Rasterweergave",
"search" : "zoek",
"details": "Details bekijken",
"detailsChecked": "Aan",
"detailsUnchecked": "Uit",
"delete": "Verwijderen",
"rename": "Naam wijzigen"
},
"views": {
"nameField": "Naam",
"sizeField": "Bestandsgrootte",
"typeField": "Type",
"dateModifiedField": "Datum gewijzigd",
"dateCreatedField": "Datum gecreeërd",
"items": "Items"
},
"dialogs": {
"upload": {
"title": "Bestanden uploaden",
"clear": "Lijst wissen",
"done": "Klaar"
},
"moveConfirm": {
"title": "Bevestigen",
"content": "<p style = 'text-align: center;'> Wilt u verplaatsen of kopiëren? </p>",
"okText": "Kopiëren",
"cancel": "Annuleren",
"close": "Sluiten"
},
"deleteConfirm": {
"title": "Bevestigen",
"content": "<p style = 'text-align: center;'> Weet u zeker dat u de geselecteerde bestanden wilt verwijderen? </br> U kunt deze actie niet ongedaan maken. </p>",
"okText": "Verwijderen",
"cancel": "Annuleren",
"close": "Sluiten"
},
"renamePrompt": {
"title": "Bevestigen",
"content": "<p style = 'text-align: center;'> Voer een nieuwe naam in voor het bestand. </p>",
"okText": "Naam wijzigen",
"cancel": "Annuleren",
"close": "Sluiten"
}
},
"previewPane": {
"noFileSelected": "Geen bestand geselecteerd",
"extension": "Type",
"size": "Grootte",
"created": "Datum gecreeërd",
"createdUtc": "Datum gecreeërd UTC",
"modified": "datum gewijzigd",
"modifiedUtc": "datum gewijzigd UTC",
"items": "items"
}
});
}

/* Upload messages */

if (kendo.ui.Upload) {
Expand Down
25 changes: 25 additions & 0 deletions styles/web/common/upload.less
Original file line number Diff line number Diff line change
Expand Up @@ -395,3 +395,28 @@ html .k-upload
.k-rtl .k-file-extension-wrapper {
margin-left: 14px;
}

.k-upload .k-action-buttons {
padding: 0;
margin: 0;
display: flex;
flex-direction: row;
clear: both;

.k-button {
flex: 1 1 auto;
margin: 0;
}

.k-button + .k-button {
margin: 0;
}
}

.k-no-flexbox .k-upload .k-action-buttons .k-button {
border-width: 0;
}




6 changes: 0 additions & 6 deletions styles/web/type-bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -1603,13 +1603,7 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: @accent;
border-color: @widget-border-color;

&:hover {
color: @selected-text-color;
background-color: @selected-background;
}
}

// ImageBrowser
Expand Down
1 change: 0 additions & 1 deletion styles/web/type-default.less
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,6 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: contrast(@base, @widget-text-color, @accent, .9);
border-color: @widget-border-color;
}

Expand Down
1 change: 0 additions & 1 deletion styles/web/type-fiori.less
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,6 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: @accent;
border-color: @widget-border-color;
}

Expand Down
6 changes: 0 additions & 6 deletions styles/web/type-material.less
Original file line number Diff line number Diff line change
Expand Up @@ -1694,13 +1694,7 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: @selected-text-color;
border-color: @widget-border-color;

&:hover {
color: @base;
background-color: @selected-text-color;
}
}

// ImageBrowser
Expand Down
5 changes: 0 additions & 5 deletions styles/web/type-metro.less
Original file line number Diff line number Diff line change
Expand Up @@ -1655,12 +1655,7 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: @accent;
border-color: @widget-border-color;

&:hover {
color: @button-hover-text-color;
}
}

// ImageBrowser
Expand Down
6 changes: 0 additions & 6 deletions styles/web/type-nova.less
Original file line number Diff line number Diff line change
Expand Up @@ -2027,13 +2027,7 @@ table:not(.k-scheduler-dayview) .k-scheduler-header-wrap .k-today {
}

.k-upload .k-upload-selected {
color: @accent;
border-color: @widget-border-color;

&:hover {
color: @selected-text-color;
background-color: @accent;
}
}

// Slider
Expand Down
1 change: 0 additions & 1 deletion styles/web/type-office365.less
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,6 @@ div.k-filebrowser-dropzone em
}

.k-upload .k-upload-selected {
color: @base;
border-color: @widget-border-color;
}

Expand Down
6 changes: 3 additions & 3 deletions typescript/kendo.all.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for Kendo UI Professional v2020.1.114
// Type definitions for Kendo UI Professional v2020.1.219
// Project: http://www.telerik.com/kendo-ui
// Definitions by: Telerik <https://github.com/telerik>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
Expand Down Expand Up @@ -3683,7 +3683,7 @@ declare namespace kendo.ui {
getSize(): void;
destroy(): void;
setDataSource(dataSource: kendo.data.FileManagerDataSource): void;

}

interface FileManagerBreadcrumb {
Expand Down Expand Up @@ -4832,7 +4832,7 @@ declare namespace kendo.ui {
}

interface GridScrollable {
virtual?: boolean;
virtual?: boolean|string;
endless?: boolean;
}

Expand Down

0 comments on commit 99e6681

Please sign in to comment.