|
203 | 203 | var that = this, |
204 | 204 | element = that.element, |
205 | 205 | maxHeight = that.options.maxHeight, |
206 | | - paddingBox, |
207 | 206 | elementMaxHeight; |
208 | 207 |
|
209 | 208 | if (maxHeight != Infinity) { |
210 | | - paddingBox = that._paddingBox(element); |
211 | | - elementMaxHeight = parseFloat(maxHeight, 10) - that._uiHeight() - paddingBox.vertical; |
| 209 | + elementMaxHeight = parseFloat(maxHeight, 10) - that._uiHeight(); |
212 | 210 | if (elementMaxHeight > 0) { |
213 | 211 | element.css({ |
214 | 212 | maxHeight: ceil(elementMaxHeight) + "px" |
|
218 | 216 |
|
219 | 217 | }, |
220 | 218 |
|
221 | | - _paddingBox: function(element) { |
222 | | - var paddingTop = parseFloat(element.css("padding-top"), 10), |
223 | | - paddingLeft = parseFloat(element.css("padding-left"), 10), |
224 | | - paddingBottom = parseFloat(element.css("padding-bottom"), 10), |
225 | | - paddingRight = parseFloat(element.css("padding-right"), 10); |
226 | | - |
227 | | - return { |
228 | | - vertical: paddingTop + paddingBottom, |
229 | | - horizontal: paddingLeft + paddingRight |
230 | | - }; |
231 | | - }, |
232 | | - |
233 | 219 | _setElementHeight: function() { |
234 | 220 | var that = this, |
235 | 221 | element = that.element, |
236 | 222 | height = that.options.height, |
237 | | - paddingBox = that._paddingBox(element), |
238 | | - elementHeight = parseFloat(height, 10) - that._uiHeight() - paddingBox.vertical; |
| 223 | + elementHeight = parseFloat(height, 10) - that._uiHeight(); |
239 | 224 |
|
240 | 225 | if (elementHeight < 0) { |
241 | 226 | elementHeight = 0; |
|
433 | 418 | .autoApplyNS(NS) |
434 | 419 | .html(text) |
435 | 420 | .appendTo(actionbar) |
| 421 | + .addClass(action.cssClass) |
436 | 422 | .data("action", action.action) |
437 | 423 | .on("click", actionClick) |
438 | 424 | .on("keydown", actionKeyHandler); |
|
820 | 806 |
|
821 | 807 | Widget.fn.destroy.call(that); |
822 | 808 |
|
| 809 | + kendo.destroy(that.wrapper); |
| 810 | + |
823 | 811 | that.wrapper.remove(); |
824 | 812 | that.wrapper = that.element = $(); |
825 | 813 | }, |
|
0 commit comments