Skip to content

Commit

Permalink
Merge pull request #31 from Open-MBEE/release/3.3.0
Browse files Browse the repository at this point in the history
Merge Release 3.3.0 to master
  • Loading branch information
shakeh authored Jun 29, 2018
2 parents b82eb75 + 1c366df commit e612f6e
Show file tree
Hide file tree
Showing 60 changed files with 506 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- node_modules
key: openmbee-ve-{{ checksum "package.json" }}

- run: ./node_modules/grunt/bin/grunt --ARTIFACTORY_URL=https://oss.jfrog.org --ARTIFACTORY_USER=$ARTIFACTORY_USER --ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD --SNAPSHOT_REPO=oss-snapshot-local --RELEASE_REPO=oss-release-local --GROUP_ID=org.openmbee deploy
- run: ./node_modules/grunt/bin/grunt #--ARTIFACTORY_URL=https://oss.jfrog.org --ARTIFACTORY_USER=$ARTIFACTORY_USER --ARTIFACTORY_PASSWORD=$ARTIFACTORY_PASSWORD --SNAPSHOT_REPO=oss-snapshot-local --RELEASE_REPO=oss-release-local --GROUP_ID=org.openmbee deploy
Binary file removed Documents/ViewEditorUserGuide-OpenMBEE.pdf
Binary file not shown.
Binary file added Documents/ViewEditorUserGuide.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ module.exports = function(grunt) {
options: {
publish: [{
id: groupId + ':ve:zip',
version: '3.3.0-rc1',
version: '3.3.0',
path: 'deploy/'
}]
}
Expand Down
Binary file added app/assets/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/favicon.ico
Binary file not shown.
Binary file added app/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions app/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/styles/ve/layout/_pane-center.scss
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,7 @@ tr {
position: relative;
}
}

.fa-folder {
color: lighten($ve-accent, 12%);
}
6 changes: 3 additions & 3 deletions app/assets/styles/ve/layout/_pane-left.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Styles for the View Editor left pane
*************************/

$pane_left_btn_group_width: 234px;
$pane_left_btn_group_width: 244px;

#main-pane {
> .west-tabs {
Expand Down Expand Up @@ -33,10 +33,10 @@ $pane_left_btn_group_width: 234px;
}

