inherit html5 time input from abstract

This commit is contained in:
vitalets 2013-08-05 23:14:22 +04:00
parent 85c5ff9fba
commit 0c8f3fb70f
2 changed files with 9 additions and 2 deletions

@ -3,6 +3,7 @@ X-editable changelog
Version 1.4.6 wip
----------------------------
[enh #286] added HTML5 time input (Doggie52)
[enh] add `defaultValue` option (vitalets)
[enh #313] add composer support (masim)
[enh #300] Fix 'bootstrap popover falls off page if editable is too close to window edge' (belerweb)

@ -204,8 +204,14 @@ Time
var Time = function (options) {
this.init('time', options, Time.defaults);
};
$.fn.editableutils.inherit(Time, $.fn.editabletypes.text);
Time.defaults = $.extend({}, $.fn.editabletypes.text.defaults, {
//inherit from abstract, as inheritance from text gives selection error.
$.fn.editableutils.inherit(Time, $.fn.editabletypes.abstractinput);
$.extend(Time.prototype, {
render: function() {
this.setClass();
}
});
Time.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, {
tpl: '<input type="time">'
});
$.fn.editabletypes.time = Time;