diff --git a/dev/jquery.jtable.core.js b/dev/jquery.jtable.core.js index a859986b..d9adbe01 100644 --- a/dev/jquery.jtable.core.js +++ b/dev/jquery.jtable.core.js @@ -99,7 +99,7 @@ * CONSTRUCTOR AND INITIALIZATION METHODS * *************************************************************************/ - /* Contructor. + /* Constructor. *************************************************************************/ _create: function () { @@ -138,8 +138,11 @@ if (props.inputClass == undefined) { props.inputClass = ''; } + if (props.placeholder == undefined) { + props.placeholder = ''; + } - //Convert dependsOn to array if it's a comma seperated lists + //Convert dependsOn to array if it's a comma separated lists if (props.dependsOn && $.type(props.dependsOn) === 'string') { var dependsOnArray = props.dependsOn.split(','); props.dependsOn = []; diff --git a/dev/jquery.jtable.forms.js b/dev/jquery.jtable.forms.js index b497a7e5..34ea15bb 100644 --- a/dev/jquery.jtable.forms.js +++ b/dev/jquery.jtable.forms.js @@ -10,7 +10,7 @@ *************************************************************************/ /* Submits a form asynchronously using AJAX. - * This method is needed, since form submitting logic can be overrided + * This method is needed, since form submitting logic can be overridden * by extensions. *************************************************************************/ _submitFormUsingAjax: function (url, formData, success, error) { @@ -126,10 +126,10 @@ .append($textArea); }, - /* Creates a standart textbox for a field. + /* Creates a standard text input for a field. *************************************************************************/ _createTextInputForField: function (field, fieldName, value) { - var $input = $(''); + var $input = $(''); if (value != undefined) { $input.val(value); } @@ -142,7 +142,7 @@ /* Creates a password input for a field. *************************************************************************/ _createPasswordInputForField: function (field, fieldName, value) { - var $input = $(''); + var $input = $(''); if (value != undefined) { $input.val(value); } @@ -152,7 +152,7 @@ .append($input); }, - /* Creates a checkboxfor a field. + /* Creates a checkbox for a field. *************************************************************************/ _createCheckboxForField: function (field, fieldName, value) { var self = this; @@ -179,7 +179,7 @@ //Check the checkbox if it's value is checked-value if (self._getIsCheckBoxSelectedForFieldByValue(fieldName, value)) { - $checkBox.attr('checked', 'checked'); + $checkBox.prop('checked', true); } //This method sets checkbox's value and text according to state of the checkbox @@ -200,9 +200,9 @@ .addClass('jtable-option-text-clickable') .click(function () { if ($checkBox.is(':checked')) { - $checkBox.attr('checked', false); + $checkBox.prop('checked', false); } else { - $checkBox.attr('checked', true); + $checkBox.prop('checked', true); } refreshCheckBoxValueAndText(); diff --git a/lib/jquery.jtable.js b/lib/jquery.jtable.js index 869af246..c8424eab 100644 --- a/lib/jquery.jtable.js +++ b/lib/jquery.jtable.js @@ -128,7 +128,7 @@ THE SOFTWARE. * CONSTRUCTOR AND INITIALIZATION METHODS * *************************************************************************/ - /* Contructor. + /* Constructor. *************************************************************************/ _create: function () { @@ -167,8 +167,11 @@ THE SOFTWARE. if (props.inputClass == undefined) { props.inputClass = ''; } + if (props.placeholder == undefined) { + props.placeholder = ''; + } - //Convert dependsOn to array if it's a comma seperated lists + //Convert dependsOn to array if it's a comma separated lists if (props.dependsOn && $.type(props.dependsOn) === 'string') { var dependsOnArray = props.dependsOn.split(','); props.dependsOn = []; @@ -1489,7 +1492,7 @@ THE SOFTWARE. *************************************************************************/ /* Submits a form asynchronously using AJAX. - * This method is needed, since form submitting logic can be overrided + * This method is needed, since form submitting logic can be overridden * by extensions. *************************************************************************/ _submitFormUsingAjax: function (url, formData, success, error) { @@ -1605,10 +1608,10 @@ THE SOFTWARE. .append($textArea); }, - /* Creates a standart textbox for a field. + /* Creates a standard text input for a field. *************************************************************************/ _createTextInputForField: function (field, fieldName, value) { - var $input = $(''); + var $input = $(''); if (value != undefined) { $input.val(value); } @@ -1621,7 +1624,7 @@ THE SOFTWARE. /* Creates a password input for a field. *************************************************************************/ _createPasswordInputForField: function (field, fieldName, value) { - var $input = $(''); + var $input = $(''); if (value != undefined) { $input.val(value); } @@ -1631,7 +1634,7 @@ THE SOFTWARE. .append($input); }, - /* Creates a checkboxfor a field. + /* Creates a checkbox for a field. *************************************************************************/ _createCheckboxForField: function (field, fieldName, value) { var self = this; @@ -1658,7 +1661,7 @@ THE SOFTWARE. //Check the checkbox if it's value is checked-value if (self._getIsCheckBoxSelectedForFieldByValue(fieldName, value)) { - $checkBox.attr('checked', 'checked'); + $checkBox.prop('checked', true); } //This method sets checkbox's value and text according to state of the checkbox @@ -1679,9 +1682,9 @@ THE SOFTWARE. .addClass('jtable-option-text-clickable') .click(function () { if ($checkBox.is(':checked')) { - $checkBox.attr('checked', false); + $checkBox.prop('checked', false); } else { - $checkBox.attr('checked', true); + $checkBox.prop('checked', true); } refreshCheckBoxValueAndText();