.tree-options {
display: -webkit-box;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: -webkit-flex;
display: flex;
padding: 4px 5px;
background: $white;
Expand Down
22 changes: 18 additions & 4 deletions app/assets/styles/ve/layout/_ve-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,29 @@ a.switch-org:hover {
text-decoration: underline !important;
}

.logotype {
font-weight: 300;
line-height: $navHeight;
padding: 0 5px 0 13px;
/* View Editor logo placement*/
.navbar-brand{
float: left;
padding: 5px 7px;
font-size: 20px;
line-height: 22px;
height: $navHeight;

img{
height: 26px;
border-radius: 50%;
transition: $background_hover_transition;

&:hover{
background-color: #0096FF;
}
}
}

.org-title {
font-weight: 600;
padding-right: 4px;
line-height: $navHeight;
}

/*------------------------------------------------------------------
Expand Down
18 changes: 16 additions & 2 deletions app/assets/styles/ve/ve-main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ div.tooltip-inner {
4. Modal fixes
5. 404 bookmark
6. Open document button
7. Right pane
8. Growl notification
-------------------------------------------------------------------*/

Expand Down Expand Up @@ -1097,7 +1099,7 @@ table caption {
}

/*------------------------------------------------------------------
9. Right pane
7. Right pane
-------------------------------------------------------------------*/

.pane-right .container-fluid{
Expand All @@ -1111,7 +1113,7 @@ hr.spec-title-divider{
}

/*------------------------------------------------------------------
9.4 Modal for revert history
7.1 Modal for revert history
-------------------------------------------------------------------*/

/* Special styling to preview element*/
Expand All @@ -1138,3 +1140,15 @@ span.inline-btn-label{
.fa-exclamation-triangle{
color: $ve-yellow-base;
}


/*------------------------------------------------------------------
8. Growl notification
-------------------------------------------------------------------*/
.growl-container > .growl-item.ng-enter,
.growl-container > .growl-item.ng-leave {
-webkit-transition:0.1s linear all;
-moz-transition:0.1s linear all;
-o-transition:0.1s linear all;
transition:0.1s linear all;
}
8 changes: 4 additions & 4 deletions app/bower.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "mms",
"version": "3.2.0",
"name": "ve",
"version": "3.3.0",
"authors": [
"Shakeh E Brys <skhudiky@jpl.nasa.gov",
"Raffi P Tikidjian <raffi@jpl.nasa.gov>"
],
"description": "Model Management System",
"description": "View Editor bower dependencies",
"main": "bower.json",
"moduleType": [
"globals"
Expand Down Expand Up @@ -48,7 +48,7 @@
},
"resolutions": {
"lodash": "3.9.3",
"d3": "~5.1.0",
"d3": "~5.1.0",
"angular": "~1.5.5"
},
"devDependencies": {
Expand Down
31 changes: 24 additions & 7 deletions app/js/mms/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
});
return deferred.promise;
}],
orgObs: ['$stateParams', 'ProjectService', 'ticket', function($stateParams, ProjectService, ticket) {
return ProjectService.getOrgs();
}],
//orgObs: ['$stateParams', 'ProjectService', 'ticket', function($stateParams, ProjectService, ticket) {
// return ProjectService.getOrgs();
//}],
projectOb: ['$stateParams', 'ProjectService', 'ticket', function($stateParams, ProjectService, ticket) {
return ProjectService.getProject($stateParams.projectId);
}],
Expand Down Expand Up @@ -244,10 +244,10 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
views: {
'nav@': {
template: '<ve-nav mms-title="ve_title" mms-org="org" mms-orgs="orgs" mms-project="project" mms-projects="projects" mms-ref="ref" mms-branch="branch" mms-branches="branches" mms-tag="tag" mms-tags="tags" mms-search="search"></ve-nav>',
controller: ['$scope', '$rootScope', 'orgOb', 'orgObs', 'projectOb', 'projectObs', 'refOb', 'branchOb', 'branchObs', 'tagOb', 'tagObs', 'search', function ($scope, $rootScope, orgOb, orgObs, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) {
controller: ['$scope', '$rootScope', 'orgOb', 'projectOb', 'projectObs', 'refOb', 'branchOb', 'branchObs', 'tagOb', 'tagObs', 'search', function ($scope, $rootScope, orgOb, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) {
$rootScope.ve_title = orgOb.name;
$scope.org = orgOb;
$scope.orgs = orgObs;
//$scope.orgs = orgObs;
$scope.project = projectOb;
$scope.projects = projectObs;
$scope.ref = refOb;
Expand Down Expand Up @@ -356,10 +356,10 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
views: {
'nav@': {
template: '<ve-nav mms-title="ve_title" mms-org="org" mms-orgs="orgs" mms-project="project" mms-projects="projects" mms-ref="ref" mms-branch="branch" mms-branches="branches" mms-tag="tag" mms-tags="tags" mms-search="search"></ve-nav>',
controller: ['$scope', '$rootScope', 'orgOb', 'orgObs', 'projectOb', 'projectObs', 'refOb', 'branchOb', 'branchObs', 'tagOb', 'tagObs', 'search', function ($scope, $rootScope, orgOb, orgObs, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) {
controller: ['$scope', '$rootScope', 'orgOb', 'projectOb', 'projectObs', 'refOb', 'branchOb', 'branchObs', 'tagOb', 'tagObs', 'search', function ($scope, $rootScope, orgOb, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) {
$rootScope.ve_title = orgOb.name;
$scope.org = orgOb;
$scope.orgs = orgObs;
//$scope.orgs = orgObs;
$scope.project = projectOb;
$scope.projects = projectObs;
$scope.ref = refOb;
Expand Down Expand Up @@ -404,6 +404,23 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
}
}
})
.state('project.ref.groupReorder', {
url: '/group-reorder',
resolve: {
documentObs: ['ViewService', '$stateParams', 'ticket', function(ViewService, $stateParams, ticket) {
return ViewService.getProjectDocuments({
projectId: $stateParams.projectId,
refId: $stateParams.refId
});
}]
},
views: {
'pane-center@': {
templateUrl: 'partials/mms/reorder-groups.html',
controller: 'ReorderGroupCtrl'
}
}
})
.state('project.ref.manage', { //not needed right now, for managing mounts
url: '/manage'
})
Expand Down
22 changes: 12 additions & 10 deletions app/js/mms/controllers/controller.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,14 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache
var prefix = protocol + '://' + hostname + ((port == 80 || port == 443) ? '' : (':' + port));
var mmsIndex = absurl.indexOf('mms.html');
var toc = UtilsService.makeHtmlTOC($rootScope.ve_treeApi.get_rows());
var tableAndFigTOC = {figures: '', tables: '', equations: ''};
// Conver to proper links for word/pdf
UtilsService.convertViewLinks(printElementCopy);
//if (genTotf) {
tableAndFigTOC = UtilsService.makeTablesAndFiguresTOC($rootScope.ve_treeApi.get_rows(), printElementCopy, false, htmlTotf);
//}
// Get correct table/image numbering based on doc hierarchy
var tableAndFigTOC = UtilsService.makeTablesAndFiguresTOC($rootScope.ve_treeApi.get_rows(), printElementCopy, false, htmlTotf);
var tof = tableAndFigTOC.figures;
var tot = tableAndFigTOC.tables;
var toe = tableAndFigTOC.equations;
// Customize TOC based on user choice
if (!isDoc) {
toc = tof = tot = toe = '';
}
Expand Down Expand Up @@ -325,7 +325,7 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache
$this.remove();
}
});
printElementCopy.find('[width]').not('img').removeAttr('width');
printElementCopy.find('[width]').not('img').not('.ve-fixed-width').removeAttr('width');
printElementCopy.find('[style]').each(function() {
this.style.removeProperty('font-size');
this.style.removeProperty('width');
Expand Down Expand Up @@ -387,15 +387,16 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache
return deferred.promise;
};

var handleChildViews = function(v, aggr, projectId, refId, curItemFunc, childrenFunc, seen) {
var handleChildViews = function(v, aggr, propId, projectId, refId, curItemFunc, childrenFunc, seen) {
var seenViews = seen;
if (!seenViews)
seenViews = {};
var deferred = $q.defer();
var curItem = curItemFunc(v, aggr);
var curItem = curItemFunc(v, aggr, propId);
seenViews[v.id] = v;
var childIds = [];
var childAggrs = [];
var childPropIds = [];
if (!v._childViews || v._childViews.length === 0 || aggr === 'none') {
if (angular.isObject(curItem) && curItem.loading) {
curItem.loading = false;
Expand All @@ -408,6 +409,7 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache
continue;
childIds.push(v._childViews[i].id);
childAggrs.push(v._childViews[i].aggregation);
childPropIds.push(v._childViews[i].propertyId);
}
ElementService.getElements({
elementIds: childIds,
Expand All @@ -424,9 +426,9 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache
for (i = 0; i < childIds.length; i++) {
var child = mapping[childIds[i]];
if (child && UtilsService.isView(child)) { //what if not found??
childPromises.push(handleChildViews(child, childAggrs[i], projectId, refId, curItemFunc, childrenFunc, seenViews));
childNodes.push(curItemFunc(child, childAggrs[i]));
processedChildViews.push({id: child.id, aggregation: childAggrs[i]});
childPromises.push(handleChildViews(child, childAggrs[i], childPropIds[i], projectId, refId, curItemFunc, childrenFunc, seenViews));
childNodes.push(curItemFunc(child, childAggrs[i], childPropIds[i]));
processedChildViews.push({id: child.id, aggregation: childAggrs[i], propertyId: childPropIds[i]});
}
}
v._childViews = processedChildViews;
Expand Down
2 changes: 1 addition & 1 deletion app/js/mms/controllers/fulldoc.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ function($scope, $rootScope, $state, $anchorScroll, $location, $timeout, FullDoc
if (!documentOb._childViews) {
documentOb._childViews = [];
}
return MmsAppUtils.handleChildViews(documentOb, 'composite', projectOb.id, refOb.id, _handleSingleView, _handleChildren)
return MmsAppUtils.handleChildViews(documentOb, 'composite', undefined, projectOb.id, refOb.id, _handleSingleView, _handleChildren)
.then(function(childIds) {
for (var i = 0; i < childIds.length; i++) {
_constructViews(childIds[i], num);
Expand Down
13 changes: 10 additions & 3 deletions app/js/mms/controllers/reorder.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,19 @@ function($scope, $rootScope, documentOb, ElementService, ViewService, MmsAppUtil
};

var seenViewIds = {};
function handleSingleView(v, aggr) {
function handleSingleView(v, aggr, propId) {
var curNode = viewIds2node[v.id];
if (!curNode) {
curNode = {
name: v.name,
id: v.id,
aggr: aggr,
propertyId: propId,
children: []
};
viewIds2node[v.id] = curNode;
}
origViews[v.id] = JSON.parse(JSON.stringify(v));
origViews[v.id] = v;
return curNode;
}

Expand All @@ -75,7 +76,7 @@ function($scope, $rootScope, documentOb, ElementService, ViewService, MmsAppUtil
curNode.children.push.apply(curNode.children, newChildNodes);
}

MmsAppUtils.handleChildViews(documentOb, 'composite', documentOb._projectId,
MmsAppUtils.handleChildViews(documentOb, 'composite', undefined, documentOb._projectId,
documentOb._refId, handleSingleView, handleChildren)
.then(function(docNode) {
var num = 1;
Expand Down Expand Up @@ -126,6 +127,12 @@ function($scope, $rootScope, documentOb, ElementService, ViewService, MmsAppUtil
});
}
});
if (toSave.length === 0) {
growl.info("No changes to save!");
saving = false;
$scope.saveClass = "";
return;
}
ElementService.updateElements(toSave, true)
.then(function() {
growl.success('Reorder Successful');
Expand Down
Loading

0 comments on commit e612f6e

Please sign in to comment.