mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[Fixed Position] Add 'Add' menu button
Add UI for the Add button in fixed position view, WTD-880.
This commit is contained in:
parent
1015e97b3e
commit
2be58579dc
@ -26,9 +26,31 @@
|
||||
"items": [
|
||||
{
|
||||
"method": "add",
|
||||
"control": "button",
|
||||
"control": "menu-button",
|
||||
"text": "Add",
|
||||
"inclusive": true
|
||||
"inclusive": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "Box",
|
||||
"glyph": "\u2610",
|
||||
"key": "fixed.box"
|
||||
},
|
||||
{
|
||||
"name": "Line",
|
||||
"glyph": "-",
|
||||
"key": "fixed.line"
|
||||
},
|
||||
{
|
||||
"name": "Text",
|
||||
"glyph": "\u1D1B",
|
||||
"key": "fixed.text"
|
||||
},
|
||||
{
|
||||
"name": "Image",
|
||||
"glyph": "\u2353",
|
||||
"key": "fixed.image"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -45,6 +45,10 @@
|
||||
{
|
||||
"key": "composite",
|
||||
"templateUrl": "templates/controls/composite.html"
|
||||
},
|
||||
{
|
||||
"key": "menu-button",
|
||||
"templateUrl": "templates/controls/menu-button.html"
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
|
27
platform/forms/res/templates/controls/menu-button.html
Normal file
27
platform/forms/res/templates/controls/menu-button.html
Normal file
@ -0,0 +1,27 @@
|
||||
<div class="s-btn s-icon-btn s-very-subtle btn-menu menu-element dropdown click-invoke"
|
||||
ng-controller="ClickAwayController as toggle">
|
||||
|
||||
<span ng-click="toggle.toggle()">
|
||||
<span class="ui-symbol icon">{{structure.glyph}}</span>
|
||||
<span class="title-label" ng-if="structure.text">
|
||||
{{structure.text}}
|
||||
</span>
|
||||
<span class='ui-symbol icon invoke-menu'
|
||||
ng-if="!structure.text">
|
||||
v
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="menu dropdown" ng-show="toggle.isActive()">
|
||||
<ul>
|
||||
<li ng-repeat="option in structure.options">
|
||||
<a href="" ng-click="structure.click(option.key); toggle.setState(false)">
|
||||
<span class="ui-symbol type-icon icon">
|
||||
{{option.glyph}}
|
||||
</span>
|
||||
{{option.name}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user