comments
This commit is contained in:
src
@ -167,6 +167,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
|
|||||||
//sending data to server
|
//sending data to server
|
||||||
$.when(this.save(newValueStr))
|
$.when(this.save(newValueStr))
|
||||||
.done($.proxy(function(response) {
|
.done($.proxy(function(response) {
|
||||||
|
//clear error message
|
||||||
this.error(false);
|
this.error(false);
|
||||||
this.value = newValue;
|
this.value = newValue;
|
||||||
/**
|
/**
|
||||||
@ -198,7 +199,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
|
|||||||
if (send) { //send to server
|
if (send) { //send to server
|
||||||
this.showLoading();
|
this.showLoading();
|
||||||
|
|
||||||
//standart params
|
//standard params
|
||||||
params = {
|
params = {
|
||||||
name: this.options.name || '',
|
name: this.options.name || '',
|
||||||
value: value,
|
value: value,
|
||||||
|
@ -63,11 +63,12 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
|||||||
|
|
||||||
//attach handler to close container when click outside
|
//attach handler to close container when click outside
|
||||||
$(document).off('click.editable').on('click.editable', function(e) {
|
$(document).off('click.editable').on('click.editable', function(e) {
|
||||||
//if click inside container --> do nothing
|
|
||||||
var $target = $(e.target);
|
var $target = $(e.target);
|
||||||
|
//if click inside container --> do nothing
|
||||||
if($target.is('.editable-container') || $target.parents('.editable-container').length || $target.parents('.ui-datepicker-header').length) {
|
if($target.is('.editable-container') || $target.parents('.editable-container').length || $target.parents('.ui-datepicker-header').length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//close all other containers
|
||||||
$('.editable-container').find('button[type=button]').click();
|
$('.editable-container').find('button[type=button]').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user