This commit is contained in:
vitalets
2012-11-09 12:58:42 +04:00
commit ccdff0ee51
160 changed files with 83260 additions and 0 deletions

26
src/inputs/text.js Normal file
View File

@@ -0,0 +1,26 @@
/**
* text
*/
(function ($) {
var Text = function (options) {
this.init('text', options, Text.defaults);
};
$.fn.editableform.utils.inherit(Text, $.fn.editableform.types.abstract);
$.extend(Text.prototype, {
activate: function() {
if(this.$input.is(':visible')) {
$.fn.editableform.utils.setCursorPosition(this.$input.get(0), this.$input.val().length);
this.$input.focus();
}
}
});
Text.defaults = $.extend({}, $.fn.editableform.types.abstract.defaults, {
tpl: '<input type="text">'
});
$.fn.editableform.types.text = Text;
}(window.jQuery));