source as function scope

This commit is contained in:
vitalets
2013-03-06 21:22:01 +04:00
parent d39f4d3b8a
commit 3270e5e4b7
5 changed files with 69 additions and 18 deletions

@ -26,7 +26,9 @@ Makes editable any HTML element on the page. Applied as jQuery method.
//name
this.options.name = this.options.name || this.$element.attr('id');
//create input of specified type. Input need already here to convert value for initial display (e.g. show text by id for select)
//create input of specified type. Input needed already here to convert value for initial display (e.g. show text by id for select)
//also we set scope option to have access to element inside input specific callbacks (e. g. source as function)
this.options.scope = this.$element[0];
this.input = $.fn.editableutils.createInput(this.options);
if(!this.input) {
return;