@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
59 lines (57 loc) • 1.56 kB
JavaScript
//#region ../src/kendo.html.base.js
const __meta__ = {
id: "html.base",
name: "Html.Base",
category: "web",
description: "",
depends: ["core"],
features: []
};
(function($, undefined) {
var kendo = window.kendo, Class = kendo.Class;
kendo.html = kendo.html || {};
var HTMLBase = Class.extend({
init: function(element, options) {
var that = this;
that.element = $(element);
options = options || {};
delete options.name;
that._initOptions(options);
},
options: { stylingOptions: [] },
_addClasses: function() {
var that = this, options = that.options, stylingOptions = options.stylingOptions, previouslyAddedClasses = that.wrapper.data("added-classes");
stylingOptions = stylingOptions.map(function(option) {
return kendo.cssProperties.getValidClass({
widget: options.name,
propName: option,
value: options[option]
});
});
if (previouslyAddedClasses) {
that.wrapper.removeClass(previouslyAddedClasses.join(" "));
}
that.wrapper.data("added-classes", stylingOptions);
that.wrapper.addClass(stylingOptions.join(" "));
},
html: function() {
var that = this;
return that.wrapper[0].outerHTML;
}
});
$.extend(kendo.html, { HTMLBase });
})(window.kendo.jQuery);
var kendo_html_base_default = kendo;
//#endregion
Object.defineProperty(exports, '__meta__', {
enumerable: true,
get: function () {
return __meta__;
}
});
Object.defineProperty(exports, 'kendo_html_base_default', {
enumerable: true,
get: function () {
return kendo_html_base_default;
}
});