fix indent in examples

This commit is contained in:
vitalets
2012-11-27 15:46:17 +04:00
parent 30f7c20360
commit 4e616680fd

@ -198,7 +198,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
@example @example
$('#form-div').on('save'), function(e, params){ $('#form-div').on('save'), function(e, params){
if(params.newValue === 'username') {...} if(params.newValue === 'username') {...}
}); });
**/ **/
this.$element.triggerHandler('save', {newValue: newValue, response: response}); this.$element.triggerHandler('save', {newValue: newValue, response: response});
@ -278,10 +278,10 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
@params {Object} options @params {Object} options
@example @example
var $form = $('<div>').editableform({ var $form = $('<div>').editableform({
type: 'text', type: 'text',
name: 'username', name: 'username',
url: '/post', url: '/post',
value: 'vitaliy' value: 'vitaliy'
}); });
//to display form you should call 'render' method //to display form you should call 'render' method
@ -327,20 +327,20 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
@default null @default null
@example @example
url: function(params) { url: function(params) {
if(params.value === 'abc') { if(params.value === 'abc') {
var d = new $.Deferred; var d = new $.Deferred;
return d.reject('field cannot be "abc"'); //returning error via deferred object return d.reject('field cannot be "abc"'); //returning error via deferred object
} else { } else {
someModel.set(params.name, params.value); //save data in some js model someModel.set(params.name, params.value); //save data in some js model
} }
} }
**/ **/
url:null, url:null,
/** /**
Additional params for submit. Function can be used to calculate params dynamically Additional params for submit. Function can be used to calculate params dynamically
@example @example
params: function() { params: function() {
return { a: 1 }; return { a: 1 };
} }
@property params @property params
@ -391,9 +391,9 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
@default null @default null
@example @example
validate: function(value) { validate: function(value) {
if($.trim(value) == '') { if($.trim(value) == '') {
return 'This field is required'; return 'This field is required';
} }
} }
**/ **/
validate: null, validate: null,
@ -406,7 +406,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
@default null @default null
@example @example
success: function(response, newValue) { success: function(response, newValue) {
if(!response.success) return response.msg; if(!response.success) return response.msg;
} }
**/ **/
success: function(response, newValue) {} success: function(response, newValue) {}