Skip to content

Commit

Permalink
Merge pull request #64 from alfredobarron/dev
Browse files Browse the repository at this point in the history
update 2.2.0
  • Loading branch information
alfredobarron committed May 31, 2015
2 parents 402df68 + 7d5272f commit 97986bc
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = function(grunt){
compress: {
main: {
options: {
archive: 'smoke-v2.1.6.zip'
archive: 'smoke-v2.2.0.zip'
},
files: [
//{src: ['path/*'], dest: 'internal_folder/', filter: 'isFile'}, // includes files in path
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smoke",
"version": "2.1.6",
"version": "2.2.0",
"description": "Smoke is the most complete jQuery Plugin and designed for use with Bootstrap 3",
"license": "LGPL",
"authors": [
Expand Down
18 changes: 15 additions & 3 deletions dist/css/smoke.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| Validate
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
.smk-error-text{
.has-feedback .smk-error-text{
position: absolute;
right: 0;
font-size: 12px;
Expand All @@ -32,8 +32,20 @@
.smk-select .smk-error-icon{
right: 10px;
}
.smk-checkbox .smk-error-text, .smk-radio .smk-error-text{
margin-top: -12px
.smk-checkbox .smk-error-text,
.smk-radio .smk-error-text{
margin-top: -12px;
}
/* form-horizontal */
.form-horizontal .has-feedback .smk-error-text {
right: 15px;
}
.form-horizontal .smk-select .smk-error-icon{
right: 25px;
}
.form-horizontal .smk-checkbox .smk-error-text,
.form-horizontal .smk-radio .smk-error-text{
margin-top: 0;
}


Expand Down
2 changes: 1 addition & 1 deletion dist/css/smoke.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions dist/js/smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,10 @@ $.fn.smkClear = function(options) {
*/
$.smkAddError = function (obj, text)
{
// Se obtiene el elemento form-group
var formGroup = $(obj).parents('.form-group');
// Se obtiene el elemento padre
var parent = $(obj).parents('.form-group');
var parent = $(obj).parent();
// Se obtiene el type
var type = $(obj).attr('type');
// Se obtiene el tag
Expand All @@ -496,19 +498,20 @@ $.smkAddError = function (obj, text)

if(type == 'select'){
// Se agrega la clase de error
parent.addClass('has-feedback has-error smk-' + type);
formGroup.addClass('has-feedback has-error smk-' + type);
// Se agrega el icono y el mensaje de error
parent.append(icon + msj);
}else if(type == 'checkbox' || type == 'radio'){
// Se agrega la clase de error
parent.addClass('has-feedback has-error smk-' + type);
formGroup.addClass('has-feedback has-error smk-' + type);
// Se agrega el icono y el mensaje de error
parent.append(msj);
parent.parent().parent().append(msj);
}else{
// Se agrega la clase de error
parent.addClass('has-feedback has-error');
formGroup.addClass('has-feedback has-error');
// Se agrega el icono y el mensaje de error
parent.append(icon + msj);

}
// Se posiciona el focus en el input
obj.focus();
Expand Down
Loading

0 comments on commit 97986bc

Please sign in to comment.