Skip to content

Commit 65f2d2d

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 80f71d9 commit 65f2d2d

File tree

6 files changed

+56
-14
lines changed

6 files changed

+56
-14
lines changed

docs/api/javascript/ui/toolbar.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: ToolBar
33
page_title: Configuration, methods and events of Kendo UI ToolBar
44
relatedDocs: gs-web-toolbar-overview
55
res_type: api
6-
component: toolbar
6+
component: toolbar
77
---
88

99
# kendo.ui.ToolBar
@@ -1398,6 +1398,10 @@ The jQuery object that represents the command element.
13981398

13991399
The id of the command element.
14001400

1401+
##### e.item `Object`
1402+
1403+
The item instance of the clicked item.
1404+
14011405
##### e.sender `kendo.ui.ToolBar`
14021406

14031407
The widget instance which fired the event.
@@ -1570,6 +1574,10 @@ Boolean flag that indicates the button state.
15701574

15711575
The id of the command element.
15721576

1577+
##### e.item `Object`
1578+
1579+
The item instance of the toggled item.
1580+
15731581
##### e.sender `kendo.ui.ToolBar`
15741582

15751583
The widget instance which fired the event.

src/kendo.combobox.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,18 @@ var __meta__ = { // jshint ignore:line
804804
var that = this;
805805
var item = e.item;
806806
var dataItem = that.listView.dataItemByIndex(that.listView.getElementIndex(item));
807-
807+
var shouldTrigger = true;
808808
e.preventDefault();
809809

810-
if (that.trigger("select", { dataItem: dataItem, item: item })) {
810+
if(dataItem){
811+
shouldTrigger = that._value(dataItem) !== List.unifyType(that.value(), typeof that._value(dataItem));
812+
813+
if(!shouldTrigger){
814+
that.input.val(that._accessor());
815+
}
816+
}
817+
818+
if (shouldTrigger && that.trigger("select", { dataItem: dataItem, item: item })) {
811819
that.close();
812820
return;
813821
}
@@ -983,6 +991,10 @@ var __meta__ = { // jshint ignore:line
983991

984992
if(dataItem){
985993
shouldTrigger = that._value(dataItem) !== List.unifyType(that.value(), typeof that._value(dataItem));
994+
995+
if(!shouldTrigger){
996+
that.input.val(that._accessor());
997+
}
986998
}
987999

9881000
if (shouldTrigger && that.trigger("select", { dataItem: dataItem, item: current })) {
@@ -1054,7 +1066,7 @@ var __meta__ = { // jshint ignore:line
10541066
if (that._prev !== value) {
10551067
that._prev = value;
10561068

1057-
if (that.options.filter === "none") {
1069+
if (that.options.filter === "none" && that.options.virtual) {
10581070
that.listView.select(-1);
10591071
}
10601072

src/kendo.data.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,7 +3288,9 @@ var __meta__ = { // jshint ignore:line
32883288

32893289
success: function(data) {
32903290
var that = this,
3291-
options = that.options;
3291+
options = that.options,
3292+
items,
3293+
replaceSubset;
32923294

32933295
that.trigger(REQUESTEND, { response: data, type: "read" });
32943296

@@ -3318,7 +3320,7 @@ var __meta__ = { // jshint ignore:line
33183320
} else {
33193321
data = that._readData(data);
33203322

3321-
var items = [];
3323+
items = [];
33223324
var itemIds = {};
33233325
var model = that.reader.model;
33243326
var idField = model ? model.idField : "id";
@@ -3347,8 +3349,19 @@ var __meta__ = { // jshint ignore:line
33473349
}
33483350

33493351
that._pristineTotal = that._total;
3352+
replaceSubset = that._skip && that._data.length && that._skip < that._data.length;
33503353

3351-
that._pristineData = data.slice(0);
3354+
if (that.options.endless) {
3355+
if (replaceSubset) {
3356+
that._pristineData.splice(that._skip, that._pristineData.length);
3357+
}
3358+
items = data.slice(0);
3359+
for (var j = 0; j < items.length; j++) {
3360+
that._pristineData.push(items[j]);
3361+
}
3362+
} else {
3363+
that._pristineData = data.slice(0);
3364+
}
33523365

33533366
that._detachObservableParents();
33543367

@@ -3361,6 +3374,9 @@ var __meta__ = { // jshint ignore:line
33613374
}
33623375

33633376
data = that._observe(data);
3377+
if (replaceSubset) {
3378+
that._data.splice(that._skip, that._data.length);
3379+
}
33643380
for (var i = 0; i < data.length; i++) {
33653381
that._data.push(data[i]);
33663382
}
@@ -3790,7 +3806,7 @@ var __meta__ = { // jshint ignore:line
37903806
return $.Deferred().resolve(isPrevented).promise();
37913807
},
37923808

3793-
_setFilterTotal: function(filterTotal, setDefaultValue) {
3809+
_setFilterTotal: function(filterTotal, setDefaultValue) {
37943810
var that = this;
37953811

37963812
if (!that.options.serverFiltering) {
@@ -3799,7 +3815,7 @@ var __meta__ = { // jshint ignore:line
37993815
} else if (setDefaultValue) {
38003816
that._total = that._data.length;
38013817
}
3802-
}
3818+
}
38033819
},
38043820

38053821
fetch: function(callback) {

src/kendo.toolbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,13 +1352,13 @@ var __meta__ = { // jshint ignore:line
13521352
handler = isFunction(item.toggleHandler) ? item.toggleHandler : null;
13531353

13541354
item.toggle(!item.options.selected, true);
1355-
eventData = { target: target, group: item.options.group, checked: item.options.selected, id: item.options.id };
1355+
eventData = { target: target, group: item.options.group, checked: item.options.selected, id: item.options.id, item: item };
13561356

13571357
if (handler) { handler.call(that, eventData); }
13581358
that.trigger(TOGGLE, eventData);
13591359
} else {
13601360
handler = isFunction(item.clickHandler) ? item.clickHandler : null;
1361-
eventData = { sender: that, target: target, id: item.options.id };
1361+
eventData = { sender: that, target: target, id: item.options.id, item: item };
13621362

13631363
if (handler) { handler.call(that, eventData); }
13641364
that.trigger(CLICK, eventData);

src/messages/kendo.messages.hu-HU.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ $.extend(true, kendo.ui.FilterCell.prototype.options.operators,{
193193
"isnull": "null",
194194
"isnotnull": "nem null",
195195
"isempty": "üres",
196-
"isnotempty": "nem üres"
196+
"isnotempty": "nem üres",
197+
"isnullorempty": "nincs értéke",
198+
"isnotnullorempty": "van értéke"
197199
},
198200
"number": {
199201
"eq": "egyenlő",
@@ -259,7 +261,9 @@ $.extend(true, kendo.ui.FilterMenu.prototype.options.operators,{
259261
"isnull": "null",
260262
"isnotnull": "nem null",
261263
"isempty": "üres",
262-
"isnotempty": "nem üres"
264+
"isnotempty": "nem üres",
265+
"isnullorempty": "nincs értéke",
266+
"isnotnullorempty": "van értéke"
263267
},
264268
"number": {
265269
"eq": "egyenlő",
@@ -592,6 +596,8 @@ $.extend(true, kendo.ui.Scheduler.prototype.options.messages,{
592596
"deleteWindowTitle": "Ismétlődő elem törlése",
593597
"deleteWindowOccurrence": "Alkalom törlése",
594598
"deleteWindowSeries": "Összes ismétlődés törlése",
599+
"deleteRecurringConfirmation": "Biztos, hogy törölni akarja ezt az alakalmat?",
600+
"deleteSeriesConfirmation": "Biztos, hogy törölni akarja az összes ismétlődést?",
595601
"editWindowTitle": "Ismétlődő elem szerkesztése",
596602
"editWindowOccurrence": "Alkalom szerkesztése",
597603
"editWindowSeries": "Összes ismétlődés szerkesztése",

tests/combobox/searching.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ asyncTest("clear selected value if search is started (filter: none)", 1, functio
10251025

10261026
combobox.bind("open", function() {
10271027
start();
1028-
equal(combobox.value(), "Ba");
1028+
equal(combobox.value(), 2);
10291029
});
10301030

10311031
combobox.input.focus().val("Ba").trigger({ type: "keydown" });

0 commit comments

Comments
 (0)