rename cancelnochange into savenochange

This commit is contained in:
vitalets
2012-12-06 21:19:33 +04:00
parent 19a6dabbae
commit 48a665c7f2
4 changed files with 11 additions and 11 deletions

@ -181,7 +181,7 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
//if value not changed --> cancel
/*jslint eqeq: true*/
if (this.options.cancelnochange && this.input.value2str(newValue) == this.input.value2str(this.value)) {
if (!this.options.savenochange && this.input.value2str(newValue) == this.input.value2str(this.value)) {
/*jslint eqeq: false*/
this.cancel();
return;
@ -484,14 +484,14 @@ Editableform is linked with one of input types, e.g. 'text', 'select' etc.
**/
scope: null,
/**
Whether to cancel or submit value when it was not changed.
Whether to save or cancel value when it was not changed but form was submitted
@property cancelnochange
@property savenochange
@type boolean
@default true
@default false
@since 1.2.0
**/
cancelnochange: true
savenochange: false
};
/*

@ -97,6 +97,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
@event init
@param {Object} event event object
@param {Object} editable editable instance
@since 1.2.0
**/
this.$element.triggerHandler('init', this);
}, this));
@ -522,7 +523,6 @@ Makes editable any HTML element on the page. Applied as jQuery method.
@default 'click'
**/
toggle: 'click',
/**
Text shown when element is empty.