Skip to content

Commit 97986bc

Browse files
committed
Merge pull request #64 from alfredobarron/dev
update 2.2.0
2 parents 402df68 + 7d5272f commit 97986bc

21 files changed

+63
-33
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function(grunt){
3737
compress: {
3838
main: {
3939
options: {
40-
archive: 'smoke-v2.1.6.zip'
40+
archive: 'smoke-v2.2.0.zip'
4141
},
4242
files: [
4343
//{src: ['path/*'], dest: 'internal_folder/', filter: 'isFile'}, // includes files in path

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smoke",
3-
"version": "2.1.6",
3+
"version": "2.2.0",
44
"description": "Smoke is the most complete jQuery Plugin and designed for use with Bootstrap 3",
55
"license": "LGPL",
66
"authors": [

dist/css/smoke.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| Validate
2222
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2323
*/
24-
.smk-error-text{
24+
.has-feedback .smk-error-text{
2525
position: absolute;
2626
right: 0;
2727
font-size: 12px;
@@ -32,8 +32,20 @@
3232
.smk-select .smk-error-icon{
3333
right: 10px;
3434
}
35-
.smk-checkbox .smk-error-text, .smk-radio .smk-error-text{
36-
margin-top: -12px
35+
.smk-checkbox .smk-error-text,
36+
.smk-radio .smk-error-text{
37+
margin-top: -12px;
38+
}
39+
/* form-horizontal */
40+
.form-horizontal .has-feedback .smk-error-text {
41+
right: 15px;
42+
}
43+
.form-horizontal .smk-select .smk-error-icon{
44+
right: 25px;
45+
}
46+
.form-horizontal .smk-checkbox .smk-error-text,
47+
.form-horizontal .smk-radio .smk-error-text{
48+
margin-top: 0;
3749
}
3850

3951

dist/css/smoke.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/smoke.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,10 @@ $.fn.smkClear = function(options) {
471471
*/
472472
$.smkAddError = function (obj, text)
473473
{
474+
// Se obtiene el elemento form-group
475+
var formGroup = $(obj).parents('.form-group');
474476
// Se obtiene el elemento padre
475-
var parent = $(obj).parents('.form-group');
477+
var parent = $(obj).parent();
476478
// Se obtiene el type
477479
var type = $(obj).attr('type');
478480
// Se obtiene el tag
@@ -496,19 +498,20 @@ $.smkAddError = function (obj, text)
496498

497499
if(type == 'select'){
498500
// Se agrega la clase de error
499-
parent.addClass('has-feedback has-error smk-' + type);
501+
formGroup.addClass('has-feedback has-error smk-' + type);
500502
// Se agrega el icono y el mensaje de error
501503
parent.append(icon + msj);
502504
}else if(type == 'checkbox' || type == 'radio'){
503505
// Se agrega la clase de error
504-
parent.addClass('has-feedback has-error smk-' + type);
506+
formGroup.addClass('has-feedback has-error smk-' + type);
505507
// Se agrega el icono y el mensaje de error
506-
parent.append(msj);
508+
parent.parent().parent().append(msj);
507509
}else{
508510
// Se agrega la clase de error
509-
parent.addClass('has-feedback has-error');
511+
formGroup.addClass('has-feedback has-error');
510512
// Se agrega el icono y el mensaje de error
511513
parent.append(icon + msj);
514+
512515
}
513516
// Se posiciona el focus en el input
514517
obj.focus();

0 commit comments

Comments
 (0)