diff --git a/bower.json b/bower.json index 5d5ded7..a7b4ef6 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "kendo-pouchdb", "main": "kendo-pouchdb.js", - "version": "0.1.5", + "version": "0.1.6", "description": "Kendo UI adapter for PouchDB", "homepage": "https://github.com/terikon/kendo-pouchdb", @@ -35,9 +35,9 @@ "dependencies": { "jquery": "^2.1.4", - "pouchdb": "^3.4.0", + "pouchdb": "^4.0.0", "pouchdb-collate": "^1.2.0", - "pouchdb-find": "^0.3.4" + "pouchdb-find": "^0.4.0" }, "ignore": [ diff --git a/package.json b/package.json index eb227ad..53a7bc1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "kendo-pouchdb", "title": "kendoPouchDB", - "version": "0.1.5", + "version": "0.1.6", "description": "Kendo UI adapter for PouchDB", "main": "kendo-pouchdb.js", "scripts": { @@ -36,9 +36,9 @@ "dependencies": { "jasmine-core": "^2.3.4", "jquery": "^2.1.4", - "pouchdb": "^3.4.0", + "pouchdb": "^4.0.0", "pouchdb-collate": "^1.2.0", - "pouchdb-find": "^0.3.4" + "pouchdb-find": "^0.4.0" }, "devDependencies": { "grunt": "^0.4.5", @@ -47,6 +47,6 @@ "grunt-contrib-jasmine": "^0.9.0", "underscore": "^1.8.3", "grunt-kendo-lint": "~0.0.3", - "load-grunt-tasks": "~3.2.0" + "load-grunt-tasks": "~3.3.0" } } diff --git a/vendor/kendo/kendo.binder.js b/vendor/kendo/kendo.binder.js index 88e6c89..b26dd54 100644 --- a/vendor/kendo/kendo.binder.js +++ b/vendor/kendo/kendo.binder.js @@ -21,32 +21,25 @@ /*jshint eqnull: true */ (function ($, undefined) { var kendo = window.kendo, - browser = kendo.support.browser, Observable = kendo.Observable, ObservableObject = kendo.data.ObservableObject, ObservableArray = kendo.data.ObservableArray, toString = {}.toString, binders = {}, - slice = Array.prototype.slice, Class = kendo.Class, - innerText, proxy = $.proxy, VALUE = "value", SOURCE = "source", EVENTS = "events", CHECKED = "checked", + CSS = "css", deleteExpando = true, + FUNCTION = "function", CHANGE = "change"; (function() { var a = document.createElement("a"); - if (a.innerText !== undefined) { - innerText = "innerText"; - } else if (a.textContent !== undefined) { - innerText = "textContent"; - } - try { delete a.test; } catch(e) { @@ -296,7 +289,7 @@ var TypedBinder = Binder.extend({ dataType: function() { - var dataType = this.element.getAttribute("data-type") || this.element.type || "text"; + var dataType = this.element.getAttribute("data-type") || this.element.type || "text"; return dataType.toLowerCase(); }, @@ -304,7 +297,7 @@ return this._parseValue(this.element.value, this.dataType()); }, - _parseValue : function (value, dataType){ + _parseValue: function (value, dataType){ if (dataType == "date") { value = kendo.parseDate(value, "yyyy-MM-dd"); } else if (dataType == "datetime-local") { @@ -329,6 +322,23 @@ } }); + binders.css = Binder.extend({ + init: function(element, bindings, options) { + Binder.fn.init.call(this, element, bindings, options); + this.classes = {}; + }, + refresh: function(className) { + var element = $(this.element), + binding = this.bindings.css[className], + hasClass = this.classes[className] = binding.get(); + if(hasClass){ + element.addClass(className); + }else{ + element.removeClass(className); + } + } + }); + binders.style = Binder.extend({ refresh: function(key) { this.element.style[key] = this.bindings.style[key].get() || ""; @@ -398,12 +408,12 @@ binders.text = Binder.extend({ refresh: function() { var text = this.bindings.text.get(); - + var dataFormat = this.element.getAttribute("data-format") || ""; if (text == null) { text = ""; } - this.element[innerText] = text; + $(this.element).text(kendo.toString(text, dataFormat)); } }); @@ -543,7 +553,6 @@ } else { template = "#:data#"; } - template = kendo.template(template); } @@ -577,7 +586,7 @@ for (idx = 0; idx < items.length; idx++) { var child = element.children[index]; - unbindElementTree(child); + unbindElementTree(child, true); element.removeChild(child); } }, @@ -599,7 +608,7 @@ } if (this.bindings.template) { - unbindElementChildren(element); + unbindElementChildren(element, true); $(element).html(this.bindings.template.render(source)); @@ -692,6 +701,8 @@ } if (element.value === value.toString()) { element.checked = true; + }else{ + element.checked = false; } } }, @@ -713,6 +724,30 @@ }; binders.select = { + source: binders.source.extend({ + refresh: function(e) { + var that = this, + source = that.bindings.source.get(); + + if (source instanceof ObservableArray || source instanceof kendo.data.DataSource) { + e = e || {}; + if (e.action == "add") { + that.add(e.index, e.items); + } else if (e.action == "remove") { + that.remove(e.index, e.items); + } else if (e.action == "itemchange" || e.action === undefined) { + that.render(); + if(that.bindings.value){ + if (that.bindings.value) { + that.element.value = retrievePrimitiveValues(that.bindings.value.get(), $(that.element).data("valueField")); + } + } + } + } else { + that.render(); + } + } + }), value: TypedBinder.extend({ init: function(target, bindings, options) { TypedBinder.fn.init.call(this, target, bindings, options); @@ -755,7 +790,21 @@ idx, length; - values = this.parsedValue(); + for (idx = 0, length = element.options.length; idx < length; idx++) { + option = element.options[idx]; + + if (option.selected) { + value = option.attributes.value; + + if (value && value.specified) { + value = option.value; + } else { + value = option.text; + } + + values.push(this._parseValue(value, this.dataType())); + } + } if (field) { source = this.bindings.source.get(); @@ -765,7 +814,8 @@ for (valueIndex = 0; valueIndex < values.length; valueIndex++) { for (idx = 0, length = source.length; idx < length; idx++) { - var match = valuePrimitive ? (this._parseValue(values[valueIndex], this.dataType()) === source[idx].get(field)) : (this._parseValue(source[idx].get(field), this.dataType()).toString() === values[valueIndex]); + var sourceValue = this._parseValue(source[idx].get(field), this.dataType()); + var match = (String(sourceValue) === values[valueIndex]); if (match) { values[valueIndex] = source[idx]; break; @@ -787,7 +837,6 @@ var optionIndex, element = this.element, options = element.options, - valuePrimitive = this.options.valuePrimitive, value = this.bindings[VALUE].get(), values = value, field = this.options.valueField || this.options.textField, @@ -859,7 +908,7 @@ items = e.removedItems || widget.items(); for (idx = 0, length = items.length; idx < length; idx++) { - unbindElementTree(items[idx]); + unbindElementTree(items[idx], false); } }, @@ -880,7 +929,13 @@ dataSource = widget[fieldName], view, parents, - groups = dataSource.group() || []; + hds = kendo.data.HierarchicalDataSource; + + if (hds && dataSource instanceof hds) { + // suppress binding of HDS items, because calling view() on root + // will return only root items, and widget.items() returns all items + return; + } if (items.length) { view = e.addedDataItems || dataSource.flatView(); @@ -895,7 +950,8 @@ refresh: function(e) { var that = this, source, - widget = that.widget; + widget = that.widget, + select, multiselect; e = e || {}; @@ -915,6 +971,13 @@ widget[setter](source._dataSource); } else { widget[fieldName].data(source); + + select = kendo.ui.Select && widget instanceof kendo.ui.Select; + multiselect = kendo.ui.MultiSelect && widget instanceof kendo.ui.MultiSelect; + + if (that.bindings.value && (select || multiselect)) { + widget.value(retrievePrimitiveValues(that.bindings.value.get(), widget.options.dataValueField)); + } } } } @@ -1094,7 +1157,7 @@ value = null; } else { if (!source || source instanceof kendo.data.DataSource) { - source = this.widget.dataSource.view(); + source = this.widget.dataSource.flatView(); } if (isArray) { @@ -1136,28 +1199,45 @@ }, refresh: function() { - if (!this._initChange) { - var field = this.options.dataValueField || this.options.dataTextField, - value = this.bindings.value.get(), - idx = 0, length, - values = []; + var widget = this.widget; + var options = widget.options; + var textField = options.dataTextField; + var valueField = options.dataValueField || textField; + var value = this.bindings.value.get(); + var text = options.text || ""; + var idx = 0, length; + var values = []; if (value === undefined) { value = null; } - if (field) { + if (valueField) { if (value instanceof ObservableArray) { for (length = value.length; idx < length; idx++) { - values[idx] = value[idx].get(field); + values[idx] = value[idx].get(valueField); } value = values; } else if (value instanceof ObservableObject) { - value = value.get(field); + text = value.get(textField); + value = value.get(valueField); } } - this.widget.value(value); + + if (options.autoBind === false && !options.cascadeFrom && widget.listView && !widget.listView.isBound()) { + if (textField === valueField && !text) { + text = value; + } + + if (!text && (value || value === 0) && options.valuePrimitive) { + widget.value(value); + } else { + widget._preselect(value, text); + } + } else { + widget.value(value); + } } this._initChange = false; @@ -1264,8 +1344,11 @@ refresh: function() { if (!this._initChange) { - var field = this.options.dataValueField || this.options.dataTextField, + var options = this.options, + widget = this.widget, + field = options.dataValueField || options.dataTextField, value = this.bindings.value.get(), + data = value, idx = 0, length, values = [], selectedValue; @@ -1286,7 +1369,11 @@ } } - this.widget.value(value); + if (options.autoBind === false && options.valuePrimitive !== true && !widget.listView.isBound()) { + widget._preselect(data, value); + } else { + widget.value(value); + } } }, @@ -1381,6 +1468,7 @@ hasSource, hasEvents, hasChecked, + hasCss, widgetBinding = this instanceof WidgetBindingTarget, specificBinders = this.binders(); @@ -1393,6 +1481,8 @@ hasEvents = true; } else if (key == CHECKED) { hasChecked = true; + } else if (key == CSS) { + hasCss = true; } else { this.applyBinding(key, bindings, specificBinders); } @@ -1412,6 +1502,10 @@ if (hasEvents && !widgetBinding) { this.applyBinding(EVENTS, bindings, specificBinders); } + + if (hasCss && !widgetBinding) { + this.applyBinding(CSS, bindings, specificBinders); + } }, binders: function() { @@ -1551,7 +1645,7 @@ parents = parents || [source]; if (role || bind) { - unbindElement(element); + unbindElement(element, false); } if (role) { @@ -1598,6 +1692,10 @@ bindings.events = createBindings(bind.events, parents, EventBinding); } + if (bind.css) { + bindings.css = createBindings(bind.css, parents, Binding); + } + target.bind(bindings); } @@ -1634,7 +1732,7 @@ } } - function unbindElement(element) { + function unbindElement(element, destroyWidget) { var bindingTarget = element.kendoBindingTarget; if (bindingTarget) { @@ -1648,20 +1746,27 @@ element.kendoBindingTarget = null; } } + + if(destroyWidget) { + var widget = kendo.widgetInstance($(element)); + if (widget && typeof widget.destroy === FUNCTION) { + widget.destroy(); + } + } } - function unbindElementTree(element) { - unbindElement(element); + function unbindElementTree(element, destroyWidgets) { + unbindElement(element, destroyWidgets); - unbindElementChildren(element); + unbindElementChildren(element, destroyWidgets); } - function unbindElementChildren(element) { + function unbindElementChildren(element, destroyWidgets) { var children = element.children; if (children) { for (var idx = 0, length = children.length; idx < length; idx++) { - unbindElementTree(children[idx]); + unbindElementTree(children[idx], destroyWidgets); } } } @@ -1672,7 +1777,7 @@ dom = $(dom); for (idx = 0, length = dom.length; idx < length; idx++ ) { - unbindElementTree(dom[idx]); + unbindElementTree(dom[idx], false); } } @@ -1685,6 +1790,29 @@ } } + function retrievePrimitiveValues(value, valueField) { + var values = []; + var idx = 0; + var length; + var item; + + if (!valueField) { + return value; + } + + if (value instanceof ObservableArray) { + for (length = value.length; idx < length; idx++) { + item = value[idx]; + values[idx] = item.get ? item.get(valueField) : item[valueField]; + } + value = values; + } else if (value instanceof ObservableObject) { + value = value.get(valueField); + } + + return value; + } + kendo.unbind = unbind; kendo.bind = bind; kendo.data.binders = binders; diff --git a/vendor/kendo/kendo.calendar.js b/vendor/kendo/kendo.calendar.js index 905f068..70ec604 100644 --- a/vendor/kendo/kendo.calendar.js +++ b/vendor/kendo/kendo.calendar.js @@ -878,11 +878,14 @@ adjustDST(today, 0); today = +today; + start = new DATE(start.getFullYear(), start.getMonth(), start.getDate()); + adjustDST(start, 0); + return view({ cells: 42, perRow: 7, html: html += '', - start: new DATE(start.getFullYear(), start.getMonth(), start.getDate()), + start: start, min: new DATE(min.getFullYear(), min.getMonth(), min.getDate()), max: new DATE(max.getFullYear(), max.getMonth(), max.getDate()), content: options.content, diff --git a/vendor/kendo/kendo.common.core.css b/vendor/kendo/kendo.common.core.css index 03fe761..41d4c7b 100644 --- a/vendor/kendo/kendo.common.core.css +++ b/vendor/kendo/kendo.common.core.css @@ -128,15 +128,11 @@ .k-button.k-state-disabled:active { cursor: default; } -.k-ie7 .k-button { - line-height: normal; -} a.k-button { - -khtml-user-select: none; -webkit-user-select: none; - -moz-user-select: -moz-none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; text-decoration: none; } /* Override the important default line-height in Firefox 4+ */ @@ -144,25 +140,6 @@ a.k-button { padding-bottom: 0.37em; padding-top: 0.37em; } -.k-ie7 .k-button { - overflow: visible; - margin-right: 4px; -} -.k-ie7 a.k-button { - line-height: 1.6; - padding-left: 7px; - padding-right: 7px; - /*+1*/ -} -.k-ie7 .k-slider a.k-button { - height: 22px; - line-height: 22px; - padding: 0; -} -.k-ie7 .k-button-expand { - margin-left: 0; - margin-right: 0; -} button.k-button::-moz-focus-inner, input.k-button::-moz-focus-inner { padding: 0; @@ -182,11 +159,6 @@ body .k-split-button-arrow { padding-left: .4em; padding-right: .4em; } -.k-ie7 a.k-button-icon { - padding-left: 5px; - padding-right: 5px; - /*+1*/ -} .k-button-icontext { overflow: visible; /*IE9*/ @@ -278,10 +250,6 @@ html body .k-button-bare.k-upload-button:hover { .k-sprite { background-color: transparent; } -.k-ie7 .k-icon, -.k-ie7 .k-sprite { - text-indent: 0; -} .k-numerictextbox .k-select .k-link span.k-i-arrow-n { background-position: 0 -3px; } @@ -1372,6 +1340,17 @@ html body .k-button-bare.k-upload-button:hover { .k-button:active .k-i-more { background-position: -80px -32px; } +.k-i-gantt-toggle { + background-position: -64px -240px; +} +.k-link:not(.k-state-disabled):hover > .k-i-gantt-toggle, +.k-state-hover > .k-i-gantt-toggle, +.k-state-hover > * > .k-i-gantt-toggle, +.k-button:not(.k-state-disabled):hover .k-i-gantt-toggle, +.k-textbox:hover .k-i-gantt-toggle, +.k-button:active .k-i-gantt-toggle { + background-position: -80px -240px; +} .k-file > .k-icon { background-position: -115px -91px; } @@ -1386,21 +1365,28 @@ html body .k-button-bare.k-upload-button:hover { } /* Dropdown icon in k-scheduler-views */ .k-pager-numbers .k-current-page .k-link:after, -.k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after { +.k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-gantt-views > .k-current-view > .k-link:after { background-position: 0px -32px; } .k-link:not(.k-state-disabled):hover > .k-pager-numbers .k-current-page .k-link:after, .k-link:not(.k-state-disabled):hover > .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-link:not(.k-state-disabled):hover > .k-gantt-views > .k-current-view > .k-link:after, .k-state-hover > .k-pager-numbers .k-current-page .k-link:after, .k-state-hover > .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-state-hover > .k-gantt-views > .k-current-view > .k-link:after, .k-state-hover > * > .k-pager-numbers .k-current-page .k-link:after, .k-state-hover > * > .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-state-hover > * > .k-gantt-views > .k-current-view > .k-link:after, .k-button:not(.k-state-disabled):hover .k-pager-numbers .k-current-page .k-link:after, .k-button:not(.k-state-disabled):hover .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-button:not(.k-state-disabled):hover .k-gantt-views > .k-current-view > .k-link:after, .k-textbox:hover .k-pager-numbers .k-current-page .k-link:after, .k-textbox:hover .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-textbox:hover .k-gantt-views > .k-current-view > .k-link:after, .k-button:active .k-pager-numbers .k-current-page .k-link:after, -.k-button:active .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after { +.k-button:active .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after, +.k-button:active .k-gantt-views > .k-current-view > .k-link:after { background-position: -16px -32px; } /* Colors */ @@ -1434,6 +1420,9 @@ html .k-error-colored { .k-loading-text { position: absolute; } +.k-loading-mask { + z-index: 100; +} .k-loading-text { text-indent: -4000px; text-align: center; @@ -1546,8 +1535,7 @@ html .k-error-colored { .k-block .k-header, .k-list-container { -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; + box-sizing: content-box; } .k-button, .k-textbox, @@ -1561,14 +1549,12 @@ div.k-window-content, .km-actionsheet > li, .km-shim { -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; } /* Fix for Bootstrap 3 */ .input-group .form-control { -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; } .form-control.k-widget { padding: 0; @@ -1577,9 +1563,8 @@ a.k-button:hover { text-decoration: none; } /* override iOS styles in mobile Kendo */ -.k-widget, -.k-widget * { - -moz-background-clip: border-box; +.km-widget, +.km-widget * { -webkit-background-clip: border-box; background-clip: border-box; } @@ -1689,13 +1674,20 @@ input.k-checkbox, } input.k-checkbox + label { -webkit-user-select: none; - user-select: none; } /* Off-screen container used during export */ .k-pdf-export-shadow { position: absolute; - overflow: visible; - left: -10000px; + overflow: hidden; + left: -15000px; + width: 14400px; +} +.km-native-scroller { + overflow: auto; + -webkit-overflow-scrolling: touch; + -ms-touch-action: pan-x pan-y; + -ms-overflow-style: -ms-autohiding-scrollbar; + -ms-scroll-snap-type: proximity; } /* responsive panel */ .k-rpanel-left { @@ -1731,11 +1723,11 @@ input.k-checkbox + label { } .k-rpanel-top { position: static; - overflow: hidden; max-height: 0; } .k-rpanel-top.k-rpanel-expanded { max-height: 568px; + overflow: visible !important; } .k-edit-form { margin: 0; @@ -1847,13 +1839,6 @@ div.k-window-iframecontent { .k-window-content > .km-scroll-container { height: 100%; } -/* Compensate for content padding in IE7 */ -.k-ie7 .k-window { - padding-bottom: 1.16em; -} -.k-ie7 .k-window-titleless { - padding-bottom: 0; -} .k-window-titlebar .k-window-actions { position: absolute; top: 0; @@ -1965,15 +1950,54 @@ div.k-window-iframecontent { filter: alpha(opacity=0); opacity: 0; } +.k-action-buttons { + clear: both; + text-align: right; + border-width: 1px 0 0; + border-style: solid; + position: relative; + bottom: -1em; + padding: .6em; + margin: 0 -1em; +} +.k-action-buttons .k-button { + display: inline-block; + margin: 0 0 0 6px; + min-width: 75px; +} /* TabStrip */ .k-tabstrip { margin: 0; padding: 0; zoom: 1; + position: relative; } -.k-tabstrip .k-tabstrip-items { +.k-tabstrip-items { padding: 0.3em 0.3em 0; } +.k-tabstrip-scrollable .k-tabstrip-items { + white-space: nowrap; + overflow: hidden; +} +.k-tabstrip > .k-button { + position: absolute; + top: .4em; + z-index: 2; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.k-tabstrip-bottom > .k-button { + top: auto; + bottom: .4em; +} +.k-tabstrip-prev { + left: .4em; +} +.k-tabstrip-next { + right: .4em; +} .k-tabstrip-items .k-item, .k-panelbar .k-tabstrip-items .k-item { list-style-type: none; @@ -2012,11 +2036,6 @@ div.k-window-iframecontent { margin: -3px 3px 0 -6px; vertical-align: middle; } -.k-ie7 .k-tabstrip-items .k-item .k-image, -.k-ie7 .k-tabstrip-items .k-item .k-sprite { - margin-top: -1px; - vertical-align: top; -} /* TabStrip Loading Progress */ .k-tabstrip-items .k-loading { top: 0; @@ -2028,28 +2047,20 @@ div.k-window-iframecontent { border-top: 1px solid transparent; border-color: inherit; -webkit-transition: width 200ms linear; - -moz-transition: width 200ms linear; - -o-transition: width 200ms linear; - transition: width 200ms linear; + transition: width 200ms linear; -webkit-transition: "width 200ms linear"; - -moz-transition: "width 200ms linear"; - -ms-transition: "width 200ms linear"; - -o-transition: "width 200ms linear"; - transition: "width 200ms linear"; - animation: k-tab-loader 1s ease-in-out infinite; - -moz-animation: k-tab-loader 1s ease-in-out infinite; + transition: "width 200ms linear"; -webkit-animation: k-tab-loader 1s ease-in-out infinite; + animation: k-tab-loader 1s ease-in-out infinite; } .k-tabstrip-items .k-progress { - animation: none; - -moz-animation: none; -webkit-animation: none; + animation: none; } .k-tabstrip-items .k-loading.k-complete { width: 100%; - animation: none; - -moz-animation: none; -webkit-animation: none; + animation: none; } .k-tabstrip > .k-content, .k-panelbar .k-tabstrip > .k-content { @@ -2062,6 +2073,7 @@ div.k-window-iframecontent { } .k-tabstrip > .k-content { display: none; + overflow: auto; } .k-tabstrip > .k-content.km-scroll-wrapper { padding: 0; @@ -2080,17 +2092,6 @@ div.k-window-iframecontent { left: 0; } } -@-moz-keyframes k-tab-loader { - 0% { - left: 0; - } - 50% { - left: 80%; - } - 100% { - left: 0; - } -} @keyframes k-tab-loader { 0% { left: 0; @@ -2107,57 +2108,57 @@ div.k-window-iframecontent { .k-tabstrip-right > div.k-content { margin: .286em .3em; } -.k-tabstrip-left .k-tabstrip-items .k-item, -.k-tabstrip-right .k-tabstrip-items .k-item { +.k-tabstrip-left > .k-tabstrip-items .k-item, +.k-tabstrip-right > .k-tabstrip-items .k-item { display: block; margin-bottom: -1px; } -.k-tabstrip-left .k-tabstrip-items .k-link, -.k-tabstrip-right .k-tabstrip-items .k-link { +.k-tabstrip-left > .k-tabstrip-items .k-link, +.k-tabstrip-right > .k-tabstrip-items .k-link { display: block; } -.k-tabstrip-left .k-tabstrip-items .k-tab-on-top, -.k-tabstrip-right .k-tabstrip-items .k-tab-on-top, -.k-tabstrip-left .k-tabstrip-items .k-state-active, -.k-tabstrip-right .k-tabstrip-items .k-state-active, -.k-tabstrip-left .k-panelbar .k-tabstrip-items .k-state-active, -.k-tabstrip-right .k-panelbar .k-tabstrip-items .k-state-active { +.k-tabstrip-left > .k-tabstrip-items .k-tab-on-top, +.k-tabstrip-right > .k-tabstrip-items .k-tab-on-top, +.k-tabstrip-left > .k-tabstrip-items .k-state-active, +.k-tabstrip-right > .k-tabstrip-items .k-state-active, +.k-panelbar .k-tabstrip-left > .k-tabstrip-items .k-state-active, +.k-panelbar .k-tabstrip-right > .k-tabstrip-items .k-state-active { margin-bottom: -1px; padding-bottom: 0; } /* left tabs */ -.k-tabstrip-left .k-tabstrip-items { +.k-tabstrip-left > .k-tabstrip-items { float: left; padding: .25em 0 .3em .3em; } -.k-tabstrip-left .k-tabstrip-items .k-item { +.k-tabstrip-left > .k-tabstrip-items .k-item { border-width: 1px 0 1px 1px; border-radius: 3px 0 0 3px; } -.k-tabstrip-left .k-tabstrip-items .k-state-active { +.k-tabstrip-left > .k-tabstrip-items .k-state-active { border-width: 1px 0 1px 1px; } -.k-tabstrip-left .k-tabstrip-items .k-tab-on-top, -.k-tabstrip-left .k-tabstrip-items .k-state-active, -.k-tabstrip-left .k-panelbar .k-tabstrip-items .k-state-active { +.k-tabstrip-left > .k-tabstrip-items .k-tab-on-top, +.k-tabstrip-left > .k-tabstrip-items .k-state-active, +.k-panelbar .k-tabstrip-left > .k-tabstrip-items .k-state-active { margin-right: -2px; padding-right: 1px; } /* right tabs */ -.k-tabstrip-right .k-tabstrip-items { +.k-tabstrip-right > .k-tabstrip-items { float: right; padding: .25em .3em .3em 0; } -.k-tabstrip-right .k-tabstrip-items .k-item { +.k-tabstrip-right > .k-tabstrip-items .k-item { border-width: 1px 1px 1px 0; border-radius: 0 3px 3px 0; } -.k-tabstrip-right .k-tabstrip-items .k-state-active { +.k-tabstrip-right > .k-tabstrip-items .k-state-active { border-width: 1px 1px 1px 0; } -.k-tabstrip-right .k-tabstrip-items .k-tab-on-top, -.k-tabstrip-right .k-tabstrip-items .k-state-active, -.k-tabstrip-right .k-panelbar .k-tabstrip-items .k-state-active { +.k-tabstrip-right > .k-tabstrip-items .k-tab-on-top, +.k-tabstrip-right > .k-tabstrip-items .k-state-active, +.k-panelbar .k-tabstrip-right > .k-tabstrip-items .k-state-active { margin-left: -1px; padding-left: 1px; } @@ -2183,7 +2184,7 @@ div.k-window-iframecontent { .k-tabstrip-bottom > .k-content { min-height: 100px; } -.k-tabstrip-bottom .k-tabstrip-items .k-loading { +.k-tabstrip-bottom > .k-tabstrip-items .k-loading { top: auto; bottom: 0; } @@ -2200,8 +2201,8 @@ div.k-window-iframecontent { zoom: 1; border-radius: 0; } -.k-panelbar .k-image, -.k-panelbar .k-sprite { +.k-panelbar .k-link > .k-image, +.k-panelbar .k-link > .k-sprite { float: left; margin-top: 4px; margin-right: 5px; @@ -2270,12 +2271,14 @@ div.k-window-iframecontent { .k-menu .k-item { -webkit-user-select: none; -moz-user-select: -moz-none; - user-select: none; + -ms-user-select: none; + user-select: none; } .k-menu .k-item div { -webkit-user-select: default; - -moz-user-select: default; - user-select: default; + -moz-user-select: default; + -ms-user-select: default; + user-select: default; } .k-menu .k-item .k-item, ul.k-menu-vertical > .k-item { @@ -2283,9 +2286,6 @@ ul.k-menu-vertical > .k-item { float: none; border-width: 0; } -.k-ie7 .k-menu .k-item .k-item { - zoom: normal; -} .k-menu .k-item > .k-link > .k-icon, .k-menu .k-image, .k-menu .k-sprite { @@ -2295,20 +2295,14 @@ ul.k-menu-vertical > .k-item { .k-menu .k-item > .k-link > .k-icon { margin: -2px 0 0; } -.k-ie7 .k-menu .k-item > .k-link > .k-i-arrow-s, -.k-ie7 .k-menu .k-image, -.k-ie7 .k-menu .k-sprite { - margin-top: 0; -} .k-menu .k-item > .k-link { display: block; padding: 0.5em 1.1em 0.4em; line-height: 1.34em; - -khtml-user-select: none; -webkit-user-select: none; - -moz-user-select: -moz-none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .k-menu .k-menu-group { display: none; @@ -2330,8 +2324,7 @@ ul.k-menu-vertical > .k-item { vertical-align: top; zoom: 1; -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; + box-sizing: content-box; } .k-context-menu.k-menu-vertical > .k-item > .k-link, .k-menu .k-menu-group .k-item > .k-link { @@ -2342,15 +2335,11 @@ ul.k-menu-vertical > .k-item { } .k-context-menu.k-menu-horizontal > .k-item { -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; } .k-context-menu.k-menu-horizontal > .k-last { border: 0; } -.k-ie7 .k-menu .k-menu-group .k-link { - width: 100%; -} .k-menu .k-item > .k-link > .k-i-arrow-s { margin-right: -8px; } @@ -2412,8 +2401,9 @@ ul.k-menu-vertical .k-separator, .k-context-menu { border: 0; -webkit-user-select: none; - -moz-user-select: -moz-none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } /* Calendar */ .k-calendar { @@ -2664,6 +2654,13 @@ span.k-dropdown, .k-space-right .k-icon { right: 3px; } +/*prevent missing bottom border at some zoom levels*/ +span.k-textbox:after { + content: "\a0"; + display: block; + height: .4px; + overflow: hidden; +} .k-autocomplete, .k-dropdown-wrap.k-state-focused, .k-dropdown-wrap.k-state-hover, @@ -2671,15 +2668,10 @@ span.k-dropdown, .k-picker-wrap.k-state-hover, .k-numeric-wrap.k-state-focused, .k-numeric-wrap.k-state-hover { - -webkit-transition: box-shadow .15s ease-out; - -moz-transition: box-shadow .15s ease-out; - -o-transition: box-shadow .15s ease-out; - transition: box-shadow .15s ease-out; + -webkit-transition: -webkit-box-shadow .15s ease-out; + transition: box-shadow .15s ease-out; -webkit-transition: "box-shadow .15s ease-out"; - -moz-transition: "box-shadow .15s ease-out"; - -ms-transition: "box-shadow .15s ease-out"; - -o-transition: "box-shadow .15s ease-out"; - transition: "box-shadow .15s ease-out"; + transition: "box-shadow .15s ease-out"; } .k-textbox > input, .k-picker-wrap .k-input, @@ -2700,12 +2692,6 @@ span.k-dropdown, .k-selectbox .k-input { background: transparent; } -.k-ie7 .k-picker-wrap .k-input, -.k-ie7 .k-numeric-wrap .k-input, -.k-ie7 .k-combobox .k-input { - margin: -1px 0; -} -/* removes excessive spacing */ .k-picker-wrap .k-select, .k-numeric-wrap .k-select, .k-dropdown-wrap .k-select { @@ -2763,15 +2749,20 @@ span.k-datetimepicker .k-select + .k-select { border: 0; margin: 0; } -/* fix missing bottom border on browser zoom in Chrome */ -.k-webkit .k-combobox .k-dropdown-wrap:before, -.k-webkit .k-picker-wrap:before, -.k-webkit .k-numeric-wrap:before { +.k-combobox .k-dropdown-wrap:before, +.k-picker-wrap:before, +.k-numeric-wrap:before { content: "\a0"; display: inline-block; width: 0; height: 1.65em; - padding-bottom: 0.4em; + padding-bottom: 0.3em; +} +/* fix missing bottom border on browser zoom in Chrome */ +.k-webkit .k-combobox .k-dropdown-wrap:before, +.k-webkit .k-picker-wrap:before, +.k-webkit .k-numeric-wrap:before { + padding-bottom: 0.38em; } /* above style breaks NumericTextBox layout due display:block style applied to the input */ .km.root .k-combobox .k-dropdown-wrap:before, @@ -2784,13 +2775,6 @@ span.k-datetimepicker .k-select + .k-select { .k-numeric-wrap .k-input { display: inline; } -.k-ie7 .k-autocomplete .k-input, -.k-ie7 .k-picker-wrap .k-input, -.k-ie7 .k-numeric-wrap .k-input, -.k-ie7 .k-dropdown-wrap .k-input, -.k-ie7 .k-selectbox .k-input { - text-indent: 0; -} .k-picker-wrap .k-select, .k-numeric-wrap .k-select, .k-dropdown-wrap .k-select { @@ -2808,13 +2792,6 @@ span.k-datetimepicker .k-select + .k-select { body .k-datetimepicker .k-select { border-radius: 0; } -.k-ie7 .k-picker-wrap .k-icon, -.k-ie7 .k-dropdown-wrap .k-icon { - line-height: 2em; - font-size: 1em; - padding-top: 16px; - height: 0; -} .k-combobox .k-icon, .k-dropdown, .k-selectbox .k-icon { @@ -2837,12 +2814,14 @@ body .k-datetimepicker .k-select { .k-popup .k-list .k-item, .k-fieldselector .k-list .k-item, .k-list-optionlabel, -.k-popup > .k-static-header { +.k-popup > .k-group-header, +.k-popup > .k-virtual-wrap > .k-group-header { padding: 1px 5px 1px 5px; line-height: 1.8em; min-height: 1.8em; } -.k-popup > .k-static-header { +.k-popup > .k-group-header, +.k-popup > .k-virtual-wrap > .k-group-header { padding-right: 22px; } .k-overflow-container .k-item { @@ -2876,8 +2855,8 @@ body .k-datetimepicker .k-select { } .k-list-filter > .k-icon { position: absolute; - right: 4px; - top: 3px; + right: 6px; + top: 1px; } /* MultiSelect */ .k-multiselect-wrap { @@ -2899,11 +2878,15 @@ body .k-datetimepicker .k-select { margin: 1px 0 0; float: left; } +.k-multiselect-wrap .k-input::-ms-clear { + display: none; +} .k-multiselect-wrap li { margin: 1px 0 1px 1px; - padding: .1em .15em .1em .4em; + padding: .1em 1.6em .1em .4em; line-height: 1.5em; float: left; + position: relative; } .k-autocomplete .k-loading, .k-multiselect .k-loading { @@ -2914,6 +2897,13 @@ body .k-datetimepicker .k-select { .k-multiselect .k-loading-hidden { visibility: hidden; } +.k-multiselect-wrap .k-select { + position: absolute; + top: 0; + bottom: 0; + right: 0; + padding: .1em .2em; +} /* Date/Time Pickers */ .k-datetimepicker .k-picker-wrap { padding-right: 3.8em; @@ -2952,6 +2942,9 @@ body .k-datetimepicker .k-select { } .k-textbox { outline: 0; +} +input.k-textbox, +textarea.k-textbox { padding: 2px .3em; } input.k-textbox { @@ -2965,18 +2958,9 @@ input.k-textbox { .k-ff input.k-textbox { height: 2.17em; } -.k-ie7 input.k-textbox { - line-height: 1.72em; - height: 1.72em; - text-indent: 0.33em; -} textarea.k-textbox { height: auto; } -.k-ie7 .k-textbox { - padding: 1px 0; - text-indent: 0; -} /* NumericTextBox */ span.k-numerictextbox { background-color: transparent; @@ -3034,7 +3018,7 @@ span.k-numerictextbox { bottom: -3px; border-radius: 0 !important; } -.k-colorpicker .k-icon { +.k-colorpicker .k-select { cursor: pointer; } .k-disabled-overlay { @@ -3065,12 +3049,20 @@ span.k-numerictextbox { overflow: hidden; -ms-high-contrast-adjust: none; } -.k-colorpalette .k-item.k-state-selected { +.k-colorpalette .k-item.k-state-selected, +.k-colorpalette .k-item.k-state-selected:hover { z-index: 100; background: transparent; - box-shadow: 0 1px 4px #000, inset 0 0 3px #fff; + -webkit-box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.45); + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.45); position: relative; } +.k-colorpalette .k-item:hover { + z-index: 101; + position: relative; + -webkit-box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.3); + box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.3); +} .k-flatcolorpicker { position: relative; display: inline-block; @@ -3095,11 +3087,10 @@ div.k-flatcolorpicker { } .k-flatcolorpicker .k-hsv-rectangle { position: relative; - -khtml-user-select: none; -webkit-user-select: none; - -moz-user-select: -moz-none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; -ms-touch-action: pinch-zoom double-tap-zoom; } .k-flatcolorpicker .k-hsv-rectangle .k-draghandle { @@ -3115,7 +3106,7 @@ div.k-flatcolorpicker { margin-top: -5px; border-radius: 6px; -webkit-box-shadow: 0 1px 2px #444444; - box-shadow: 0 1px 2px #444444; + box-shadow: 0 1px 2px #444444; background: transparent; } .k-flatcolorpicker .k-hsv-rectangle .k-draghandle:hover, @@ -3123,7 +3114,7 @@ div.k-flatcolorpicker { background: transparent; border-color: #fff; -webkit-box-shadow: 0 1px 5px #000000; - box-shadow: 0 1px 5px #000000; + box-shadow: 0 1px 5px #000000; } .k-flatcolorpicker .k-hsv-rectangle.k-dragging, .k-flatcolorpicker .k-hsv-rectangle.k-dragging * { @@ -3136,7 +3127,7 @@ div.k-flatcolorpicker { } .k-flatcolorpicker .k-slider-horizontal .k-slider-track { -webkit-box-shadow: 0 1px 0 #fff, 0 -1px 0 #999; - box-shadow: 0 1px 0 #fff, 0 -1px 0 #999; + box-shadow: 0 1px 0 #fff, 0 -1px 0 #999; } .k-flatcolorpicker .k-hue-slider, .k-flatcolorpicker .k-transparency-slider { @@ -3154,7 +3145,7 @@ div.k-flatcolorpicker { height: 8px; width: 8px; -webkit-box-shadow: 0 1px 4px #444444; - box-shadow: 0 1px 4px #444444; + box-shadow: 0 1px 4px #444444; } .k-flatcolorpicker .k-hue-slider .k-draghandle:hover, .k-flatcolorpicker .k-transparency-slider .k-draghandle:hover, @@ -3163,27 +3154,19 @@ div.k-flatcolorpicker { background: transparent; border-color: #fff; -webkit-box-shadow: 0 1px 5px #000000; - box-shadow: 0 1px 5px #000000; + box-shadow: 0 1px 5px #000000; border-width: 2px; padding: 1px; } .k-flatcolorpicker .k-hue-slider .k-slider-track { - background: -moz-linear-gradient(left, #ff0000 0%, #ffff00 16%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 84%, #ff0004 100%); - /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right top, color-stop(0%, #ff0000), color-stop(16%, #ffff00), color-stop(33%, #00ff00), color-stop(50%, #00ffff), color-stop(67%, #0000ff), color-stop(84%, #ff00ff), color-stop(100%, #ff0004)); - /* Chrome,Safari4+ */ + background: -webkit-gradient(linear, left top, right top, from(#ff0000), color-stop(16%, #ffff00), color-stop(33%, #00ff00), color-stop(50%, #00ffff), color-stop(67%, #0000ff), color-stop(84%, #ff00ff), to(#ff0004)); background: -webkit-linear-gradient(left, #ff0000 0%, #ffff00 16%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 84%, #ff0004 100%); - /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(left, #ff0000 0%, #ffff00 16%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 84%, #ff0004 100%); - /* Opera 11.10+ */ - background: -ms-linear-gradient(left, #ff0000 0%, #ffff00 16%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 84%, #ff0004 100%); - /* IE10+ */ - background: -left-linear-gradient(left,#ff0000 0%,#ffff00 16%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 84%,#ff0004 100%); - /* W3C */ + background: linear-gradient(to right, #ff0000 0%, #ffff00 16%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 84%, #ff0004 100%); } .k-flatcolorpicker .k-transparency-slider .k-slider-track { background-image: url("textures/transparency.png"); - background-size: 100% auto; + -webkit-background-size: 100% auto; + background-size: 100% auto; background-position: 100% 50%; background-repeat: no-repeat; } @@ -3197,18 +3180,9 @@ div.k-flatcolorpicker { width: 6em; } .k-flatcolorpicker .k-hsv-gradient { - background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 100%), /* FF3.6+ */ -moz-linear-gradient(left, #ffffff 0%, rgba(255, 255, 255, 0) 100%); - /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, #000000)), /* Chrome,Safari4+ */ -webkit-gradient(linear, left top, right top, color-stop(0%, #ffffff), color-stop(100%, rgba(255, 255, 255, 0))); - /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 100%), /* Chrome10+,Safari5.1+ */ -webkit-linear-gradient(left, #ffffff 0%, rgba(255, 255, 255, 0) 100%); - /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 100%), /* Opera 11.10+ */ -o-linear-gradient(left, #ffffff 0%, rgba(255, 255, 255, 0) 100%); - /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 100%), /* IE10+ */ -ms-linear-gradient(left, #ffffff 0%, rgba(255, 255, 255, 0) 100%); - /* IE10+ */ - background: -top-linear-gradient(top,rgba(0,0,0,0) 0%,#000000 100%), /* W3C */ -left-linear-gradient(left,#ffffff 0%,rgba(255,255,255,0) 100%); - /* W3C */ + background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(#000000)), -webkit-gradient(linear, left top, right top, from(#ffffff), to(rgba(255, 255, 255, 0))); + background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, #000000 100%), -webkit-linear-gradient(left, #ffffff 0%, rgba(255, 255, 255, 0) 100%); + background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000000 100%), linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%); height: 180px; margin-bottom: 5px; } @@ -3218,15 +3192,12 @@ div.k-flatcolorpicker { .k-ie9 .k-flatcolorpicker .k-hsv-gradient { background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); } -.k-ie7 .k-flatcolorpicker .k-hue-slider .k-slider-track, .k-ie8 .k-flatcolorpicker .k-hue-slider .k-slider-track { background: url("textures/hue.png") repeat 0 50%; } -.k-ie7 .k-flatcolorpicker .k-transparency-slider .k-slider-track, .k-ie8 .k-flatcolorpicker .k-transparency-slider .k-slider-track { background: url("textures/transparency.png") repeat 0 50%; } -.k-ie7 .k-flatcolorpicker .k-hsv-gradient, .k-ie8 .k-flatcolorpicker .k-hsv-gradient { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#00ffffff',GradientType=1) progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#ff000000',GradientType=0); } @@ -3331,7 +3302,7 @@ div.k-flatcolorpicker { } .k-progressbar-horizontal .k-item, .k-rtl .k-progressbar-horizontal.k-progressbar-reverse .k-item { - border-width: 1px 1px 1px 0; + border-width: 1px 0 1px 1px; } .k-progressbar-horizontal.k-progressbar-reverse .k-item, .k-rtl .k-progressbar-horizontal .k-item { @@ -3340,17 +3311,22 @@ div.k-flatcolorpicker { .k-progressbar-horizontal .k-first, .k-rtl .k-progressbar-horizontal .k-last, .k-rtl .k-progressbar-horizontal.k-progressbar-reverse .k-last { - border-radius: 4px 0 0 4px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; border-left-width: 1px; } .k-progressbar-horizontal .k-last, .k-rtl .k-progressbar-horizontal .k-first { - border-radius: 0 4px 4px 0; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; } .k-progressbar-horizontal.k-progressbar-reverse .k-last, .k-rtl .k-progressbar-horizontal .k-first { border-right-width: 1px; } +.k-progressbar-horizontal .k-last.k-state-selected { + border-right-width: 1px; +} .k-progressbar-vertical .k-item { width: 100%; border-style: solid; @@ -3364,10 +3340,12 @@ div.k-flatcolorpicker { border-bottom-width: 0; } .k-progressbar-vertical .k-first { - border-radius: 4px 4px 0 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; } .k-progressbar-vertical .k-last { - border-radius: 0 0 4px 4px; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; border-bottom-width: 1px; } .k-progressbar-vertical.k-progressbar-reverse .k-item { @@ -3417,31 +3395,19 @@ div.k-flatcolorpicker { } .k-progressbar-vertical .k-progress-status { -webkit-transform: rotate(-90deg) translateX(-100%); - -moz-transform: rotate(-90deg) translateX(-100%); - -ms-transform: rotate(-90deg) translateX(-100%); - -o-transform: rotate(-90deg) translateX(-100%); - transform: rotate(-90deg) translateX(-100%); + -ms-transform: rotate(-90deg) translateX(-100%); + transform: rotate(-90deg) translateX(-100%); -webkit-transform-origin: 0 0; - -moz-transform-origin: 0 0; - -ms-transform-origin: 0 0; - -o-transform-origin: 0 0; - transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; } .k-progressbar-vertical.k-progressbar-reverse .k-progress-status { -webkit-transform: rotate(90deg) translateX(-100%); - -moz-transform: rotate(90deg) translateX(-100%); - -ms-transform: rotate(90deg) translateX(-100%); - -o-transform: rotate(90deg) translateX(-100%); - transform: rotate(90deg) translateX(-100%); + -ms-transform: rotate(90deg) translateX(-100%); + transform: rotate(90deg) translateX(-100%); -webkit-transform-origin: 0 100%; - -moz-transform-origin: 0 100%; - -ms-transform-origin: 0 100%; - -o-transform-origin: 0 100%; - transform-origin: 0 100%; -} -.k-ie7 .k-progressbar-vertical .k-progress-status { - writing-mode: tb-rl; - padding: .5em 0; + -ms-transform-origin: 0 100%; + transform-origin: 0 100%; } .k-ie8 .k-progressbar-vertical .k-progress-status { writing-mode: bt-lr; @@ -3452,11 +3418,10 @@ div.k-slider { position: relative; border-width: 0; background-color: transparent; - -khtml-user-select: none; -webkit-user-select: none; - -moz-user-select: -moz-none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .k-slider-vertical { width: 26px; @@ -3511,9 +3476,6 @@ div.k-slider { .k-slider .k-tick { cursor: pointer; } -.k-ie7 .k-slider .k-icon { - margin-top: 2px; -} .k-slider-track, .k-slider-selection { position: absolute; @@ -3591,12 +3553,6 @@ div.k-slider { height: 100%; text-align: center; } -/* fixes ticks position and removes spacing between them in IE7 */ -.k-ie7 .k-slider-vertical .k-tick { - float: left; - clear: left; - width: 100%; -} .k-slider-horizontal .k-tick { background-position: center -92px; } @@ -3758,8 +3714,8 @@ div.k-slider { position: absolute; z-index: 12000; border-style: solid; - border-width: 1px; - padding: 4px 5px 4px 6px; + border-width: 0; + padding: 5px 5px 5px 6px; background-repeat: repeat-x; min-width: 20px; /*slider tooltip only*/ @@ -3794,20 +3750,20 @@ span.k-tooltip { border-color: transparent; } .k-callout-n { - top: -13px; + top: -12px; left: 50%; } .k-callout-w { top: 50%; - left: -13px; + left: -12px; } .k-callout-s { left: 50%; - bottom: -13px; + bottom: -12px; } .k-callout-e { top: 50%; - right: -13px; + right: -12px; } .k-slider-tooltip .k-callout-n, .k-slider-tooltip .k-callout-s { @@ -4007,11 +3963,10 @@ span.k-tooltip { border-style: solid; font-size: 0; outline: 0; - -khtml-user-select: none; -webkit-user-select: none; - -moz-user-select: -moz-none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .k-splitter .k-ghost-splitbar-horizontal, .k-splitter .k-splitbar-horizontal { @@ -4197,26 +4152,275 @@ span.k-tooltip { .k-ie7 .k-task-summary, .k-ie7 .k-task-actions:first-child > .k-link, .k-ie7 .k-task-wrap:hover .k-task-delete, -.k-ie7 .k-task-wrap-active .k-task-delete { +.k-ie7 .k-task-wrap-active .k-task-delete, +.k-ie7 .k-navigator, +.k-ie7 .k-zoom-control, +.k-ie7 .k-sparkline, +.k-ie7 .k-sparkline span { display: inline; zoom: 1; } +/* IE7 zooms */ .k-ie7 .k-treeview .k-item, .k-ie7 .k-treeview .k-group { zoom: 1; } +/* IE7 textboxes */ .k-ie7 .k-edit-field > .k-textbox { text-indent: 0; } -/* Virtual List */ -.k-virtual-wrap { +/* IE7 icons */ +.k-ie7 .k-icon, +.k-ie7 .k-sprite { + text-indent: 0; +} +/* IE7 disabled state */ +.k-ie7 .k-state-disabled { + filter: alpha(opacity=70); +} +/* IE7 Button */ +.k-ie7 .k-button { + line-height: normal; + overflow: visible; + margin-right: 4px; +} +.k-ie7 a.k-button { + line-height: 1.6; + padding-left: 7px; + padding-right: 7px; + /*+1*/ +} +.k-ie7 .k-button-expand { + margin-left: 0; + margin-right: 0; +} +.k-ie7 a.k-button-icon { + padding-left: 5px; + padding-right: 5px; + /*+1*/ +} +/* IE7 input widgets */ +.k-ie7 .k-picker-wrap .k-input, +.k-ie7 .k-numeric-wrap .k-input, +.k-ie7 .k-combobox .k-input { + margin: -1px 0; +} +/* removes excessive spacing */ +.k-ie7 .k-autocomplete .k-input, +.k-ie7 .k-picker-wrap .k-input, +.k-ie7 .k-numeric-wrap .k-input, +.k-ie7 .k-dropdown-wrap .k-input, +.k-ie7 .k-selectbox .k-input { + text-indent: 0; +} +.k-ie7 .k-picker-wrap .k-icon, +.k-ie7 .k-dropdown-wrap .k-icon { + /*use alternative approach for vertical expansion, instead of min-height and height*/ + line-height: 2em; + font-size: 1em; + padding-top: 16px; + height: 0; +} +.k-ie7 input.k-textbox { + line-height: 1.72em; + height: 1.72em; + text-indent: .33em; +} +.k-ie7 .k-textbox { + padding: 1px 0; + text-indent: 0; +} +/*IE7 ColorPicker*/ +.k-ie7 .k-flatcolorpicker .k-hue-slider .k-slider-track { + background: url("textures/hue.png") repeat 0 50%; +} +.k-ie7 .k-flatcolorpicker .k-transparency-slider .k-slider-track { + background: url("textures/transparency.png") repeat 0 50%; +} +.k-ie7 .k-flatcolorpicker .k-hsv-gradient { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#00ffffff',GradientType=1) progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#ff000000',GradientType=0); +} +/*IE7 Editor*/ +.k-ie7 .k-editor-toolbar li { + display: inline; + /* required. Floats and the inline-block hack break it */ +} +.k-ie7 .k-filebrowser .k-upload-button, +.k-ie7 .k-filebrowser .k-upload .k-icon { + vertical-align: baseline; + position: relative; + top: 1px; +} +.k-ie7 .k-filebrowser .k-upload .k-icon { + top: 2px; +} +.k-ie7 .k-filebrowser .k-filebrowser-toolbar .k-button-icon { + vertical-align: middle; +} +/*IE7 Gantt*/ +.k-ie7 .k-task-milestone { + margin-left: 1px; + /*+1*/ +} +/* IE7 Grid */ +.k-ie7 .k-grid-content table { + width: auto; +} +.k-ie7 .k-pager-wrap .k-textbox { + height: 1.3333em; + margin-top: 0.16666em; + display: inline; +} +.k-ie7 .k-pager-sizes { + float: left; +} +.k-ie7 .k-dirty-cell { + position: relative; +} +.k-ie7 .k-dirty { + top: 5px; +} +.k-ie7 .k-grid-actions { + vertical-align: bottom; +} +.k-ie7 .k-grid tbody a.k-button { + min-width: 62px; + /*-2*/ +} +.k-ie7 .k-edit-cell > .text-box, +.k-ie7 .k-edit-cell > .k-textbox, +.k-ie7 .k-edit-cell > .k-widget, +.k-ie7 .k-grid-edit-row > td > .k-textbox, +.k-ie7 .k-grid-edit-row > td > .k-widget, +.k-ie7 .k-grid-edit-row > td > .text-box { + display: block; + width: 90%; +} +.k-ie7 .k-multicheck-wrap { position: relative; } -.k-virtual-wrap > .k-list { +/*IE7 Menu*/ +.k-ie7 .k-menu .k-item .k-item { + zoom: normal; +} +.k-ie7 .k-menu .k-item > .k-link > .k-i-arrow-s, +.k-ie7 .k-menu .k-image, +.k-ie7 .k-menu .k-sprite { + margin-top: 0; + /*+2*/ +} +.k-ie7 .k-menu .k-menu-group .k-link { + width: 100%; +} +/*IE7 ProgressBar */ +.k-ie7 .k-progressbar-vertical .k-progress-status { + /*instead of transforms*/ + writing-mode: tb-rl; + padding: .5em 0; +} +/*IE7 Scheduler*/ +.k-ie7 .k-scheduler-toolbar .k-nav-prev .k-link, +.k-ie7 .k-scheduler-toolbar .k-nav-next .k-link { + height: 2.3em; + margin-top: -1px; + vertical-align: middle; +} +.k-ie7 .k-scheduler-toolbar .k-nav-prev .k-link .k-icon, +.k-ie7 .k-scheduler-toolbar .k-nav-next .k-link .k-icon { + margin-top: .5em; +} +.k-ie7 .k-scheduler-content .k-scheduler-table { + width: auto; +} +/* IE7 Slider */ +.k-ie7 .k-slider .k-icon { + margin-top: 2px; +} +/* fixes ticks position and removes spacing between them in IE7 */ +.k-ie7 .k-slider-vertical .k-tick { + float: left; + clear: left; + width: 100%; +} +.k-ie7 .k-slider a.k-button { + height: 22px; + line-height: 22px; + padding: 0; +} +/*IE7 TabStrip */ +.k-ie7 .k-tabstrip-items .k-item .k-image, +.k-ie7 .k-tabstrip-items .k-item .k-sprite { + margin-top: -1px; + vertical-align: top; +} +/* IE7 Upload */ +.k-ie7 .k-dropzone em, +.k-ie7 .k-upload-button { + vertical-align: baseline; +} +.k-ie7 .k-upload-button { + margin: .8em; +} +.k-ie7 .k-upload-files .k-button { + line-height: 1; +} +/*IE7*/ +.k-ie7 .k-upload-selected { + min-width: 100px; +} +/* IE7 Window */ +/* Compensate for content padding in IE7 */ +.k-ie7 .k-window { + padding-bottom: 1.16em; +} +.k-ie7 .k-window-titleless { + padding-bottom: 0; +} +/* IE7 Map */ +.k-ie7 .k-navigator > button { + border-width: 0; + display: block; +} +.k-ie7 .k-navigator > button > span { + vertical-align: top; + display: block; +} +.k-ie7 div.k-navigator .k-navigator-n, +.k-ie7 div.k-navigator .k-navigator-s { + margin-left: -8px; + /*+1*/ +} +.k-ie7 div.k-navigator .k-navigator-w, +.k-ie7 div.k-navigator .k-navigator-e { + margin-top: -8px; + /*+1*/ +} +.k-ie7 .k-zoom-control .k-button { margin: 0; + /*-14*/ +} +/*IE7 TreeMap */ +.k-ie7 .k-treemap .k-treemap-tile { + border-width: 0; padding: 0; } -.k-virtual-list { +.k-ie7 .k-treemap .k-leaf > div { + padding: 7px; +} +.k-ie7 .k-treemap .k-leaf.k-state-hover { + border-width: 1px; +} +.k-ie7 .k-treemap .k-leaf.k-state-hover > div { + padding: 6px; +} +/* Virtual List */ +.k-virtual-wrap { + position: relative; +} +.k-virtual-wrap .k-list.k-virtual-list { + height: auto; +} +.k-virtual-content { overflow-y: scroll; /* has to be scroll, not auto */ -webkit-overflow-scrolling: touch; @@ -4239,39 +4443,49 @@ span.k-tooltip { .k-virtual-wrap > .k-virtual-header { text-align: right; } -.k-popup .k-list .k-item.k-virtual-item { - /*padding: 1px 0;*/ +.k-popup .k-item.k-first { + position: relative; } -.k-virtual-list .k-virtual-item { +.k-virtual-content > .k-virtual-list > .k-virtual-item { position: absolute; width: 100%; - box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + white-space: nowrap; } -.k-popup .k-item.k-first { - position: relative; +.k-popup .k-list .k-item > .k-group, +.k-popup > .k-group-header, +.k-popup > .k-virtual-wrap > .k-group-header { + text-transform: uppercase; + font-size: .857em; } -.k-popup .k-item > .k-group { - background: none; +.k-popup .k-list .k-item > .k-group { position: absolute; top: 0; - right: .3em; + right: 0; + padding: 0 .5em; + line-height: 1.8; } -.k-popup .k-item.k-first, -.k-virtual-item.k-first { - border-bottom-style: solid; - border-bottom-width: 1px; +.k-popup .k-state-hover > .k-group { + right: -1px; +} +.k-virtual-item.k-first, +.k-group-header + .k-list > .k-item.k-first, +.k-static-header + .k-list > .k-item.k-first { + border-top-style: solid; + border-top-width: 1px; + padding-top: 0; } -.k-popup > .k-static-header { +.k-popup > .k-group-header, +.k-popup > .k-virtual-wrap > .k-group-header { text-align: right; } /* animation classes */ .k-fx-end .k-fx-next, .k-fx-end .k-fx-current { -webkit-transition: all 350ms ease-out; - -moz-transition: all 350ms ease-out; - -ms-transition: all 350ms ease-out; - -o-transition: all 350ms ease-out; - transition: all 350ms ease-out; + transition: all 350ms ease-out; } .k-fx { position: relative; @@ -4295,39 +4509,29 @@ span.k-tooltip { /* Zoom */ .k-fx-zoom.k-fx-start .k-fx-next { -webkit-transform: scale(0) !important; - -moz-transform: scale(0) !important; - -ms-transform: scale(0) !important; - -o-transform: scale(0) !important; - transform: scale(0) !important; + -ms-transform: scale(0) !important; + transform: scale(0) !important; } .k-fx-zoom.k-fx-end .k-fx-next { -webkit-transform: scale(1) !important; - -moz-transform: scale(1) !important; - -ms-transform: scale(1) !important; - -o-transform: scale(1) !important; - transform: scale(1) !important; + -ms-transform: scale(1) !important; + transform: scale(1) !important; } .k-fx-zoom.k-fx-reverse.k-fx-start .k-fx-next, .k-fx-zoom.k-fx-reverse.k-fx-end .k-fx-next { -webkit-transform: scale(1) !important; - -moz-transform: scale(1) !important; - -ms-transform: scale(1) !important; - -o-transform: scale(1) !important; - transform: scale(1) !important; + -ms-transform: scale(1) !important; + transform: scale(1) !important; } .k-fx-zoom.k-fx-reverse.k-fx-start .k-fx-current { -webkit-transform: scale(1) !important; - -moz-transform: scale(1) !important; - -ms-transform: scale(1) !important; - -o-transform: scale(1) !important; - transform: scale(1) !important; + -ms-transform: scale(1) !important; + transform: scale(1) !important; } .k-fx-zoom.k-fx-reverse.k-fx-end .k-fx-current { -webkit-transform: scale(0) !important; - -moz-transform: scale(0) !important; - -ms-transform: scale(0) !important; - -o-transform: scale(0) !important; - transform: scale(0) !important; + -ms-transform: scale(0) !important; + transform: scale(0) !important; } /* Fade */ .k-fx-fade.k-fx-start .k-fx-next { @@ -4357,18 +4561,13 @@ span.k-tooltip { .k-fx-slide.k-fx-end .k-fx-current .km-header, .k-fx-slide.k-fx-end .k-fx-current .km-footer { -webkit-transition: all 350ms ease-out; - -moz-transition: all 350ms ease-out; - -ms-transition: all 350ms ease-out; - -o-transition: all 350ms ease-out; - transition: all 350ms ease-out; + transition: all 350ms ease-out; } .k-fx-slide.k-fx-start .k-fx-next .km-content { will-change: transform; -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-slide.k-fx-start .k-fx-next .km-header, .k-fx-slide.k-fx-start .k-fx-next .km-footer { @@ -4377,10 +4576,8 @@ span.k-tooltip { } .k-fx-slide.k-fx-end .k-fx-current .km-content { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-slide.k-fx-end .k-fx-next .km-header, .k-fx-slide.k-fx-end .k-fx-next .km-footer { @@ -4389,31 +4586,23 @@ span.k-tooltip { .k-fx-slide.k-fx-reverse.k-fx-start .k-fx-current .km-content { will-change: transform; -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-slide.k-fx-reverse.k-fx-end .k-fx-current .km-content { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-slide.k-fx-reverse.k-fx-start .k-fx-next .km-content { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-slide.k-fx-reverse.k-fx-end .k-fx-next .km-content { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-slide.k-fx-reverse.k-fx-start .k-fx-current .km-header, .k-fx-slide.k-fx-reverse.k-fx-start .k-fx-current .km-footer { @@ -4437,45 +4626,33 @@ span.k-tooltip { } .k-fx-slide.k-fx-right.k-fx-start .k-fx-next .km-content { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-slide.k-fx-right.k-fx-end .k-fx-current .km-content { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-slide.k-fx-right.k-fx-reverse.k-fx-start .k-fx-current .km-content { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-slide.k-fx-right.k-fx-reverse.k-fx-end .k-fx-current .km-content { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-slide.k-fx-right.k-fx-reverse.k-fx-start .k-fx-next .km-content { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-slide.k-fx-right.k-fx-reverse.k-fx-end .k-fx-next .km-content { -webkit-transform: translatex(0%); - -moz-transform: translatex(0%); - -ms-transform: translatex(0%); - -o-transform: translatex(0%); - transform: translatex(0%); + -ms-transform: translatex(0%); + transform: translatex(0%); } /* Tile */ .k-fx-tile { @@ -4486,91 +4663,67 @@ span.k-tooltip { .k-fx-tile.k-fx-start .k-fx-next { will-change: transform; -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-end .k-fx-current { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-reverse.k-fx-start .k-fx-current { will-change: transform; -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-reverse.k-fx-end .k-fx-current { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-reverse.k-fx-start .k-fx-next { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-reverse.k-fx-end .k-fx-next { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-right { /* right reverse */ } .k-fx-tile.k-fx-right.k-fx-start .k-fx-next { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-right.k-fx-end .k-fx-current { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-start .k-fx-current { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-end .k-fx-current { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-start .k-fx-next { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-end .k-fx-next { -webkit-transform: translatex(0%); - -moz-transform: translatex(0%); - -ms-transform: translatex(0%); - -o-transform: translatex(0%); - transform: translatex(0%); + -ms-transform: translatex(0%); + transform: translatex(0%); } /* Tile */ .k-fx-tile { @@ -4581,164 +4734,120 @@ span.k-tooltip { .k-fx-tile.k-fx-start .k-fx-next { will-change: transform; -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-end .k-fx-current { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-reverse.k-fx-start .k-fx-current { will-change: transform; -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-reverse.k-fx-end .k-fx-current { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-reverse.k-fx-start .k-fx-next { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-reverse.k-fx-end .k-fx-next { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-right { /* right reverse */ } .k-fx-tile.k-fx-right.k-fx-start .k-fx-next { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-right.k-fx-end .k-fx-current { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-start .k-fx-current { -webkit-transform: translatex(0); - -moz-transform: translatex(0); - -ms-transform: translatex(0); - -o-transform: translatex(0); - transform: translatex(0); + -ms-transform: translatex(0); + transform: translatex(0); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-end .k-fx-current { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-start .k-fx-next { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx-tile.k-fx-right.k-fx-reverse.k-fx-end .k-fx-next { -webkit-transform: translatex(0%); - -moz-transform: translatex(0%); - -ms-transform: translatex(0%); - -o-transform: translatex(0%); - transform: translatex(0%); + -ms-transform: translatex(0%); + transform: translatex(0%); } /* Overlay */ .k-fx.k-fx-overlay.k-fx-start .k-fx-next, .k-fx.k-fx-overlay.k-fx-left.k-fx-start .k-fx-next { will-change: transform; -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx.k-fx-overlay.k-fx-right.k-fx-start .k-fx-next { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx.k-fx-overlay.k-fx-up.k-fx-start .k-fx-next { -webkit-transform: translatey(100%); - -moz-transform: translatey(100%); - -ms-transform: translatey(100%); - -o-transform: translatey(100%); - transform: translatey(100%); + -ms-transform: translatey(100%); + transform: translatey(100%); } .k-fx.k-fx-overlay.k-fx-down.k-fx-start .k-fx-next { -webkit-transform: translatey(-100%); - -moz-transform: translatey(-100%); - -ms-transform: translatey(-100%); - -o-transform: translatey(-100%); - transform: translatey(-100%); + -ms-transform: translatey(-100%); + transform: translatey(-100%); } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-start .k-fx-next { -webkit-transform: none; - -moz-transform: none; - -ms-transform: none; - -o-transform: none; - transform: none; + -ms-transform: none; + transform: none; } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-start .k-fx-current { will-change: transform; -webkit-transform: none; - -moz-transform: none; - -ms-transform: none; - -o-transform: none; - transform: none; + -ms-transform: none; + transform: none; } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-end .k-fx-current, .k-fx.k-fx-overlay.k-fx-reverse.k-fx-left.k-fx-end .k-fx-current { -webkit-transform: translatex(100%); - -moz-transform: translatex(100%); - -ms-transform: translatex(100%); - -o-transform: translatex(100%); - transform: translatex(100%); + -ms-transform: translatex(100%); + transform: translatex(100%); } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-right.k-fx-end .k-fx-current { -webkit-transform: translatex(-100%); - -moz-transform: translatex(-100%); - -ms-transform: translatex(-100%); - -o-transform: translatex(-100%); - transform: translatex(-100%); + -ms-transform: translatex(-100%); + transform: translatex(-100%); } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-up.k-fx-end .k-fx-current { -webkit-transform: translatey(100%); - -moz-transform: translatey(100%); - -ms-transform: translatey(100%); - -o-transform: translatey(100%); - transform: translatey(100%); + -ms-transform: translatey(100%); + transform: translatey(100%); } .k-fx.k-fx-overlay.k-fx-reverse.k-fx-down.k-fx-end .k-fx-current { -webkit-transform: translatey(-100%); - -moz-transform: translatey(-100%); - -ms-transform: translatey(-100%); - -o-transform: translatey(-100%); - transform: translatey(-100%); + -ms-transform: translatey(-100%); + transform: translatey(-100%); } diff --git a/vendor/kendo/kendo.core.js b/vendor/kendo/kendo.core.js index 4a14045..8ef5128 100644 --- a/vendor/kendo/kendo.core.js +++ b/vendor/kendo/kendo.core.js @@ -494,6 +494,8 @@ function pad(number, digits, end) { symbol: "%" }, currency: { + name: "US Dollar", + abbr: "USD", pattern: ["($n)", "$n"], decimals: 2, ",": ",", @@ -1194,6 +1196,8 @@ function pad(number, digits, end) { var i = 0, length = names.length, name, nameLength, + matchLength = 0, + matchIdx = 0, subValue; for (; i < length; i++) { @@ -1205,11 +1209,17 @@ function pad(number, digits, end) { subValue = subValue.toLowerCase(); } - if (subValue == name) { - valueIdx += nameLength; - return i + 1; + if (subValue == name && nameLength > matchLength) { + matchLength = nameLength; + matchIdx = i; } } + + if (matchLength) { + valueIdx += matchLength; + return matchIdx + 1; + } + return null; }, checkLiteral = function() { @@ -1269,6 +1279,10 @@ function pad(number, digits, end) { calendar._lowerDays = lowerLocalInfo(calendar.days); } + if (day !== null && count > 2) { + continue; + } + day = count < 3 ? getNumber(2) : getIndexByName(calendar._lowerDays[count == 3 ? "namesAbbr" : "names"], true); if (day === null || outOfRange(day, 1, 31)) { @@ -1478,7 +1492,6 @@ function pad(number, digits, end) { var date = null; var length, patterns; var tzoffset; - var sign; if (value && value.indexOf("/D") === 0) { date = dateRegExp.exec(value); @@ -1841,6 +1854,38 @@ function pad(number, digits, end) { return styles; } + function isScrollable(element) { + if (element.className.indexOf("k-auto-scrollable") > -1) { + return true; + } + + var overflow = getComputedStyles(element, ["overflow"]).overflow; + return overflow == "auto" || overflow == "scroll"; + } + + function scrollLeft(element, value) { + var el = element instanceof $ ? element[0] : element; + var isRtl = support.isRtl(element); + var webkit = support.browser.webkit; + var mozila = support.browser.mozilla; + + if (value !== undefined) { + if (isRtl && webkit) { + el.scrollLeft = el.scrollWidth - el.clientWidth - value; + } else if (isRtl && mozila) { + el.scrollLeft = -value; + } else { + el.scrollLeft = value; + } + } else { + if (isRtl && webkit) { + return el.scrollWidth - el.clientWidth - el.scrollLeft; + } else { + return Math.abs(el.scrollLeft); + } + } + } + (function () { support._scrollbar = undefined; @@ -2012,6 +2057,7 @@ function pad(number, digits, end) { support.detectBrowser = function(ua) { var browser = false, match = [], browserRxs = { + edge: /(edge)[ \/]([\w.]+)/i, webkit: /(chrome)[ \/]([\w.]+)/i, safari: /(webkit)[ \/]([\w.]+)/i, opera: /(opera)(?:.*version|)[ \/]([\w.]+)/i, @@ -2040,8 +2086,16 @@ function pad(number, digits, end) { support.zoomLevel = function() { try { - return support.touch ? (document.documentElement.clientWidth / window.innerWidth) : - support.browser.msie && support.browser.version >= 10 ? ((top || window).document.documentElement.offsetWidth / (top || window).innerWidth) : 1; + var browser = support.browser; + var ie11WidthCorrection = 0; + var docEl = document.documentElement; + + if (browser.msie && browser.version == 11 && docEl.scrollHeight > docEl.clientHeight && !support.touch) { + ie11WidthCorrection = support.scrollbar(); + } + + return support.touch ? (docEl.clientWidth / window.innerWidth) : + browser.msie && browser.version >= 10 ? (((top || window).document.documentElement.offsetWidth + ie11WidthCorrection) / (top || window).innerWidth) : 1; } catch(e) { return 1; } @@ -2065,6 +2119,8 @@ function pad(number, digits, end) { cssClass = "webkit"; } else if (browser.opera) { cssClass = "opera"; + } else if (browser.edge) { + cssClass = "edge"; } if (cssClass) { @@ -2154,6 +2210,8 @@ function pad(number, digits, end) { var documentMode = document.documentMode; support.hashChange = ("onhashchange" in window) && !(support.browser.msie && (!documentMode || documentMode <= 8)); // old IE detection + + support.customElements = ("registerElement" in window.document); })(); @@ -2173,8 +2231,7 @@ function pad(number, digits, end) { type = "offset"; } - var result = element[type](), - mobileOS = support.mobileOS; + var result = element[type](); // IE10 touch zoom is living in a separate viewport if (support.browser.msie && (support.pointers || support.msPointers) && !positioned) { @@ -2440,12 +2497,16 @@ function pad(number, digits, end) { localUrlRe = /^([a-z]+:)?\/\//i; extend(kendo, { + widgets: [], + _widgetRegisteredCallbacks: [], ui: kendo.ui || {}, fx: kendo.fx || fx, effects: kendo.effects || effects, mobile: kendo.mobile || { }, data: kendo.data || {}, dataviz: kendo.dataviz || {}, + drawing: kendo.drawing || {}, + spreadsheet: {}, keys: { INSERT: 45, DELETE: 46, @@ -2479,6 +2540,9 @@ function pad(number, digits, end) { wrap: wrap, deepExtend: deepExtend, getComputedStyles: getComputedStyles, + webComponents: [], + isScrollable: isScrollable, + scrollLeft: scrollLeft, size: size, toCamelCase: toCamelCase, toHyphens: toHyphens, @@ -2513,7 +2577,10 @@ function pad(number, digits, end) { } if (safe) { + expression = expression.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'); + expression = expression.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"); expression = wrapExpression(expression.split("."), paramName); + expression = expression.replace(/_\$DOT\$_/g, "."); } else { expression = paramName + expression; } @@ -2574,6 +2641,14 @@ function pad(number, digits, end) { return (/^(label|input|textarea|select)$/i).test(e.target.tagName); }, + onWidgetRegistered: function(callback) { + for (var i = 0, len = kendo.widgets.length; i < len; i++) { + callback(kendo.widgets[i]); + } + + kendo._widgetRegisteredCallbacks.push(callback); + }, + logToConsole: function(message) { var console = window.console; @@ -2662,9 +2737,9 @@ function pad(number, digits, end) { var size = this.getSize(), currentSize = this._size; - if (force || !currentSize || size.width !== currentSize.width || size.height !== currentSize.height) { + if (force || (size.width > 0 || size.height > 0) && (!currentSize || size.width !== currentSize.width || size.height !== currentSize.height)) { this._size = size; - this._resize(size); + this._resize(size, force); this.trigger("resize", size); } }, @@ -2691,8 +2766,18 @@ function pad(number, digits, end) { that.element.removeData("handler"); that.unbind(); }, + _destroy: function() { + this.destroy(); + }, + angular: function(){}, - angular: function(){} + _muteAngularRebind: function(callback) { + this._muteRebind = true; + + callback.call(this); + + this._muteRebind = false; + } }); var DataBoundWidget = Widget.extend({ @@ -2982,6 +3067,13 @@ function pad(number, digits, end) { getter = "getKendo" + prefix + name; name = "kendo" + prefix + name; + var widgetEntry = { name: name, widget: widget, prefix: prefix || "" }; + kendo.widgets.push(widgetEntry); + + for (var i = 0, len = kendo._widgetRegisteredCallbacks.length; i < len; i++) { + kendo._widgetRegisteredCallbacks[i](widgetEntry); + } + $.fn[name] = function(options) { var value = this, args; @@ -3013,7 +3105,7 @@ function pad(number, digits, end) { }); } else { this.each(function() { - new widget(this, options); + return new widget(this, options); }); } @@ -3103,6 +3195,10 @@ function pad(number, digits, end) { kendo.touchScroller = function(elements, options) { // return the first touch scroller + if (!options){ options = {}; } + + options.useNative = true; + return $(elements).map(function(idx, element) { element = $(element); if (support.kineticScrollNeeded && kendo.mobile.ui.Scroller && !element.data("kendoMobileScroller")) { @@ -3198,9 +3294,10 @@ function pad(number, digits, end) { } function visible(element) { - return !$(element).parents().addBack().filter(function() { - return $.css(this,"visibility") === "hidden" || $.expr.filters.hidden(this); - }).length; + return $.expr.filters.visible(element) && + !$(element).parents().addBack().filter(function() { + return $.css(this,"visibility") === "hidden"; + }).length; } $.extend($.expr[ ":" ], { @@ -3884,7 +3981,9 @@ function pad(number, digits, end) { }; kendo.elementUnderCursor = function(e) { - return document.elementFromPoint(e.x.client, e.y.client); + if (typeof e.x.client != "undefined") { + return document.elementFromPoint(e.x.client, e.y.client); + } }; kendo.wheelDeltaY = function(jQueryEvent) { @@ -4001,16 +4100,12 @@ function pad(number, digits, end) { return start; }; - kendo.compileMobileDirective = function(element, scopeSetup) { + kendo.compileMobileDirective = function(element, scope) { var angular = window.angular; element.attr("data-" + kendo.ns + "role", element[0].tagName.toLowerCase().replace('kendo-mobile-', '').replace('-', '')); angular.element(element).injector().invoke(["$compile", function($compile) { - var scope = angular.element(element).scope(); - if (scopeSetup) { - scopeSetup(scope); - } $compile(element)(scope); if (!/^\$(digest|apply)$/.test(scope.$$phase)) { @@ -4037,6 +4132,35 @@ function pad(number, digits, end) { return tokens; }; + kendo.cycleForm = function(form) { + var firstElement = form.find("input, .k-widget").first(); + var lastElement = form.find("button, .k-button").last(); + + function focus(el) { + var widget = kendo.widgetInstance(el); + + if (widget && widget.focus) { + widget.focus(); + } else { + el.focus(); + } + } + + lastElement.on("keydown", function(e) { + if (e.keyCode == kendo.keys.TAB && !e.shiftKey) { + e.preventDefault(); + focus(firstElement); + } + }); + + firstElement.on("keydown", function(e) { + if (e.keyCode == kendo.keys.TAB && e.shiftKey) { + e.preventDefault(); + focus(lastElement); + } + }); + }; + // kendo.saveAs ----------------------------------------------- (function() { function postToProxy(dataURI, fileName, proxyURL, proxyTarget) { diff --git a/vendor/kendo/kendo.data.js b/vendor/kendo/kendo.data.js index 50dc58c..8388d53 100644 --- a/vendor/kendo/kendo.data.js +++ b/vendor/kendo/kendo.data.js @@ -18,10 +18,6 @@ define([ "./kendo.core", "./kendo.data.odata", "./kendo.data.xml" ], f); })(function(){ -var A = 0; - - - /*jshint eqnull: true, loopfunc: true, evil: true */ (function($, undefined) { var extend = $.extend, @@ -278,6 +274,41 @@ var A = 0; return result; }, + reduce: function(callback) { + var idx = 0, + result, + length = this.length; + + if (arguments.length == 2) { + result = arguments[1]; + } else if (idx < length) { + result = this[idx++]; + } + + for (; idx < length; idx++) { + result = callback(result, this[idx], idx, this); + } + + return result; + }, + + reduceRight: function(callback) { + var idx = this.length - 1, + result; + + if (arguments.length == 2) { + result = arguments[1]; + } else if (idx > 0) { + result = this[idx--]; + } + + for (; idx >= 0; idx--) { + result = callback(result, this[idx], idx, this); + } + + return result; + }, + filter: function(callback) { var idx = 0, result = [], @@ -410,6 +441,8 @@ var A = 0; Observable.fn.init.call(this); + this._handlers = {}; + for (field in value) { member = value[field]; @@ -424,7 +457,7 @@ var A = 0; }, shouldSerialize: function(field) { - return this.hasOwnProperty(field) && field !== "_events" && typeof this[field] !== FUNCTION && field !== "uid"; + return this.hasOwnProperty(field) && field !== "_handlers" && field !== "_events" && typeof this[field] !== FUNCTION && field !== "uid"; }, forEach: function(f) { @@ -497,6 +530,12 @@ var A = 0; current = kendo.getter(field, true)(that); if (current !== value) { + if (current instanceof Observable && this._handlers[field]) { + if (this._handlers[field].get) { + current.unbind(GET, this._handlers[field].get); + } + current.unbind(CHANGE, this._handlers[field].change); + } if (!that.trigger("set", { field: field, value: value })) { if (!composite) { @@ -512,8 +551,10 @@ var A = 0; parent: noop, wrap: function(object, field, parent) { - var that = this, - type = toString.call(object); + var that = this; + var get; + var change; + var type = toString.call(object); if (object != null && (type === "[object Object]" || type === "[object Array]")) { var isObservableArray = object instanceof ObservableArray; @@ -524,18 +565,22 @@ var A = 0; object = new ObservableObject(object); } - if (object.parent() != parent()) { - object.bind(GET, eventHandler(that, GET, field, true)); - object.bind(CHANGE, eventHandler(that, CHANGE, field, true)); - } + get = eventHandler(that, GET, field, true); + object.bind(GET, get); + change = eventHandler(that, CHANGE, field, true); + object.bind(CHANGE, change); + + that._handlers[field] = { get: get, change: change }; } else if (type === "[object Array]" || isObservableArray || isDataSource) { if (!isObservableArray && !isDataSource) { object = new ObservableArray(object); } - if (object.parent() != parent()) { - object.bind(CHANGE, eventHandler(that, CHANGE, field, false)); - } + change = eventHandler(that, CHANGE, field, false); + + object.bind(CHANGE, change); + + that._handlers[field] = { change: change }; } object.parent = parent; @@ -1023,6 +1068,20 @@ var A = 0; return a + ".lastIndexOf('" + b + "', 0) == 0"; }, + doesnotstartwith: function(a, b, ignore) { + if (ignore) { + a = "(" + a + " || '').toLowerCase()"; + if (b) { + b = b.toLowerCase(); + } + } + + if (b) { + b = quote(b); + } + + return a + ".lastIndexOf('" + b + "', 0) == -1"; + }, endswith: function(a, b, ignore) { if (ignore) { a = "(" + a + " || '').toLowerCase()"; @@ -1037,6 +1096,20 @@ var A = 0; return a + ".indexOf('" + b + "', " + a + ".length - " + (b || "").length + ") >= 0"; }, + doesnotendwith: function(a, b, ignore) { + if (ignore) { + a = "(" + a + " || '').toLowerCase()"; + if (b) { + b = b.toLowerCase(); + } + } + + if (b) { + b = quote(b); + } + + return a + ".indexOf('" + b + "', " + a + ".length - " + (b || "").length + ") < 0"; + }, contains: function(a, b, ignore) { if (ignore) { a = "(" + a + " || '').toLowerCase()"; @@ -1889,34 +1962,6 @@ var A = 0; } }); - function cloneGroups(groups) { - var result = []; - var item; - var group; - - for (var idx = 0, length = groups.length; idx < length; idx++) { - item = groups[idx]; - if (!("field" in item && "items" in item && "value" in item)) { - break; - } - - group = {}; - for (var field in item) { - var shouldSerialize = item.shouldSerialize ? item.shouldSerialize : item.hasOwnProperty; - if (shouldSerialize.call(item, field)) { - group[field] = item[field]; - } - } - - result.push(group); - - if (group.hasSubgroups) { - result = result.concat(cloneGroups(group.items)); - } - } - return result; - } - function mergeGroups(target, dest, skip, take) { var group, idx = 0, @@ -1989,7 +2034,7 @@ var A = 0; } function wrapGroupItems(data, model) { - var idx, length, group, items; + var idx, length, group; if (model) { for (idx = 0, length = data.length; idx < length; idx++) { group = data.at(idx); @@ -2071,34 +2116,10 @@ var A = 0; } } - function wrapInEmptyGroup(groups, model) { - var parent, - group, - idx, - length; - - for (idx = groups.length-1, length = 0; idx >= length; idx--) { - group = groups[idx]; - parent = { - value: model.get(group.field), - field: group.field, - items: parent ? [parent] : [model], - hasSubgroups: !!parent, - aggregates: {} - }; - } - - return parent; - } - function indexOfPristineModel(data, model) { if (model) { return indexOf(data, function(item) { - if (item.uid) { - return item.uid == model.uid; - } - - return item[model.idField] === model.id; + return (item.uid && item.uid == model.uid) || (item[model.idField] === model.id && model.id !== model._defaultId); }); } return -1; @@ -2222,7 +2243,7 @@ var A = 0; Observable.fn.init.call(that); - that.transport = Transport.create(options, data); + that.transport = Transport.create(options, data, that); if (isFunction(that.transport.push)) { that.transport.push({ @@ -2241,7 +2262,7 @@ var A = 0; return JSON.parse(localStorage.getItem(key)); }, setItem: function(item) { - localStorage.setItem(key, stringify(item)); + localStorage.setItem(key, stringify(that.reader.serialize(item))); } }; } else { @@ -2275,6 +2296,10 @@ var A = 0; batch: false }, + clone: function() { + return this; + }, + online: function(value) { if (value !== undefined) { if (this._online != value) { @@ -2300,7 +2325,7 @@ var A = 0; return this._storage.setItem(state); } - return this._storage.getItem() || {}; + return this._storage.getItem() || []; }, _isServerGrouped: function() { @@ -2464,7 +2489,7 @@ var A = 0; } if (this._isServerGrouped()) { - this._data.splice(index, 0, wrapInEmptyGroup(this.group(), model)); + this._data.splice(index, 0, this._wrapInEmptyGroup(model)); } else { this._data.splice(index, 0, model); } @@ -2492,7 +2517,7 @@ var A = 0; var pristine = result.toJSON(); if (this._isServerGrouped()) { - pristine = wrapInEmptyGroup(this.group(), pristine); + pristine = this._wrapInEmptyGroup(pristine); } this._pristineData.push(pristine); @@ -2614,14 +2639,43 @@ var A = 0; return model; }, + destroyed: function() { + return this._destroyed; + }, + + created: function() { + var idx, + length, + result = [], + data = this._flatData(this._data); + + for (idx = 0, length = data.length; idx < length; idx++) { + if (data[idx].isNew && data[idx].isNew()) { + result.push(data[idx]); + } + } + return result; + }, + + updated: function() { + var idx, + length, + result = [], + data = this._flatData(this._data); + + for (idx = 0, length = data.length; idx < length; idx++) { + if ((data[idx].isNew && !data[idx].isNew()) && data[idx].dirty) { + result.push(data[idx]); + } + } + return result; + }, + sync: function() { var that = this, - idx, - length, created = [], updated = [], - destroyed = that._destroyed, - data = that._flatData(that._data); + destroyed = that._destroyed; var promise = $.Deferred().resolve().promise(); @@ -2631,18 +2685,18 @@ var A = 0; return promise; } - for (idx = 0, length = data.length; idx < length; idx++) { - if (data[idx].isNew()) { - created.push(data[idx]); - } else if (data[idx].dirty) { - updated.push(data[idx]); - } - } + created = that.created(); + updated = that.updated(); var promises = []; - promises.push.apply(promises, that._send("create", created)); - promises.push.apply(promises, that._send("update", updated)); - promises.push.apply(promises, that._send("destroy", destroyed)); + + if (that.options.batch && that.transport.submit) { + promises = that._sendSubmit(created, updated, destroyed); + } else { + promises.push.apply(promises, that._send("create", created)); + promises.push.apply(promises, that._send("update", updated)); + promises.push.apply(promises, that._send("destroy", destroyed)); + } promise = $.when .apply(null, promises) @@ -2691,7 +2745,7 @@ var A = 0; hasChanges: function() { var idx, length, - data = this._data; + data = this._flatData(this._data); if (this._destroyed.length) { return true; @@ -2743,7 +2797,7 @@ var A = 0; models[idx].accept(response[idx]); if (type === "create") { - pristine.push(serverGroup ? wrapInEmptyGroup(that.group(), models[idx]) : response[idx]); + pristine.push(serverGroup ? that._wrapInEmptyGroup(models[idx]) : response[idx]); } else if (type === "update") { that._updatePristineForModel(models[idx], response[idx]); } @@ -2826,6 +2880,73 @@ var A = 0; }); }, + _submit: function(promises, data) { + var that = this; + + that.trigger(REQUESTSTART, { type: "submit" }); + + that.transport.submit(extend({ + success: function(response, type) { + var promise = $.grep(promises, function(x) { + return x.type == type; + })[0]; + + if (promise) { + promise.resolve({ + response: response, + models: promise.models, + type: type + }); + } + }, + error: function(response, status, error) { + for (var idx = 0; idx < promises.length; idx++) { + promises[idx].reject(response); + } + + that.error(response, status, error); + } + }, data)); + }, + + _sendSubmit: function(created, updated, destroyed) { + var that = this, + promises = []; + + if (that.options.batch) { + if (created.length) { + promises.push($.Deferred(function(deferred) { + deferred.type = "create"; + deferred.models = created; + })); + } + + if (updated.length) { + promises.push($.Deferred(function(deferred) { + deferred.type = "update"; + deferred.models = updated; + })); + } + + if (destroyed.length) { + promises.push($.Deferred(function(deferred) { + deferred.type = "destroy"; + deferred.models = destroyed; + })); + } + + that._submit(promises, { + data: { + created: that.reader.serialize(toJSON(created)), + updated: that.reader.serialize(toJSON(updated)), + destroyed: that.reader.serialize(toJSON(destroyed)) + } + }); + } + + return promises; + }, + _promise: function(data, models, type) { var that = this; @@ -2883,7 +3004,7 @@ var A = 0; that.transport.read({ data: params, success: function(data) { - that.success(data); + that.success(data, params); deferred.resolve(); }, @@ -2896,7 +3017,7 @@ var A = 0; } }); } else if (that.options.offlineStorage != null){ - that.success(that.offlineData()); + that.success(that.offlineData(), params); deferred.resolve(); } @@ -2939,13 +3060,23 @@ var A = 0; data = that._readData(data); var items = []; + var itemIds = {}; + var model = that.reader.model; + var idField = model ? model.idField : "id"; + var idx; - for (var idx = 0; idx < data.length; idx++) { + for (idx = 0; idx < this._destroyed.length; idx++) { + var id = this._destroyed[idx][idField]; + itemIds[id] = id; + } + + for (idx = 0; idx < data.length; idx++) { var item = data[idx]; var state = item.__state__; - if (state == "destroy") { - this._destroyed.push(this._createNewModel(item)); + if (!itemIds[item[idField]]) { + this._destroyed.push(this._createNewModel(item)); + } } else { items.push(item); } @@ -3027,13 +3158,15 @@ var A = 0; if (this.options.offlineStorage != null) { var state = items(this._data); + var destroyed = []; + for (var idx = 0; idx < this._destroyed.length; idx++) { var item = this._destroyed[idx].toJSON(); item.__state__ = "destroy"; - state.push(item); + destroyed.push(item); } - this.offlineData(state); + this.offlineData(state.concat(destroyed)); if (updatePristine) { this._pristineData = state; @@ -3046,7 +3179,7 @@ var A = 0; start = that._skip || 0, end = start + that._flatData(data, true).length; - that._ranges.push({ start: start, end: end, data: data }); + that._ranges.push({ start: start, end: end, data: data, timestamp: new Date().getTime() }); that._ranges.sort( function(x, y) { return x.start - y.start; } ); }, @@ -3133,20 +3266,25 @@ var A = 0; return false; }, + _shouldWrap: function(data) { + var model = this.reader.model; + + if (model && data.length) { + return !(data[0] instanceof model); + } + + return false; + }, + _observe: function(data) { var that = this, - model = that.reader.model, - wrap = false; + model = that.reader.model; that._shouldDetachObservableParents = true; - if (model && data.length) { - wrap = !(data[0] instanceof model); - } - if (data instanceof ObservableArray) { that._shouldDetachObservableParents = false; - if (wrap) { + if (that._shouldWrap(data)) { data.type = that.reader.model; data.wrapAll(data, data); } @@ -3169,6 +3307,27 @@ var A = 0; return data.bind(CHANGE, that._changeHandler); }, + _updateTotalForAction: function(action, items) { + var that = this; + + var total = parseInt(that._total, 10); + + if (!isNumber(that._total)) { + total = parseInt(that._pristineTotal, 10); + } + if (action === "add") { + total += items.length; + } else if (action === "remove") { + total -= items.length; + } else if (action !== "itemchange" && action !== "sync" && !that.options.serverPaging) { + total = that._pristineTotal; + } else if (action === "sync") { + total = that._pristineTotal = parseInt(that._total, 10); + } + + that._total = total; + }, + _change: function(e) { var that = this, idx, length, action = e ? e.action : ""; @@ -3181,23 +3340,20 @@ var A = 0; } if (that.options.autoSync && (action === "add" || action === "remove" || action === "itemchange")) { + + var handler = function(args) { + if (args.action === "sync") { + that.unbind("change", handler); + that._updateTotalForAction(action, e.items); + } + }; + + that.first("change", handler); + that.sync(); - } else { - var total = parseInt(that._total, 10); - if (!isNumber(that._total)) { - total = parseInt(that._pristineTotal, 10); - } - if (action === "add") { - total += e.items.length; - } else if (action === "remove") { - total -= e.items.length; - } else if (action !== "itemchange" && action !== "sync" && !that.options.serverPaging) { - total = that._pristineTotal; - } else if (action === "sync") { - total = that._pristineTotal = parseInt(that._total, 10); - } - that._total = total; + } else { + that._updateTotalForAction(action, e ? e.items : []); that._process(that._data, e); } @@ -3447,8 +3603,8 @@ var A = 0; return that._filter; } - that._query({ filter: val, page: 1 }); that.trigger("reset"); + that._query({ filter: val, page: 1 }); }, group: function(val) { @@ -3478,7 +3634,53 @@ var A = 0; }, aggregates: function() { - return this._aggregateResult; + var result = this._aggregateResult; + + if (isEmptyObject(result)) { + result = this._emptyAggregates(this.aggregate()); + } + + return result; + }, + + _emptyAggregates: function(aggregates) { + var result = {}; + + if (!isEmptyObject(aggregates)) { + var aggregate = {}; + + if (!isArray(aggregates)){ + aggregates = [aggregates]; + } + + for (var idx = 0; idx = length; idx--) { + group = groups[idx]; + parent = { + value: model.get(group.field), + field: group.field, + items: parent ? [parent] : [model], + hasSubgroups: !!parent, + aggregates: this._emptyAggregates(group.aggregates) + }; + } + + return parent; }, totalPages: function() { @@ -3513,7 +3715,14 @@ var A = 0; this._skipRequestsInProgress = false; }, + _timeStamp: function() { + return new Date().getTime(); + }, + range: function(skip, take) { + this._currentRequestTimeStamp = this._timeStamp(); + this._skipRequestsInProgress = true; + skip = math.min(skip || 0, this.total()); var that = this, @@ -3521,12 +3730,10 @@ var A = 0; size = math.min(pageSkip + take, that.total()), data; - that._skipRequestsInProgress = false; - data = that._findRange(skip, math.min(skip + take, that.total())); if (data.length) { - that._skipRequestsInProgress = true; + that._pending = undefined; that._skip = skip > that.skip() ? math.min(size, (that.totalPages() - 1) * that.take()) : pageSkip; @@ -3645,7 +3852,6 @@ var A = 0; _mergeGroups: function(data, range, skip, take) { if (this._isServerGrouped()) { - //var temp = cloneGroups(range), var temp = range.toJSON(), prevGroup; @@ -3675,10 +3881,11 @@ var A = 0; _prefetchSuccessHandler: function (skip, size, callback, force) { var that = this; + var timestamp = that._timeStamp(); return function(data) { var found = false, - range = { start: skip, end: size, data: [] }, + range = { start: skip, end: size, data: [], timestamp: that._timeStamp() }, idx, length, temp; @@ -3692,6 +3899,7 @@ var A = 0; temp = that._readData(data); if (temp.length) { + for (idx = 0, length = that._ranges.length; idx < length; idx++) { if (that._ranges[idx].start === skip) { found = true; @@ -3709,7 +3917,7 @@ var A = 0; that._ranges.sort( function(x, y) { return x.start - y.start; } ); that._total = that.reader.total(data); - if (force || !that._skipRequestsInProgress) { + if (force || (timestamp >= that._currentRequestTimeStamp || !that._skipRequestsInProgress)) { if (callback && temp.length) { callback(); } else { @@ -3741,7 +3949,11 @@ var A = 0; if (!that.trigger(REQUESTSTART, { type: "read" })) { that.transport.read({ data: that._params(options), - success: that._prefetchSuccessHandler(skip, size, callback) + success: that._prefetchSuccessHandler(skip, size, callback), + error: function() { + var args = slice.call(arguments); + that.error.apply(that, args); + } }); } else { that._dequeueRequest(); @@ -3832,13 +4044,17 @@ var A = 0; var Transport = {}; - Transport.create = function(options, data) { + Transport.create = function(options, data, dataSource) { var transport, - transportOptions = options.transport; + transportOptions = options.transport ? $.extend({}, options.transport) : null; if (transportOptions) { transportOptions.read = typeof transportOptions.read === STRING ? { url: transportOptions.read } : transportOptions.read; + if (options.type === "jsdo") { + transportOptions.dataSource = dataSource; + } + if (options.type) { kendo.data.transports = kendo.data.transports || {}; kendo.data.schemas = kendo.data.schemas || {}; @@ -3881,6 +4097,10 @@ var A = 0; data = inferTable(table, fields); } else if (select) { data = inferSelect(select, fields); + + if (dataSource.group === undefined && data[0] && data[0].optgroup !== undefined) { + dataSource.group = "optgroup"; + } } } @@ -3898,6 +4118,9 @@ var A = 0; } dataSource.data = data; + + select = null; + dataSource.select = null; table = null; dataSource.table = null; @@ -3905,24 +4128,35 @@ var A = 0; }; function inferSelect(select, fields) { - var options = $(select)[0].children, - idx, - length, - data = [], - record, - firstField = fields[0], - secondField = fields[1], - value, - option; + select = $(select)[0]; + var options = select.options; + var firstField = fields[0]; + var secondField = fields[1]; + + var data = []; + var idx, length; + var optgroup; + var option; + var record; + var value; for (idx = 0, length = options.length; idx < length; idx++) { record = {}; option = options[idx]; + optgroup = option.parentNode; + + if (optgroup === select) { + optgroup = null; + } - if (option.disabled) { + if (option.disabled || (optgroup && optgroup.disabled)) { continue; } + if (optgroup) { + record.optgroup = optgroup.label; + } + record[firstField.field] = option.text; value = option.attributes.value; @@ -4217,7 +4451,12 @@ var A = 0; }, _find: function(method, value) { - var idx, length, node, data, children; + var idx, length, node, children; + var data = this._data; + + if (!data) { + return; + } node = DataSource.fn[method].call(this, value); @@ -4227,10 +4466,6 @@ var A = 0; data = this._flatData(this._data); - if (!data) { - return; - } - for (idx = 0, length = data.length; idx < length; idx++) { children = data[idx].children; @@ -4374,9 +4609,7 @@ var A = 0; at: function(index) { var pageSize = this.pageSize, - item, - itemPresent = true, - changeTo; + itemPresent = true; if (index >= this.total()) { this.trigger("endreached", {index: index }); diff --git a/vendor/kendo/kendo.data.odata.js b/vendor/kendo/kendo.data.odata.js index eda9202..2b400b6 100644 --- a/vendor/kendo/kendo.data.odata.js +++ b/vendor/kendo/kendo.data.odata.js @@ -41,7 +41,10 @@ page: $.noop, filter: function(params, filter, useVersionFour) { if (filter) { - params.$filter = toOdataFilter(filter, useVersionFour); + filter = toOdataFilter(filter, useVersionFour); + if (filter) { + params.$filter = filter; + } } }, sort: function(params, orderby) { diff --git a/vendor/kendo/kendo.data.xml.js b/vendor/kendo/kendo.data.xml.js index 202b8e8..faaf35a 100644 --- a/vendor/kendo/kendo.data.xml.js +++ b/vendor/kendo/kendo.data.xml.js @@ -46,7 +46,9 @@ if (model.fields) { each(model.fields, function(field, value) { if (isPlainObject(value) && value.field) { - value = extend(value, { field: that.getter(value.field) }); + if (!$.isFunction(value.field)) { + value = extend(value, { field: that.getter(value.field) }); + } } else { value = { field: that.getter(value) }; } diff --git a/vendor/kendo/kendo.datepicker.js b/vendor/kendo/kendo.datepicker.js index 89f1c1b..5f90f72 100644 --- a/vendor/kendo/kendo.datepicker.js +++ b/vendor/kendo/kendo.datepicker.js @@ -14,22 +14,6 @@ * limitations under the License. */ -/** - * Copyright 2015 Telerik AD - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - (function(f, define){ define([ "./kendo.calendar", "./kendo.popup" ], f); })(function(){ @@ -49,7 +33,6 @@ OPEN = "open", CLOSE = "close", CHANGE = "change", - DATEVIEW = "dateView", DISABLED = "disabled", READONLY = "readonly", DEFAULT = "k-state-default", @@ -57,7 +40,6 @@ SELECTED = "k-state-selected", STATEDISABLED = "k-state-disabled", HOVER = "k-state-hover", - KEYDOWN = "keydown" + ns, HOVEREVENTS = "mouseenter" + ns + " mouseleave" + ns, MOUSEDOWN = "mousedown" + ns, ID = "id", @@ -82,7 +64,13 @@ calendar.normalize(options); + parseFormats = $.isArray(parseFormats) ? parseFormats : [parseFormats]; + + if (!parseFormats.length) { + parseFormats.push("yyyy-MM-dd"); + } + if ($.inArray(format, parseFormats) === -1) { parseFormats.splice(0, 0, options.format); } @@ -204,35 +192,33 @@ var that = this, key = e.keyCode, calendar = that.calendar, - selectIsClicked = e.ctrlKey && key == keys.DOWN || key == keys.ENTER; - - if (key == keys.ESC) { - that.close(); - return; - } + selectIsClicked = e.ctrlKey && key == keys.DOWN || key == keys.ENTER, + handled = false; if (e.altKey) { if (key == keys.DOWN) { that.open(); e.preventDefault(); + handled = true; } else if (key == keys.UP) { that.close(); e.preventDefault(); + handled = true; } - return; - } - if (!that.popup.visible()){ - return; - } + } else if (that.popup.visible()) { - if (selectIsClicked && calendar._cell.hasClass(SELECTED)) { - that.close(); - e.preventDefault(); - return; + if (key == keys.ESC || (selectIsClicked && calendar._cell.hasClass(SELECTED))) { + that.close(); + e.preventDefault(); + return true; + } + + that._current = calendar._move(e); + handled = true; } - that._current = calendar._move(e); + return handled; }, current: function(date) { @@ -290,6 +276,8 @@ normalize(options); + that._initialOptions = extend({}, options); + that._wrapper(); that.dateView = new DateView(extend({}, options, { @@ -350,7 +338,7 @@ that._reset(); that._template(); - disabled = element.is("[disabled]"); + disabled = element.is("[disabled]") || $(that.element).parents("fieldset").is(':disabled'); if (disabled) { that.enable(false); } else { @@ -540,23 +528,32 @@ that._old = value; that._oldText = that.element.val(); - // trigger the DOM change event so any subscriber gets notified - that.element.trigger(CHANGE); + if (!that._typing) { + // trigger the DOM change event so any subscriber gets notified + that.element.trigger(CHANGE); + } that.trigger(CHANGE); } + + that._typing = false; }, _keydown: function(e) { var that = this, dateView = that.dateView, - value = that.element.val(); + value = that.element.val(), + handled = false; if (!dateView.popup.visible() && e.keyCode == keys.ENTER && value !== that._oldText) { that._change(value); } else { - dateView.move(e); + handled = dateView.move(e); that._updateARIA(dateView._current); + + if (!handled) { + that._typing = true; + } } }, @@ -662,6 +659,8 @@ if (form[0]) { that._resetHandler = function() { that.value(element[0].defaultValue); + that.max(that._initialOptions.max); + that.min(that._initialOptions.min); }; that._form = form.on("reset", that._resetHandler); diff --git a/vendor/kendo/kendo.editable.js b/vendor/kendo/kendo.editable.js index 4d7d03a..2ff339d 100644 --- a/vendor/kendo/kendo.editable.js +++ b/vendor/kendo/kendo.editable.js @@ -139,8 +139,9 @@ }, "values": function(container, options) { var attr = createAttributes(options); + var items = kendo.stringify(convertItems(options.values)); $('' + options.messages.itemsPerPage + "") + var pageSizes = options.pageSizes.length ? options.pageSizes : ["all", 5, 10, 20]; + var pageItems = $.map(pageSizes, function(size) { + if (size.toLowerCase && size.toLowerCase() === "all") { + return ""; + } + + return ""; + }); + + $('' + options.messages.itemsPerPage + "") + var pageSizes = options.pageSizes.length ? options.pageSizes : ["all", 5, 10, 20]; + var pageItems = $.map(pageSizes, function(size) { + if (size.toLowerCase && size.toLowerCase() === "all") { + return ""; + } + + return ""; + }); + + $('') .attr(attr).appendTo(container); $('').hide().appendTo(container); } @@ -31783,19 +33437,18 @@ var A = 0; values = {}, bindAttribute = kendo.attr("bind"), fieldName = e.field.replace(nameSpecialCharRegExp, "\\$1"), - checkedBinding = 'checked:' + fieldName, - valueBinding = 'value:' + fieldName; + bindingRegex = new RegExp("(value|checked)\\s*:\\s*" + fieldName + "\\s*(,|$)"); values[e.field] = e.value; - input = $(':input[' + bindAttribute + '*="' + valueBinding + '"],:input[' + bindAttribute + '*="' + checkedBinding + '"]', that.element) - .filter("[" + kendo.attr("validate") + "!='false']"); + input = $(':input[' + bindAttribute + '*="' + fieldName + '"]', that.element) + .filter("[" + kendo.attr("validate") + "!='false']").filter(function() { + return bindingRegex.test($(this).attr(bindAttribute)); + }); if (input.length > 1) { input = input.filter(function () { var element = $(this); - var bindings = element.attr(bindAttribute).split(","); - var matchesBinding = inArray(valueBinding, bindings) >= 0 || inArray(checkedBinding, bindings) >= 0; - return matchesBinding && (!element.is(":radio") || element.val() == value); + return !element.is(":radio") || element.val() == value; }); } @@ -31869,7 +33522,7 @@ var A = 0; that.angular("compile", function(){ return { elements: container, - data: [ { dataItem: model } ] + data: container.map(function() { return { dataItem: model }; }) }; }); } @@ -31925,7 +33578,6 @@ var A = 0; FOCUSED = "k-state-focused", SELECTED = "k-state-selected", KEDITITEM = "k-edit-item", - STRING = "string", EDIT = "edit", REMOVE = "remove", SAVE = "save", @@ -32414,48 +34066,40 @@ var A = 0; return this.dataSource.getByUid(uid); }, - _closeEditable: function(validate) { + _closeEditable: function() { var that = this, editable = that.editable, data, item, index, - template = that.template, - valid = true; + template = that.template; if (editable) { - if (validate) { - valid = editable.end(); + if (editable.element.index() % 2) { + template = that.altTemplate; } - if (valid) { - if (editable.element.index() % 2) { - template = that.altTemplate; - } - - that.angular("cleanup", function() { - return { elements: [ editable.element ]}; - }); - - data = that._modelFromElement(editable.element); - that._destroyEditable(); + that.angular("cleanup", function() { + return { elements: [ editable.element ]}; + }); - index = editable.element.index(); - editable.element.replaceWith(template(data)); - item = that.items().eq(index); - item.attr(kendo.attr("uid"), data.uid); + data = that._modelFromElement(editable.element); + that._destroyEditable(); - if (that._hasBindingTarget()) { - kendo.bind(item, data); - } + index = editable.element.index(); + editable.element.replaceWith(template(data)); + item = that.items().eq(index); + item.attr(kendo.attr("uid"), data.uid); - that.angular("compile", function() { - return { elements: [ item ], data: [ { dataItem: data } ]}; - }); + if (that._hasBindingTarget()) { + kendo.bind(item, data); } - } - return valid; + that.angular("compile", function() { + return { elements: [ item ], data: [ { dataItem: data } ]}; + }); + } + return true; }, edit: function(item) { @@ -32490,10 +34134,11 @@ var A = 0; return; } - editable = editable.element; - model = that._modelFromElement(editable); + var container = editable.element; + model = that._modelFromElement(container); - if (!that.trigger(SAVE, { model: model, item: editable }) && that._closeEditable(true)) { + if (editable.end() && !that.trigger(SAVE, { model: model, item: container })) { + that._closeEditable(); that.dataSource.sync(); } }, @@ -32505,7 +34150,7 @@ var A = 0; if (that.editable) { dataSource.cancelChanges(that._modelFromElement(that.editable.element)); - that._closeEditable(false); + that._closeEditable(); } if (!that.trigger(REMOVE, { model: data, item: item })) { @@ -32517,6 +34162,7 @@ var A = 0; add: function() { var that = this, + dataItem, dataSource = that.dataSource, index = dataSource.indexOf((dataSource.view() || [])[0]); @@ -32525,8 +34171,8 @@ var A = 0; } that.cancel(); - dataSource.insert(index, {}); - that.edit(that.element.children().first()); + dataItem = dataSource.insert(index, {}); + that.edit(that.element.find("[data-uid='" + dataItem.uid + "']")); }, cancel: function() { @@ -32539,7 +34185,7 @@ var A = 0; if (!that.trigger(CANCEL, { model: model, container: container})) { dataSource.cancelChanges(model); - that._closeEditable(false); + that._closeEditable(); } } }, @@ -32660,7 +34306,7 @@ var A = 0; that._togglePrompt(); }); - var disabled = element.is("[disabled]"); + var disabled = element.is("[disabled]") || $(that.element).parents("fieldset").is(':disabled'); if (disabled) { that.enable(false); @@ -32736,7 +34382,6 @@ var A = 0; value: function(value) { var element = this.element; var emptyMask = this._emptyMask; - var options = this.options; if (value === undefined) { return this.element.val(); @@ -34470,7 +36115,6 @@ var A = 0; _closeHandler: function (e) { var that = this, - options = that.options, target = $(e.relatedTarget || e.target), sameTarget = target.closest(that.target.selector)[0] == that.target[0], children = target.closest(itemSelector).children(popupSelector), @@ -35080,7 +36724,7 @@ var A = 0; that.element.removeAttr("aria-activedescendant"); - if (focused) { + if (focused && focused.length) { if (focused[0].id === id) { focused.removeAttr("id"); } @@ -35703,7 +37347,7 @@ var A = 0; setOptions: function(options) { var that = this; - + Widget.fn.setOptions.call(that, options); if (options.hasOwnProperty("reverse")) { @@ -35798,7 +37442,7 @@ var A = 0; if (options.type === PROGRESSTYPE.VALUE) { that.progressStatus.text(initialStatusValue); } else { - that.progressStatus.text(that._calculatePercentage(initialStatusValue) + "%"); + that.progressStatus.text(that._calculatePercentage(initialStatusValue).toFixed() + "%"); } } } @@ -35951,6 +37595,7 @@ var A = 0; var that = this; var options = that.options; var progressWrapperSize = parseFloat(that.progressWrapper[0].style[that._progressProperty]); + var progressValue; if (options.type !== PROGRESSTYPE.CHUNK && progressWrapperSize > 98) { that.progressWrapper.addClass(KPROGRESSBARCOMPLETE); @@ -35958,10 +37603,13 @@ var A = 0; if (options.showStatus) { if (options.type === PROGRESSTYPE.VALUE) { - that.progressStatus.text(currentValue); + progressValue = currentValue; + } else if (options.type == PROGRESSTYPE.PERCENT) { + progressValue = that._calculatePercentage(currentValue).toFixed() + "%"; } else { - that.progressStatus.text(math.floor(that._calculatePercentage(currentValue)) + "%"); + progressValue = math.floor(that._calculatePercentage(currentValue)) + "%"; } + that.progressStatus.text(progressValue); } if (currentValue === options.min) { @@ -36004,7 +37652,7 @@ var A = 0; var html = ""; if (options.chunkCount <= 1) { - options.chunkCount = DEFAULTCHUNKCOUNT; + options.chunkCount = 1; } html += "
    "; @@ -36097,6 +37745,8 @@ var A = 0; init: function(element, options) { Widget.fn.init.call(this, element, options); + this._guid = "_" + kendo.guid(); + this._toggleHandler = proxy(this._toggleButtonClick, this); this._closeHandler = proxy(this._close, this); @@ -36105,20 +37755,23 @@ var A = 0; this._registerBreakpoint(); this.element - .addClass("k-rpanel k-rpanel-" + this.options.orientation); + .addClass("k-rpanel k-rpanel-" + this.options.orientation + " " + this._guid); - this._resizeHandler = proxy(this.resize, this); + this._resizeHandler = proxy(this.resize, this, false); $(window).on("resize" + NS, this._resizeHandler); }, _mediaQuery: "@media (max-width: #= breakpoint-1 #px) {" + - ".k-rpanel-animate.k-rpanel-left," + - ".k-rpanel-animate.k-rpanel-right {" + + ".#= guid #.k-rpanel-animate.k-rpanel-left," + + ".#= guid #.k-rpanel-animate.k-rpanel-right {" + "-webkit-transition: -webkit-transform .2s ease-out;" + "-ms-transition: -ms-transform .2s ease-out;" + "transition: transform .2s ease-out;" + "} " + - ".k-rpanel-animate.k-rpanel-top {" + + ".#= guid #.k-rpanel-top {" + + "overflow: hidden;" + + "}" + + ".#= guid #.k-rpanel-animate.k-rpanel-top {" + "-webkit-transition: max-height .2s linear;" + "-ms-transition: max-height .2s linear;" + "transition: max-height .2s linear;" + @@ -36126,35 +37779,39 @@ var A = 0; "} " + "@media (min-width: #= breakpoint #px) {" + "#= toggleButton # { display: none; } " + - ".k-rpanel-left { float: left; } " + - ".k-rpanel-right { float: right; } " + - ".k-rpanel-left, .k-rpanel-right {" + + ".#= guid #.k-rpanel-left { float: left; } " + + ".#= guid #.k-rpanel-right { float: right; } " + + ".#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {" + "position: relative;" + + "-webkit-transform: translateX(0);" + + "-ms-transform: translateX(0);" + + "transform: translateX(0);" + "-webkit-transform: translateX(0) translateZ(0);" + "-ms-transform: translateX(0) translateZ(0);" + "transform: translateX(0) translateZ(0);" + "} " + - ".k-rpanel-top { max-height: none; }" + + ".#= guid #.k-rpanel-top { max-height: none; }" + "}", _registerBreakpoint: function() { var options = this.options; this._registerStyle(kendo.template(this._mediaQuery)({ breakpoint: options.breakpoint, - toggleButton: options.toggleButton + toggleButton: options.toggleButton, + guid: this._guid })); }, _registerStyle: function(cssText) { var head = $("head,body")[0]; var style = document.createElement('style'); + head.appendChild(style); + if (style.styleSheet){ style.styleSheet.cssText = cssText; } else { style.appendChild(document.createTextNode(cssText)); } - - head.appendChild(style); }, options: { name: "ResponsivePanel", @@ -36366,6 +38023,10 @@ var A = 0; tabs.filter(":last-child").addClass(LAST); } + function scrollButtonHtml(buttonClass, iconClass) { + return ""; + } + var TabStrip = Widget.extend({ init: function(element, options) { var that = this; @@ -36384,14 +38045,16 @@ var A = 0; that._updateClasses(); - that._tabPosition(); - that._dataSource(); if (options.dataSource) { that.dataSource.fetch(); } + that._tabPosition(); + + that._scrollable(); + if (that.options.contentUrls) { that.wrapper.find(".k-tabstrip-items > .k-item") .each(function(index, item) { @@ -36449,7 +38112,7 @@ var A = 0; kendo.notify(that); }, - _active: function() { + _active: function () { var item = this.tabGroup.children().filter("." + ACTIVESTATE); item = item[0] ? item : this._endItem("first"); @@ -36487,7 +38150,7 @@ var A = 0; return item; }, - _current: function(candidate) { + _current: function (candidate) { var that = this, focused = that._focused, id = that._ariaId; @@ -36725,7 +38388,10 @@ var A = 0; }, collapsible: false, navigatable: true, - contentUrls: false + contentUrls: false, + scrollable: { + distance: 200 + } }, destroy: function() { @@ -36740,6 +38406,11 @@ var A = 0; that.wrapper.off(NS); that.wrapper.children(".k-tabstrip-items").off(NS); + if (that._scrollableModeActive) { + that._scrollPrevButton.off().remove(); + that._scrollNextButton.off().remove(); + } + that.scrollWrap.children(".k-tabstrip").unwrap(); kendo.destroy(that.wrapper); @@ -36803,7 +38474,13 @@ var A = 0; each(inserted.tabs, function (idx) { var contents = inserted.contents[idx]; that.tabGroup.append(this); - that.wrapper.append(contents); + if (that.options.tabPosition == "bottom") { + that.tabGroup.before(contents); + } else if (that._scrollableModeActive) { + that._scrollPrevButton.before(contents); + } else { + that.wrapper.append(contents); + } that.angular("compile", function(){ return { elements: [ contents ] }; }); }); @@ -37053,8 +38730,7 @@ var A = 0; _tabPosition: function() { var that = this, - tabPosition = that.options.tabPosition, - tabGroup = that.tabGroup; + tabPosition = that.options.tabPosition; that.wrapper.addClass("k-floatwrap k-tabstrip-" + tabPosition); @@ -37090,6 +38766,7 @@ var A = 0; _resize: function() { this._setContentElementsDimensions(); + this._scrollable(); }, _sizeScrollWrap: function (element) { @@ -37148,6 +38825,122 @@ var A = 0; return prevent; }, + _scrollable: function() { + var that = this, + options = that.options, + wrapperOffsetWidth, + tabGroupScrollWidth, + scrollPrevButton, + scrollNextButton; + + if (that._scrollableAllowed()) { + + that.wrapper.addClass("k-tabstrip-scrollable"); + + wrapperOffsetWidth = that.wrapper[0].offsetWidth; + tabGroupScrollWidth = that.tabGroup[0].scrollWidth; + + if (tabGroupScrollWidth > wrapperOffsetWidth && !that._scrollableModeActive) { + that._nowScrollingTabs = false; + that._isRtl = kendo.support.isRtl(that.element); + + that.wrapper.append(scrollButtonHtml("prev", "k-i-arrow-w") + scrollButtonHtml("next", "k-i-arrow-e")); + + scrollPrevButton = that._scrollPrevButton = that.wrapper.children(".k-tabstrip-prev"); + scrollNextButton = that._scrollNextButton = that.wrapper.children(".k-tabstrip-next"); + + that.tabGroup.css({ marginLeft: scrollPrevButton.outerWidth() + 9, marginRight: scrollNextButton.outerWidth() + 12 }); + + scrollPrevButton.on("mousedown" + NS, function () { + that._nowScrollingTabs = true; + that._scrollTabsByDelta(options.scrollable.distance * (that._isRtl ? 1 : -1)); + }); + + scrollNextButton.on("mousedown" + NS, function () { + that._nowScrollingTabs = true; + that._scrollTabsByDelta(options.scrollable.distance * (that._isRtl ? -1 : 1)); + }); + + scrollPrevButton.add(scrollNextButton).on("mouseup" + NS, function () { + that._nowScrollingTabs = false; + }); + + that._scrollableModeActive = true; + + that._toggleScrollButtons(); + } else if (that._scrollableModeActive && tabGroupScrollWidth <= wrapperOffsetWidth) { + that._scrollableModeActive = false; + + that.wrapper.removeClass("k-tabstrip-scrollable"); + + that._scrollPrevButton.off().remove(); + that._scrollNextButton.off().remove(); + that.tabGroup.css({ marginLeft: "", marginRight: "" }); + } else if (!that._scrollableModeActive) { + that.wrapper.removeClass("k-tabstrip-scrollable"); + } else { + that._toggleScrollButtons(); + } + } + }, + + _scrollableAllowed: function() { + var options = this.options; + return options.scrollable && !isNaN(options.scrollable.distance) && (options.tabPosition == "top" || options.tabPosition == "bottom"); + }, + + _scrollTabsToItem: function (item) { + var that = this, + tabGroup = that.tabGroup, + currentScrollOffset = tabGroup.scrollLeft(), + itemWidth = item.outerWidth(), + itemOffset = that._isRtl ? item.position().left : item.position().left - tabGroup.children().first().position().left, + tabGroupWidth = tabGroup[0].offsetWidth, + tabGroupPadding = Math.ceil(parseFloat(tabGroup.css("padding-left"))), + itemPosition; + + if (that._isRtl) { + if (itemOffset < 0) { + itemPosition = currentScrollOffset + itemOffset - (tabGroupWidth - currentScrollOffset) - tabGroupPadding; + } else if (itemOffset + itemWidth > tabGroupWidth) { + itemPosition = currentScrollOffset + itemOffset - itemWidth + tabGroupPadding * 2; + } + } else { + if (currentScrollOffset + tabGroupWidth < itemOffset + itemWidth) { + itemPosition = itemOffset + itemWidth - tabGroupWidth + tabGroupPadding * 2; + } else if (currentScrollOffset > itemOffset) { + itemPosition = itemOffset - tabGroupPadding; + } + } + + tabGroup.finish().animate({ "scrollLeft": itemPosition }, "fast", "linear", function () { + that._toggleScrollButtons(); + }); + }, + + _scrollTabsByDelta: function (delta) { + var that = this; + var tabGroup = that.tabGroup; + var scrLeft = tabGroup.scrollLeft(); + + tabGroup.finish().animate({ "scrollLeft": scrLeft + delta }, "fast", "linear", function () { + if (that._nowScrollingTabs) { + that._scrollTabsByDelta(delta); + } else { + that._toggleScrollButtons(); + } + }); + }, + + _toggleScrollButtons: function () { + var that = this, + ul = that.tabGroup, + scrollLeft = ul.scrollLeft(); + + that._scrollPrevButton.toggle(that._isRtl ? scrollLeft < ul[0].scrollWidth - ul[0].offsetWidth - 1 : scrollLeft !== 0); + that._scrollNextButton.toggle(that._isRtl ? scrollLeft !== 0 : scrollLeft < ul[0].scrollWidth - ul[0].offsetWidth - 1); + }, + deactivateTab: function (item) { var that = this, animationSettings = that.options.animation, @@ -37209,7 +39002,7 @@ var A = 0; } if (contentAnimators.length === 0) { - oldTab.removeClass(TABONTOP); + that.tabGroup.find("." + TABONTOP).removeClass(TABONTOP); item.addClass(TABONTOP) // change these directly to bring the tab on top. .css("z-index"); @@ -37218,6 +39011,10 @@ var A = 0; that.trigger("change"); + if (that._scrollableModeActive) { + that._scrollTabsToItem(item); + } + return false; } @@ -37244,7 +39041,7 @@ var A = 0; var isAjaxContent = (item.children("." + LINK).data(CONTENTURL) || false) && contentHolder.is(EMPTY), showContentElement = function () { - oldTab.removeClass(TABONTOP); + that.tabGroup.find("." + TABONTOP).removeClass(TABONTOP); item.addClass(TABONTOP) // change these directly to bring the tab on top. .css("z-index"); @@ -37293,6 +39090,11 @@ var A = 0; that.trigger("change"); }); } + + if (that._scrollableModeActive) { + that._scrollTabsToItem(item); + } + }; visibleContents @@ -37552,6 +39354,7 @@ var A = 0; id = options.id; that.options = options; + that._dates = []; that.ul = $('