mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 23:36:41 +00:00
[About] Refactor overlay templates
Refactor overlay templates to separate out the overlay container from the inner dialog containing the form; this permits the easy reuse of that overlay container to supply a non-form-like About dialog, WTD-667.
This commit is contained in:
parent
b5ebe5b27f
commit
97d4f34ae2
@ -15,6 +15,16 @@
|
||||
"templates": [
|
||||
{
|
||||
"key": "overlay-dialog",
|
||||
"templateUrl": "templates/overlay-dialog.html"
|
||||
},
|
||||
{
|
||||
"key": "form-dialog",
|
||||
"templateUrl": "templates/dialog.html"
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"key": "overlay",
|
||||
"templateUrl": "templates/overlay.html"
|
||||
}
|
||||
]
|
||||
|
25
platform/commonUI/dialog/res/templates/dialog.html
Normal file
25
platform/commonUI/dialog/res/templates/dialog.html
Normal file
@ -0,0 +1,25 @@
|
||||
<div class="abs top-bar">
|
||||
<div class="title">{{ngModel.title}}</div>
|
||||
<div class="hint">
|
||||
All fields marked <span class="ui-symbol req">*</span> are required.
|
||||
</div>
|
||||
</div>
|
||||
<div class="abs form outline editor">
|
||||
<div class='abs contents'>
|
||||
<mct-form ng-model="ngModel.value"
|
||||
structure="ngModel.structure"
|
||||
name="createForm">
|
||||
</mct-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="abs bottom-bar">
|
||||
<a class='btn lg major'
|
||||
href=''
|
||||
ng-class="{ disabled: !createForm.$valid }"
|
||||
ng-click="ngModel.confirm()">
|
||||
OK
|
||||
</a>
|
||||
<a class='btn lg subtle' href='' ng-click="ngModel.cancel()">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
@ -0,0 +1,4 @@
|
||||
<mct-container key="overlay">
|
||||
<mct-include key="'form-dialog'" ng-model="ngModel">
|
||||
</mct-include>
|
||||
</mct-container>
|
@ -3,32 +3,12 @@
|
||||
<div class="abs holder">
|
||||
<a href=""
|
||||
ng-click="ngModel.cancel()"
|
||||
class="btn normal outline ui-symbol close">x</a>
|
||||
<div class="abs contents">
|
||||
<div class="abs top-bar">
|
||||
<div class="title">{{ngModel.title}}</div>
|
||||
<div class="hint">All fields marked <span class="ui-symbol req">*</span> are required.</div>
|
||||
</div>
|
||||
<div class="abs form outline editor">
|
||||
<div class='abs contents'>
|
||||
<!-- mct-include key="'form'" ng-model="" -->
|
||||
<mct-form ng-model="ngModel.value"
|
||||
structure="ngModel.structure"
|
||||
name="createForm">
|
||||
</mct-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="abs bottom-bar">
|
||||
<a class='btn lg major'
|
||||
href=''
|
||||
ng-class="{ disabled: !createForm.$valid }"
|
||||
ng-click="ngModel.confirm()">
|
||||
OK
|
||||
</a>
|
||||
<a class='btn lg subtle' href='' ng-click="ngModel.cancel()">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
ng-if="ngModel.cancel"
|
||||
class="btn normal outline ui-symbol close">
|
||||
x
|
||||
</a>
|
||||
<div class="abs contents" ng-transclude>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user