Skip to content

Commit

Permalink
Fix #10: Correct btn-vertical bootstrap markup styling
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 5, 2018
1 parent 34179c9 commit 1daca82
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Change Log: `yii2-widget-touchspin`

## Version 1.2.3

**Date:** _under development_
**Date:** 05-Sep-2018

- (enh #10): Correct `btn-vertical` bootstrap markup styling.
- (enh #10): Correct `btn-vertical` bootstrap markup styling.

## Version 1.2.2

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
],
"require": {
"kartik-v/yii2-krajee-base": "~1.9"
"kartik-v/yii2-krajee-base": ">=1.9"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 5 additions & 1 deletion src/assets/css/jquery.bootstrap-touchspin.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
width: 2em;
padding: 0;
text-align: center;
line-height: 1;
line-height: 0.4;
}

.bootstrap-touchspin .input-group-btn-vertical > .btn i {
font-size: 9px;
}

.bootstrap-touchspin .input-group-btn-vertical .bootstrap-touchspin-up {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/css/jquery.bootstrap-touchspin.min.css

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

10 changes: 8 additions & 2 deletions src/assets/js/jquery.bootstrap-touchspin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* A mobile and touch friendly input spinner component for Bootstrap 3 & 4.
* http://www.virtuosoft.eu/code/bootstrap-touchspin/
*
* Modified by Kartik Visweswaran, Krajee.com, Sep 2018
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
*
* Modified by Kartik Visweswaran, Krajee.com, Sep 2018
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
Expand Down Expand Up @@ -285,6 +285,9 @@
}

if (settings.verticalbuttons) {
/*
* BEGIN change by Kartik for better BS3 & BS4 styling
*/
html = '<div class="input-group ' + inputGroupSize + ' bootstrap-touchspin bootstrap-touchspin-injected">' +
'<span class="input-group-addon input-group-prepend bootstrap-touchspin-prefix">' +
'<span class="input-group-text">' + settings.prefix + '</span>' +
Expand All @@ -302,6 +305,9 @@
'</button>' +
'</span>' +
'</span></div>';
/*
* END change by Kartik for better BS3 & BS4 styling
*/
}
else {
html = '<div class="input-group bootstrap-touchspin bootstrap-touchspin-injected"><span class="input-group-btn input-group-prepend"><button class="' + settings.buttondown_class + ' bootstrap-touchspin-down" type="button">' + settings.buttondown_txt + '</button></span><span class="input-group-addon bootstrap-touchspin-prefix input-group-prepend"><span class="input-group-text">' + settings.prefix + '</span></span><span class="input-group-addon bootstrap-touchspin-postfix input-group-append"><span class="input-group-text">' + settings.postfix + '</span></span><span class="input-group-btn input-group-append"><button class="' + settings.buttonup_class + ' bootstrap-touchspin-up" type="button">' + settings.buttonup_txt + '</button></span></div>';
Expand Down
11 changes: 1 addition & 10 deletions src/assets/js/jquery.bootstrap-touchspin.min.js

Large diffs are not rendered by default.

0 comments on commit 1daca82

Please sign in to comment.