[Frontend] Improve layout of "locator"

Fixes #1118
Locator in Save In, Move, etc. dialog now
expands vertically to use as much vertical as
possible;
This commit is contained in:
Charles Hacskaylo
2016-08-09 16:06:53 -07:00
parent 5409e3d203
commit 2e8d021a6a
7 changed files with 59 additions and 42 deletions

View File

@ -90,7 +90,9 @@ define(
// Ensure there is always a "save in" section // Ensure there is always a "save in" section
if (includeLocation) { if (includeLocation) {
sections.push({ sections.push({
name: 'Location', rows: [{ name: 'Location',
cssclass: "grows",
rows: [{
name: "Save In", name: "Save In",
control: "locator", control: "locator",
validate: validateLocation, validate: validateLocation,

View File

@ -71,7 +71,7 @@
.form { .form {
margin-bottom: $interiorMarginSm; margin-bottom: $interiorMarginSm;
padding-bottom: $interiorMarginLg; padding-bottom: $interiorMarginLg;
.form-section { .l-section-body {
margin-bottom: 0; margin-bottom: 0;
&:not(.first) { &:not(.first) {
border-top: 1px solid $colorFormLines; border-top: 1px solid $colorFormLines;

View File

@ -25,10 +25,20 @@
.form { .form {
color: $colorFormText; color: $colorFormText;
height: 100%;
width: 100%; width: 100%;
.form-section {
.l-form-section {
position: relative; position: relative;
margin-bottom: $interiorMarginLg * 2; &.grows {
.l-section-body,
.form-row {
@include flex(1 1 auto);
.wrapper {
height: 100%;
}
}
}
} }
.section-header { .section-header {
@ -43,10 +53,14 @@
.form-row { .form-row {
$m: $interiorMargin; $m: $interiorMargin;
box-sizing: border-box; box-sizing: border-box;
@include clearfix;
border-top: 1px solid $colorFormLines; border-top: 1px solid $colorFormLines;
margin-bottom: $interiorMarginLg * 2;
padding: $formTBPad 0; padding: $formTBPad 0;
position: relative; position: relative;
//&ng-form {
// display: block;
//}
&.first { &.first {
border-top: none; border-top: none;
} }
@ -92,9 +106,9 @@
.selector-list { .selector-list {
// Used in create overlay to display tree view // Used in create overlay to display tree view
@include nice-input(); @include nice-input();
$h: 150px;
position: relative; position: relative;
height: $h; min-height: 150px;
height: 100%;
>.wrapper { >.wrapper {
$p: $interiorMargin; $p: $interiorMargin;
overflow: auto; overflow: auto;

View File

@ -95,7 +95,7 @@ define(
this.locationService = locationService; this.locationService = locationService;
this.composeService = composeService; this.composeService = composeService;
this.verb = verb || "Compose"; this.verb = verb || "Compose";
this.suffix = suffix || "to a new location"; this.suffix = suffix || "To a New Location";
} }
AbstractComposeAction.prototype.cloneContext = function () { AbstractComposeAction.prototype.cloneContext = function () {

View File

@ -54,7 +54,7 @@ define(
copyService, copyService,
context, context,
"Duplicate", "Duplicate",
"to a location" "To a Location"
); );
} }

View File

@ -58,6 +58,7 @@ define(
sections: [ sections: [
{ {
name: 'Location', name: 'Location',
cssclass: "grows",
rows: [ rows: [
{ {
name: label, name: label,

View File

@ -19,22 +19,24 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<form name="mctForm" novalidate class="form"> <form name="mctForm" novalidate class="form l-flex-col">
<span ng-repeat="section in structure.sections"> <span ng-repeat="section in structure.sections"
<div class="section-header" ng-if="section.name"> class="l-form-section l-flex-col flex-elem {{ section.cssclass }}">
<div class="section-header flex-elem" ng-if="section.name">
{{section.name}} {{section.name}}
</div> </div>
<div class="form-section" ng-class="{ first:$index < 1 }"> <ng-form class="form-row validates l-flex-row flex-elem {{ section.cssclass }}"
<ng-form name="mctFormInner" ng-repeat="row in section.rows">
<div class="form-row validates l-flex-row"
ng-class="{ ng-class="{
first:$index < 1,
req: row.required, req: row.required,
valid: mctFormInner.$dirty && mctFormInner.$valid, valid: mctFormInner.$dirty && mctFormInner.$valid,
invalid: mctFormInner.$dirty && !mctFormInner.$valid, invalid: mctFormInner.$dirty && !mctFormInner.$valid,
first: $index < 1, first: $index < 1,
'l-controls-first': row.layout === 'control-first', 'l-controls-first': row.layout === 'control-first',
'l-controls-under': row.layout === 'controls-under' 'l-controls-under': row.layout === 'controls-under'
}"> }"
name="mctFormInner"
ng-repeat="row in section.rows">
<div class='label flex-elem' title="{{row.description}}"> <div class='label flex-elem' title="{{row.description}}">
{{row.name}} {{row.name}}
</div> </div>
@ -50,8 +52,6 @@
</mct-control> </mct-control>
</div> </div>
</div> </div>
</div>
</ng-form> </ng-form>
</div>
</span> </span>
</form> </form>