Skip to content

Commit cf2bc2d

Browse files
committed
fix(styling) Makes BS3 forms have 25% of row for labels
Improves (I think, anyway) BS3 styling by increasing width of labels columns. Will affect some screen layouts in existing apps (hopefully for the better).
1 parent 89faa75 commit cf2bc2d

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

js/services/form-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ formsAngular.factory('formGenerator', function (
658658
};
659659

660660
$scope.skipCols = function (index) {
661-
return index > 0 ? 'col-md-offset-2' : '';
661+
return index > 0 ? 'col-md-offset-3' : '';
662662
};
663663

664664
$scope.setFormDirty = function (event) {

js/services/form-markup-helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ formsAngular.factory('formMarkupHelper', [
104104
// Override default label class (can be empty)
105105
classes += ' ' + fieldInfo.labelDefaultClass;
106106
} else if (cssFrameworkService.framework() === 'bs3') {
107-
classes += ' col-sm-2';
107+
classes += ' col-sm-3';
108108
}
109109
} else if (options.formstyle === 'inline') {
110110
labelHTML += ' for="' + fieldInfo.id + '"';
@@ -184,7 +184,7 @@ formsAngular.factory('formMarkupHelper', [
184184
exports.controlDivClasses = function (options) {
185185
var result = [];
186186
if (exports.isHorizontalStyle(options.formstyle)) {
187-
result.push(cssFrameworkService.framework() === 'bs2' ? 'controls' : 'col-sm-10');
187+
result.push(cssFrameworkService.framework() === 'bs2' ? 'controls' : 'col-sm-9');
188188
}
189189
return result;
190190
};

less/forms-angular-bs-common.less

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
}
2424

2525
.header-rhs {
26-
width: 226px;
27-
padding-right: 60px;
26+
min-width: 226px;
2827
min-height: 40px;
29-
}
28+
padding-right: 20px;
29+
padding-bottom: 5px;
30+
display: block;}
3031

3132
.list-header .header-rhs {
3233
margin: 15px 0;
@@ -40,13 +41,6 @@
4041
z-index: 1;
4142
}
4243

43-
.header-rhs {
44-
width: inherited !important;
45-
padding-right: 20px !important;
46-
padding-bottom: 5px;
47-
display: block;
48-
}
49-
5044
// Modifications to ngGrid style
5145

5246
.gridStyle {

0 commit comments

Comments
 (0)