Skip to content

Commit 277942d

Browse files
committed
JBDS-3812 Target folder input looks weird
1 parent 15d9b0d commit 277942d

4 files changed

Lines changed: 50 additions & 38 deletions

File tree

browser/app.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ footer {
362362

363363
#location-form-container {
364364
padding-right: 25%;
365+
365366
}
366367

367368
.location-form-elements {
@@ -378,6 +379,7 @@ footer {
378379

379380
#location-form-browse {
380381
margin-top: 25px;
382+
white-space: nowrap;
381383
}
382384

383385
.location-browse-container {
@@ -394,7 +396,7 @@ footer {
394396

395397
.location-browse-input {
396398
width: 60%;
397-
margin-right: -4px;
399+
margin-right: 0px;
398400
}
399401

400402
.location-browse-btn {

browser/pages/location/location.html

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p id="location-form-instructions" class="location-form-elements">
1010
This installer will automatically detect the existing Red Hat products and tools that meet the requirements and
1111
<b>help you install the rest of the components</b>. Before it gets started, please browse to locate the installation
12-
folder or use the default location.
12+
folder or use the default location.
1313
</p>
1414
<p id="location-form-note" class="location-form-elements">
1515
Note: You can NOT choose the folder again once components start to get installed.
@@ -20,24 +20,29 @@
2020
Select the installation folder
2121
</label>
2222
<input name="folder" type="text" id="location-browse-input-folder" class="location-browse-input"
23-
ng-init="locCtrl.checkFolder()" ng-change="locCtrl.folderChanged()" ng-model="locCtrl.folder" path-validator/>
23+
ng-init="locCtrl.checkFolder()" ng-change="locCtrl.folderChanged()" ng-model="locCtrl.folder" path-validator autofocus/>
2424
<button id="location-browse-btn" type="button" class="btn btn-primary location-browse-btn" ng-click="locCtrl.selectFolder()">Browse</button>
25-
<span id="folderStatus" class="sr-only" ng-show="locationForm.folder.$invalid">(error)</span>
2625

27-
28-
<div ng-show="!locationForm.folder.$invalid" class="has-warning">
29-
<div id="existingFolderStatus" ng-show="locCtrl.folderExists" class="help-block has-warning">
26+
<div ng-show="!locationForm.folder.$invalid && locCtrl.folderExists" class="has-warning">
27+
<strong id="existingFolderStatus" class="help-block">
3028
<span class="pficon pficon-warning-triangle-o"></span>
31-
<strong>The selected folder already exists, some files might be overwritten.</strong>
32-
</div>
33-
<div id="createFolderStatus" ng-show="!locCtrl.folderExists" class="help-block">
29+
The selected folder already exists, some files might be overwritten.
30+
</strong>
31+
</div>
32+
33+
<div ng-show="!locationForm.folder.$invalid && !locCtrl.folderExists">
34+
<strong id="createFolderStatus" class="help-block">
3435
<span class="pficon pficon-info"></span>
35-
<strong>The selected folder will be created.</strong>
36-
</div>
36+
The selected folder will be created.
37+
</strong>
38+
</div>
39+
40+
<div ng-show="locationForm.folder.$error" class="help-block has-error">
41+
<ng-messages for="locationForm.folder.$error">
42+
<ng-messages-include src="pages/location/messages.html"></ng-messages-include>
43+
</ng-messages>
3744
</div>
38-
<ng-messages for="locationForm.folder.$error">
39-
<ng-messages-include src="pages/location/messages.html"></ng-messages-include>
40-
</ng-messages>
45+
4146
<div id="vagrantHomeStatus" ng-show="locCtrl.vagrantHomeHasSpace" class="help-block has-error">
4247
<span class="pficon pficon-error-circle-o"></span>
4348
<strong>
Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
<div id="pathRequiredStatus" ng-message="notSelected" class="help-block has-error">
1+
<strong id="pathRequiredStatus" ng-message="notSelected" class="help-block has-error">
2+
<span class="pficon-error-circle-o"></span>
3+
Please select an installation folder.
4+
</strong>
5+
6+
<strong id="invalidPathStatus" ng-message="notAbsolute" class="help-block has-error">
27
<span class="pficon-error-circle-o"></span>
3-
<strong>Please select an installation folder.</strong>
4-
</div>
5-
<div id="invalidPathStatus" ng-message="notAbsolute" class="help-block has-error">
8+
The selection is not a valid absolute path.
9+
</strong>
10+
11+
<strong id="pathFormatStatus" ng-message="invalidFormat" class="help-block has-error">
612
<span class="pficon-error-circle-o"></span>
7-
<strong>The selection is not a valid absolute path.</strong>
8-
</div>
9-
<div id="pathFormatStatus" ng-message="invalidFormat" class="help-block has-error">
10-
<span class="pficon pficon-error-circle-o"></span>
11-
<strong>Selected path has invalid format.</strong>
12-
</div>
13-
<div id="pathDriveStatus" ng-message="invalidDisk" class="help-block has-error">
14-
<span class="pficon pficon-error-circle-o"></span>
15-
<strong>Selected disk does not exist.</strong>
16-
</div>
17-
<div id="pathTooLongStatus" ng-message="tooLong" class="help-block has-error">
18-
<span class="pficon pficon-error-circle-o"></span>
19-
<strong>The path is too long.</strong>
20-
</div>
21-
<div id="pathWithSpacesStatus" ng-message="hasSpaces" class="help-block has-error">
22-
<span class="pficon pficon-error-circle-o"></span>
23-
<strong>The path has spaces. Please choose another location with NO spaces.</strong>
24-
</div>
13+
Selected path has invalid format.
14+
</strong>
15+
16+
<strong id="pathDriveStatus" ng-message="invalidDisk" class="help-block has-error">
17+
<span class="pficon-error-circle-o"></span>
18+
Selected disk does not exist.
19+
</strong>
20+
21+
<strong id="pathTooLongStatus" ng-message="tooLong" class="help-block has-error">
22+
<span class="pficon-error-circle-o"></span>
23+
The path is too long.
24+
</strong>
25+
26+
<strong id="pathWithSpacesStatus" ng-message="hasSpaces" class="help-block has-error">
27+
<span class="pficon-error-circle-o"></span>
28+
The path has spaces. Please choose another location with NO spaces.
29+
</strong>

test/ui/location-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ describe('Location page', function() {
148148
locationField.sendKeys('c:\\');
149149

150150
expect(existingFolderStatus.isDisplayed()).toBe(true);
151-
expect(existingFolderStatus.getAttribute('class')).toMatch('help-block has-warning');
151+
expect(existingFolderStatus.getAttribute('class')).toMatch('help-block');
152152
expect(nextButton.isEnabled()).toBe(true);
153153
});
154154

0 commit comments

Comments
 (0)