Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2017-05-22 20:24:55 +0000
committerAngel Avila2017-05-22 23:59:54 +0000
commitb26873c97dc0644686fd816f3086da0372651067 (patch)
tree676ba1eb3d291018cc8816d04880ba3d4734fe6a
parente55a5d5467cb281c4c902cd5470a89c2c8b1aa9e (diff)
downloadorg.eclipse.osee-b26873c97dc0644686fd816f3086da0372651067.tar.gz
org.eclipse.osee-b26873c97dc0644686fd816f3086da0372651067.tar.xz
org.eclipse.osee-b26873c97dc0644686fd816f3086da0372651067.zip
refactor[ats_ATS334473]: Upgrade Dispo and Coverage to Ui-Grid
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html20
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/grips/horizontal.pngbin0 -> 104 bytes
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css153
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/css/userGrid.css896
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js566
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js195
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js86
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js1106
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html46
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html15
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/dropdown.html1
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html113
12 files changed, 2172 insertions, 1025 deletions
diff --git a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
index 6deebff1c3f..b9f09f098ec 100644
--- a/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
+++ b/plugins/org.eclipse.osee.web.ui/src/coverage/ui/index.html
@@ -10,24 +10,26 @@
</meta>
<link rel="stylesheet" href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css">
</link>
- <link rel="stylesheet" href="/ajax/libs/ng-grid/2.0.11/ng-grid.min.css">
- </link>
- <link rel="stylesheet" href="/dispo/css/user.css">
- </link>
- <link rel="stylesheet" href="/dispo/css/admin.css">
- </link>
+ <link rel="stylesheet" href="/ajax/libs/ui-grid/4.0.4/ui-grid.min.css">
+ <link rel="stylesheet" href="/dispo/css/user.css"></link>
+ <link rel="stylesheet" href="/dispo/css/admin.css"></link>
+ <link rel="stylesheet" href="/dispo/css/userGrid.css"></link>
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.svg">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.eot">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.tff">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.woff">
+
<script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-resource.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-cookies.js"></script>
- <script src="/ajax/libs/ng-grid/2.0.11/ng-grid.min.js"></script>
+ <script src="/ajax/libs/ui-grid/4.0.4/ui-grid.min.js"></script>
<script src="/ajax/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="/ajax/libs/ui-bootstrap/0.12.0/ui-bootstrap-tpls-0.12.0.min.js"></script>
<script src="/ajax/libs/ngStorage/0.3.0/ngStorage.min.js"></script>
<script src="/ajax/libs/oauth-ng/0.3.8/oauth-ng.js"></script>
- <script src="/libs/js/oseeAuth/oseeAuth.js"></script>
- <script src="/libs/js/support/linkRewrite.js"></script>
+ <script src="/ajax/libs/splitjs/1.2.0/split.min.js"></script>
<script src="/dispo/js/resizer.js"></script>
<script src="/dispo/js/dispoApp.js"></script>
<script src="/dispo/js/ColumnFactory.js"></script>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/css/grips/horizontal.png b/plugins/org.eclipse.osee.web.ui/src/dispo/css/grips/horizontal.png
new file mode 100644
index 00000000000..cbe7da77dda
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/grips/horizontal.png
Binary files differ
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css b/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css
index 66336a6c6d2..69a7d11be25 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/user.css
@@ -1,16 +1,95 @@
+.gutter {
+ background-color: #eee;
+ background-repeat: no-repeat;
+ background-position: 50%;
+}
+
+.gutter.gutter-horizontal {
+ background-image: url('grips/vertical.png');
+ cursor: ew-resize;
+}
+
+.grid {
+ height: 100%;
+ border: black;
+}
+
+.gutter.gutter-vertical {
+ background-image: url('grips/horizontal.png');
+ cursor: ns-resize;
+ background-color: darkgrey;
+}
+
+#itemsGridDiv {
+ height: 100px;
+}
+
+#gridsDiv {
+ height: 83vh;
+}
+
+#subGridDiv {
+ height: 100px;
+}
+
#top-content {
margin-left: 5px;
margin-right: 5px;
+ background-color: blue;
+ border: black;
+
+}
+
+#itemSelectedBar {
+ height: 40px;
+ width: 100%;
+ background-color: lightcyan;
+ border-bottom: 3px solid black;
+ z-index: 100;
+}
+
+#itemSelectedText {
overflow: auto;
+ height: 100%;
+ display: inline-block;
}
-#bottom-content {
- position: fixed;
- height: 300px;
- bottom: 0;
- left: 0;
- right: 0;
+
+#itemSelectedLeftDiv {
+ display: inline-block;
+ overflow: hidden;
+ position: absolute;
+ width: 90%;
+ height: inherit;
+}
+
+#itemSelectedRightDiv {
+ display: inline;
+ width: 10%;
+ float: right;
+ height: 100%;
+}
+
+#itemSelectedFailureText {
+ margin: auto;
overflow: auto;
+ height: 92%;
+ display: inline-block;
+ position: absolute;
+ padding-top: 12px;
+ padding-left: 5px;
+ overflow-x: hidden;
+}
+
+#openSourceFileButton {
+ float: right;
+ width: 100%;
+ height: 100%;
+}
+
+#bottom-content {
+ margin-left: 5px;
+ margin-right: 5px;
background-color: lightslategray;
}
@@ -32,38 +111,22 @@
position:fixed;
}
-#annotationsGrid {
- margin-top: 35px;
- background-color: lightslategray;
+#subGrid div.ui-grid-cell-contents.invalid {
+ border: 2px solid red;
}
-.textarea {
- resize: vertical;
-}
-
-#itemSelectedBar {
- height: 40px;
- width: 100%;
- position: fixed;
- background-color: lightcyan;
- border-bottom: 3px solid Black;
+#subGrid .ui-grid-viewport.ng-isolate-scope {
+ background-color: lightslategray;
}
-#itemSelectedText {
- overflow: auto;
- height: 100%;
- display: inline-block;
+#subGridDiv {
+ background-color: lightslategray;
}
-#itemSelectedFailureText {
- margin-top: 6px;
- margin-bottom: 6px;
- overflow: auto;
- height: 100%;
- display: inline-block;
+.textarea {
+ resize: vertical;
}
-
#compareText {
width: 110px;
margin: 0px 0px 0px 75px;
@@ -126,16 +189,6 @@ textarea {
resize: none;
}
-.annotationInput {
- border: none;
- width: 100%;
- height: 32px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- background-color: #9AEAF5;
-}
.annotationInput:focus {
border: 2px dashed green;
}
@@ -145,7 +198,7 @@ textarea {
white-space: pre-line;
}
.annotationInput.invalid {
- border: 4px solid red;
+ border: 5px solid red;
}
.annotationInput:disabled {
background-color: #D3DFE0;
@@ -156,19 +209,11 @@ textarea {
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
background-color: #D3DFE0;
}
-.annotationInput.invalid:focus {
- border: 2px dashed red;
-}
-.annotationInput.details:focus {
- border: 2px dashed green;
-}
.annotationInput.details.invalid {
border: 4px solid red;
}
-.annotationInput.details.invalid:focus {
- border: 2px dashed red;
-}
+
.annotationDelete {
display: block;
width: 100%;
@@ -247,3 +292,11 @@ input.cellInput:focus{
border: solid cyan;
}
+#showAllTextArea {
+ width: 100%;
+ height: 100%;
+ resize: both:
+}
+
+
+
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/css/userGrid.css b/plugins/org.eclipse.osee.web.ui/src/dispo/css/userGrid.css
new file mode 100644
index 00000000000..61b664598fa
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/css/userGrid.css
@@ -0,0 +1,896 @@
+#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
+#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
+#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
+#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
+#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
+#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
+ content: " ";
+ display: table;
+}
+#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
+#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
+#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
+ clear: both;
+}
+#subGrid .ui-grid {
+ border: 1px solid #94c0d2;
+ box-sizing: content-box;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+ -webkit-transform: translateZ(0);
+ -moz-transform: translateZ(0);
+ -o-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+}
+#subGrid .ui-grid-vertical-bar {
+ position: absolute;
+ right: 0;
+ width: 0;
+}
+#subGrid .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,
+#subGrid .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
+ width: 1px;
+}
+#subGrid .ui-grid-scrollbar-placeholder {
+ background-color: transparent;
+}
+#subGrid .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar {
+ background-color: #edf6f7;
+}
+#subGrid .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
+ background-color: #94c0d2;
+}
+#subGrid .ui-grid-header-cell:last-child .ui-grid-vertical-bar {
+ right: -1px;
+ width: 1px;
+ background-color: #edf6f7;
+}
+#subGrid .ui-grid-clearfix:before,
+#subGrid .ui-grid-clearfix:after {
+ content: "";
+ display: table;
+}
+#subGrid .ui-grid-clearfix:after {
+ clear: both;
+}
+#subGrid .ui-grid-invisible {
+ visibility: hidden;
+}
+#subGrid .ui-grid-contents-wrapper {
+ position: relative;
+ height: 100%;
+ width: 100%;
+}
+#subGrid .ui-grid-sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ margin: -1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+#subGrid .ui-grid-top-panel-background {
+ background: #f9feff;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #daecf4), color-stop(1, #f9feff));
+ background: -ms-linear-gradient(bottom, #daecf4, #f9feff);
+ background: -moz-linear-gradient(center bottom, #daecf4 0%, #f9feff 100%);
+ background: -o-linear-gradient(#f9feff, #daecf4);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9feff', endColorstr='#daecf4', GradientType=0);
+}
+#subGrid .ui-grid-header {
+ border-bottom: 1px solid #94c0d2;
+ box-sizing: border-box;
+}
+#subGrid .ui-grid-top-panel {
+ position: relative;
+ overflow: hidden;
+ font-weight: bold;
+ background: #f9feff;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #daecf4), color-stop(1, #f9feff));
+ background: -ms-linear-gradient(bottom, #daecf4, #f9feff);
+ background: -moz-linear-gradient(center bottom, #daecf4 0%, #f9feff 100%);
+ background: -o-linear-gradient(#f9feff, #daecf4);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9feff', endColorstr='#daecf4', GradientType=0);
+ -webkit-border-top-right-radius: -1px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: -1px;
+ -moz-border-radius-topright: -1px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: -1px;
+ border-top-right-radius: -1px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: -1px;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+#subGrid .ui-grid-header-viewport {
+ overflow: hidden;
+}
+#subGrid .ui-grid-header-canvas:before,
+#subGrid .ui-grid-header-canvas:after {
+ content: "";
+ display: table;
+ line-height: 0;
+}
+#subGrid .ui-grid-header-canvas:after {
+ clear: both;
+}
+#subGrid .ui-grid-header-cell-wrapper {
+ position: relative;
+ display: table;
+ box-sizing: border-box;
+ height: 100%;
+}
+#subGrid .ui-grid-header-cell-row {
+ display: table-row;
+ position: relative;
+}
+#subGrid .ui-grid-header-cell {
+ position: relative;
+ box-sizing: border-box;
+ background-color: inherit;
+ border-right: 1px solid;
+ border-color: #edf6f7;
+ display: table-cell;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ width: 0;
+}
+#subGrid .ui-grid-header-cell:last-child {
+ border-right: 0;
+}
+#subGrid .ui-grid-header-cell .sortable {
+ cursor: pointer;
+}
+#subGrid .ui-grid-header-cell .ui-grid-sort-priority-number {
+ margin-left: -8px;
+}
+#subGrid .ui-grid-header .ui-grid-vertical-bar {
+ top: 0;
+ bottom: 0;
+}
+#subGrid .ui-grid-column-menu-button {
+ position: absolute;
+ right: 1px;
+ top: 0;
+}
+#subGrid .ui-grid-column-menu-button .ui-grid-icon-angle-down {
+ vertical-align: sub;
+}
+#subGrid .ui-grid-column-menu-button-last-col {
+ margin-right: 25px;
+}
+#subGrid .ui-grid-column-menu {
+ position: absolute;
+}
+/* Slide up/down animations */
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
+ -webkit-transition: all 0.05s linear;
+ -moz-transition: all 0.05s linear;
+ -o-transition: all 0.05s linear;
+ transition: all 0.05s linear;
+ display: block !important;
+}
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
+ -webkit-transform: translateY(-100%);
+ -moz-transform: translateY(-100%);
+ -o-transform: translateY(-100%);
+ -ms-transform: translateY(-100%);
+ transform: translateY(-100%);
+}
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
+#subGrid .ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -o-transform: translateY(0);
+ -ms-transform: translateY(0);
+ transform: translateY(0);
+}
+/* Slide up/down animations */
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
+ -webkit-transition: all 0.05s linear;
+ -moz-transition: all 0.05s linear;
+ -o-transition: all 0.05s linear;
+ transition: all 0.05s linear;
+ display: block !important;
+}
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
+ -webkit-transform: translateY(-100%);
+ -moz-transform: translateY(-100%);
+ -o-transform: translateY(-100%);
+ -ms-transform: translateY(-100%);
+ transform: translateY(-100%);
+}
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
+ -webkit-transform: translateY(0);
+ -moz-transform: translateY(0);
+ -o-transform: translateY(0);
+ -ms-transform: translateY(0);
+ transform: translateY(0);
+}
+#subGrid .ui-grid-filter-container {
+ padding: 4px 10px;
+ position: relative;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ right: 0;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
+ position: absolute;
+ top: 50%;
+ line-height: 32px;
+ margin-top: -16px;
+ right: 10px;
+ opacity: 0.66;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover {
+ opacity: 1;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button-select {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ right: 0;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"] {
+ position: absolute;
+ top: 50%;
+ line-height: 32px;
+ margin-top: -16px;
+ right: 0px;
+ opacity: 0.66;
+}
+#subGrid .ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"]:hover {
+ opacity: 1;
+}
+input[type="text"].ui-grid-filter-input {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ width: 100%;
+ border: 1px solid #94c0d2;
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: 0;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+input[type="text"].ui-grid-filter-input:hover {
+ border: 1px solid #94c0d2;
+}
+select.ui-grid-filter-select {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ width: 90%;
+ border: 1px solid #94c0d2;
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: 0;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+select.ui-grid-filter-select:hover {
+ border: 1px solid #94c0d2;
+}
+#subGrid .ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select {
+ width: 100%;
+}
+#subGrid .ui-grid-render-container {
+ position: inherit;
+ -webkit-border-top-right-radius: 0;
+ -webkit-border-bottom-right-radius: 0px;
+ -webkit-border-bottom-left-radius: 0px;
+ -webkit-border-top-left-radius: 0;
+ -moz-border-radius-topright: 0;
+ -moz-border-radius-bottomright: 0px;
+ -moz-border-radius-bottomleft: 0px;
+ -moz-border-radius-topleft: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0px;
+ border-bottom-left-radius: 0px;
+ border-top-left-radius: 0;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+#subGrid .ui-grid-render-container:focus {
+ outline: none;
+}
+#subGrid .ui-grid-viewport {
+ min-height: 20px;
+ position: relative;
+ overflow-y: scroll;
+ -webkit-overflow-scrolling: touch;
+}
+#subGrid .ui-grid-viewport:focus {
+ outline: none !important;
+}
+#subGrid .ui-grid-canvas {
+ position: relative;
+ padding-top: 1px;
+}
+#subGrid .ui-grid-row {
+ clear: both;
+}
+#subGrid .ui-grid-row:nth-child(odd) .ui-grid-cell {
+ background-color: #c5e5e8;
+}
+#subGrid .ui-grid-row:nth-child(even) .ui-grid-cell {
+ background-color: #eaf4f9;
+}
+#subGrid .ui-grid-row:last-child .ui-grid-cell {
+ border-bottom-color: #94c0d2;
+ border-bottom-style: solid;
+}
+#subGrid .ui-grid-no-row-overlay {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin: 10%;
+ background: #f9feff;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #daecf4), color-stop(1, #f9feff));
+ background: -ms-linear-gradient(bottom, #daecf4, #f9feff);
+ background: -moz-linear-gradient(center bottom, #daecf4 0%, #f9feff 100%);
+ background: -o-linear-gradient(#f9feff, #daecf4);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9feff', endColorstr='#daecf4', GradientType=0);
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: 0;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #94c0d2;
+ font-size: 2em;
+ text-align: center;
+}
+#subGrid .ui-grid-no-row-overlay > * {
+ position: absolute;
+ display: table;
+ margin: auto 0;
+ width: 100%;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ opacity: 0.66;
+}
+/* This file contains variable declarations (do not remove this line) */
+/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
+/**
+* @section Grid styles
+*/
+/**
+* @section Header styles
+*/
+/** @description Colors for header gradient */
+/**
+* @section Grid body styles
+*/
+/** @description Colors used for row alternation */
+/**
+* @section Sort arrow colors
+*/
+/**
+* @section Scrollbar styles
+*/
+/**
+* @section font library path
+*/
+/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
+#subGrid .ui-grid-cell {
+ overflow: hidden;
+ float: left;
+ background-color: inherit;
+ border-right: 1px solid;
+ border-color: #94c0d2;
+ box-sizing: border-box;
+}
+#subGrid .ui-grid-cell:last-child {
+ border-right: 0;
+}
+#subGrid .ui-grid-cell-contents {
+ padding: 5px;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ white-space: nowrap;
+ -ms-text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ height: 100%;
+}
+#subGrid .ui-grid-cell-contents-hidden {
+ visibility: hidden;
+ width: 0;
+ height: 0;
+ display: none;
+}
+#subGrid .ui-grid-row .ui-grid-cell.ui-grid-row-header-cell {
+ background-color: #f0f0ee;
+ border-bottom: solid 1px #94c0d2;
+}
+#subGrid .ui-grid-footer-panel-background {
+ background: #f9feff;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #daecf4), color-stop(1, #f9feff));
+ background: -ms-linear-gradient(bottom, #daecf4, #f9feff);
+ background: -moz-linear-gradient(center bottom, #daecf4 0%, #f9feff 100%);
+ background: -o-linear-gradient(#f9feff, #daecf4);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9feff', endColorstr='#daecf4', GradientType=0);
+}
+#subGrid .ui-grid-footer-panel {
+ position: relative;
+ border-bottom: 1px solid #94c0d2;
+ border-top: 1px solid #94c0d2;
+ overflow: hidden;
+ font-weight: bold;
+ background: #f9feff;
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #daecf4), color-stop(1, #f9feff));
+ background: -ms-linear-gradient(bottom, #daecf4, #f9feff);
+ background: -moz-linear-gradient(center bottom, #daecf4 0%, #f9feff 100%);
+ background: -o-linear-gradient(#f9feff, #daecf4);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9feff', endColorstr='#daecf4', GradientType=0);
+ -webkit-border-top-right-radius: -1px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: -1px;
+ -moz-border-radius-topright: -1px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: -1px;
+ border-top-right-radius: -1px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: -1px;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+#subGrid .ui-grid-grid-footer {
+ float: left;
+ width: 100%;
+}
+#subGrid .ui-grid-footer-viewport {
+ overflow: hidden;
+}
+#subGrid .ui-grid-footer-canvas {
+ position: relative;
+}
+#subGrid .ui-grid-footer-canvas:before,
+#subGrid .ui-grid-footer-canvas:after {
+ content: "";
+ display: table;
+ line-height: 0;
+}
+#subGrid .ui-grid-footer-canvas:after {
+ clear: both;
+}
+#subGrid .ui-grid-footer-cell-wrapper {
+ position: relative;
+ display: table;
+ box-sizing: border-box;
+ height: 100%;
+}
+#subGrid .ui-grid-footer-cell-row {
+ display: table-row;
+}
+#subGrid .ui-grid-footer-cell {
+ overflow: hidden;
+ background-color: inherit;
+ border-right: 1px solid;
+ border-color: #94c0d2;
+ box-sizing: border-box;
+ display: table-cell;
+}
+#subGrid .ui-grid-footer-cell:last-child {
+ border-right: 0;
+}
+input[type="text"].ui-grid-filter-input {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ width: 100%;
+ border: 1px solid #94c0d2;
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0;
+ -moz-border-radius-bottomleft: 0;
+ -moz-border-radius-topleft: 0;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ -moz-background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+}
+input[type="text"].ui-grid-filter-input:hover {
+ border: 1px solid #94c0d2;
+}
+#subGrid .ui-grid-menu-button {
+ z-index: 2;
+ position: absolute;
+ right: 0;
+ top: 0;
+ background: #f9feff;
+ border: 1px solid #94c0d2;
+ cursor: pointer;
+ height: 31px;
+ font-weight: normal;
+}
+#subGrid .ui-grid-menu-button .ui-grid-icon-container {
+ margin-top: 3px;
+}
+#subGrid .ui-grid-menu-button .ui-grid-menu {
+ right: 0;
+}
+#subGrid .ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid {
+ overflow: scroll;
+ border: 1px solid #94c0d2;
+}
+#subGrid .ui-grid-menu {
+ z-index: 2;
+ position: absolute;
+ padding: 0 10px 20px 10px;
+ cursor: pointer;
+ box-sizing: border-box;
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner {
+ background: #f9feff;
+ border: 1px solid #94c0d2;
+ position: relative;
+ white-space: nowrap;
+ -webkit-border-radius: 0px;
+ -moz-border-radius: 0px;
+ border-radius: 0px;
+ -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li {
+ padding: 0px;
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li button {
+ min-width: 100%;
+ padding: 8px;
+ text-align: left;
+ background: transparent;
+ border: none;
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li button:hover,
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li button:focus {
+ -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active {
+ -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+ box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
+ background-color: #cecece;
+}
+#subGrid .ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child) > button {
+ border-bottom: 1px solid #94c0d2;
+}
+#subGrid .ui-grid-sortarrow {
+ right: 5px;
+ position: absolute;
+ width: 20px;
+ top: 0;
+ bottom: 0;
+ background-position: center;
+}
+#subGrid .ui-grid-sortarrow.down {
+ -webkit-transform: rotate(180deg);
+ -moz-transform: rotate(180deg);
+ -o-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
+/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
+/*
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+ @font-face {
+ font-family: 'ui-grid';
+ src: url('@{font-path}ui-grid.svg?12312827#ui-grid') format('svg');
+ }
+}
+*/
+[class^="ui-grid-icon"]:before,
+[class*=" ui-grid-icon"]:before {
+ font-family: "ui-grid";
+ font-style: normal;
+ font-weight: normal;
+ speak: none;
+ display: inline-block;
+ text-decoration: inherit;
+ width: 1em;
+ margin-right: .2em;
+ text-align: center;
+ /* opacity: .8; */
+ /* For safety - reset parent styles, that can break glyph codes*/
+ font-variant: normal;
+ text-transform: none;
+ /* fix buttons height, for twitter bootstrap */
+ line-height: 1em;
+ /* Animation center compensation - margins should be symmetric */
+ /* remove if not needed */
+ margin-left: .2em;
+ /* you can be more comfortable with increased icons size */
+ /* font-size: 120%; */
+ /* Uncomment for 3D effect */
+ /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
+}
+#subGrid .ui-grid-icon-blank::before {
+ width: 1em;
+ content: ' ';
+}
+#subGrid .ui-grid-icon-plus-squared:before {
+ content: '\c350';
+}
+#subGrid .ui-grid-icon-minus-squared:before {
+ content: '\c351';
+}
+#subGrid .ui-grid-icon-search:before {
+ content: '\c352';
+}
+#subGrid .ui-grid-icon-cancel:before {
+ content: '\c353';
+}
+#subGrid .ui-grid-icon-info-circled:before {
+ content: '\c354';
+}
+#subGrid .ui-grid-icon-lock:before {
+ content: '\c355';
+}
+#subGrid .ui-grid-icon-lock-open:before {
+ content: '\c356';
+}
+#subGrid .ui-grid-icon-pencil:before {
+ content: '\c357';
+}
+#subGrid .ui-grid-icon-down-dir:before {
+ content: '\c358';
+}
+#subGrid .ui-grid-icon-up-dir:before {
+ content: '\c359';
+}
+#subGrid .ui-grid-icon-left-dir:before {
+ content: '\c35a';
+}
+#subGrid .ui-grid-icon-right-dir:before {
+ content: '\c35b';
+}
+#subGrid .ui-grid-icon-left-open:before {
+ content: '\c35c';
+}
+#subGrid .ui-grid-icon-right-open:before {
+ content: '\c35d';
+}
+#subGrid .ui-grid-icon-angle-down:before {
+ content: '\c35e';
+}
+#subGrid .ui-grid-icon-filter:before {
+ content: '\c35f';
+}
+#subGrid .ui-grid-icon-sort-alt-up:before {
+ content: '\c360';
+}
+#subGrid .ui-grid-icon-sort-alt-down:before {
+ content: '\c361';
+}
+#subGrid .ui-grid-icon-ok:before {
+ content: '\c362';
+}
+#subGrid .ui-grid-icon-menu:before {
+ content: '\c363';
+}
+#subGrid .ui-grid-icon-indent-left:before {
+ content: '\e800';
+}
+#subGrid .ui-grid-icon-indent-right:before {
+ content: '\e801';
+}
+#subGrid .ui-grid-icon-spin5:before {
+ content: '\ea61';
+}
+/*
+* RTL Styles
+*/
+#subGrid .ui-grid[dir=rtl] .ui-grid-header-cell,
+#subGrid .ui-grid[dir=rtl] .ui-grid-footer-cell,
+#subGrid .ui-grid[dir=rtl] .ui-grid-cell {
+ float: right !important;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-column-menu-button {
+ position: absolute;
+ left: 1px;
+ top: 0;
+ right: inherit;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-cell:first-child,
+#subGrid .ui-grid[dir=rtl] .ui-grid-header-cell:first-child,
+#subGrid .ui-grid[dir=rtl] .ui-grid-footer-cell:first-child {
+ border-right: 0;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-cell:last-child,
+#subGrid .ui-grid[dir=rtl] .ui-grid-header-cell:last-child {
+ border-right: 1px solid #94c0d2;
+ border-left: 0;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,
+#subGrid .ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,
+#subGrid .ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar {
+ width: 0;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-menu-button {
+ z-index: 2;
+ position: absolute;
+ left: 0;
+ right: auto;
+ background: #f9feff;
+ border: 1px solid #94c0d2;
+ cursor: pointer;
+ min-height: 27px;
+ font-weight: normal;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu {
+ left: 0;
+ right: auto;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button {
+ right: initial;
+ left: 0;
+}
+#subGrid .ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
+ right: initial;
+ left: 10px;
+}
+/*
+ Animation example, for spinners
+*/
+#subGrid .ui-grid-animate-spin {
+ -moz-animation: ui-grid-spin 2s infinite linear;
+ -o-animation: ui-grid-spin 2s infinite linear;
+ -webkit-animation: ui-grid-spin 2s infinite linear;
+ animation: ui-grid-spin 2s infinite linear;
+ display: inline-block;
+}
+@-moz-keyframes ui-grid-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -moz-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@-webkit-keyframes ui-grid-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -moz-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@-o-keyframes ui-grid-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -moz-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@-ms-keyframes ui-grid-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -moz-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@keyframes ui-grid-spin {
+ 0% {
+ -moz-transform: rotate(0deg);
+ -o-transform: rotate(0deg);
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -moz-transform: rotate(359deg);
+ -o-transform: rotate(359deg);
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+/*---------------------------------------------------
+ LESS Elements 0.9
+ ---------------------------------------------------
+ A set of useful LESS mixins
+ More info at: http://lesselements.com
+ ---------------------------------------------------*/
+#subGrid .ui-grid {
+ color: #003f59;
+}
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js
index 936a991061f..395c4131c58 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/ColumnFactory.js
@@ -1,32 +1,62 @@
app.factory('ColumnFactory', function() {
var ColumnFactory = {};
- ColumnFactory.getColumns = function(dispoType, width) {
- var toReturn;
- if(width < 1000) {
- if(dispoType = '') {
- toReturn = smallColumnsTestScript;
- } else {
- toReturn = smallColumnsCoverage
- }
- } else {
- if(dispoType = '') {
- toReturn = wideColumnsTestScript;
- } else {
- toReturn = wideColumnsCoverage
- }
- }
-
- return toReturn;
+ ColumnFactory.getColumns = function(type, width) {
+ return columnsCoverage;
}
- var origCellTmpl = '<div ng-dblclick="getItemDetails(row.entity, row)">{{row.entity.name}}</div>';
- var editCellTmpl = '<input ng-model="row.getProperty(col.field)" ng-model-onblur ng-change="editItem(row.entity);" value="row.getProperty(col.field);></input>';
- var cellEditNotes = '<input class="cellInput" ng-model="COL_FIELD" ng-disabled="checkEditable(row.entity);" ng-model-onblur ng-change="editNotes(row.entity)"/>'
- var chkBoxTemplate = '<input type="checkbox" class="form-control" ng-model="COL_FIELD" ng-change="editNeedsRerun(row.entity)"></input>';
- var assigneeCellTmpl = '<div ng-dblclick="stealItem(row.entity)">{{row.entity.assignee}}</div>';
- var dateCellTmpl = '<div>getReadableDate({{row.getProperty(col.field)}})</div>';
+ ColumnFactory.setResolutionTypeArray = function(type, array) {
+ if(type == 'testScript') {
+ subGridColumnsTestScript[1].editDropdownOptionsArray = array;
+ } else {
+ subGridColumnsCoverage[1].editDropdownOptionsArray = array;
+ }
+ }
+
+ ColumnFactory.getSubGridColumns = function(type) {
+ if(type == 'testScript'){
+ return subGridColumnsTestScript;
+ } else {
+ return subGridColumnsCoverage;
+ }
+ }
+
+ var usePureRegex = function(searchTerm, cellValue) {
+ var escapeRegex = new RegExp("\\\\", "img");
+ var strippedSearchTerm = searchTerm.replace(escapeRegex, "");
+ var regex = new RegExp(strippedSearchTerm,"img");
+ return cellValue.match(regex) != null;
+ };
+ var findPointInRanges = function(searchTerm, cellValue) {
+ var isFound = false;
+ var searchTermAsInt = parseInt(searchTerm);
+ var ranges = cellValue.split(",");
+
+ for(var i = 0; i < ranges.length; i ++) {
+ var range = ranges[i];
+
+ if(range.indexOf("-") > -1) {
+ var limits = range.split("-");
+ var endPoint = parseInt(limits[1]);
+ var starPoint = parseInt(limits[0]);
+
+ if(searchTermAsInt <= endPoint && starPoint <= searchTermAsInt) {
+ isFound = true;
+ }
+ } else {
+ var singlePoint = parseInt(range);
+ isFound = singlePoint == searchTermAsInt;
+ }
+
+ if(isFound) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
var checkboxSorting = function checkboxSorting(itemA, itemB) {
if(itemA == itemB) {
return 0;
@@ -49,414 +79,236 @@ app.factory('ColumnFactory', function() {
return 0;
}
};
-
- var smallColumnsTestScript = [{
+
+ var origCellTmpl = '<div ng-dblclick="grid.appScope.getItemDetails(row.entity, row, grid)" class="ui-grid-cell-contents" title="TOOLTIP">{{row.entity.name}}</div>';
+ var chkBoxTemplate = '<input type="checkbox" class="form-control needsRerunBox" ng-model="row.entity.needsRerun" ng-change="grid.appScope.editNeedsRerun(row.entity)"></input>';
+ var assigneeCellTmpl = '<div ng-dblclick="grid.appScope.stealItem(row.entity, row)">{{row.entity.assignee}}</div>';
+ var deleteCellTmpl = '<div><button ng-class="{annotationDelete: true, \'btn btn-danger\': true}" ng-disabled="row.entity.guid == null" ng-click="grid.appScope.deleteAnnotation(row.entity)">X</button></div>';
+
+
+ var columnsCoverage = [{
field: 'name',
displayName: 'Name',
cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: usePureRegex
+ }
}, {
field: 'status',
displayName: 'Status',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'totalPoints',
- displayName: 'Total',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'failureCount',
- displayName: 'Failure Count',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'discrepanciesAsRanges',
- displayName: 'Failed Points',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'assignee',
- displayName: 'Assignee',
- enableCellEdit: false,
- cellTemplate: assigneeCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ width: '6%',
+ filter: {
+ condition: usePureRegex
+ }
},
{
- field: 'team',
- displayName: 'Team',
- enableCellEdit: false,
- visible: true,
- headerCellTemplate: '/dispo/legacy/templates/nameFilterTmpl.html'
- },{
- field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'needsRerun',
- displayName: 'Rerun?',
- enableCellEdit: false,
- cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting
- },{
- field: 'lastUpdated',
- displayName: 'Last Ran',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- }, {
- field: 'category',
- displayName: 'Category',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'machine',
- displayName: 'Station',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'elapsedTime',
- displayName: 'Elapsed Time',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'creationDate',
- displayName: 'Creation Date',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- },{
- field: 'aborted',
- displayName: 'Aborted',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'version',
- displayName: 'Version',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
- var wideColumnsTestScript = [{
- field: 'name',
- displayName: 'Name',
- width: '22%',
- cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'status',
- displayName: 'Status',
- width: '10%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
field: 'totalPoints',
displayName: 'Total',
- width: '10%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
+ width: '4%',
+ filter: {
+ condition: usePureRegex
+ }
+ },
+ {
field: 'failureCount',
displayName: 'Failure Count',
- width: '7%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ width: '4%',
+ filter: {
+ condition: usePureRegex
+ }
}, {
field: 'discrepanciesAsRanges',
displayName: 'Failed Points',
- width: '15%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: findPointInRanges
+ }
}, {
field: 'assignee',
displayName: 'Assignee',
+ width: '10%',
enableCellEdit: false,
cellTemplate: assigneeCellTmpl,
- width: '12%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },
+ filter: {
+ condition: usePureRegex
+ }
+ } ,
{
field: 'team',
displayName: 'Team',
- enableCellEdit: false,
- visible: true,
- width: '7%',
- headerCellTemplate: '/dispo/legacy/templates/nameFilterTmpl.html'
- },{
+ width: '5%',
+ enableCellEdit: true,
+ filter: {
+ condition: usePureRegex
+ }
+ }, {
field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- width: '12%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ width: '10%',
+ displayName: 'Item Notes',
+ enableCellEdit: true,
+ filter: {
+ condition: usePureRegex
+ }
},{
field: 'needsRerun',
+ width: '4%',
displayName: 'Rerun?',
- enableCellEdit: false,
+ type: 'boolean',
+ filter: {
+ },
cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting,
- width: '10%',
+ enableCellEdit: true
},{
field: 'lastUpdated',
+ width: '10%',
displayName: 'Last Ran',
enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
+ filter: {
+ condition: usePureRegex
+ },
+ sortingAlgorithm: dateSorting
}, {
field: 'category',
+ width: '10%',
displayName: 'Category',
enableCellEdit: true,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: usePureRegex
+ }
}, {
field: 'machine',
+ width: '10%',
displayName: 'Station',
enableCellEdit: true,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: usePureRegex
+ }
}, {
field: 'elapsedTime',
+ width: '10%',
displayName: 'Elapsed Time',
enableCellEdit: false,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: usePureRegex
+ }
},{
field: 'creationDate',
+ width: '10%',
displayName: 'Creation Date',
enableCellEdit: false,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
+ filter: {
+ condition: usePureRegex
+ },
+ sortingAlgorithm: dateSorting
},{
field: 'aborted',
+ width: '10%',
displayName: 'Aborted',
enableCellEdit: false,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ filter: {
+ condition: usePureRegex
+ }
}, {
field: 'version',
+ width: '10%',
displayName: 'Version',
enableCellEdit: false,
visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
- var smallColumnsCoverage = [{
- field: 'name',
- displayName: 'Name',
- cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'status',
- displayName: 'Status',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'totalPoints',
- displayName: 'Total',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'failureCount',
- displayName: 'Failure Count',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'discrepanciesAsRanges',
- displayName: 'Failed Points',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'assignee',
- displayName: 'Assignee',
+ filter: {
+ condition: usePureRegex
+ }
+ }
+ ];
+
+ var origSubCellTmpl = '<div class="ui-grid-cell-contents" title="TOOLTIP">{{ grid.appScope.getText2(row.entity) }}</div>';
+ var subGridOrigTmpl = '<div ng-class="{\'ui-grid-cell-contents\': true, annotationInput: true, invalid: grid.appScope.getInvalidLocRefs(row.entity), details: annotation.showDeets}" title="TOOLTIP">{{row.entity.locationRefs}}</div>';
+
+ var getInvalidRes = function getInvalidRes(annotation) {
+ return annotation.resolution != null && annotation.resolution != "" && !annotation.isResolutionValid;
+ }
+
+
+ var subGridColumnsCoverage = [{
+ field: 'locationRefs',
+ displayName: 'Code Line',
enableCellEdit: false,
- cellTemplate: assigneeCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ width: '5%',
},
{
- field: 'team',
- displayName: 'Team',
- enableCellEdit: false,
- visible: true,
- headerCellTemplate: '/dispo/legacy/templates/nameFilterTmpl.html'
- },{
- field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'needsRerun',
- displayName: 'Rerun?',
- enableCellEdit: false,
- cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting
- },{
- field: 'lastUpdated',
- displayName: 'Last Ran',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- }, {
- field: 'category',
- displayName: 'Category',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'machine',
- displayName: 'Station',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'elapsedTime',
- displayName: 'Elapsed Time',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'creationDate',
- displayName: 'Creation Date',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- },{
- field: 'aborted',
- displayName: 'Aborted',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'version',
- displayName: 'Version',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'fileNumber',
- displayName: 'File Number',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'methodNumber',
- displayName: 'Method Number',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
- var wideColumnsCoverage = [{
- field: 'name',
- displayName: 'Name',
- width: '22%',
- cellTemplate: origCellTmpl,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'status',
- displayName: 'Status',
- width: '10%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'totalPoints',
- displayName: 'Total',
- width: '10%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }, {
- field: 'failureCount',
- displayName: 'Failure Count',
+ name: 'resolutionType',
+ displayName: 'Resolution Type',
+ editableCellTemplate: '/dispo/views/dropdown.html',
width: '7%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ cellTemplate: origSubCellTmpl,
+ editDropdownIdLabel: 'text',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.isLeaf && !$scope.row.entity.isDefault;
+ }
}, {
- field: 'discrepanciesAsRanges',
- displayName: 'Failed Points',
+ field: 'resolution',
+ displayName: 'Resolution',
width: '15%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.isLeaf && !$scope.row.entity.isDefault
+ }
+
}, {
- field: 'assignee',
- displayName: 'Assignee',
- enableCellEdit: false,
- cellTemplate: assigneeCellTmpl,
- width: '12%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },
- {
- field: 'team',
- displayName: 'Team',
- enableCellEdit: false,
- visible: true,
- width: '7%',
- headerCellTemplate: '/dispo/legacy/templates/nameFilterTmpl.html'
+ field: 'developerNotes',
+ displayName: 'Developer Notes',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.isLeaf
+ }
}, {
- field: 'itemNotes',
- displayName: 'Script Notes',
- cellTemplate: cellEditNotes,
- width: '10%',
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'needsRerun',
- displayName: 'Rerun?',
- enableCellEdit: false,
- cellTemplate: chkBoxTemplate,
- sortFn: checkboxSorting,
- width: '5%',
- },{
- field: 'lastUpdated',
- displayName: 'Last Ran',
+ field: 'customerNotes',
+ displayName: 'Text',
enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- }, {
- field: 'category',
- displayName: 'Category',
+ }
+];
+
+ var subGridColumnsTestScript = [{
+ field: 'locationRefs',
+ displayName: 'Test Point(s)',
enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ cellTemplate: subGridOrigTmpl
+ },
+ {
+ name: 'resolutionType',
+ displayName: 'PCR Type',
+ editableCellTemplate: '/dispo/views/dropdown.html',
+ editDropdownIdLabel: 'text',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.guid != null;
+ }
}, {
- field: 'machine',
- displayName: 'Station',
- enableCellEdit: true,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
+ field: 'resolution',
+ displayName: 'PCR',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.guid != null;
+ }
}, {
- field: 'elapsedTime',
- displayName: 'Elapsed Time',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'creationDate',
- displayName: 'Creation Date',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- sortFn: dateSorting
- },{
- field: 'aborted',
- displayName: 'Aborted',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'version',
- displayName: 'Version',
- enableCellEdit: false,
- visible: false,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'fileNumber',
- displayName: 'File Number',
- enableCellEdit: false,
- visible: false,
- width: 75,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- },{
- field: 'methodNumber',
- displayName: 'Method Number',
+ field: 'developerNotes',
+ displayName: 'Developer Notes',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.guid != null;
+ }
+ }, {
+ field: 'customerNotes',
+ displayName: 'Customer Notes',
+ cellEditableCondition: function($scope) {
+ return $scope.row.entity.guid != null;
+ },
+ } , {
+ field: 'name',
+ displayName: 'Delete',
enableCellEdit: false,
- visible: false,
- width: 75,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html'
- }];
-
+ width: '5%',
+ cellTemplate: deleteCellTmpl,
+ }
+];
+
return ColumnFactory;
}) \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
index b5b9207d92e..c22c1d45663 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/adminController.js
@@ -1,148 +1,152 @@
- app.controller('adminController', ['$scope', '$rootScope', '$modal', 'Program', 'Set', 'Report', 'CopySet', 'CopySetCoverage', 'MultiItemEdit',
- function($scope, $rootScope, $modal, Program, Set, Report, CopySet, CopySetCoverage, MultiItemEdit) {
+app.controller('adminController', [
+ '$scope',
+ '$rootScope',
+ '$modal',
+ 'Program',
+ 'Set',
+ 'Report',
+ 'CopySet',
+ 'CopySetCoverage',
+ 'MultiItemEdit',
+ 'uiGridConstants',
+ function($scope, $rootScope, $modal, Program, Set, Report, CopySet, CopySetCoverage, MultiItemEdit, uiGridConstants) {
$scope.readOnly = true;
$scope.programSelection = null;
$scope.modalShown = false;
$scope.primarySet = "";
$scope.secondarySet = "";
- $scope.sets = {};
+ $scope.sets = [];
$scope.addNew = false;
$scope.newProgramName = ""
$scope.selectedItems = [];
$scope.isRunningOperation = false;
-
-
$scope.cachedValue = "";
- $scope.$on('ngGridEventStartCellEdit', function(data) {
- var field = data.targetScope.col.field;
- $scope.cachedValue = data.targetScope.row.getProperty(field);
- });
-
- $scope.$on('ngGridEventEndCellEdit', function(data) {
- var field = data.targetScope.col.field;
- var row = data.targetScope.row;
- var newValue = row.getProperty(field);
+ $scope.programs = Program.query();
+
+ var isPrimary = function(importState) {
+ return row.entity.importState != "Warnings" && row.entity.importState != "Failed";
+ }
- if ($scope.cachedValue != newValue) {
- $scope.editSet(row.entity);
+ $scope.createNewProgram = function() {
+ if ($scope.newProgramName != "") {
+ var loadingModal = $scope.showLoadingModal();
+ var newProgram = new Program;
+ newProgram.name = $scope.newProgramName;
+ newProgram.$save({
+ name: $scope.newProgramName
+ }, function() {
+ $scope.newProgramName = "";
+ $scope.addNew = false;
+ loadingModal.close();
+ $scope.programs = Program.query();
+ }, function() {
+ loadingModal.close();
+ alert("Oops...Something went wrong");
+ });
}
- });
-
-
-
+ }
+
+ $scope.toggleAddNew = function() {
+ if($scope.addNew) {
+ $scope.addNew = false;
+ } else {
+ $scope.addNew = true;
+ }
+ }
+
$scope.gridOptions = {
data: 'sets',
- enableHighlighting: true,
- enableColumnResize: false,
- enableRowReordering: true,
- multiSelect: false,
selectedItems: $scope.selectedItems,
- columnDefs: 'columnDefs' // link to scope variable which we will define dynamically
- }
-
- var isPrimary = function(importState) {
- return row.entity.importState != "Warnings" && row.entity.importState != "Failed";
+ showGroupPanel: false,
+ enableGridMenu: false,
+ enableCellEdit: false
}
var editCellTmpl = '<input editable="true" >'
- var dellCellTmpl = '<button width="50px" class="btn btn-danger btn-sm setDelete" ng-show="!readOnly" ng-click="deleteSet(row.entity)">X</button>';
- var importCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="importSet(row.entity)">Import</button>';
- var exportCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="exportSet(row.entity)">Export</button>';
+ var dellCellTmpl = '<button width="50px" class="btn btn-danger btn-sm setDelete" ng-show="!readOnly" ng-click="grid.appScope.deleteSet(row.entity)">X</button>';
+ var importCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="grid.appScope.importSet(row.entity)">Import</button>';
+ var exportCellTmpl = '<button width="50px" class="btn btn-primary" ng-disabled="row.entity.processingImport" ng-click="grid.appScope.exportSet(row.entity)">Export</button>';
var lastOperationCellTmpl = '<id="stateButton" button width="99%" ng-disabled="row.entity.processingImport || row.entity.gettingDetails" ng-class="{btn: true, \'btn-primary\': \'isPrimary(row.entity.importState)\',' +
- '\'btn-warning\': row.entity.importState == \'Warnings\', \'btn-danger\': row.entity.importState == \'Failed\', \'btn-success\': row.entity.importState == \'OK\'}" ng-click="getSetImportDetails(row.entity)">{{row.entity.importState}}</button>';
+ '\'btn-warning\': row.entity.importState == \'Warnings\', \'btn-danger\': row.entity.importState == \'Failed\', \'btn-success\': row.entity.importState == \'OK\'}" ng-click="grid.appScope.getSetImportDetails(row.entity)">{{row.entity.importState}}</button>';
$scope.columnDefs1 = [{
- field: "",
+ field: 'name',
displayName: "Import",
width: '9%',
- enableCellEdit: false,
+ enableColumnMenu: false,
cellTemplate: importCellTmpl
}, {
- field: "",
+ field: 'name',
displayName: "Export",
width: '9%',
+ enableColumnMenu: false,
cellTemplate: exportCellTmpl
}, {
- field: "",
+ field: 'name',
displayName: "Last Operation",
width: '15%',
+ enableColumnMenu: false,
cellTemplate: lastOperationCellTmpl
}, {
- field: "name",
+ field: 'name',
displayName: "Name",
width: '20%',
- enableCellEdit: false
+ enableColumnMenu: false,
}, {
- field: "importPath",
+ field: 'importPath',
displayName: "Path",
- width: '47%',
- enableCellEdit: false
+ enableColumnMenu: false,
}];
$scope.columnDefs2 = [{
- field: "",
+ field: 'name',
displayName: "Import",
width: '9%',
- enableCellEdit: false,
+ enableColumnMenu: false,
cellTemplate: importCellTmpl
}, {
- field: "",
+ field: 'name',
displayName: "Export",
width: '9%',
+ enableColumnMenu: false,
cellTemplate: exportCellTmpl
- },{
- field: "",
+ }, {
+ field: 'name',
displayName: "Last Operation",
width: '15%',
+ enableColumnMenu: false,
cellTemplate: lastOperationCellTmpl
}, {
- field: "name",
+ field: 'name',
displayName: "Name",
width: '20%',
- enableCellEdit: true
+ enableColumnMenu: false,
}, {
- field: "importPath",
+ field: 'importPath',
displayName: "Path",
- width: '41%',
- enableCellEdit: true
+ enableColumnMenu: false,
}, {
- field: "delete",
- displayName: "Delete",
- width: '6%',
+ field: 'name',
+ displayName: "",
+ width: '5%',
+ enableColumnMenu: false,
cellTemplate: dellCellTmpl
}];
- $scope.createNewProgram = function() {
- if ($scope.newProgramName != "") {
- var loadingModal = $scope.showLoadingModal();
- var newProgram = new Program;
- newProgram.name = $scope.newProgramName;
- newProgram.$save({
- name: $scope.newProgramName
- }, function() {
- $scope.newProgramName = "";
- $scope.addNew = false;
- loadingModal.close();
- $scope.programs = Program.query();
- }, function() {
- loadingModal.close();
- alert("Oops...Something went wrong");
- });
- }
- }
+ $scope.gridOptions.columnDefs = $scope.columnDefs1;
- $scope.toggleAddNew = function() {
- if($scope.addNew) {
- $scope.addNew = false;
- } else {
- $scope.addNew = true;
- }
- }
+ $scope.gridOptions.onRegisterApi = function(gridApi) {
- $scope.columnDefs = $scope.columnDefs1;
+ $scope.subGridApi = gridApi;
- $scope.programs = Program.query();
+ gridApi.edit.on.afterCellEdit($scope, function(rowEntity, colDef, newValue, oldValue) {
+ if (oldValue != newValue) {
+ $scope.editSet(rowEntity);
+ }
+ });
+
+ };
$scope.toggleModal = function() {
$scope.modalShown = !$scope.modalShown
@@ -150,10 +154,10 @@
$scope.toggleReadOnly = function() {
if ($scope.readOnly) {
- $scope.columnDefs = $scope.columnDefs2;
+ $scope.gridOptions.columnDefs = $scope.columnDefs2;
$scope.readOnly = false;
} else {
- $scope.columnDefs = $scope.columnDefs1;
+ $scope.gridOptions.columnDefs = $scope.columnDefs1;
$scope.readOnly = true;
}
@@ -182,6 +186,7 @@
}, function(data) {
set.gettingDetails = false;
$scope.operationSummary = data.operationSummary;
+ $scope.summaryGrid.data = $scope.operationSummary.entries;
set.importState = data.importState;
}, function(data) {
set.gettingDetails = false;
@@ -345,34 +350,28 @@
data: 'operationSummary.entries',
enableHighlighting: true,
enableColumnResize: true,
- enableRowReordering: true,
multiSelect: false,
+ showFilter: true,
+ enableFiltering: true,
headerRowHeight: 60, // give room for filter bar
- plugins: [filterBarPlugin],
columnDefs: [{
field: "severity.name",
displayName: "Severity",
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- width: 70
+ width: '7%',
},{
field: "name",
displayName: "Name",
- width: 350,
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- enableCellEdit: false
+ width: '20%',
},{
field: "message",
- width: 782,
displayName: "Message",
- headerCellTemplate: '/dispo/views/nameFilterTmpl.html',
- enableCellEdit: false
}]
}
-
-
-
-
+ $scope.summaryGrid.onRegisterApi = function(gridApi) {
+ $scope.subGridApi = gridApi;
+ };
+
// Loading Modal
$scope.showLoadingModal = function() {
var modalInstance = $modal.open({
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
index 91db8a24ebc..e740f046f25 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/dispoApp.js
@@ -1,7 +1,7 @@
/**
* Dispo app definition
*/
-var app = angular.module('dispoApp', ['oauth', 'ngRoute','ngResource', 'ui.bootstrap', 'ngGrid', 'mc.resizer', 'ngCookies', 'aLinkRewrite', 'oseeProvider']);
+var app = angular.module('dispoApp', ['oauth', 'ngRoute', 'ngResource', 'ui.bootstrap', 'ui.grid', 'ui.grid.selection', 'ui.grid.exporter', 'ui.grid.edit', 'ui.grid.resizeColumns', 'mc.resizer', 'ngCookies', 'ngStorage', 'ui.grid.autoResize', 'ui.grid.cellNav', 'ui.grid.treeView', 'ui.grid.grouping']);
app.config(['$routeProvider',
function($routeProvider) {
@@ -25,6 +25,90 @@ function($routeProvider) {
}
]);
+/**
+ * @ngdoc directive
+ * @name ui.grid.edit.directive:uiGridEditDropdown
+ * @element div
+ * @restrict A
+ *
+ * @description dropdown editor for editable fields.
+ * Provides EndEdit and CancelEdit events
+ *
+ * Events that end editing:
+ * blur and enter keydown, and any left/right nav
+ *
+ * Events that cancel editing:
+ * - Esc keydown
+ *
+ */
+app.directive('uiGridEditDropdownOsee',
+ ['uiGridConstants', 'uiGridEditConstants',
+ function (uiGridConstants, uiGridEditConstants) {
+ return {
+ require: ['?^uiGrid', '?^uiGridRenderContainer'],
+ scope: true,
+ compile: function () {
+ return {
+ pre: function ($scope, $elm, $attrs) {
+
+ },
+ post: function ($scope, $elm, $attrs, controllers) {
+ var uiGridCtrl = controllers[0];
+ var renderContainerCtrl = controllers[1];
+
+ //set focus at start of edit
+ $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function () {
+ $elm[0].focus();
+ $elm[0].style.width = ($elm[0].parentElement.offsetWidth - 1) + 'px';
+ $elm.on('blur', function (evt) {
+ $scope.stopEdit(evt);
+ });
+ $elm.on('change', function (evt) {
+ $elm[0].blur();
+ });
+ });
+
+
+ $scope.stopEdit = function (evt) {
+ // no need to validate a dropdown - invalid values shouldn't be
+ // available in the list
+ $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
+ };
+
+ $elm.on('keydown', function (evt) {
+ switch (evt.keyCode) {
+ case uiGridConstants.keymap.ESC:
+ evt.stopPropagation();
+ $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
+ break;
+ }
+ if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
+ evt.uiGridTargetRenderContainerId = renderContainerCtrl.containerId;
+ if (uiGridCtrl.cellNav.handleKeyDown(evt) !== null) {
+ $scope.stopEdit(evt);
+ }
+ }
+ else {
+ //handle enter and tab for editing not using cellNav
+ switch (evt.keyCode) {
+ case uiGridConstants.keymap.ENTER: // Enter (Leave Field)
+ case uiGridConstants.keymap.TAB:
+ evt.stopPropagation();
+ evt.preventDefault();
+ $scope.stopEdit(evt);
+ break;
+ }
+ }
+ return true;
+ });
+ }
+ };
+ }
+ };
+ }]);
+
+
+
app.directive('focusMe', function($timeout) {
return function(scope, element, attrs) {
scope.$watch(attrs.focusMe, function() {
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
index ccb9ec1f568..abe7c06e4d7 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
@@ -2,352 +2,488 @@ app.controller('userController', [
'$scope',
'$modal',
'$rootScope',
- '$cookieStore',
'Program',
'Set',
'Item',
'Annotation',
'SetSearch',
'SourceFile',
- 'ColumnFactory',
'Config',
- function($scope, $modal, $rootScope, $cookieStore, Program, Set, Item, Annotation, SetSearch, SourceFile, ColumnFactory, Config) {
- $scope.unselectingItem = false;
- $scope.editItems = false;
- $scope.selectedItems = [];
+ 'uiGridConstants',
+ 'uiGridTreeViewConstants',
+ 'ColumnFactory',
+ function($scope, $modal, $rootScope, Program, Set, Item, Annotation, SetSearch, SourceFile, Config, uiGridConstants, uiGridTreeViewConstants, ColumnFactory) {
+ $scope.editItems = false;
+ $scope.selectedItems = [];
$scope.programSelection = null;
- $scope.setSelection = null;
- $scope.lastFocused = null;
+ $scope.setSelection = null;
$scope.isMulitEditRequest = false;
$scope.loading = false;
- $scope.isSearchView = false;
-
- $scope.getDispoType = function() {
- if($rootScope.type == 'codeCoverage') {
- $scope.annotationHeaders = {
- 'locationRefs': 'Code Line',
- 'resolutionType': 'Disposition Type',
- 'resolution': 'Resolution'}
- } else if($rootScope.type == 'testScript') {
- $scope.annotationHeaders = {
- 'locationRefs': 'Test Point(s)',
- 'resolutionType': 'PCR Type',
- 'resolution': 'PCR'}
- }
- };
+ $scope.isSearchView = false;
+ $scope.isMultiEditView = false;
+ $scope.isFirstSplit = false;
+ $scope.isCoverage = $rootScope.type == 'codeCoverage';
+ function split() {
+ Split(['#itemsGridDiv', '#subGridDiv'], {
+ direction: 'vertical',
+ sizes: [75, 25],
+ minSize: [200, 200],
+ gutterSize: 10,
+ cursor: 'row-resize'
+ });
+ }
+
// if this is a search result view, populate program, set and items from parent scope
- if(window.opener != null && window.opener.$windowScope != undefined) {
- $scope.programs = window.opener.$windowScope.programs;
- $scope.sets = window.opener.$windowScope.sets;
- $scope.programSelection = window.opener.$windowScope.programSelection;
- $scope.setSelection = window.opener.$windowScope.setSelection;
- $scope.items = window.opener.$windowScope.searchData;
-
- $scope.isSearchView = true;
- $scope.searchValue = window.opener.$windowScope.searchValue;
-
- $scope.dispoType = window.opener.$windowScope.dispoType;
- } else {
+ if (window.opener != null && window.opener.$windowScope != undefined) {
+ $scope.programs = window.opener.$windowScope.programs;
+ $scope.sets = window.opener.$windowScope.sets;
+ $scope.programSelection = window.opener.$windowScope.programSelection;
+ $scope.setSelection = window.opener.$windowScope.setSelection;
+ $scope.items = window.opener.$windowScope.searchData;
+
+ $scope.isSearchView = true;
+ $scope.searchValue = window.opener.$windowScope.searchValue;
+
+ $scope.type = window.opener.$windowScope.type;
+ } else {
// Get programs from server
Program.query(function(data) {
$scope.programs = data;
});
- $scope.getDispoType();
- }
-
- $scope.isDefaultResolution = function isDefaultResolution(annotation) {
- var resolutionType = annotation.resolutionType;
- return resolutionType == 'Test_Script' || resolutionType == 'Exception_Handling';
}
$scope.updateProgram = function updateProgram() {
- var loadingModal = $scope.showLoadingModal();
- $scope.items = {};
- $scope.sets = {};
+ var loadingModal = $scope.showLoadingModal();
+ $scope.items = [];
+ $scope.sets = [];
Set.query({
programId: $scope.programSelection,
type: $rootScope.type
}, function(data) {
- loadingModal.close();
+ loadingModal.close();
$scope.sets = data;
}, function(data) {
- loadingModal.close();
- alert(data.statusText);
- });
-
- // Try to get custom config
- Config.get({
- programId: $scope.programSelection,
- type: $rootScope.type
- }, function(data) {
- $scope.coverageResolutionTypes = data.validResolutions;
+ loadingModal.close();
+ alert(data.statusText);
});
+
+ if(!$scope.isCoverage) {
+ $scope.validResolutions = [{
+ text: "Code",
+ value: "CODE"
+ }, {
+ text: "Test",
+ value: "TEST"
+ }, {
+ text: "Requirement",
+ value: "REQUIREMENT"
+ }, {
+ text: "Other",
+ value: "OTHER"
+ }, {
+ text: "Undetermined",
+ value: "UNDETERMINED"
+ }];
+ ColumnFactory.setResolutionTypeArray($rootScope.type, $scope.validResolutions);
+ } else {
+ Config.get({
+ programId: $scope.programSelection,
+ type: $rootScope.type
+ }, function(data) {
+ $scope.resolutionTypes = data.validResolutions;
+ ColumnFactory.setResolutionTypeArray($rootScope.type, $scope.resolutionTypes);
+ });
+ }
+
};
-
+
$scope.updateSet = function updateSet() {
- var loadingModal = $scope.showLoadingModal();
- $scope.items = {};
-
- if($scope.isSearchView) {
- $scope.doAdvSearch($scope.searchValue, loadingModal);
- } else {
+ var loadingModal = $scope.showLoadingModal();
+
+ if ($scope.isSearchView) {
+ $scope.doAdvSearch($scope.searchValue, loadingModal);
+ } else {
Item.query({
programId: $scope.programSelection,
setId: $scope.setSelection,
- isDetailed: $rootScope.type == 'codeCoverage'
+ isDetailed: $scope.isCoverage
}, function(data) {
- loadingModal.close();
+ loadingModal.close();
$scope.items = data;
+ if(!$scope.isFirstSplit) {
+ setTimeout(split, 100);
+ $scope.isFirstSplit = true;
+ }
}, function(data) {
- loadingModal.close();
- alert("Ooops...Something went wrong");
+ loadingModal.close();
+ alert("Ooops...Something went wrong");
});
- }
+ }
};
- $scope.getItemDetails = function getItemDetails(item, row) {
- $scope.unselectingItem = true;
- $scope.gridOptions.selectAll(false);
- $scope.unselectingItem = false;
- $scope.selectedItem = item;
- Annotation.query({
+ var sortStuff = function(a, b) {
+ if (a.locationRefs == undefined) {
+ return 1;
+ }
+ if (b.locationRefs == undefined) {
+ return -1;
+ }
+ if (!isNaN(parseFloat(a)) && isFinite(a)) {
+ return b.locationRefs - a.locationRefs
+ } else {
+ var aSplit = a.locationRefs.split(".");
+ var bSplit = b.locationRefs.split(".");
+
+ var delta = bSplit[0] - aSplit[0];
+ if (delta == 0) {
+ if (bSplit[1].match("RESULT") && !aSplit[1].match("RESULT")) {
+ return -1;
+ } else if (!bSplit[1].match("RESULT") && aSplit[1].match("RESULT")) {
+ return 1;
+ } else {
+ return b.locationRefs.localeCompare(a.locationRefs);
+ }
+ } else {
+ return delta;
+ }
+ }
+ }
+
+ $scope.getSourceFlie = function() {
+ var requst = [];
+ requst.push(
+ "program/",
+ $scope.programSelection,
+ "/set/",
+ $scope.setSelection,
+ "/file/",
+ $scope.selectedItem.name
+ );
+ var url = requst.join("");
+
+ window.open(url);
+ }
+
+ $scope.toggleEditItems = function toggleEditItems() {
+ $scope.isMultiEditView = !$scope.isMultiEditView;
+ console.log($scope.gridOptions.enableRowSelection);
+
+ $scope.gridApi.selection.clearSelectedRows();
+ $scope.gridOptions.enableRowSelection = $scope.isMultiEditView;
+ $scope.gridApi.selection.setMultiSelect($scope.isMultiEditView);
+
+ $scope.gridOptions.enableFullRowSelection = $scope.isMultiEditView;
+ $scope.gridOptions.enableRowHeaderSelection = $scope.isMultiEditView;
+
+ $scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
+
+ $scope.annotations = [];
+ $scope.subGridOptions.data = [];
+ }
+
+ $scope.stealItem = function(item, row) {
+ Item.get({
programId: $scope.programSelection,
setId: $scope.setSelection,
itemId: item.guid
}, function(data) {
- $scope.annotations = data;
- if($rootScope.type == 'codeCoverage') {
- $scope.annotations.sort(sortStuff);
- }
- var blankAnnotation = new Annotation();
- $scope.annotations.push(blankAnnotation);
-
- $scope.gridOptions.selectRow(row.rowIndex, true);
+ $scope.updateItemFromServer(item, data);
+ $scope.askToSteal(item);
});
-
-
};
-
- var sortStuff = function(a, b) {
- if(a.locationRefs == undefined) {
- return 1;
- }
- if(b.locationRefs == undefined) {
- return -1;
- }
- if(!isNaN(parseFloat(a)) && isFinite(a)) {
- return a.locationRefs-b.locationRefs
- } else {
- var aSplit = a.locationRefs.split(".");
- var bSplit = b.locationRefs.split(".");
-
- var delta = aSplit[0] - bSplit[0];
- if(delta == 0) {
- if(aSplit[1].match("RESULT") && !bSplit[1].match("RESULT")) {
- return -1;
- } else if(!aSplit[1].match("RESULT") && bSplit[1].match("RESULT")){
- return 1;
- }else {
- return a.locationRefs.localeCompare(b.locationRefs);
- }
- } else {
- return delta;
- }
- }
- }
-
- $scope.$on('ngGridEventStartCellEdit', function(data) {
- var field = data.targetScope.col.field;
- $scope.cachedValue = data.targetScope.row.getProperty(field);
- });
- $scope.$on('ngGridEventEndCellEdit', function(data) {
- var field = data.targetScope.col.field;
- var newValue = data.targetScope.row.getProperty(field);
- if ($scope.cachedValue != newValue) {
- var object = data.targetScope.row.entity;
- $scope.editItem(data.targetScope.row.entity);
+ $scope.askToSteal = function askToSteal(item) {
+ if ($rootScope.cachedName != null) {
+ if ($rootScope.cachedName != item.assignee) {
+ var confirmed = false;
+ if (item.assignee.toUpperCase() == 'UNASSIGNED') {
+ confirmed = true;
+ } else {
+ confirmed = window.confirm("Are you sure you want to steal this Item from " + item.assignee);
+ }
+ if (confirmed) {
+ item.assignee = $rootScope.cachedName;
+ $scope.editItem(item);
+ }
+ }
}
- });
-
- $scope.saveLastFocused = function saveLastFocused(element) {
- $scope.lastFocused = element;
- }
-
- $scope.getSourceFlie = function () {
- if($rootScope.type == 'codeCoverage') {
- var requst = [];
- requst.push(
- "/dispo/",
- "program/",
- $scope.programSelection,
- "/set/",
- $scope.setSelection,
- "/file/",
- $scope.selectedItem.name
- );
- var url = requst.join("");
-
- window.open(url);
- }
- }
-
- $scope.toggleEditItems = function toggleEditItems() {
- var size = $scope.selectedItems.length;
- $scope.gridOptions.selectAll(false);
-
- // Why do this last? Good question, checkSeletable gets called by selectAll and needs editItems to be true so ng-grid can properly unselect the selected items withouth breaking it's 'watch' function
- $scope.editItems = !$scope.editItems;
- $scope.annotations.length = 0;
}
-
- // Need this so that user clicks on grid rows doesn't automatically change the selected/highlighted row
- var checkSelectable = function checkSelectable(data) {
- if($scope.editItems || $scope.unselectingItem){
- return true;
- } else {
- return false;
- }
+
+ var dateSorting = function(itemA, itemB) {
+ var DateA = new Date(itemA);
+ var DateB = new Date(itemB);
+
+ if (DateA < DateB) {
+ return -1;
+ } else if (DateB < DateA) {
+ return 1;
+ } else {
+ return 0;
+ }
};
-
- $scope.$on('ngGridEventStartCellEdit', function (event) {
- $scope.previousCellData = event.targetScope.row.entity[event.targetScope.col.field];
- });
-
- $scope.$on('ngGridEventEndCellEdit', function (event) {
- cellData = event.targetScope.row.entity[event.targetScope.col.field];
- if(cellData != $scope.previousCellData) {
+
+ var checkboxSorting = function checkboxSorting(itemA, itemB) {
+ if (itemA == itemB) {
+ return 0;
+ } else if (itemA) {
+ return -1;
+ } else if (itemB) {
+ return 1;
}
- });
-
+ };
+
$scope.checkEditable = function checkEditable(item) {
- return item.assignee != $rootScope.cachedName;
+ return item.assignee != $rootScope.cachedName;
}
- $scope.columns = ColumnFactory.getColumns($scope.type, window.innerWidth);
-
- var filterBarPlugin = {
- init: function(scope, grid) {
- filterBarPlugin.scope = scope;
- filterBarPlugin.grid = grid;
- $scope.$watch(function() {
- var searchQuery = "";
- angular.forEach(filterBarPlugin.scope.columns, function(col) {
- if (col.visible && col.filterText) {
- var filterText = (col.filterText.indexOf('*') == 0 ? col.filterText.replace('*', '') : "^" + col.filterText) + ";";
- searchQuery += col.displayName + ": " + filterText;
- }
- });
- return searchQuery;
- }, function(searchQuery) {
- filterBarPlugin.scope.$parent.filterText = searchQuery;
- filterBarPlugin.grid.searchProvider.evalFilter();
- });
- },
- scope: undefined,
- grid: undefined,
- };
-
+ $scope.uiGridConstants = uiGridConstants;
+
$scope.gridOptions = {
data: 'items',
+ enableCellEdit: false,
enableHighlighting: true,
enableColumnResize: true,
- enableRowReordering: true,
- multiSelect: true,
+ multiSelect: false,
showColumnMenu: true,
selectedItems: $scope.selectedItems,
- beforeSelectionChange: checkSelectable,
showGroupPanel: true,
showFilter: true,
noTabInterference: true,
+ enableGridMenu: true,
tabIndex: 0,
- columnDefs: 'columns',
- plugins: [filterBarPlugin],
- headerRowHeight: 60 // give room for filter bar
+ enableFiltering: true,
+ enableFullRowSelection: true,
+ showGridFooter: true,
+ exporterMenuPdf: false,
};
-
- $scope.stealItem = function(item) {
- Item.get({
- programId: $scope.programSelection,
- setId: $scope.setSelection,
- itemId: item.guid
- }, function(data) {
- $scope.updateItemFromServer(item, data);
- $scope.askToSteal(item);
+ $scope.gridOptions.enableRowSelection = false;
+ $scope.gridOptions.enableRowHeaderSelection = false;
+
+ $scope.gridOptions.onRegisterApi = function(gridApi) {
+
+ $scope.gridApi = gridApi;
+
+ gridApi.edit.on.afterCellEdit($scope, function(rowEntity, colDef, newValue, oldValue) {
+ if (oldValue != newValue) {
+ $scope.editItem(rowEntity);
+ }
+ });
+
+ gridApi.core.on.filterChanged($scope, function(ffff) {
+ var grid = this.grid;
+ })
+
+ gridApi.selection.on.rowSelectionChanged($scope, function(row, event) {
+ $scope.selectedItems = gridApi.selection.getSelectedRows();
+ });
+
+ gridApi.selection.on.rowSelectionChangedBatch($scope, function(row, event) {
+ $scope.selectedItems = gridApi.selection.getSelectedRows();
});
+ };
+
+ $scope.gridOptions.columnDefs = ColumnFactory.getColumns($scope.type, window.innerWidth);
+
+ $scope.getText2 = function(annotation) {
+ if (annotation.childrenComplete) {
+ return "COMPLETE"
+ } else {
+ return annotation.resolutionType;
+ }
}
-
- $scope.askToSteal = function askToSteal(item) {
- if ($rootScope.cachedName != null) {
- if ($rootScope.cachedName != item.assignee) {
- var confirmed = false;
- if(item.assignee.toUpperCase() == 'UNASSIGNED'){
- confirmed = true;
- } else {
- confirmed = window.confirm("Are you sure you want to steal this Item from " + item.assignee);
- }
- if (confirmed) {
- item.assignee = $rootScope.cachedName;
- $scope.editItem(item);
+
+ $scope.subGridOptions = {
+ data: 'annotations',
+ enableHighlighting: true,
+ enableCellEdit: true,
+ enableCellEditOnFocus: true,
+ enableColumnResize: true,
+ multiSelect: false,
+ showColumnMenu: true,
+ showFilter: true,
+ noTabInterference: true,
+ enableGridMenu: true,
+ tabIndex: 0,
+ enableFiltering: true,
+ showTreeExpandNoChildren: false,
+ enableFullRowSelection: true,
+ };
+
+ $scope.subGridOptions.enableRowSelection = false;
+ $scope.subGridOptions.enableRowHeaderSelection = false;
+ $scope.subGridOptions.onRegisterApi = function(gridApi) {
+
+ $scope.subGridApi = gridApi;
+
+ gridApi.edit.on.afterCellEdit($scope, function(rowEntity, colDef, newValue, oldValue) {
+ if (oldValue != newValue) {
+ $scope.editAnnotation(rowEntity);
+ }
+ });
+
+ };
+
+ var id = 0;
+ $scope.writeoutNode = function(childArray, currentLevel, dataArray) {
+ childArray.forEach(function(childNode) {
+ if (childNode.children.length > 0) {
+ childNode.$$treeLevel = currentLevel;
+ id = childNode.id;
+ } else {
+ if ((id != childNode.parentId) || (childNode.id == childNode.parentId)) {
+ childNode.$$treeLevel = currentLevel;
}
}
+ dataArray.push(childNode);
+ $scope.writeoutNode(childNode.children, currentLevel + 1, dataArray);
+ });
+ };
+
+ $scope.subGridOptions.data = [];
+ $scope.subGridOptions.columnDefs = ColumnFactory.getSubGridColumns($rootScope.type);
+
+
+ $scope.treeAnnotations = function(annotations) {
+ var annotationsStack = annotations.slice();
+ var toReturn = [];
+
+ while (annotationsStack.length > 0) {
+ var annotation = annotationsStack[annotationsStack.length - 1] // peek
+ if (annotation.name.match(/\d+\.\w+\..+/gi)) {
+ var annotationWithChildren = {};
+ annotation.id = annotation.guid;
+ var leadingLocRefs = annotation.locationRefs.split(".")[0];
+ annotationWithChildren.locationRefs = leadingLocRefs;
+ annotationWithChildren.id = annotation.guid;
+ annotationWithChildren.guid = annotation.guid;
+ annotationWithChildren.parentId = -1;
+
+ var metaData = {};
+ metaData.childrenComplete = true;
+
+ var childrenStack = $scope.getAnnotationsStartsWith(annotationsStack, leadingLocRefs, true);
+ var childrenAsTree = $scope.createTreeAnnotations(annotationsStack, annotationWithChildren, childrenStack, 1, metaData);
+ annotationWithChildren.children = childrenAsTree;
+ annotationWithChildren.$treeLevel = 0;
+ annotationWithChildren.childrenComplete = metaData.childrenComplete;
+ toReturn.push(annotationWithChildren);
+ } else {
+ annotationsStack.pop();
+ annotation.children = [];
+ annotation.$$treeLevel = -1;
+ annotation.isLeaf = true;
+
+ toReturn.push(annotation);
+ }
}
+
+ return toReturn;
}
-
-
- $scope.testResolutionTypes = [{
- text: "Code",
- value: "CODE"
- }, {
- text: "Test",
- value: "TEST"
- }, {
- text: "Requirement",
- value: "REQUIREMENT"
- }, {
- text: "Other",
- value: "OTHER"
- }, {
- text: "Undetermined",
- value: "UNDETERMINED"
- }];
- $scope.coverageResolutionTypes = [{
- text: "Test Script",
- value: "Test_Script",
- isDefault: true
- }, {
- text: "Exception_Handling",
- value: "Exception_Handling",
- isDefault: true
- }, {
- text: "Other",
- value: "other",
- isDefault: false
- }, {
- text: "Undetermined",
- value: "UNDETERMINED",
- isDefault: false
- }];
-
-
- $scope.searchAnnotations = function() {
- Item.get({
- programId: $scope.programSelection,
+
+ $scope.createTreeAnnotations = function(annotationsStack, parent, childrenStack, level, metaData) {
+ if (level >= 2) {
+ var children = $scope.getAnnotationsStartsWith(childrenStack, parent.locationRefs, true);
+ for (var i = 0; i < children.length; i++) {
+ children[i].$$treeLevel = level;
+
+ children[i].children = [];
+ children[i].parentId = parent.id;
+ children[i].isLeaf = true;
+ if (children[i].resolution === "") {
+ metaData.childrenComplete = false;
+ }
+ }
+ return children;
+ } else {
+ var toReturn = [];
+ while (childrenStack.length > 0) {
+ var annotation = childrenStack[0]
+ var leadingLocRefs = $scope.createLocRef(annotation.locationRefs, level);
+
+ var workingGen = {};
+ workingGen.id = $scope.generateId();
+ workingGen.parentId = parent.id;
+ workingGen.locationRefs = leadingLocRefs;
+ workingGen.$$treeLevel = level;
+ var metaDataCur = {};
+ metaDataCur.childrenComplete = true;
+ workingGen.children = $scope.createTreeAnnotations(annotationsStack, workingGen, childrenStack, level + 1, metaDataCur);
+ metaData.childrenComplete = metaData.childrenComplete && metaDataCur.childrenComplete;
+ workingGen.childrenComplete = metaData.childrenComplete;
+ toReturn.push(workingGen);
+ }
+ return toReturn;
+ }
+ }
+
+ $scope.createLocRef = function(fullLocRefs, level) {
+ var workingGenLocationRefs = "";
+ for (var i = 0; i <= level; i++) {
+ if (i > 0) {
+ workingGenLocationRefs += ".";
+ }
+ workingGenLocationRefs += fullLocRefs.split(".")[i];
+ }
+ return workingGenLocationRefs;
+ }
+
+
+ $scope.getAnnotationsStartsWith = function(annotationsStack, startsWith, isPop) {
+ var startsWithRegex = "^" + startsWith + "($|\\.)";
+ var annotationsStackOrig = annotationsStack.slice();
+ var toReturn = [];
+ var toDelete = [];
+ for (var i = 0; i < annotationsStack.length; i++) {
+ var annotation = annotationsStackOrig[i];
+ if (annotation.locationRefs.match(startsWithRegex)) {
+ toDelete.push(i);
+ toReturn.push(annotation);
+ }
+ }
+ if (isPop) {
+ for (var i = toDelete.length - 1; i >= 0; i--) {
+ annotationsStack.splice(toDelete[i], 1);
+ }
+ }
+ return toReturn;
+ }
+
+ $scope.getItemDetails = function(item, row) {
+ if (!$scope.isMultiEditView) {
+ $scope.selectedItem = item;
+ Annotation.query({
+ programId: $scope.programSelection,
setId: $scope.setSelection,
- itemId: $scope.selectedItem.guid,
- keyword: "text"
- })
+ itemId: item.guid
+ }, function(data) {
+ $scope.subGridOptions.data = [];
+ $scope.annotations = data;
+ if ($scope.isCoverage) {
+ $scope.annotations.sort(sortStuff);
+ $scope.annotations = $scope.treeAnnotations(data);
+ $scope.writeoutNode($scope.annotations, 0, $scope.subGridOptions.data);
+ } else {
+ var blankAnnotation = new Annotation();
+ $scope.annotations.push(blankAnnotation);
+ $scope.subGridOptions.data = $scope.annotations;
+ }
+
+ $scope.gridApi.selection.selectRow(row.entity, $scope.gridApi.grid);
+ });
+ }
+
}
-
- $scope.getResolutionTypes = function getResolutionTypes() {
- if($scope.type == 'codeCoverage') {
- return $scope.coverageResolutionTypes;
- } else {
- return $scope.testResolutionTypes;
- }
+
+ $scope.searchAnnotations = function() {
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ keyword: "text"
+ })
}
$scope.deleteAnnotation = function deleteAnnotation(annotation) {
@@ -357,7 +493,7 @@ app.controller('userController', [
itemId: $scope.selectedItem.guid,
annotationId: annotation.guid,
userName: $rootScope.cachedName,
- }, function(data) {
+ }, function() {
var index = $scope.annotations.indexOf(annotation);
if (index > -1) {
$scope.annotations.splice(index, 1);
@@ -374,50 +510,50 @@ app.controller('userController', [
});
}
-
+
$scope.editItem = function editItem(item) {
- $scope.editItem(item, null);
+ $scope.editItem(item, null);
}
-
+
$scope.editAssignees = function(item) {
- $scope.editItem(item, 'assignee');
+ $scope.editItem(item, 'assignee');
}
-
- $scope.editNotes = function (item) {
- $scope.editItem(item, 'itemNotes');
+
+ $scope.editItemNotes = function(item) {
+ $scope.editItem(item, 'itemNotes');
}
-
- $scope.editCategories = function (item) {
- $scope.editItem(item, 'category');
+
+ $scope.editCategories = function(item) {
+ $scope.editItem(item, 'category');
}
-
- $scope.editNeedsRerun = function (item) {
- $scope.editItem(item, 'needsRerun');
+
+ $scope.editNeedsRerun = function(item) {
+ $scope.editItem(item, 'needsRerun');
}
$scope.editItem = function editItem(item, field) {
- var newItem = new Item;
- if(field == null) {
- newItem = item;
- } else if(field == 'itemNotes') {
- newItem.itemNotes = item.itemNotes;
- } else if(field == 'needsRerun') {
- newItem.needsRerun = item.needsRerun;
- } else if(field == 'assignee') {
- newItem.assignee = item.assignee;
- } else if(field == 'category') {
- newItem.category = item.category;
- }
-
+ var newItem = new Item();
+ if (field == null) {
+ newItem = item;
+ } else if (field == 'itemNotes') {
+ newItem.itemNotes = item.itemNotes;
+ } else if (field == 'needsRerun') {
+ newItem.needsRerun = item.needsRerun;
+ } else if (field == 'category') {
+ newItem.category = item.category;
+ } else if (field == 'assignee') {
+ newItem.assignee = item.assignee;
+ }
+
Item.update({
programId: $scope.programSelection,
setId: $scope.setSelection,
itemId: item.guid,
}, newItem, function() {
- if($scope.isMulitEditRequest) {
- $scope.gridOptions.selectAll(false);
- $scope.isMulitEditRequest=false;
- }
+ if ($scope.isMulitEditRequest) {
+ $scope.gridApi.selection.clearSelectedRows();
+ $scope.isMulitEditRequest = false;
+ }
}, function(data) {
alert("Could not make change, please try refreshing");
});
@@ -425,23 +561,55 @@ app.controller('userController', [
}
$scope.getInvalidLocRefs = function getInvalidLocRefs(annotation) {
- if(annotation.isConnected != null) {
- return !annotation.isConnected && !annotation.isDefault && annotation.locationRefs != null;
- } else {
- return false;
- }
+ if (annotation.isConnected != null) {
+ return !annotation.isConnected && annotation.locationRefs != null;
+ } else {
+ return false;
+ }
}
$scope.getInvalidRes = function getInvalidRes(annotation) {
return annotation.resolution != null && annotation.resolution != "" && !annotation.isResolutionValid;
}
-
+
$scope.editAnnotation = function editAnnotation(annotation) {
- $scope.lastFocused;
+ if ($scope.selectedItem.assignee == $rootScope.cachedName) {
+ $scope.editAnnotationServerCall(annotation);
+ } else if ($scope.selectedItem.assignee == "UnAssigned") {
+ var newItem = new Item();
+ newItem.assignee = $rootScope.cachedName;
+
+ Item.get({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid
+ }, function(data) {
+ if (data.assignee == "UnAssigned") {
+ Item.update({
+ programId: $scope.programSelection,
+ setId: $scope.setSelection,
+ itemId: $scope.selectedItem.guid,
+ }, newItem, function() {
+ $scope.selectedItem.assignee = $rootScope.cachedName;
+ $scope.editAnnotationServerCall
+ }, function(data) {
+ alert("Could not make change, please try refreshing");
+ });
+ } else {
+ $scope.selectedItem.assignee = data.assignee;
+ alert("This item was taken while you weren't looking. Double click on the assignee field for this item to steal it and make changes");
+ }
+ });
+ } else {
+ alert("You are not assigned to this Item. Double click on the assignee field for this item to steal it and make changes");
+ }
+ }
+
+ $scope.editAnnotationServerCall = function(annotation) {
if (annotation.guid == null) {
- if(/[^\s]+/.test(annotation.locationRefs)) {
- $scope.createAnnotation(annotation);
- }
+ if (/[^\s]+/.test(annotation.locationRefs)) {
+ $scope.createAnnotation(annotation);
+ }
} else {
Annotation.update({
programId: $scope.programSelection,
@@ -472,11 +640,10 @@ app.controller('userController', [
}, function(data) {
alert("Could not make change, please try refreshing");
});
-
- if($rootScope.type == 'codeCoverage') {
- $scope.annotations.sort(sortStuff);
- }
+ if ($scope.isCoverage) {
+ $scope.annotations.sort(sortStuff);
+ }
}
}
@@ -487,10 +654,6 @@ app.controller('userController', [
itemId: $scope.selectedItem.guid,
userName: $rootScope.cachedName,
}, function() {
- var nextFocused = $scope.lastFocused.$$prevSibling;
- nextFocused.focus;
- nextFocused.focusMe;
-
Item.get({
programId: $scope.programSelection,
setId: $scope.setSelection,
@@ -501,10 +664,10 @@ app.controller('userController', [
var blankAnnotation = new Annotation();
$scope.annotations.push(blankAnnotation);
-
- if($rootScope.type == 'codeCoverage') {
- $scope.annotations.sort(sortStuff);
- }
+
+ if ($scope.isCoverage) {
+ $scope.annotations.sort(sortStuff);
+ }
}, function(data) {
alert("Could not make change, please try refreshing");
});
@@ -540,65 +703,81 @@ app.controller('userController', [
annotation.showDeets = true;
}
}
-
+
$scope.updateItemFromServer = function(oldItem, newItem) {
- oldItem.assignee = newItem.assignee;
- oldItem.scriptNotes = newItem.scriptNotes;
- oldItem.status = newItem.status;
+ oldItem.assignee = newItem.assignee;
+ oldItem.itemNotes = newItem.itemNotes;
+ oldItem.status = newItem.status;
}
-
+
$scope.doAdvSearch = function(value, loadingModal) {
- SetSearch.query({
+ SetSearch.query({
programId: $scope.programSelection,
setId: $scope.setSelection,
value: value,
- isDetailed: $rootScope.type == 'codeCoverage',
+ isDetailed: $scope.isCoverage
}, function(data) {
- if($scope.isSearchView) {
- $scope.items = data;
- if(loadingModal != null) {
- loadingModal.close();
- }
- } else {
- $scope.searchData = data;
- window.$windowScope = $scope;
- $scope.searchValue = value;
- window.open("/dispo/main.html#/search");
- }
+ if ($scope.isSearchView) {
+ $scope.items = data;
+ if (loadingModal != null) {
+ loadingModal.close();
+ }
+ } else {
+ $scope.searchData = data;
+ window.$windowScope = $scope;
+ $scope.searchValue = value;
+ window.open("/dispo/main.html#/search");
+ }
}, function(data) {
- if($scope.isSearchView) {
- $scope.items = $scope.emptyItems;
- } else {
- $scope.searchData = $scope.emptyItems;
- window.$windowScope = $scope;
- window.open("/dispo/main.html#/search");
- }
- if(loadingModal != null) {
- loadingModal.close();
- }
+ if ($scope.isSearchView) {
+ $scope.items = $scope.emptyItems;
+ } else {
+ $scope.searchData = $scope.emptyItems;
+ window.$windowScope = $scope;
+ window.open("/dispo/main.html#/search");
+ }
+ if (loadingModal != null) {
+ loadingModal.close();
+ }
});
}
- $scope.getText = function(annotation) {
- if(annotation.customerNotes == "") {
- var discrepancies = $scope.selectedItem.discrepancies;
- var covered = annotation.idsOfCoveredDiscrepancies[0]
-
- if(!discrepancies[covered] == null)
- return discrepancies[covered].text;
- else
- return "";
- } else {
- return annotation.customerNotes;
- }
+ $scope.getSourceFile = function () {
+ if($scope.isCoverage) {
+ var requst = [];
+ requst.push(
+ "/dispo/",
+ "program/",
+ $scope.programSelection,
+ "/set/",
+ $scope.setSelection,
+ "/file/",
+ $scope.selectedItem.name
+ );
+ var url = requst.join("");
+
+ window.open(url);
+ }
+ }
+
+ $scope.emptyItems = [{
+ "name": "NONE FOUND"
+ }];
+
+ $scope.generateId = function() {
+ var text = "";
+ var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+
+ for (var i = 0; i < 10; i++)
+ text += possible.charAt(Math.floor(Math.random() * possible.length));
+
+ return text;
}
-
- $scope.emptyItems = [{"name": "NONE FOUND"}]
-
-
+
+
// MODALS -------------------------------------------------------------------------------------------------
$scope.showAssigneeModal = function() {
- $scope.isMulitEditRequest = true;
+ $scope.isMulitEditRequest = true;
var modalInstance = $modal.open({
templateUrl: 'assigneeModal.html',
controller: AssigneeModalCtrl,
@@ -607,16 +786,16 @@ app.controller('userController', [
});
modalInstance.result.then(function(inputs) {
- var size = $scope.selectedItems.length;
- for(var i = 0; i < size; i++) {
- if($scope.selectedItems[i].assignee != inputs.multiAssignee){
- $scope.selectedItems[i].assignee = inputs.multiAssignee;
- $scope.editAssignees($scope.selectedItems[i]);
- }
- }
+ var size = $scope.selectedItems.length;
+ for (var i = 0; i < size; i++) {
+ if ($scope.selectedItems[i].assignee != inputs.multiAssignee) {
+ $scope.selectedItems[i].assignee = inputs.multiAssignee;
+ $scope.editAssignees($scope.selectedItems[i]);
+ }
+ }
});
}
-
+
var AssigneeModalCtrl = function($scope, $modalInstance) {
$scope.multiAssignee = "";
@@ -630,10 +809,10 @@ app.controller('userController', [
$modalInstance.dismiss('cancel');
};
};
-
+
// Category Modal
$scope.showCategoryModal = function() {
- $scope.isMulitEditRequest = true;
+ $scope.isMulitEditRequest = true;
var modalInstance = $modal.open({
templateUrl: 'categoryModal.html',
controller: CategoryModalCtrl,
@@ -642,16 +821,16 @@ app.controller('userController', [
});
modalInstance.result.then(function(inputs) {
- var size = $scope.selectedItems.length;
- for(var i = 0; i < size; i++) {
- if($scope.selectedItems[i].category != inputs.category){
- $scope.selectedItems[i].category = inputs.category;
- $scope.editCategories($scope.selectedItems[i]);
- }
- }
+ var size = $scope.selectedItems.length;
+ for (var i = 0; i < size; i++) {
+ if ($scope.selectedItems[i].category != inputs.category) {
+ $scope.selectedItems[i].category = inputs.category;
+ $scope.editCategories($scope.selectedItems[i]);
+ }
+ }
});
}
-
+
var CategoryModalCtrl = function($scope, $modalInstance) {
$scope.multiCategory = "";
@@ -665,10 +844,10 @@ app.controller('userController', [
$modalInstance.dismiss('cancel');
};
};
-
+
// Needs Rerun Modal
$scope.showNeedsRerunModal = function() {
- $scope.isMulitEditRequest = true;
+ $scope.isMulitEditRequest = true;
var modalInstance = $modal.open({
templateUrl: 'needsRerunModal.html',
controller: NeedsRerunModalCtrl,
@@ -677,23 +856,23 @@ app.controller('userController', [
});
modalInstance.result.then(function(inputs) {
- var size = $scope.selectedItems.length;
- for(var i = 0; i < size; i++) {
- if($scope.selectedItems[i].needsRerun != inputs.needsRerun) {
- $scope.selectedItems[i].needsRerun = inputs.needsRerun;
- $scope.editNeedsRerun($scope.selectedItems[i]);
- }
- }
+ var size = $scope.selectedItems.length;
+ for (var i = 0; i < size; i++) {
+ if ($scope.selectedItems[i].needsRerun != inputs.needsRerun) {
+ $scope.selectedItems[i].needsRerun = inputs.needsRerun;
+ $scope.editNeedsRerun($scope.selectedItems[i]);
+ }
+ }
});
}
-
+
var NeedsRerunModalCtrl = function($scope, $modalInstance) {
$scope.ok = function() {
var inputs = {};
- if(this.formData == undefined) {
- inputs.needsRerun = true;
+ if (this.formData == undefined) {
+ inputs.needsRerun = true;
} else {
- inputs.needsRerun = this.formData.multiNeedsRerun;
+ inputs.needsRerun = this.formData.multiNeedsRerun;
}
$modalInstance.close(inputs);
};
@@ -702,9 +881,9 @@ app.controller('userController', [
$modalInstance.dismiss('cancel');
};
};
-
-
-
+
+
+
// Advanced Serach Modal
$scope.showAdvSearchModal = function() {
var modalInstance = $modal.open({
@@ -713,27 +892,27 @@ app.controller('userController', [
size: 'md',
windowClass: 'advSearch',
resolve: {
- value: function() {
- return $scope.searchValue;
- }
+ value: function() {
+ return $scope.searchValue;
+ }
}
});
modalInstance.result.then(function(inputs) {
- var loadingModal = null;
- if($scope.isSearchView) {
- $scope.searchValue = inputs.value;
- loadingModal = $scope.showLoadingModal();
- }
- $scope.doAdvSearch(inputs.value, loadingModal)
+ var loadingModal = null;
+ if ($scope.isSearchView) {
+ $scope.searchValue = inputs.value;
+ loadingModal = $scope.showLoadingModal();
+ }
+ $scope.doAdvSearch(inputs.value, loadingModal)
});
}
-
+
var AdvSearchModalCtrl = function($scope, $modalInstance, value) {
- $scope.searchValue = value;
+ $scope.searchValue = value;
$scope.ok = function() {
var inputs = {};
- inputs.value = this.searchValue;
+ inputs.value = this.searchValue;
$modalInstance.close(inputs);
};
@@ -741,7 +920,42 @@ app.controller('userController', [
$modalInstance.dismiss('cancel');
};
};
-
+
+ // Item Notes Modal
+ $scope.showItemNotesModal = function() {
+ $scope.isMulitEditRequest = true;
+ var modalInstance = $modal.open({
+ templateUrl: 'itemNotesModal.html',
+ controller: ItemNotesModalCtrl,
+ size: 'md',
+ windowClass: 'itemNotesModal'
+ });
+
+ modalInstance.result.then(function(inputs) {
+ var size = $scope.selectedItems.length;
+ for (var i = 0; i < size; i++) {
+ if ($scope.selectedItems[i].itemNotes != inputs.itemNotes) {
+ $scope.selectedItems[i].itemNotes = inputs.itemNotes;
+ $scope.editItemNotes($scope.selectedItems[i]);
+ }
+ }
+ });
+ }
+
+ var ItemNotesModalCtrl = function($scope, $modalInstance) {
+ $scope.itemNotes = "";
+
+ $scope.ok = function() {
+ var inputs = {};
+ inputs.itemNotes = this.itemNotes;
+ $modalInstance.close(inputs);
+ };
+
+ $scope.cancel = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
+
// Loading Modal
$scope.showLoadingModal = function() {
var modalInstance = $modal.open({
@@ -750,10 +964,32 @@ app.controller('userController', [
windowClass: 'needsRerunModal',
backdrop: 'static'
});
-
+
return modalInstance;
}
+
+
+ // Show All Failures Modal
+ $scope.showAllFailuresModal = function() {
+ var modalInstance = $modal.open({
+ templateUrl: 'showAllFailuresModal.html',
+ controller: ShowAllFailuresCtrl,
+ size: 'lg',
+ windowClass: 'showAllFailures',
+ resolve: {
+ item: function() {
+ return $scope.selectedItem;
+ }
+ }
+ });
+ }
+ var ShowAllFailuresCtrl = function($scope, $modalInstance, item) {
+ $scope.item = item;
+ $scope.close = function() {
+ $modalInstance.dismiss('cancel');
+ };
+ };
}
]);
@@ -779,17 +1015,19 @@ app.directive('ngModelOnblur', function() {
// http://stackoverflow.com/questions/18398472/disabled-text-box-accessible-using-tab-key
app.directive('focusMe', function($timeout) {
- return {
- scope: { trigger: '=focusMe' },
- link: function(scope, element) {
- scope.$watch('trigger', function(value) {
- if(value === true) {
- element[0].focus();
- }
- });
- }
- };
- });
+ return {
+ scope: {
+ trigger: '=focusMe'
+ },
+ link: function(scope, element) {
+ scope.$watch('trigger', function(value) {
+ if (value === true) {
+ element[0].focus();
+ }
+ });
+ }
+ };
+});
//http://stackoverflow.com/questions/16202254/ng-options-with-disabled-rows
app.directive('optionsDisabled', function($parse) {
@@ -810,15 +1048,15 @@ app.directive('optionsDisabled', function($parse) {
var attrToWatch = expElements[3];
var fnDisableIfTrue = $parse(expElements[1]);
scope.$watch(attrToWatch, function(newValue, oldValue) {
- if(newValue)
+ if (newValue)
disableOptions(scope, expElements[2], iElement, newValue, fnDisableIfTrue);
}, true);
// handle model updates properly
scope.$watch(iAttrs.ngModel, function(newValue, oldValue) {
var disOptions = $parse(attrToWatch)(scope);
- if(newValue)
+ if (newValue)
disableOptions(scope, expElements[2], iElement, disOptions, fnDisableIfTrue);
});
}
};
-});
+}); \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html b/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html
index f1f2b1e2a2b..e82aee87d14 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/ui/index.html
@@ -10,27 +10,29 @@
</meta>
<link rel="stylesheet" href="/ajax/libs/bootstrap/3.3.2/css/bootstrap.min.css">
</link>
- <link rel="stylesheet" href="/ajax/libs/ng-grid/2.0.11/ng-grid.min.css">
- </link>
- <link rel="stylesheet" href="../css/user.css">
- </link>
- <link rel="stylesheet" href="../css/admin.css">
- </link>
+ <link rel="stylesheet" href="/ajax/libs/ui-grid/4.0.4/ui-grid.min.css">
+ <link rel="stylesheet" href="/dispo/css/user.css"></link>
+ <link rel="stylesheet" href="/dispo/css/admin.css"></link>
+ <link rel="stylesheet" href="/dispo/css/userGrid.css"></link>
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.svg">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.eot">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.tff">
+ <link href="stylesheet" href="/ajax/libs/fonts/ui-grid.woff">
+
<script src="/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-route.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-resource.min.js"></script>
<script src="/ajax/libs/angularjs/1.3.11/angular-cookies.js"></script>
- <script src="/ajax/libs/ng-grid/2.0.11/ng-grid.min.js"></script>
+ <script src="/ajax/libs/ui-grid/4.0.4/ui-grid.min.js"></script>
<script src="/ajax/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="/ajax/libs/ui-bootstrap/0.12.0/ui-bootstrap-tpls-0.12.0.min.js"></script>
<script src="/ajax/libs/ngStorage/0.3.0/ngStorage.min.js"></script>
<script src="/ajax/libs/oauth-ng/0.3.8/oauth-ng.js"></script>
- <script src="/libs/js/oseeAuth/oseeAuth.js"></script>
- <script src="/libs/js/support/linkRewrite.js"></script>
- <script src="/dispo/js/ColumnFactory.js"></script>
+ <script src="/ajax/libs/splitjs/1.2.0/split.min.js"></script>
<script src="/dispo/js/resizer.js"></script>
<script src="/dispo/js/dispoApp.js"></script>
+ <script src="/dispo/js/ColumnFactory.js"></script>
<script src="/dispo/js/userController.js"></script>
<script src="/dispo/js/adminController.js"></script>
<script src="/dispo/js/mainController.js"></script>
@@ -38,7 +40,7 @@
app.controller("indexController", [
"$scope", "$rootScope",
function($scope, $rootScope) {
- $scope.links = [ { ref: '', name: 'Home'}, { ref: 'user', name: 'User'}, { ref: 'admin', name: 'Admin'}];
+ $scope.links = [ { ref: '', name: 'Home', roles: ['all']}, { ref: 'user', name: 'User', roles: ['all']}, { ref: 'admin', name: 'Admin', roles: ['DispoAdmin']}];
$rootScope.type = "testScript";
}]);
@@ -49,10 +51,24 @@
</head>
<body ng-app="dispoApp">
<div ng-controller="indexController">
- <osee
- redirect-uri="../dispo/ui/index.html"
- links="links">
- </osee>
+ <nav ng-controller="mainController" class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#/user">Disposition</a>
+ </div>
+ <p ng-dblclick="resetUserName()" class="navbar-text">Signed in as {{ cachedName }}</p>
+ <div class="collapse navbar-collapse">
+ <ul class="nav navbar-nav navbar-right">
+ <button id="helpButton" class="btn btn-info" ng-click="showHelpModal()">Help</button>
+ </ul>
+ </div>
+ </div>
+ </nav>
</div>
<div ng-view></div>
</body>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
index 02f16db85bd..6368890266a 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/admin.html
@@ -11,7 +11,7 @@
<u ng-click="toggleAddNew()">Add New</u> <div ng-show="addNew"><input class="form-control" ng-model="newProgramName" type="text" name="newProgram"><button ng-click="createNewProgram()" class="form-control">Submit</button></div>
</div>
</div>
- <div ng-show="sets.length > 0" class="row" id=reportRow>
+ <div ng-show="programSelection != null" class="row" id=reportRow>
<div class="panel panel-default">
<div class="panel-heading">
@@ -27,16 +27,21 @@
</div>
</div>
+ <div class="row" ng-show="false" id=coverageCopyRow>
+ <div class="col-sm-10 col-sm-offset-2" id=coverageCopyContainer>
+ <button ng-click="openCopyCoverageModal()" ng-show="sets.length > 0" class="btn btn-primary active" id=coverageCopyRowBtn>Import From Coverage</button>
+ </div>
+ </div>
</div>
- <div ng-show="sets.length > 0" class="col-md-6 col-md-offset-1">
+ <div ng-show="programSelection != null" class="col-md-6 col-md-offset-1">
<div class="row">
<button ng-disabled="programSelection == null" ng-click="createNewSetModal()" class="btn pull-left">New</button>
<button ng-disabled="programSelection == null" ng-click="toggleReadOnly()" class="btn pull-right">Edit</button>
</div>
<div class="row">
- <div style="height: 300px;" class="gridStyle" ng-grid="gridOptions"></div>
+ <div id="itemsGrid" class="grid" ui-grid="gridOptions" ui-grid-edit ui-grid-auto-resize></div>
<div class="panel panel-default">
<div class="panel-heading" id="operationsPanel">
<h3 class="panel-title">Operations</h3>
@@ -51,10 +56,10 @@
</div>
</div>
</div>
- <div ng-show="sets.length > 0" class="row">
+ <div ng-show="programSelection != null" class="row">
<div class="col-md-9 col-md-offset-1">
<div class="row" id="summaryContainer">
- <div style="height: 400px;" class="gridStyle" ng-grid="summaryGrid"></div>
+ <div id="itemsGrid" class="grid" ui-grid="summaryGrid" ui-grid-resize-columns ui-grid-auto-resize></div>
</div>
</div>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/dropdown.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/dropdown.html
new file mode 100644
index 00000000000..666599f5d23
--- /dev/null
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/dropdown.html
@@ -0,0 +1 @@
+<select ui-grid-edit-dropdown-osee class="form-control" ng-change="grid.appScope.$emit(uiGridEditConstants.events.END_CELL_EDIT)" ng-model="row.entity.resolutionType" ng-options="obj.value as obj.text for obj in editDropdownOptionsArray"></select>
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
index 1ac525daa52..ec674d24135 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/views/user.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="container-fluid" id="content">
- <div class="row">
+ <div class="row">
<div id="refresh" class="col-md-1">
<button ng-show="items.length>0" class="btn btn-primary active" ng-click="updateSet()">Refresh</button>
</div>
@@ -14,73 +14,43 @@
ATS Version:
<select class="form-control" ng-show="programs" ng-model="programSelection" ng-disabled="isSearchView" ng-change="updateProgram()" ng-options="obj.value as obj.text for obj in programs"></select>
</div>
- <div class="col-md-2">
+ <div ng-show="programSelection" class="col-md-2">
Set:
- <select ng-show="programSelection != null" class="form-control" ng-show="sets" ng-disabled="isSearchView" ng-model="setSelection" ng-change="updateSet()" ng-options="obj.guid as obj.name for obj in sets">
+ <select class="form-control" ng-show="sets" ng-disabled="isSearchView" ng-model="setSelection" ng-change="updateSet()" ng-options="obj.guid as obj.name for obj in sets">
</select>
</div>
<div id="multItemEditDiv" class="col-md-5">
<div ng-show="items.length>0" class="btn-group">
<button class="btn btn-primary active" ng-click="toggleEditItems()">Edit Multiple Items</button>
- <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showAssigneeModal()">Assignee</button>
- <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showCategoryModal()">Category</button>
- <button type="button" class="btn btn-default" ng-show="editItems" ng-disabled="selectedItems.length == 0" ng-click="showNeedsRerunModal()">Needs Rerun</button>
+ <button type="button" class="btn btn-default" ng-show="isMultiEditView" ng-disabled="selectedItems.length == 0" ng-click="showAssigneeModal()">Assignee</button>
+ <button type="button" class="btn btn-default" ng-show="isMultiEditView" ng-disabled="selectedItems.length == 0" ng-click="showCategoryModal()">Category</button>
+ <button type="button" class="btn btn-default" ng-show="isMultiEditView" ng-disabled="selectedItems.length == 0" ng-click="showNeedsRerunModal()">Needs Rerun</button>
+ <button type="button" class="btn btn-default" ng-show="isMultiEditView" ng-disabled="selectedItems.length == 0" ng-click="showItemNotesModal()">Item Notes</button>
</div>
</div>
<div id="search" class="col-md-1 col-md-offset-1">
<button class="btn btn-primary active" ng-show="items.length>0 && !isSearchView" ng-click="showAdvSearchModal()">Adv Search</button>
<button class="btn btn-primary active" ng-show="items.length>0 && isSearchView" ng-click="showAdvSearchModal()">Searching: {{ searchValue }}</button>
</div>
- </div>
- <div id="top-content" class="row">
- <div style='height: 500px;' id="itemsGrid" class="gridStyle" ng-grid="gridOptions"></div>
- </div>
</div>
- <div id="bottom-content">
- <div ng-dblclick="getSourceFlie()" id="itemSelectedBar">
- <h4 id="itemSelectedText">Item: {{ selectedItem.name || "Select an Item"}} :: </h4><h6 ng-show="selectedItem" id="itemSelectedFailureText"> Failures: {{ selectedItem.discrepanciesAsRanges || "N/A"}}</h6>
- </div>
- <div id="annotationsGrid">
- <table class="table subTable">
- <th width="50px" ng-show="type == 'codeCoverage'">Method</th>
- <th ng-click="sort()">{{ annotationHeaders.locationRefs }}</th>
- <th>{{ annotationHeaders.resolutionType }}</th>
- <th>{{ annotationHeaders.resolution }}</th>
- <th>Developer Notes</th>
- <th ng-show="type != 'codeCoverage'">Customer Notes</th>
- <th ng-show="type == 'codeCoverage'">Text</th>
- <th width="50px;">Delete</th>
- <tr ng-repeat="annotation in annotations">
- <td ng-show="type == 'codeCoverage'">
- <textarea ng-class="{annotationInput: true, invalid: getInvalidLocRefs(annotation), details: annotation.showDeets}" ng-disabled="true" ng-model="selectedItem.methodNumber" type=text></textarea>
- </td>
- <td>
- <textarea ng-class="{annotationInput: true, invalid: getInvalidLocRefs(annotation), details: annotation.showDeets}" ng-disabled="isDefaultResolution(annotation);" ng-model="annotation.locationRefs" type=text ng-model-onblur ng-change="editAnnotation(annotation); saveLastFocused(this);" ng-dblclick="toggleDetails(annotation)"></textarea>
- </td>
- <td>
- <select ng-class="{annotationInput: true, details: annotation.showDeets}" focus-me="annotation.guid !=null" ng-options="obj.value as obj.text for obj in getResolutionTypes();" options-disabled="option.isDefault for option in getResolutionTypes();" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-model="annotation.resolutionType" ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></select>
- </td>
- <td>
- <textarea ng-class="{annotationInput: true, invalid: getInvalidRes(annotation), details: annotation.showDeets}" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-model="annotation.resolution" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
- </td>
- <td>
- <textarea ng-class="{annotationInput: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null" ng-model="annotation.developerNotes" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
- </td>
- <td ng-show="type != 'codeCoverage'">
- <textarea ng-class="{annotationInput: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null || type == 'codeCoverage'" ng-model="annotation.customerNotes" type=text ng-model-onblur ng-change="editAnnotation(annotation)" ng-dblclick="toggleDetails(annotation)"></textarea>
- </td>
- <td ng-show="type == 'codeCoverage'">
- <textarea ng-class="{annotationInput: true, details: annotation.showDeets}" ng-disabled="true" type=text ng-dblclick="getText(annotation)">{{ getText(annotation) }}</textarea>
- </td>
- <td>
- <button ng-class="{annotationDelete: true, details: annotation.showDeets}" ng-disabled="annotation.guid == null || isDefaultResolution(annotation);" ng-click="deleteAnnotation(annotation)">X</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <div id="content-resizer" resizer="horizontal" resizer-height="6" resizer-top="#top-content" resizer-bottom="#bottom-content">
+ <div id="gridsDiv" ng-show="items.length > 0" class="row">
+ <div id="itemsGridDiv" class="split content">
+ <div id="itemsGrid" class="grid" ui-grid="gridOptions" ui-grid-exporter ui-grid-resize-columns ui-grid-selection ui-grid-edit ui-grid-auto-resize ui-grid-grouping></div>
+ </div>
+ <div id="subGridDiv" class="split content">
+ <div id="itemSelectedBar">
+ <div id="itemSelectedLeftDiv">
+ <h4 id="itemSelectedText">Item: {{ selectedItem.name || "Select an Item"}} :: </h4>
+ <h5 ng-show="selectedItem" id="itemSelectedFailureText"> Failures: {{ selectedItem.discrepanciesAsRanges || "N/A"}}</h5>
+ </div>
+ <div id="itemSelectedRightDiv">
+ <button ng-show="isCoverage && selectedItem" type="button" class="btn btn-primary" id="openSourceFileButton" ng-click="getSourceFile()">Open File</button>
+ <button ng-show="!isCoverage && selectedItem && selectedItem.failureCount > 1 " type="button" class="btn btn-primary" id="openSourceFileButton" ng-click="showAllFailuresModal()">Show All Failures</button>
+ </div>
+ </div>
+ <div ng-show="annotations.length > 0" id="subGrid" class="subgrid grid" ui-grid="subGridOptions" ui-grid-edit ui-grid-nav ui-grid-resize-columns ui-grid-auto-resize ui-grid-tree-view></div>
+ </div>
+ </div>
</div>
<!-- definitions for modal forms -->
<script type="text/ng-template" id="assigneeModal.html">
@@ -157,7 +127,38 @@
<button class="btn btn-warning" ng-click="cancel()">Cancel</button>
</div>
</script>
-
+ <script type="text/ng-template" id="itemNotesModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">Edit Item Notes</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <div class="form-group">
+ <label for="setItemNotes">Script Notes</label>
+ <input ng-model="itemNotes" class="form-control" name="setItemNotes" placeholder="Enter Item Notes" required>
+ </div>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
+ </div>
+
+ </script>
+
+
+ <script type="text/ng-template" id="showAllFailuresModal.html">
+ <div class="modal-header">
+ <h3 class="modal-title">{{ item.name }}</h3>
+ </div>
+ <div class="modal-body" style="height: 300px; overflow: auto;">
+ <textarea ng-model="item.discrepanciesAsRanges" readonly class="form-control" id="showAllTextArea">
+ </textarea>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" ng-click="close()">Close</button>
+ </div>
+ </script>
+
<script type="text/ng-template" id="loadingModal.html">
<div id="loadingModal" class="alert alert-info">
Loading...

Back to the top