Merge branch 'master' of https://github.com/nasa/openmctweb into search
Conflicts: platform/commonUI/general/src/controllers/TreeNodeController.js platform/persistence/elastic/src/ElasticSearchProvider.js
This commit is contained in:
@@ -196,7 +196,7 @@
|
||||
{
|
||||
"key": "label",
|
||||
"templateUrl": "templates/label.html",
|
||||
"uses": [ "type" ],
|
||||
"uses": [ "type", "location" ],
|
||||
"gestures": [ "drag", "menu", "info" ]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/* line 5, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 5, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
@@ -114,38 +114,38 @@ time, mark, audio, video {
|
||||
font-size: 100%;
|
||||
vertical-align: baseline; }
|
||||
|
||||
/* line 22, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 22, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
html {
|
||||
line-height: 1; }
|
||||
|
||||
/* line 24, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 24, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
ol, ul {
|
||||
list-style: none; }
|
||||
|
||||
/* line 26, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 26, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0; }
|
||||
|
||||
/* line 28, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 28, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
caption, th, td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
vertical-align: middle; }
|
||||
|
||||
/* line 30, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 30, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
q, blockquote {
|
||||
quotes: none; }
|
||||
/* line 103, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 103, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
q:before, q:after, blockquote:before, blockquote:after {
|
||||
content: "";
|
||||
content: none; }
|
||||
|
||||
/* line 32, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 32, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
a img {
|
||||
border: none; }
|
||||
|
||||
/* line 116, ../../../../../../../../../../Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
/* line 116, ../../../../../../../../.gem/ruby/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/reset/_utilities.scss */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary {
|
||||
display: block; }
|
||||
|
||||
@@ -1240,29 +1240,32 @@ table {
|
||||
table .tr .th:first-child {
|
||||
border-left: none; }
|
||||
/* line 85, ../sass/lists/_tabular.scss */
|
||||
.tabular tr th.sort .icon-sorting:before, .tabular tr .th.sort .icon-sorting:before, .tabular .tr th.sort .icon-sorting:before, .tabular .tr .th.sort .icon-sorting:before,
|
||||
table tr th.sort .icon-sorting:before,
|
||||
table tr .th.sort .icon-sorting:before,
|
||||
table .tr th.sort .icon-sorting:before,
|
||||
table .tr .th.sort .icon-sorting:before {
|
||||
display: inline-block;
|
||||
.tabular tr th.sort.sort:after, .tabular tr .th.sort.sort:after, .tabular .tr th.sort.sort:after, .tabular .tr .th.sort.sort:after,
|
||||
table tr th.sort.sort:after,
|
||||
table tr .th.sort.sort:after,
|
||||
table .tr th.sort.sort:after,
|
||||
table .tr .th.sort.sort:after {
|
||||
color: #49dedb;
|
||||
font-family: symbolsfont;
|
||||
margin-left: 5px; }
|
||||
/* line 90, ../sass/lists/_tabular.scss */
|
||||
.tabular tr th.sort.asc .icon-sorting:before, .tabular tr .th.sort.asc .icon-sorting:before, .tabular .tr th.sort.asc .icon-sorting:before, .tabular .tr .th.sort.asc .icon-sorting:before,
|
||||
table tr th.sort.asc .icon-sorting:before,
|
||||
table tr .th.sort.asc .icon-sorting:before,
|
||||
table .tr th.sort.asc .icon-sorting:before,
|
||||
table .tr .th.sort.asc .icon-sorting:before {
|
||||
content: '0'; }
|
||||
font-size: 8px;
|
||||
content: "\ed";
|
||||
display: inline-block;
|
||||
margin-left: 3px; }
|
||||
/* line 93, ../sass/lists/_tabular.scss */
|
||||
.tabular tr th.sort.desc .icon-sorting:before, .tabular tr .th.sort.desc .icon-sorting:before, .tabular .tr th.sort.desc .icon-sorting:before, .tabular .tr .th.sort.desc .icon-sorting:before,
|
||||
table tr th.sort.desc .icon-sorting:before,
|
||||
table tr .th.sort.desc .icon-sorting:before,
|
||||
table .tr th.sort.desc .icon-sorting:before,
|
||||
table .tr .th.sort.desc .icon-sorting:before {
|
||||
content: '1'; }
|
||||
/* line 98, ../sass/lists/_tabular.scss */
|
||||
.tabular tr th.sort.sort.desc:after, .tabular tr .th.sort.sort.desc:after, .tabular .tr th.sort.sort.desc:after, .tabular .tr .th.sort.sort.desc:after,
|
||||
table tr th.sort.sort.desc:after,
|
||||
table tr .th.sort.sort.desc:after,
|
||||
table .tr th.sort.sort.desc:after,
|
||||
table .tr .th.sort.sort.desc:after {
|
||||
content: "\ec"; }
|
||||
/* line 97, ../sass/lists/_tabular.scss */
|
||||
.tabular tr th.sortable, .tabular tr .th.sortable, .tabular .tr th.sortable, .tabular .tr .th.sortable,
|
||||
table tr th.sortable,
|
||||
table tr .th.sortable,
|
||||
table .tr th.sortable,
|
||||
table .tr .th.sortable {
|
||||
cursor: pointer; }
|
||||
/* line 101, ../sass/lists/_tabular.scss */
|
||||
.tabular tr td, .tabular tr .td, .tabular .tr td, .tabular .tr .td,
|
||||
table tr td,
|
||||
table tr .td,
|
||||
@@ -1274,21 +1277,21 @@ table {
|
||||
padding: 3px 5px;
|
||||
word-wrap: break-word;
|
||||
vertical-align: top; }
|
||||
/* line 105, ../sass/lists/_tabular.scss */
|
||||
/* line 108, ../sass/lists/_tabular.scss */
|
||||
.tabular tr td.numeric, .tabular tr .td.numeric, .tabular .tr td.numeric, .tabular .tr .td.numeric,
|
||||
table tr td.numeric,
|
||||
table tr .td.numeric,
|
||||
table .tr td.numeric,
|
||||
table .tr .td.numeric {
|
||||
text-align: right; }
|
||||
/* line 108, ../sass/lists/_tabular.scss */
|
||||
/* line 111, ../sass/lists/_tabular.scss */
|
||||
.tabular tr td.s-cell-type-value, .tabular tr .td.s-cell-type-value, .tabular .tr td.s-cell-type-value, .tabular .tr .td.s-cell-type-value,
|
||||
table tr td.s-cell-type-value,
|
||||
table tr .td.s-cell-type-value,
|
||||
table .tr td.s-cell-type-value,
|
||||
table .tr .td.s-cell-type-value {
|
||||
text-align: right; }
|
||||
/* line 110, ../sass/lists/_tabular.scss */
|
||||
/* line 113, ../sass/lists/_tabular.scss */
|
||||
.tabular tr td.s-cell-type-value .l-cell-contents, .tabular tr .td.s-cell-type-value .l-cell-contents, .tabular .tr td.s-cell-type-value .l-cell-contents, .tabular .tr .td.s-cell-type-value .l-cell-contents,
|
||||
table tr td.s-cell-type-value .l-cell-contents,
|
||||
table tr .td.s-cell-type-value .l-cell-contents,
|
||||
@@ -1299,23 +1302,23 @@ table {
|
||||
border-radius: 2px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px; }
|
||||
/* line 126, ../sass/lists/_tabular.scss */
|
||||
/* line 129, ../sass/lists/_tabular.scss */
|
||||
.tabular.filterable tbody, .tabular.filterable .tbody,
|
||||
table.filterable tbody,
|
||||
table.filterable .tbody {
|
||||
top: 44px; }
|
||||
/* line 129, ../sass/lists/_tabular.scss */
|
||||
/* line 132, ../sass/lists/_tabular.scss */
|
||||
.tabular.filterable input[type="text"],
|
||||
table.filterable input[type="text"] {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 100%; }
|
||||
/* line 135, ../sass/lists/_tabular.scss */
|
||||
/* line 138, ../sass/lists/_tabular.scss */
|
||||
.tabular.fixed-header,
|
||||
table.fixed-header {
|
||||
height: 100%; }
|
||||
/* line 137, ../sass/lists/_tabular.scss */
|
||||
/* line 140, ../sass/lists/_tabular.scss */
|
||||
.tabular.fixed-header thead, .tabular.fixed-header .thead,
|
||||
.tabular.fixed-header tbody tr, .tabular.fixed-header .tbody .tr,
|
||||
table.fixed-header thead,
|
||||
@@ -1324,12 +1327,12 @@ table {
|
||||
table.fixed-header .tbody .tr {
|
||||
display: table;
|
||||
table-layout: fixed; }
|
||||
/* line 142, ../sass/lists/_tabular.scss */
|
||||
/* line 145, ../sass/lists/_tabular.scss */
|
||||
.tabular.fixed-header thead, .tabular.fixed-header .thead,
|
||||
table.fixed-header thead,
|
||||
table.fixed-header .thead {
|
||||
width: calc(100% - 10px); }
|
||||
/* line 144, ../sass/lists/_tabular.scss */
|
||||
/* line 147, ../sass/lists/_tabular.scss */
|
||||
.tabular.fixed-header thead:before, .tabular.fixed-header .thead:before,
|
||||
table.fixed-header thead:before,
|
||||
table.fixed-header .thead:before {
|
||||
@@ -1340,7 +1343,7 @@ table {
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
background: rgba(255, 255, 255, 0.15); }
|
||||
/* line 154, ../sass/lists/_tabular.scss */
|
||||
/* line 157, ../sass/lists/_tabular.scss */
|
||||
.tabular.fixed-header tbody, .tabular.fixed-header .tbody,
|
||||
table.fixed-header tbody,
|
||||
table.fixed-header .tbody {
|
||||
@@ -1355,7 +1358,7 @@ table {
|
||||
top: 22px;
|
||||
display: block;
|
||||
overflow-y: scroll; }
|
||||
/* line 162, ../sass/lists/_tabular.scss */
|
||||
/* line 165, ../sass/lists/_tabular.scss */
|
||||
.tabular.t-event-messages td, .tabular.t-event-messages .td,
|
||||
table.t-event-messages td,
|
||||
table.t-event-messages .td {
|
||||
@@ -4454,26 +4457,26 @@ input[type="text"] {
|
||||
.l-infobubble-wrapper .l-infobubble table tr td {
|
||||
padding: 2px 0;
|
||||
vertical-align: top; }
|
||||
/* line 57, ../sass/helpers/_bubbles.scss */
|
||||
/* line 53, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper .l-infobubble table tr td.label {
|
||||
padding-right: 10px;
|
||||
white-space: nowrap; }
|
||||
/* line 61, ../sass/helpers/_bubbles.scss */
|
||||
/* line 57, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper .l-infobubble table tr td.value {
|
||||
white-space: nowrap; }
|
||||
/* line 65, ../sass/helpers/_bubbles.scss */
|
||||
word-break: break-all; }
|
||||
/* line 61, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper .l-infobubble table tr td.align-wrap {
|
||||
white-space: normal; }
|
||||
/* line 71, ../sass/helpers/_bubbles.scss */
|
||||
/* line 67, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper .l-infobubble .title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 5px; }
|
||||
/* line 78, ../sass/helpers/_bubbles.scss */
|
||||
/* line 74, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-left {
|
||||
margin-left: 20px; }
|
||||
/* line 80, ../sass/helpers/_bubbles.scss */
|
||||
/* line 76, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-left .l-infobubble::before {
|
||||
right: 100%;
|
||||
width: 0;
|
||||
@@ -4481,10 +4484,10 @@ input[type="text"] {
|
||||
border-top: 6.66667px solid transparent;
|
||||
border-bottom: 6.66667px solid transparent;
|
||||
border-right: 10px solid #ddd; }
|
||||
/* line 86, ../sass/helpers/_bubbles.scss */
|
||||
/* line 82, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-right {
|
||||
margin-right: 20px; }
|
||||
/* line 88, ../sass/helpers/_bubbles.scss */
|
||||
/* line 84, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-right .l-infobubble::before {
|
||||
left: 100%;
|
||||
width: 0;
|
||||
@@ -4492,16 +4495,16 @@ input[type="text"] {
|
||||
border-top: 6.66667px solid transparent;
|
||||
border-bottom: 6.66667px solid transparent;
|
||||
border-left: 10px solid #ddd; }
|
||||
/* line 95, ../sass/helpers/_bubbles.scss */
|
||||
/* line 91, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-top .l-infobubble::before {
|
||||
top: 20px; }
|
||||
/* line 101, ../sass/helpers/_bubbles.scss */
|
||||
/* line 97, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-btm .l-infobubble::before {
|
||||
bottom: 20px; }
|
||||
/* line 106, ../sass/helpers/_bubbles.scss */
|
||||
/* line 102, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-down {
|
||||
margin-bottom: 10px; }
|
||||
/* line 108, ../sass/helpers/_bubbles.scss */
|
||||
/* line 104, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-down .l-infobubble::before {
|
||||
left: 50%;
|
||||
top: 100%;
|
||||
@@ -4509,21 +4512,21 @@ input[type="text"] {
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top: 7.5px solid #ddd; }
|
||||
/* line 117, ../sass/helpers/_bubbles.scss */
|
||||
/* line 113, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper .arw {
|
||||
z-index: 2; }
|
||||
/* line 120, ../sass/helpers/_bubbles.scss */
|
||||
/* line 116, ../sass/helpers/_bubbles.scss */
|
||||
.l-infobubble-wrapper.arw-up .arw.arw-down, .l-infobubble-wrapper.arw-down .arw.arw-up {
|
||||
display: none; }
|
||||
|
||||
/* line 127, ../sass/helpers/_bubbles.scss */
|
||||
/* line 125, ../sass/helpers/_bubbles.scss */
|
||||
.l-thumbsbubble-wrapper .arw-up {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 6.66667px solid transparent;
|
||||
border-right: 6.66667px solid transparent;
|
||||
border-bottom: 10px solid #4d4d4d; }
|
||||
/* line 130, ../sass/helpers/_bubbles.scss */
|
||||
/* line 128, ../sass/helpers/_bubbles.scss */
|
||||
.l-thumbsbubble-wrapper .arw-down {
|
||||
width: 0;
|
||||
height: 0;
|
||||
@@ -4531,7 +4534,7 @@ input[type="text"] {
|
||||
border-right: 6.66667px solid transparent;
|
||||
border-top: 10px solid #4d4d4d; }
|
||||
|
||||
/* line 134, ../sass/helpers/_bubbles.scss */
|
||||
/* line 133, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble {
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
@@ -4542,22 +4545,29 @@ input[type="text"] {
|
||||
background: #ddd;
|
||||
color: #666;
|
||||
font-size: 0.8rem; }
|
||||
/* line 141, ../sass/helpers/_bubbles.scss */
|
||||
/* line 140, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble .title {
|
||||
color: #333333;
|
||||
font-weight: bold; }
|
||||
/* line 146, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble tr td {
|
||||
border-top: 1px solid #c4c4c4;
|
||||
.s-infobubble table tr td {
|
||||
border: none;
|
||||
border-top: 1px solid #c4c4c4 !important;
|
||||
font-size: 0.9em; }
|
||||
/* line 150, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble tr:first-child td {
|
||||
/* line 152, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble table tr:first-child td {
|
||||
border-top: none !important; }
|
||||
/* line 157, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble:first-child td {
|
||||
border-top: none; }
|
||||
/* line 154, ../sass/helpers/_bubbles.scss */
|
||||
/* line 161, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble .label {
|
||||
color: gray; }
|
||||
/* line 165, ../sass/helpers/_bubbles.scss */
|
||||
.s-infobubble .value {
|
||||
color: #333333; }
|
||||
|
||||
/* line 159, ../sass/helpers/_bubbles.scss */
|
||||
/* line 171, ../sass/helpers/_bubbles.scss */
|
||||
.s-thumbsbubble {
|
||||
background: #4d4d4d;
|
||||
color: #b3b3b3; }
|
||||
|
||||
@@ -124,8 +124,8 @@ ul.tree {
|
||||
transition: background-color 0.25s;
|
||||
display: block;
|
||||
font-size: 0.8em;
|
||||
height: 1.4rem;
|
||||
line-height: 1.4rem;
|
||||
height: 1.5rem;
|
||||
line-height: 1.5rem;
|
||||
margin-bottom: 3px;
|
||||
position: relative; }
|
||||
/* line 39, ../sass/tree/_tree.scss */
|
||||
|
||||
@@ -147,7 +147,7 @@ $controlDisabledOpacity: 0.3;
|
||||
$formLabelW: 20%;
|
||||
$formInputH: 22px;
|
||||
$formRowCtrlsH: 14px;
|
||||
$menuLineH: 1.4rem;
|
||||
$menuLineH: 1.5rem;
|
||||
$scrollbarTrackSize: 10px;
|
||||
$scrollbarTrackColorBg: rgba(#000, 0.4);
|
||||
$btnStdH: 25px;
|
||||
|
||||
@@ -48,19 +48,15 @@
|
||||
width: 100%;
|
||||
tr {
|
||||
td {
|
||||
//max-width: 150px;
|
||||
padding: 2px 0;
|
||||
vertical-align: top;
|
||||
//white-space: nowrap;
|
||||
//overflow: hidden;
|
||||
//text-overflow: ellipsis;
|
||||
&.label {
|
||||
padding-right: $interiorMargin * 2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
&.value {
|
||||
white-space: nowrap;
|
||||
//width: 90%;
|
||||
//word-wrap: break-word; // Doesn't work in <td>?
|
||||
word-break: break-all;
|
||||
}
|
||||
&.align-wrap {
|
||||
white-space: normal;
|
||||
@@ -118,7 +114,9 @@
|
||||
z-index: 2;
|
||||
}
|
||||
&.arw-up .arw.arw-down,
|
||||
&.arw-down .arw.arw-up { display: none; }
|
||||
&.arw-down .arw.arw-up {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
//************************************************* LOOK AND FEEL
|
||||
@@ -131,6 +129,7 @@
|
||||
@include triangle('down', $bubbleArwSize, 1.5, $colorThumbsBubbleBg);
|
||||
}
|
||||
}
|
||||
|
||||
.s-infobubble {
|
||||
$emFg: darken($colorInfoBubbleFg, 20%);
|
||||
@include border-radius($basicCr);
|
||||
@@ -142,18 +141,31 @@
|
||||
color: $emFg;
|
||||
font-weight: bold;
|
||||
}
|
||||
tr {
|
||||
td {
|
||||
border-top: 1px solid darken($colorInfoBubbleBg, 10%);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
&:first-child td {
|
||||
border-top: none;
|
||||
table {
|
||||
tr {
|
||||
td {
|
||||
border: none;
|
||||
border-top: 1px solid darken($colorInfoBubbleBg, 10%) !important;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
&:first-child td {
|
||||
border-top: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: lighten($emFg, 30%);
|
||||
}
|
||||
|
||||
.value {
|
||||
color: $emFg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.s-thumbsbubble {
|
||||
|
||||
@@ -82,18 +82,21 @@ table {
|
||||
border-left: none;
|
||||
}
|
||||
&.sort {
|
||||
.icon-sorting:before {
|
||||
display: inline-block;
|
||||
&.sort:after {
|
||||
color: $colorIconLink;
|
||||
font-family: symbolsfont;
|
||||
margin-left: 5px;
|
||||
font-size: 8px;
|
||||
content: "\ed";
|
||||
display: inline-block;
|
||||
margin-left: $interiorMarginSm;
|
||||
}
|
||||
&.asc .icon-sorting:before {
|
||||
content: '0';
|
||||
}
|
||||
&.desc .icon-sorting:before {
|
||||
content: '1';
|
||||
&.sort.desc:after {
|
||||
content: "\ec";
|
||||
}
|
||||
}
|
||||
&.sortable {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
td, .td {
|
||||
border-bottom: 1px solid $tabularColorBorder;
|
||||
|
||||
@@ -22,7 +22,13 @@
|
||||
<span class="label s-label">
|
||||
<span class='ui-symbol icon type-icon'>
|
||||
{{type.getGlyph()}}
|
||||
<span class='ui-symbol icon alert hidden'>!</span>
|
||||
<span
|
||||
class='ui-symbol icon l-icon-link'
|
||||
ng-show="location.isLink()"
|
||||
></span>
|
||||
<span class='ui-symbol icon l-icon-alert'></span>
|
||||
</span>
|
||||
<span class='title-label'>
|
||||
{{model.name}}
|
||||
</span>
|
||||
<span class='title-label'>{{model.name}}</span>
|
||||
</span>
|
||||
|
||||
@@ -22,29 +22,29 @@
|
||||
<span ng-controller="ToggleController as toggle">
|
||||
<span ng-controller="TreeNodeController as treeNode">
|
||||
<span
|
||||
class="tree-item menus-to-left"
|
||||
ng-class="{selected: treeNode.isSelected()}"
|
||||
>
|
||||
class="tree-item menus-to-left"
|
||||
ng-class="{selected: treeNode.isSelected()}"
|
||||
>
|
||||
<span
|
||||
class='ui-symbol view-control'
|
||||
ng-click="toggle.toggle(); treeNode.trackExpansion()"
|
||||
ng-if="model.composition !== undefined"
|
||||
>
|
||||
class='ui-symbol view-control'
|
||||
ng-click="toggle.toggle(); treeNode.trackExpansion()"
|
||||
ng-if="model.composition !== undefined"
|
||||
>
|
||||
{{toggle.isActive() ? "v" : ">"}}
|
||||
</span>
|
||||
<mct-representation
|
||||
key="'label'"
|
||||
mct-object="domainObject"
|
||||
ng-model="ngModel"
|
||||
ng-click="ngModel.selectedObject = domainObject"
|
||||
>
|
||||
key="'label'"
|
||||
mct-object="domainObject"
|
||||
ng-model="ngModel"
|
||||
ng-click="ngModel.selectedObject = domainObject"
|
||||
>
|
||||
</mct-representation>
|
||||
</span>
|
||||
<span
|
||||
class="tree-item-subtree"
|
||||
ng-show="toggle.isActive()"
|
||||
ng-if="model.composition !== undefined"
|
||||
>
|
||||
class="tree-item-subtree"
|
||||
ng-show="toggle.isActive()"
|
||||
ng-if="model.composition !== undefined"
|
||||
>
|
||||
|
||||
<mct-representation key="'subtree'"
|
||||
ng-model="ngModel"
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* This bundle provides various general-purpose UI elements, including
|
||||
* platform styling.
|
||||
* @namespace platform/commonUI/general
|
||||
*/
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
@@ -29,6 +34,7 @@ define(
|
||||
/**
|
||||
* The StyleSheetLoader adds links to style sheets exposed from
|
||||
* various bundles as extensions of category `stylesheets`.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {object[]} stylesheets stylesheet extension definitions
|
||||
* @param $document Angular's jqLite-wrapped document element
|
||||
@@ -62,4 +68,4 @@ define(
|
||||
|
||||
return StyleSheetLoader;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -42,6 +42,7 @@ define(
|
||||
* * `ungrouped`: All actions which did not have a defined
|
||||
* group.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ActionGroupController($scope) {
|
||||
@@ -102,4 +103,4 @@ define(
|
||||
|
||||
return ActionGroupController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ define(
|
||||
/**
|
||||
* Controller for the bottombar template. Exposes
|
||||
* available indicators (of extension category "indicators")
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function BottomBarController(indicators) {
|
||||
@@ -42,20 +43,19 @@ define(
|
||||
};
|
||||
}
|
||||
|
||||
indicators = indicators.map(present);
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get all indicators to display.
|
||||
* @returns {Indicator[]} all indicators
|
||||
* to display in the bottom bar.
|
||||
*/
|
||||
getIndicators: function () {
|
||||
return indicators;
|
||||
}
|
||||
};
|
||||
this.indicators = indicators.map(present);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all indicators to display.
|
||||
* @returns {Indicator[]} all indicators
|
||||
* to display in the bottom bar.
|
||||
* @memberof platform/commonUI/general.BottomBarController#
|
||||
*/
|
||||
BottomBarController.prototype.getIndicators = function () {
|
||||
return this.indicators;
|
||||
};
|
||||
|
||||
return BottomBarController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -31,71 +31,69 @@ define(
|
||||
* menus) where clicking elsewhere in the document while the toggle
|
||||
* is in an active state is intended to dismiss the toggle.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param $scope the scope in which this controller is active
|
||||
* @param $document the document element, injected by Angular
|
||||
*/
|
||||
function ClickAwayController($scope, $document) {
|
||||
var state = false,
|
||||
clickaway;
|
||||
var self = this;
|
||||
|
||||
// Track state, but also attach and detach a listener for
|
||||
// mouseup events on the document.
|
||||
function deactivate() {
|
||||
state = false;
|
||||
$document.off("mouseup", clickaway);
|
||||
}
|
||||
|
||||
function activate() {
|
||||
state = true;
|
||||
$document.on("mouseup", clickaway);
|
||||
}
|
||||
|
||||
function changeState() {
|
||||
if (state) {
|
||||
deactivate();
|
||||
} else {
|
||||
activate();
|
||||
}
|
||||
}
|
||||
this.state = false;
|
||||
this.$scope = $scope;
|
||||
this.$document = $document;
|
||||
|
||||
// Callback used by the document listener. Deactivates;
|
||||
// note also $scope.$apply is invoked to indicate that
|
||||
// the state of this controller has changed.
|
||||
clickaway = function () {
|
||||
deactivate();
|
||||
this.clickaway = function () {
|
||||
self.deactivate();
|
||||
$scope.$apply();
|
||||
return false;
|
||||
};
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
*/
|
||||
isActive: function () {
|
||||
return state;
|
||||
},
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
*/
|
||||
setState: function (newState) {
|
||||
if (state !== newState) {
|
||||
changeState();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
*/
|
||||
toggle: function () {
|
||||
changeState();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Track state, but also attach and detach a listener for
|
||||
// mouseup events on the document.
|
||||
ClickAwayController.prototype.deactivate = function () {
|
||||
this.state = false;
|
||||
this.$document.off("mouseup", this.clickaway);
|
||||
};
|
||||
ClickAwayController.prototype.activate = function () {
|
||||
this.state = true;
|
||||
this.$document.on("mouseup", this.clickaway);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
*/
|
||||
ClickAwayController.prototype.isActive =function () {
|
||||
return this.state;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
*/
|
||||
ClickAwayController.prototype.setState = function (newState) {
|
||||
if (this.state !== newState) {
|
||||
this.toggle();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
*/
|
||||
ClickAwayController.prototype.toggle = function () {
|
||||
if (this.state) {
|
||||
this.deactivate();
|
||||
} else {
|
||||
this.activate();
|
||||
}
|
||||
};
|
||||
|
||||
return ClickAwayController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -33,6 +33,7 @@ define(
|
||||
* Controller for the context menu. Maintains an up-to-date
|
||||
* list of applicable actions (those from category "contextual")
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ContextMenuController($scope) {
|
||||
@@ -49,4 +50,4 @@ define(
|
||||
|
||||
return ContextMenuController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -54,6 +54,7 @@ define(
|
||||
* parameter it received.) Getter-setter functions are never the
|
||||
* target of a scope assignment and so avoid this problem.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {Scope} $scope the controller's scope
|
||||
*/
|
||||
@@ -87,4 +88,4 @@ define(
|
||||
return GetterSetterController;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ define(
|
||||
|
||||
/**
|
||||
* Controller for the domain object selector control.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param {ObjectService} objectService service from which to
|
||||
* read domain objects
|
||||
@@ -38,28 +39,17 @@ define(
|
||||
function SelectorController(objectService, $scope) {
|
||||
var treeModel = {},
|
||||
listModel = {},
|
||||
selectedObjects = [],
|
||||
rootObject,
|
||||
previousSelected;
|
||||
previousSelected,
|
||||
self = this;
|
||||
|
||||
// For watch; look at the user's selection in the tree
|
||||
function getTreeSelection() {
|
||||
return treeModel.selectedObject;
|
||||
}
|
||||
|
||||
// Get the value of the field being edited
|
||||
function getField() {
|
||||
return $scope.ngModel[$scope.field] || [];
|
||||
}
|
||||
|
||||
// Get the value of the field being edited
|
||||
function setField(value) {
|
||||
$scope.ngModel[$scope.field] = value;
|
||||
}
|
||||
|
||||
// Store root object for subsequent exposure to template
|
||||
function storeRoot(objects) {
|
||||
rootObject = objects[ROOT_ID];
|
||||
self.rootObject = objects[ROOT_ID];
|
||||
}
|
||||
|
||||
// Check that a selection is of the valid type
|
||||
@@ -82,7 +72,8 @@ define(
|
||||
function updateSelectedObjects(objects) {
|
||||
// Look up from the
|
||||
function getObject(id) { return objects[id]; }
|
||||
selectedObjects = ids.filter(getObject).map(getObject);
|
||||
self.selectedObjects =
|
||||
ids.filter(getObject).map(getObject);
|
||||
}
|
||||
|
||||
// Look up objects by id, then populate right-hand list
|
||||
@@ -93,64 +84,85 @@ define(
|
||||
$scope.$watch(getTreeSelection, validateTreeSelection);
|
||||
|
||||
// Make sure right-hand list matches underlying model
|
||||
$scope.$watchCollection(getField, updateList);
|
||||
$scope.$watchCollection(function () {
|
||||
return self.getField();
|
||||
}, updateList);
|
||||
|
||||
// Look up root object, then store it
|
||||
objectService.getObjects([ROOT_ID]).then(storeRoot);
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get the root object to show in the left-hand tree.
|
||||
* @returns {DomainObject} the root object
|
||||
*/
|
||||
root: function () {
|
||||
return rootObject;
|
||||
},
|
||||
/**
|
||||
* Add a domain object to the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
*/
|
||||
select: function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
list = getField() || [];
|
||||
// Only select if we have a valid id,
|
||||
// and it isn't already selected
|
||||
if (id && list.indexOf(id) === -1) {
|
||||
setField(list.concat([id]));
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Remove a domain object from the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
*/
|
||||
deselect: function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
list = getField() || [];
|
||||
// Only change if this was a valid id,
|
||||
// for an object which was already selected
|
||||
if (id && list.indexOf(id) !== -1) {
|
||||
// Filter it out of the current field
|
||||
setField(list.filter(function (otherId) {
|
||||
return otherId !== id;
|
||||
}));
|
||||
// Clear the current list selection
|
||||
delete listModel.selectedObject;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get the currently-selected domain objects.
|
||||
* @returns {DomainObject[]} the current selection
|
||||
*/
|
||||
selected: function () {
|
||||
return selectedObjects;
|
||||
},
|
||||
// Expose tree/list model for use in template directly
|
||||
treeModel: treeModel,
|
||||
listModel: listModel
|
||||
};
|
||||
this.$scope = $scope;
|
||||
this.selectedObjects = [];
|
||||
|
||||
// Expose tree/list model for use in template directly
|
||||
this.treeModel = treeModel;
|
||||
this.listModel = listModel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Set the value of the field being edited
|
||||
SelectorController.prototype.setField = function (value) {
|
||||
this.$scope.ngModel[this.$scope.field] = value;
|
||||
};
|
||||
|
||||
// Get the value of the field being edited
|
||||
SelectorController.prototype.getField = function () {
|
||||
return this.$scope.ngModel[this.$scope.field] || [];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Get the root object to show in the left-hand tree.
|
||||
* @returns {DomainObject} the root object
|
||||
*/
|
||||
SelectorController.prototype.root = function () {
|
||||
return this.rootObject;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a domain object to the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
*/
|
||||
SelectorController.prototype.select = function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
list = this.getField() || [];
|
||||
// Only select if we have a valid id,
|
||||
// and it isn't already selected
|
||||
if (id && list.indexOf(id) === -1) {
|
||||
this.setField(list.concat([id]));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove a domain object from the list of selected objects.
|
||||
* @param {DomainObject} the domain object to select
|
||||
*/
|
||||
SelectorController.prototype.deselect = function (domainObject) {
|
||||
var id = domainObject && domainObject.getId(),
|
||||
list = this.getField() || [];
|
||||
// Only change if this was a valid id,
|
||||
// for an object which was already selected
|
||||
if (id && list.indexOf(id) !== -1) {
|
||||
// Filter it out of the current field
|
||||
this.setField(list.filter(function (otherId) {
|
||||
return otherId !== id;
|
||||
}));
|
||||
// Clear the current list selection
|
||||
delete this.listModel.selectedObject;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the currently-selected domain objects.
|
||||
* @returns {DomainObject[]} the current selection
|
||||
*/
|
||||
SelectorController.prototype.selected = function () {
|
||||
return this.selectedObjects;
|
||||
};
|
||||
|
||||
|
||||
return SelectorController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,59 +32,58 @@ define(
|
||||
/**
|
||||
* Controller for the splitter in Browse mode. Current implementation
|
||||
* uses many hard-coded constants; this could be generalized.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function SplitPaneController() {
|
||||
var current = 200,
|
||||
start = 200,
|
||||
assigned = false;
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get the current position of the splitter, in pixels
|
||||
* from the left edge.
|
||||
* @returns {number} position of the splitter, in pixels
|
||||
*/
|
||||
state: function (defaultState) {
|
||||
// Set the state to the desired default, if we don't have a
|
||||
// "real" current state yet.
|
||||
if (arguments.length > 0 && !assigned) {
|
||||
current = defaultState;
|
||||
assigned = true;
|
||||
}
|
||||
return current;
|
||||
},
|
||||
/**
|
||||
* Begin moving the splitter; this will note the splitter's
|
||||
* current position, which is necessary for correct
|
||||
* interpretation of deltas provided by mct-drag.
|
||||
*/
|
||||
startMove: function () {
|
||||
start = current;
|
||||
},
|
||||
/**
|
||||
* Move the splitter a number of pixels to the right
|
||||
* (negative numbers move the splitter to the left.)
|
||||
* This movement is relative to the position of the
|
||||
* splitter when startMove was last invoked.
|
||||
* @param {number} delta number of pixels to move
|
||||
*/
|
||||
move: function (delta, minimum, maximum) {
|
||||
// Ensure defaults for minimum/maximum
|
||||
maximum = isNaN(maximum) ? DEFAULT_MAXIMUM : maximum;
|
||||
minimum = isNaN(minimum) ? DEFAULT_MINIMUM : minimum;
|
||||
|
||||
// Update current splitter state
|
||||
current = Math.min(
|
||||
maximum,
|
||||
Math.max(minimum, start + delta)
|
||||
);
|
||||
|
||||
//console.log(current + "; minimum: " + minimum + "; max: " + maximum);
|
||||
}
|
||||
};
|
||||
this.current = 200;
|
||||
this.start = 200;
|
||||
this.assigned = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current position of the splitter, in pixels
|
||||
* from the left edge.
|
||||
* @returns {number} position of the splitter, in pixels
|
||||
*/
|
||||
SplitPaneController.prototype.state = function (defaultState) {
|
||||
// Set the state to the desired default, if we don't have a
|
||||
// "real" current state yet.
|
||||
if (arguments.length > 0 && !this.assigned) {
|
||||
this.current = defaultState;
|
||||
this.assigned = true;
|
||||
}
|
||||
return this.current;
|
||||
};
|
||||
|
||||
/**
|
||||
* Begin moving the splitter; this will note the splitter's
|
||||
* current position, which is necessary for correct
|
||||
* interpretation of deltas provided by mct-drag.
|
||||
*/
|
||||
SplitPaneController.prototype.startMove = function () {
|
||||
this.start = this.current;
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the splitter a number of pixels to the right
|
||||
* (negative numbers move the splitter to the left.)
|
||||
* This movement is relative to the position of the
|
||||
* splitter when startMove was last invoked.
|
||||
* @param {number} delta number of pixels to move
|
||||
*/
|
||||
SplitPaneController.prototype.move = function (delta, minimum, maximum) {
|
||||
// Ensure defaults for minimum/maximum
|
||||
maximum = isNaN(maximum) ? DEFAULT_MAXIMUM : maximum;
|
||||
minimum = isNaN(minimum) ? DEFAULT_MINIMUM : minimum;
|
||||
|
||||
// Update current splitter state
|
||||
this.current = Math.min(
|
||||
maximum,
|
||||
Math.max(minimum, this.start + delta)
|
||||
);
|
||||
};
|
||||
|
||||
return SplitPaneController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -30,37 +30,37 @@ define(
|
||||
* A ToggleController is used to activate/deactivate things.
|
||||
* A common usage is for "twistie"
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ToggleController() {
|
||||
var state = false;
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
*/
|
||||
isActive: function () {
|
||||
return state;
|
||||
},
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
*/
|
||||
setState: function (newState) {
|
||||
state = newState;
|
||||
},
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
*/
|
||||
toggle: function () {
|
||||
state = !state;
|
||||
}
|
||||
};
|
||||
|
||||
this.state = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
*/
|
||||
ToggleController.prototype.isActive = function () {
|
||||
return this.state;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set a new state for the toggle.
|
||||
* @return {boolean} true to activate
|
||||
*/
|
||||
ToggleController.prototype.setState = function (newState) {
|
||||
this.state = newState;
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle the current state; activate if it is inactive,
|
||||
* deactivate if it is active.
|
||||
*/
|
||||
ToggleController.prototype.toggle = function () {
|
||||
this.state = !this.state;
|
||||
};
|
||||
|
||||
return ToggleController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -48,12 +48,12 @@ define(
|
||||
* node expansion when this tree node's _subtree_ will contain
|
||||
* the navigated object (recursively, this becomes an
|
||||
* expand-to-show-navigated-object behavior.)
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function TreeNodeController($scope, $timeout, $rootScope) {
|
||||
var selectedObject = ($scope.ngModel || {}).selectedObject,
|
||||
isSelected = false,
|
||||
hasBeenExpanded = false;
|
||||
function TreeNodeController($scope, $timeout) {
|
||||
var self = this,
|
||||
selectedObject = ($scope.ngModel || {}).selectedObject;
|
||||
|
||||
// Look up the id for a domain object. A convenience
|
||||
// for mapping; additionally does some undefined-checking.
|
||||
@@ -76,17 +76,6 @@ define(
|
||||
checkPath(nodePath, navPath, index + 1));
|
||||
}
|
||||
|
||||
// Track that a node has been expanded, either by the
|
||||
// user or automatically to show a selection.
|
||||
function trackExpansion() {
|
||||
if (!hasBeenExpanded) {
|
||||
// Run on a timeout; if a lot of expansion needs to
|
||||
// occur (e.g. if the selection is several nodes deep) we
|
||||
// want this to be spread across multiple digest cycles.
|
||||
$timeout(function () { hasBeenExpanded = true; }, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Consider the currently-navigated object and update
|
||||
// parameters which support display.
|
||||
function checkSelection() {
|
||||
@@ -101,7 +90,7 @@ define(
|
||||
|
||||
// Deselect; we will reselect below, iff we are
|
||||
// exactly at the end of the path.
|
||||
isSelected = false;
|
||||
self.isSelectedFlag = false;
|
||||
|
||||
// Expand if necessary (if the navigated object will
|
||||
// be in this node's subtree)
|
||||
@@ -120,12 +109,12 @@ define(
|
||||
// at the end of the path, highlight;
|
||||
// otherwise, expand.
|
||||
if (nodePath.length === navPath.length) {
|
||||
isSelected = true;
|
||||
self.isSelectedFlag = true;
|
||||
} else { // node path is shorter: Expand!
|
||||
if ($scope.toggle) {
|
||||
$scope.toggle.setState(true);
|
||||
}
|
||||
trackExpansion();
|
||||
self.trackExpansion();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -138,49 +127,52 @@ define(
|
||||
selectedObject = object;
|
||||
checkSelection();
|
||||
}
|
||||
|
||||
|
||||
this.isSelectedFlag = false;
|
||||
this.hasBeenExpandedFlag = false;
|
||||
this.$timeout = $timeout;
|
||||
|
||||
// Listen for changes which will effect display parameters
|
||||
$scope.$watch("ngModel.selectedObject", setSelection);
|
||||
$scope.$watch("domainObject", checkSelection);
|
||||
|
||||
return {
|
||||
/**
|
||||
* This method should be called when a node is expanded
|
||||
* to record that this has occurred, to support one-time
|
||||
* lazy loading of the node's subtree.
|
||||
*/
|
||||
trackExpansion: trackExpansion,
|
||||
/**
|
||||
* Check if this not has ever been expanded.
|
||||
* @returns true if it has been expanded
|
||||
*/
|
||||
hasBeenExpanded: function () {
|
||||
return hasBeenExpanded;
|
||||
},
|
||||
/**
|
||||
* Check whether or not the domain object represented by
|
||||
* this tree node should be highlighted.
|
||||
* An object will be highlighted if it matches
|
||||
* ngModel.selectedObject
|
||||
* @returns true if this should be highlighted
|
||||
*/
|
||||
isSelected: function () {
|
||||
return isSelected;
|
||||
|
||||
// Modification for compatibility with search.
|
||||
// If this object is the same as the model's selected object
|
||||
// Same being them having the same ID (this allows different
|
||||
// instances of the same thing to be recognized as the same)
|
||||
//return getId($scope.ngModel.selectedObject) === getId($scope.domainObject);
|
||||
|
||||
// Not using modified version now because it breaks tests.
|
||||
|
||||
// TODO: Check to make sure this change doesn't break
|
||||
// anything/find a better way to do this
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This method should be called when a node is expanded
|
||||
* to record that this has occurred, to support one-time
|
||||
* lazy loading of the node's subtree.
|
||||
*/
|
||||
TreeNodeController.prototype.trackExpansion = function () {
|
||||
var self = this;
|
||||
if (!self.hasBeenExpanded()) {
|
||||
// Run on a timeout; if a lot of expansion needs to
|
||||
// occur (e.g. if the selection is several nodes deep) we
|
||||
// want this to be spread across multiple digest cycles.
|
||||
self.$timeout(function () {
|
||||
self.hasBeenExpandedFlag = true;
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if this not has ever been expanded.
|
||||
* @returns true if it has been expanded
|
||||
*/
|
||||
TreeNodeController.prototype.hasBeenExpanded = function () {
|
||||
return this.hasBeenExpandedFlag;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether or not the domain object represented by
|
||||
* this tree node should be highlighted.
|
||||
* An object will be highlighted if it matches
|
||||
* ngModel.selectedObject
|
||||
* @returns true if this should be highlighted
|
||||
*/
|
||||
TreeNodeController.prototype.isSelected = function () {
|
||||
return this.isSelectedFlag;
|
||||
};
|
||||
|
||||
return TreeNodeController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ define(
|
||||
/**
|
||||
* Controller for the view switcher; populates and maintains a list
|
||||
* of applicable views for a represented domain object.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function ViewSwitcherController($scope, $timeout) {
|
||||
@@ -71,3 +72,4 @@ define(
|
||||
return ViewSwitcherController;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
* plain string attribute, instead of as an Angular
|
||||
* expression.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTContainer(containers) {
|
||||
@@ -96,4 +97,4 @@ define(
|
||||
|
||||
return MCTContainer;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -44,6 +44,7 @@ define(
|
||||
* and vertical pixel offset of the current mouse position
|
||||
* relative to the mouse position where dragging began.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*
|
||||
*/
|
||||
@@ -157,3 +158,4 @@ define(
|
||||
return MCTDrag;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ define(
|
||||
* This is an Angular expression, and it will be re-evaluated after
|
||||
* each interval.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*
|
||||
*/
|
||||
@@ -111,4 +112,4 @@ define(
|
||||
|
||||
return MCTResize;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -37,6 +37,7 @@ define(
|
||||
* This is exposed as two directives in `bundle.json`; the difference
|
||||
* is handled purely by parameterization.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
* @param $parse Angular's $parse
|
||||
* @param {string} property property to manage within the HTML element
|
||||
@@ -80,4 +81,4 @@ define(
|
||||
return MCTScroll;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
@@ -91,6 +91,7 @@ define(
|
||||
* etc. can be set on that element to control the splitter's
|
||||
* allowable positions.
|
||||
*
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTSplitPane($parse, $log) {
|
||||
@@ -213,3 +214,4 @@ define(
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ define(
|
||||
|
||||
/**
|
||||
* Implements `mct-splitter` directive.
|
||||
* @memberof platform/commonUI/general
|
||||
* @constructor
|
||||
*/
|
||||
function MCTSplitter() {
|
||||
@@ -88,3 +89,4 @@ define(
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -32,62 +32,56 @@ define(
|
||||
/**
|
||||
* The url service handles calls for url paths
|
||||
* using domain objects.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/general
|
||||
*/
|
||||
function UrlService($location) {
|
||||
// Returns the url for the mode wanted
|
||||
// and the domainObject passed in. A path
|
||||
// is returned. The view is defaulted to
|
||||
// the current location's (current object's)
|
||||
// view set.
|
||||
function urlForLocation(mode, domainObject) {
|
||||
var context = domainObject &&
|
||||
domainObject.getCapability('context'),
|
||||
objectPath = context ? context.getPath() : [],
|
||||
ids = objectPath.map(function (domainObject) {
|
||||
return domainObject.getId();
|
||||
}),
|
||||
// Parses the path together. Starts with the
|
||||
// default index.html file, then the mode passed
|
||||
// into the service, followed by ids in the url
|
||||
// joined by '/', and lastly the view path from
|
||||
// the current location
|
||||
path = mode + "/" + ids.slice(1).join("/");
|
||||
return path;
|
||||
}
|
||||
|
||||
// Uses the Url for the current location
|
||||
// from the urlForLocation function and
|
||||
// includes the view and the index path
|
||||
function urlForNewTab(mode, domainObject) {
|
||||
var viewPath = "?view=" + $location.search().view,
|
||||
newTabPath =
|
||||
"index.html#" + urlForLocation(mode, domainObject) + viewPath;
|
||||
return newTabPath;
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Returns the Url path for a specific domain object
|
||||
* without the index.html path and the view path
|
||||
* @param {value} value of the browse or edit mode
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
*/
|
||||
urlForNewTab: urlForNewTab,
|
||||
/**
|
||||
* Returns the Url path for a specific domain object
|
||||
* including the index.html path and the view path
|
||||
* allowing a new tab to hold the correct characteristics
|
||||
* @param {value} value of the browse or edit mode
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
*/
|
||||
urlForLocation: urlForLocation
|
||||
};
|
||||
this.$location = $location;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Url path for a specific domain object
|
||||
* without the index.html path and the view path
|
||||
* @param {string} mode value of browse or edit mode
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
* @returns {string} URL for the domain object
|
||||
*/
|
||||
UrlService.prototype.urlForLocation = function (mode, domainObject) {
|
||||
var context = domainObject &&
|
||||
domainObject.getCapability('context'),
|
||||
objectPath = context ? context.getPath() : [],
|
||||
ids = objectPath.map(function (domainObject) {
|
||||
return domainObject.getId();
|
||||
});
|
||||
|
||||
// Parses the path together. Starts with the
|
||||
// default index.html file, then the mode passed
|
||||
// into the service, followed by ids in the url
|
||||
// joined by '/', and lastly the view path from
|
||||
// the current location
|
||||
return mode + "/" + ids.slice(1).join("/");
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the Url path for a specific domain object
|
||||
* including the index.html path and the view path
|
||||
* allowing a new tab to hold the correct characteristics
|
||||
* @param {string} mode value of browse or edit mode
|
||||
* for the path
|
||||
* @param {DomainObject} value of the domain object
|
||||
* to get the path of
|
||||
* @returns {string} URL for the domain object
|
||||
*/
|
||||
UrlService.prototype.urlForNewTab = function (mode, domainObject) {
|
||||
var viewPath = "?view=" + this.$location.search().view,
|
||||
newTabPath =
|
||||
"index.html#" + this.urlForLocation(mode, domainObject) +
|
||||
viewPath;
|
||||
return newTabPath;
|
||||
};
|
||||
|
||||
return UrlService;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user