Fixed typos.

This commit is contained in:
Caleb Harrelson 2012-12-04 14:54:32 -06:00
parent b2009d7c45
commit 8f43ab95ff
7 changed files with 26 additions and 26 deletions

@ -29,7 +29,7 @@ Version 1.0.1 Nov 22, 2012
[enh] contribution guide in README.md (vitalets)
[enh #7] 'shown', 'hidden' events added (vitalets)
[enh #1] params can be a function to calculate it dynamically (vitalets)
[enh #6] do not preventDetault() in click when toggle='manual'. This allows to have clickable links (vitalets)
[enh #6] do not preventDefault() in click when toggle='manual'. This allows to have clickable links (vitalets)
[bug #3] should not mark element with unsave css if url is user's function (vitalets)
@ -48,13 +48,13 @@ Here list of differences to help you to upgrade your application:
[change] 'toggle' option value can be only click|manual (not toggling element id). In case of 'manual' you should write handler calling 'show' method.
[change] 'validate' option cannot be defined as object anymore.
[change] events 'init', 'update', 'shown', 'hidden' removed. Events 'save', 'cancel' added. Event 'render' remains.
[change] input's optiom 'template' renamed to 'tpl' (to exclude conflict with container's template).
[change] value can be stored internaly as object (previously was always string). Usefull for date inupt.
[change] input's option 'template' renamed to 'tpl' (to exclude conflict with container's template).
[change] value can be stored internally as object (previously was always string). Useful for date input.
[change] 'error' callback option is removed. 'success' callback remained.
[enh] 'source' option in select can be array of structure [{value: 1, text: 'abc'}, {...}]. This allows to keep ordering of items in dropdown list. Previous format is supported for compability.
[enh] 'source' option in select can be array of structure [{value: 1, text: 'abc'}, {...}]. This allows to keep ordering of items in dropdown list. Previous format is supported for compatibility.
[enh] api method 'setValue' to set manually value of editable.
[change] locales directory is excluded from bootstrap-datepicker input. If you need localization you should jus download corresponding file from github.
[change] date and dateui specific options can be set only via 'datepicker' option in first level of config (previously it was possible to set some options directly in config, e.g. weekStart).
[change] if 'url' option defined as function - it is used as submit method instead of ajax (previously it was dynamically return url string and ajax occured anyway)
[change] if 'url' option defined as function - it is used as submit method instead of ajax (previously it was dynamically return url string and ajax occurred anyway)
Also all known bugs of bootstrap-editable were closed.

@ -119,7 +119,7 @@ Applied as jQuery method.
/**
Shows container with form
@method show()
@param {boolean} closeAll Wether to close all other editable containers when showing this one. Default true.
@param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true.
**/
show: function (closeAll) {
this.$element.addClass('editable-open');
@ -167,7 +167,7 @@ Applied as jQuery method.
/**
Toggles container visibility (show / hide)
@method toggle()
@param {boolean} closeAll Wether to close all other editable containers when showing this one. Default true.
@param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true.
**/
toggle: function(closeAll) {
if(this.tip && this.tip().is(':visible')) {
@ -350,7 +350,7 @@ Applied as jQuery method.
**/
placement: 'top',
/**
Wether to hide container on save/cancel.
Whether to hide container on save/cancel.
@property autohide
@type boolean

@ -377,7 +377,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
name: null,
/**
Primary key of editable object (e.g. record id in database). For composite keys use object, e.g. <code>{id: 1, lang: 'en'}</code>.
Can be calculated dinamically via function.
Can be calculated dynamically via function.
@property pk
@type string|object|function
@ -418,7 +418,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
validate: null,
/**
Success callback. Called when value successfully sent on server and **response status = 200**.
Usefull to work with json response. For example, if your backend response can be <code>{success: true}</code>
Useful to work with json response. For example, if your backend response can be <code>{success: true}</code>
or <code>{success: false, msg: "server error"}</code> you can check it inside this callback.
If it returns **string** - means error occured and string is shown as error message.
If it returns **object like** <code>{newValue: &lt;something&gt;}</code> - it overwrites value, submitted by user.
@ -443,7 +443,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
**/
ajaxOptions: null,
/**
Wether to show buttons or not.
Whether to show buttons or not.
Form without buttons can be auto-submitted by input or by onblur = 'submit'.
@property showbuttons
@ -454,7 +454,7 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
/*todo:
Submit strategy. Can be <code>normal|never</code>
<code>submitmode='never'</code> usefull for turning into classic form several inputs and submitting them together manually.
<code>submitmode='never'</code> useful for turning into classic form several inputs and submitting them together manually.
Works pretty with <code>showbuttons=false</code>
@property submitmode
@ -482,10 +482,10 @@ Editableform is linked with one of input types, e.g. 'text' or 'select'.
$.fn.editableform.buttons = '<button type="submit" class="editable-submit">ok</button>'+
'<button type="button" class="editable-cancel">cancel</button>';
//error class attahced to control-group
//error class attached to control-group
$.fn.editableform.errorGroupClass = null;
//error class attahced to editable-error-block
//error class attached to editable-error-block
$.fn.editableform.errorBlockClass = 'editable-error';
//input types

@ -211,7 +211,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
/**
Shows container with form
@method show()
@param {boolean} closeAll Wether to close all other editable containers when showing this one. Default true.
@param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true.
**/
show: function (closeAll) {
if(this.options.disabled) {
@ -256,7 +256,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
/**
Toggles container visibility (show / hide)
@method toggle()
@param {boolean} closeAll Wether to close all other editable containers when showing this one. Default true.
@param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true.
**/
toggle: function(closeAll) {
if(this.container && this.container.tip().is(':visible')) {
@ -312,7 +312,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
Sets new value of editable
@method setValue(value, convertStr)
@param {mixed} value new value
@param {boolean} convertStr wether to convert value from string to internal format
@param {boolean} convertStr whether to convert value from string to internal format
**/
setValue: function(value, convertStr) {
if(convertStr) {
@ -369,7 +369,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
$('#username, #fullname').editable('validate');
// possible result:
{
username: "username is requied",
username: "username is required",
fullname: "fullname should be minimum 3 letters length"
}
**/
@ -515,7 +515,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
**/
emptytext: 'Empty',
/**
Allows to automatically set element's text based on it's value. Can be <code>auto|always|never</code>. Usefull for select and date.
Allows to automatically set element's text based on it's value. Can be <code>auto|always|never</code>. Useful for select and date.
For example, if dropdown list is <code>{1: 'a', 2: 'b'}</code> and element's value set to <code>1</code>, it's html will be automatically set to <code>'a'</code>.
<code>auto</code> - text will be automatically set only if element is empty.
<code>always|never</code> - always(never) try to set element's text.
@ -526,7 +526,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
**/
autotext: 'auto',
/**
Wether to return focus on element after form is closed.
Whether to return focus on element after form is closed.
This allows fully keyboard input.
@property enablefocus

@ -10,7 +10,7 @@ To create your own input you should inherit from this class.
Abstract.prototype = {
/**
Iinitializes input
Initializes input
@method init()
**/
@ -62,7 +62,7 @@ To create your own input you should inherit from this class.
},
/**
Converts value to string (for submiting to server)
Converts value to string (for submitting to server)
@method value2str(value)
@param {mixed} value
@ -114,7 +114,7 @@ To create your own input you should inherit from this class.
},
/**
Creares input.
Creates input.
@method clear()
**/
@ -130,7 +130,7 @@ To create your own input you should inherit from this class.
},
/**
attach handler to automatically submit form when value changed (usefull when buttons not shown)
attach handler to automatically submit form when value changed (useful when buttons not shown)
**/
autosubmit: function() {

@ -232,7 +232,7 @@ List - abstract class for inputs that have source option loaded from js array or
**/
source:null,
/**
Data automatically prepended to the begining of dropdown list.
Data automatically prepended to the beginning of dropdown list.
@property prepend
@type string|array|object

@ -57,7 +57,7 @@ $(function () {
});
// usefull functions
// useful functions
function tip(e) {
return e.data('editableContainer').tip();