2016-01-15 01:08:19 +00:00
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Open MCT Web , Copyright ( c ) 2014 - 2015 , United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration . All rights reserved .
*
* Open MCT Web is licensed under the Apache License , Version 2.0 ( the
* "License" ) ; you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
* http : //www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing , software
* distributed under the License is distributed on an "AS IS" BASIS , WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . See the
* License for the specific language governing permissions and limitations
* under the License .
*
* Open MCT Web includes source code licensed under additional open source
* licenses . See the Open Source Licenses file ( LICENSES . md ) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
define ( [
"./src/LayoutController" ,
"./src/FixedController" ,
"./src/LayoutCompositionPolicy" ,
2016-02-26 21:07:50 +00:00
"text!./res/templates/layout.html" ,
"text!./res/templates/fixed.html" ,
"text!./res/templates/frame.html" ,
"text!./res/templates/elements/telemetry.html" ,
"text!./res/templates/elements/box.html" ,
"text!./res/templates/elements/line.html" ,
"text!./res/templates/elements/text.html" ,
"text!./res/templates/elements/image.html" ,
2016-01-15 01:08:19 +00:00
'legacyRegistry'
] , function (
LayoutController ,
FixedController ,
LayoutCompositionPolicy ,
2016-02-26 21:07:50 +00:00
layoutTemplate ,
fixedTemplate ,
frameTemplate ,
telemetryTemplate ,
boxTemplate ,
lineTemplate ,
textTemplate ,
imageTemplate ,
2016-01-15 01:08:19 +00:00
legacyRegistry
) {
legacyRegistry . register ( "platform/features/layout" , {
"name" : "Layout components." ,
"description" : "Plug in adding Layout capabilities." ,
"extensions" : {
"views" : [
{
"key" : "layout" ,
"name" : "Display Layout" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u004c" ,
2016-01-15 01:08:19 +00:00
"type" : "layout" ,
2016-02-26 21:07:50 +00:00
"template" : layoutTemplate ,
2016-01-15 01:08:19 +00:00
"editable" : true ,
"uses" : [ ]
} ,
{
"key" : "fixed" ,
"name" : "Fixed Position" ,
"glyph" : "3" ,
"type" : "telemetry.panel" ,
2016-02-26 21:07:50 +00:00
"template" : fixedTemplate ,
2016-01-15 01:08:19 +00:00
"uses" : [
"composition"
] ,
"toolbar" : {
"sections" : [
{
"items" : [
{
"method" : "add" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u002b" ,
2016-01-15 01:08:19 +00:00
"control" : "menu-button" ,
"text" : "Add" ,
"options" : [
{
"name" : "Box" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00e0" ,
2016-01-15 01:08:19 +00:00
"key" : "fixed.box"
} ,
{
"name" : "Line" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00e2" ,
2016-01-15 01:08:19 +00:00
"key" : "fixed.line"
} ,
{
"name" : "Text" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00e4" ,
2016-01-15 01:08:19 +00:00
"key" : "fixed.text"
} ,
{
"name" : "Image" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00e3" ,
2016-01-15 01:08:19 +00:00
"key" : "fixed.image"
}
]
}
]
} ,
{
"items" : [
{
"method" : "order" ,
"glyph" : "á" ,
"control" : "menu-button" ,
"options" : [
{
"name" : "Move to Top" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00eb" ,
2016-01-15 01:08:19 +00:00
"key" : "top"
} ,
{
"name" : "Move Up" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u005e" ,
2016-01-15 01:08:19 +00:00
"key" : "up"
} ,
{
"name" : "Move Down" ,
2016-03-24 02:30:20 +00:00
"glyph" : "\u0076" ,
2016-01-15 01:08:19 +00:00
"key" : "down"
} ,
{
"name" : "Move to Bottom" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u00ee" ,
2016-01-15 01:08:19 +00:00
"key" : "bottom"
}
]
} ,
{
"property" : "fill" ,
"glyph" : "" ,
"control" : "color"
} ,
{
"property" : "stroke" ,
"glyph" : "â" ,
"control" : "color"
} ,
{
"property" : "color" ,
"glyph" : "ä" ,
"mandatory" : true ,
"control" : "color"
} ,
{
"property" : "url" ,
"glyph" : "ã" ,
"control" : "dialog-button" ,
"title" : "Image Properties" ,
"dialog" : {
"control" : "textfield" ,
"name" : "Image URL" ,
"required" : true
}
} ,
{
"property" : "text" ,
"glyph" : "G" ,
"control" : "dialog-button" ,
"title" : "Text Properties" ,
"dialog" : {
"control" : "textfield" ,
"name" : "Text" ,
"required" : true
}
} ,
{
"method" : "showTitle" ,
"glyph" : "ç" ,
"control" : "button" ,
"description" : "Show telemetry element title."
} ,
{
"method" : "hideTitle" ,
"glyph" : "å" ,
"control" : "button" ,
"description" : "Hide telemetry element title."
}
]
} ,
{
"items" : [
{
"method" : "remove" ,
"control" : "button" ,
"glyph" : "Z"
}
]
}
]
}
}
] ,
"representations" : [
{
"key" : "frame" ,
2016-02-26 21:07:50 +00:00
"template" : frameTemplate
2016-01-15 01:08:19 +00:00
}
] ,
"controllers" : [
{
"key" : "LayoutController" ,
"implementation" : LayoutController ,
"depends" : [
"$scope"
]
} ,
{
"key" : "FixedController" ,
"implementation" : FixedController ,
"depends" : [
"$scope" ,
"$q" ,
"dialogService" ,
"telemetryHandler" ,
"telemetryFormatter" ,
"throttle"
]
}
] ,
"templates" : [
{
"key" : "fixed.telemetry" ,
2016-02-26 21:07:50 +00:00
"template" : telemetryTemplate
2016-01-15 01:08:19 +00:00
} ,
{
"key" : "fixed.box" ,
2016-02-26 21:07:50 +00:00
"template" : boxTemplate
2016-01-15 01:08:19 +00:00
} ,
{
"key" : "fixed.line" ,
2016-02-26 21:07:50 +00:00
"template" : lineTemplate
2016-01-15 01:08:19 +00:00
} ,
{
"key" : "fixed.text" ,
2016-02-26 21:07:50 +00:00
"template" : textTemplate
2016-01-15 01:08:19 +00:00
} ,
{
"key" : "fixed.image" ,
2016-02-26 21:07:50 +00:00
"template" : imageTemplate
2016-01-15 01:08:19 +00:00
}
] ,
"policies" : [
{
"category" : "composition" ,
"implementation" : LayoutCompositionPolicy
}
] ,
"types" : [
{
"key" : "layout" ,
"name" : "Display Layout" ,
2016-03-24 02:04:32 +00:00
"glyph" : "\u004c" ,
"description" : "Assemble other objects and components together into a reusable screen layout. Working in a simple canvas workspace, simply drag in the objects you want, position and size them. Save your design and view or edit it at any time." ,
2016-03-24 19:05:10 +00:00
"priority" : 900 ,
2016-01-15 01:08:19 +00:00
"features" : "creation" ,
"model" : {
"composition" : [ ]
} ,
"properties" : [
{
"name" : "Layout Grid" ,
"control" : "composite" ,
"pattern" : "^(\\d*[1-9]\\d*)?$" ,
"items" : [
{
"name" : "Horizontal grid (px)" ,
"control" : "textfield" ,
2016-03-16 21:33:23 +00:00
"cssclass" : "l-input-sm l-numeric"
2016-01-15 01:08:19 +00:00
} ,
{
"name" : "Vertical grid (px)" ,
"control" : "textfield" ,
2016-03-16 21:33:23 +00:00
"cssclass" : "l-input-sm l-numeric"
2016-01-15 01:08:19 +00:00
}
] ,
"key" : "layoutGrid" ,
"conversion" : "number[]"
}
]
} ,
{
"key" : "telemetry.panel" ,
"name" : "Telemetry Panel" ,
"glyph" : "t" ,
"description" : "A panel for collecting telemetry elements." ,
2016-03-24 19:05:10 +00:00
"priority" : 899 ,
2016-01-15 01:08:19 +00:00
"delegates" : [
"telemetry"
] ,
"features" : "creation" ,
"contains" : [
{
"has" : "telemetry"
}
] ,
"model" : {
"composition" : [ ]
} ,
"properties" : [
{
"name" : "Layout Grid" ,
"control" : "composite" ,
"items" : [
{
"name" : "Horizontal grid (px)" ,
"control" : "textfield" ,
"cssclass" : "l-small l-numeric"
} ,
{
"name" : "Vertical grid (px)" ,
"control" : "textfield" ,
"cssclass" : "l-small l-numeric"
}
] ,
"pattern" : "^(\\d*[1-9]\\d*)?$" ,
"property" : "layoutGrid" ,
"conversion" : "number[]"
}
]
}
]
}
} ) ;
} ) ;