diff --git a/Gruntfile.js b/Gruntfile.js index 776bceb99..b21a4dfd5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -286,7 +286,7 @@ module.exports = function(grunt) { options: { publish: [{ id: 'gov.nasa.jpl:evm:zip', - version: '3.1.0', + version: '3.2.0', path: 'deploy/' }] } diff --git a/app/assets/alfresco-icon-sm.png b/app/assets/alfresco-icon-sm.png new file mode 100644 index 000000000..458572c82 Binary files /dev/null and b/app/assets/alfresco-icon-sm.png differ diff --git a/app/assets/arrow-change.svg b/app/assets/arrow-change.svg new file mode 100644 index 000000000..8d2504033 --- /dev/null +++ b/app/assets/arrow-change.svg @@ -0,0 +1,12 @@ + + + + +arrowhead + + + diff --git a/app/assets/arrowhead.svg b/app/assets/arrowhead.svg new file mode 100644 index 000000000..ce87f61f4 --- /dev/null +++ b/app/assets/arrowhead.svg @@ -0,0 +1,12 @@ + + + + + +arrowhead + + diff --git a/app/assets/location-feedback.svg b/app/assets/location-feedback.svg new file mode 100644 index 000000000..2c7a839eb --- /dev/null +++ b/app/assets/location-feedback.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/app/js/mms/app.js b/app/js/mms/app.js index c4bbab5ed..2f29d625f 100644 --- a/app/js/mms/app.js +++ b/app/js/mms/app.js @@ -1,9 +1,9 @@ 'use strict'; -angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.borderLayout', 'ui.bootstrap', 'ui.router', 'ui.tree', 'angular-growl', 'cfp.hotkeys', 'angulartics', 'angulartics.piwik', 'diff-match-patch', 'ngStorage']) +angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.borderLayout', 'ui.bootstrap', 'ui.router', 'ui.tree', 'angular-growl', 'cfp.hotkeys', 'angulartics', 'angulartics.piwik', 'diff-match-patch', 'ngStorage', 'ngAnimate']) .config(function($stateProvider, $urlRouterProvider, $httpProvider) { - + $urlRouterProvider.rule(function ($injector, $location) { var locationPath = $location.url(); if (locationPath.indexOf('full%23') > 0) @@ -64,7 +64,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor growl.error(reason.message); }); }; - } + } } } }) @@ -82,7 +82,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor }); return deferred.promise; }, - orgObs: function($stateParams, ProjectService, ticket) { + orgObs: function($stateParams, ProjectService, ticket) { return ProjectService.getOrgs(); } }, @@ -129,11 +129,11 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor for (var i = 0; i < projectArray.length; i++) { if(projectArray[i].id === project.id){ return 1; - } + } } return 0; }; - + $scope.continue = function() { if (orgId && projectId) { $scope.spin = true; @@ -209,7 +209,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor }, views: { 'nav@': { - template: '', + template: '', controller: function ($scope, $rootScope, orgOb, orgObs, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) { $rootScope.ve_title = orgOb.name; $scope.org = orgOb; @@ -271,6 +271,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor groupObs: function($stateParams, ProjectService, ticket) { return ProjectService.getGroups($stateParams.projectId, $stateParams.refId); }, + groupOb: function(){ return null;}, documentOb: function($stateParams, $q, ElementService, ViewService, refOb, projectOb, ticket) { var deferred = $q.defer(); var eid = $stateParams.projectId + '_cover'; @@ -287,11 +288,11 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor deferred.resolve(null); } else { ViewService.createView({ - _projectId: $stateParams.projectId, + _projectId: $stateParams.projectId, _refId: $stateParams.refId, id: 'holding_bin_' + $stateParams.projectId },{ - viewName: projectOb.name + ' Cover Page', + viewName: projectOb.name + ' Cover Page', viewId: eid }, 2).then(function(data) { deferred.resolve(data); @@ -317,7 +318,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor }, views: { 'nav@': { - template: '', + template: '', controller: function ($scope, $rootScope, orgOb, orgObs, projectOb, projectObs, refOb, branchOb, branchObs, tagOb, tagObs, search) { $rootScope.ve_title = orgOb.name; $scope.org = orgOb; @@ -363,7 +364,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor 'toolbar-right@': { template: '', controller: 'ToolbarCtrl' - } + } } }) .state('project.ref.manage', { //not needed right now, for managing mounts @@ -393,11 +394,11 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor ElementService.getElement({projectId: $stateParams.projectId, refId: $stateParams.refId, elementId: groupId}) .then(function(groupElement) { ViewService.createView({ - _projectId: $stateParams.projectId, + _projectId: $stateParams.projectId, _refId: $stateParams.refId, id: groupId },{ - viewName: groupElement.name + ' Cover Page', + viewName: groupElement.name + ' Cover Page', viewId: eid }, 2) .then(function(data) { @@ -473,7 +474,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor } }) .state('project.ref.document', { - url: '/documents/:documentId', + url: '/documents/:documentId', resolve: { documentOb: function($stateParams, ElementService, ticket) { return ElementService.getElement({ @@ -486,7 +487,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor viewOb: function(documentOb) { return documentOb; }, - groupOb: function(groupObs, documentOb, ProjectService, ticket) { + groupOb: function(groupObs, documentOb) { var group = null; if(documentOb) { for(var i = 0; i < groupObs.length; i++) { @@ -521,7 +522,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor 'pane-left@': { templateUrl: 'partials/mms/pane-left.html', controller: 'TreeCtrl' - }, + }, 'pane-center@': { templateUrl: 'partials/mms/pane-center.html', controller: 'ViewCtrl' @@ -546,7 +547,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor elementId: $stateParams.viewId }, 2); }, - groupOb: function(groupObs, documentOb, ProjectService, ticket) { + groupOb: function(groupObs, documentOb) { var group = null; if(documentOb) { for(var i = 0; i < groupObs.length; i++) { @@ -586,7 +587,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor }) .state('project.ref.document.order', { url: '/order', - views: { + views: { 'pane-center@': { templateUrl: 'partials/mms/reorder-views.html', controller: 'ReorderCtrl' @@ -595,7 +596,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor }) .state('project.ref.document.full', { url: '/full', - views: { + views: { 'pane-center@': { templateUrl: 'partials/mms/full-doc.html', controller: 'FullDocCtrl' @@ -608,7 +609,7 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor return { 'responseError': function(rejection) { if(rejection.status === 401){ //rejection.config.url - $rootScope.$broadcast("mms.unauthorized", rejection); + $rootScope.$broadcast("mms.unauthorized", rejection); } return $q.reject(rejection); }, diff --git a/app/js/mms/controllers/controller.utils.js b/app/js/mms/controllers/controller.utils.js index cc81e31a8..db6915a5b 100644 --- a/app/js/mms/controllers/controller.utils.js +++ b/app/js/mms/controllers/controller.utils.js @@ -234,8 +234,6 @@ function MmsAppUtils($q, $uibModal, $timeout, $location, $window, $templateCache $rootScope.ve_bbApi.setToggleState('tree-full-document', true); $state.go('project.ref.document.full', {search: undefined}); } - }, function() { - deferred.reject(); }); return deferred.promise; }; diff --git a/app/js/mms/controllers/fulldoc.controller.js b/app/js/mms/controllers/fulldoc.controller.js index 61f4db66d..d88db5e49 100644 --- a/app/js/mms/controllers/fulldoc.controller.js +++ b/app/js/mms/controllers/fulldoc.controller.js @@ -3,10 +3,10 @@ /* Controllers */ angular.module('mmsApp') -.controller('FullDocCtrl', ['$scope', '$rootScope', '$state', '$stateParams', '$window', '$element', 'hotkeys', 'growl', - 'MmsAppUtils', 'UxService', 'search', '_', 'documentOb', 'projectOb', 'refOb', -function($scope, $rootScope, $state, $stateParams, $window, $element, hotkeys, growl, - MmsAppUtils, UxService, search, _, documentOb, projectOb, refOb) { +.controller('FullDocCtrl', ['$scope', '$rootScope', '$state', '$element', 'hotkeys', 'growl', '_', + 'MmsAppUtils', 'UxService', 'search', 'orgOb', 'projectOb', 'refOb', 'groupOb', 'documentOb', +function($scope, $rootScope, $state, $element, hotkeys, growl, _, + MmsAppUtils, UxService, search, orgOb, projectOb, refOb, groupOb, documentOb) { $rootScope.ve_fullDocMode = true; @@ -130,6 +130,17 @@ function($scope, $rootScope, $state, $stateParams, $window, $element, hotkeys, g views.splice(sibIndex+1, 0, buildViewElt(vId, curSec) ); }); + $scope.docLibLink = ''; + if (groupOb !== null) { + $scope.docLibLink = groupOb._link; + } else if (documentOb !== null && documentOb._groupId !== undefined && documentOb._groupId !== null) { + $scope.docLibLink = '/share/page/repository#filter=path|/Sites/' + orgOb.id + '/documentLibrary/' + + projectOb.id + '/' + documentOb._groupId; + } else { + $scope.docLibLink = '/share/page/repository#filter=path|/Sites/' + orgOb.id + '/documentLibrary/' + + projectOb.id; + } + $scope.bbApi = { init: function() { if (documentOb && documentOb._editable && refOb.type === 'Branch') { diff --git a/app/js/mms/controllers/tool.controller.js b/app/js/mms/controllers/tool.controller.js index 0a5175c1f..bb2882ae3 100644 --- a/app/js/mms/controllers/tool.controller.js +++ b/app/js/mms/controllers/tool.controller.js @@ -50,7 +50,7 @@ function($scope, $rootScope, $state, $uibModal, $q, $timeout, hotkeys, $rootScope.ve_edits = {}; $scope.presentElemEditCnts = {}; - // Set edit count for tracker view + // Set edit count for tracker view $scope.veEditsLength = function() { return Object.keys($rootScope.ve_edits).length; }; @@ -132,7 +132,7 @@ function($scope, $rootScope, $state, $uibModal, $q, $timeout, hotkeys, }); $scope.$on('presentationElem.cancel', function(event, editOb) { - cleanUpEdit(editOb); + cleanUpEdit(editOb); }); var elementSelected = function(event, elementOb, commitId) { @@ -141,7 +141,7 @@ function($scope, $rootScope, $state, $uibModal, $q, $timeout, hotkeys, $scope.specInfo.refId = elementOb._refId; $scope.specInfo.commitId = commitId ? commitId : elementOb._commitId; $rootScope.ve_tbApi.select('element-viewer'); - + showPane('element'); if ($scope.specApi.setEditing) { $scope.specApi.setEditing(false); @@ -188,7 +188,7 @@ function($scope, $rootScope, $state, $uibModal, $q, $timeout, hotkeys, $scope.viewContentsOrderApi.setEditing(true); showPane('reorder'); }); - + var elementSaving = false; $scope.$on('element-editor-save', function() { save(false); @@ -210,7 +210,7 @@ function($scope, $rootScope, $state, $uibModal, $q, $timeout, hotkeys, $scope.specApi.save().then(function(data) { elementSaving = false; growl.success('Save Successful'); - if (continueEdit) + if (continueEdit) return; var edit = $scope.specApi.getEdits(); var key = edit.id + '|' + edit._projectId + '|' + edit._refId; diff --git a/app/js/mms/controllers/view.controller.js b/app/js/mms/controllers/view.controller.js index daa011d56..4661c89cf 100644 --- a/app/js/mms/controllers/view.controller.js +++ b/app/js/mms/controllers/view.controller.js @@ -5,9 +5,9 @@ angular.module('mmsApp') .controller('ViewCtrl', ['$scope', '$rootScope', '$state', '$stateParams', '$timeout', '$element', 'hotkeys', 'MmsAppUtils', 'UxService', 'growl', - 'search', 'projectOb', 'documentOb', 'viewOb', 'refOb', + 'search', 'orgOb', 'projectOb', 'refOb', 'groupOb', 'documentOb', 'viewOb', function($scope, $rootScope, $state, $stateParams, $timeout, $element, hotkeys, MmsAppUtils, UxService, growl, - search, projectOb, documentOb, viewOb, refOb) { + search, orgOb, projectOb, refOb, groupOb, documentOb, viewOb) { function isPageLoading() { if ($element.find('.isLoading').length > 0) { @@ -68,6 +68,17 @@ angular.module('mmsApp') map: {} }; + $scope.docLibLink = ''; + if (groupOb !== null) { + $scope.docLibLink = groupOb._link; + } else if (documentOb !== null && documentOb._groupId !== undefined && documentOb._groupId !== null) { + $scope.docLibLink = '/share/page/repository#filter=path|/Sites/' + orgOb.id + '/documentLibrary/' + + projectOb.id + '/' + documentOb._groupId; + } else { + $scope.docLibLink = '/share/page/repository#filter=path|/Sites/' + orgOb.id + '/documentLibrary/' + + projectOb.id; + } + $scope.bbApi = { init: function() { if (viewOb && viewOb._editable && refOb.type === 'Branch') { diff --git a/app/js/mms/directives/veMenu.js b/app/js/mms/directives/veMenu.js index 3684f60ce..e0d6697cc 100644 --- a/app/js/mms/directives/veMenu.js +++ b/app/js/mms/directives/veMenu.js @@ -38,7 +38,7 @@ function veMenu(CacheService, $state, $templateCache, $sce) { } else if (scope.ref.type === 'Tag') { scope.currentTag = scope.tag.name; } - } + } scope.updateProject = function(project) { if (project) { @@ -88,20 +88,20 @@ function veMenu(CacheService, $state, $templateCache, $sce) { var child, parentId; var groups = scope.groups; var groupsMap = {}; - if(scope.group !== undefined) { + if (scope.group !== undefined) { for (var i = 0; i < groups.length; i++) { groupsMap[groups[i]._id] = {id: groups[i]._id, name: groups[i]._name, parentId: groups[i]._parentId}; } child = scope.group; } - if(scope.document !== undefined) { - child = scope.document; + if (scope.document !== undefined) { + child = scope.document; } - if(child) { - if(child.hasOwnProperty('_id')) { + if (child) { + if (child.hasOwnProperty('_id')) { bcrumbs.push({name: child._name, id: child._id, type: "group", alfLink: child._link, link: "project.ref.preview({documentId: 'site_' + breadcrumb.id + '_cover', search: undefined})"}); if(child._parentId) { - parentId = child._parentId; + parentId = child._parentId; } } else { bcrumbs.push({name: child.name, id: child.id, type: "doc", link: "project.ref.document({documentId: breadcrumb.id, search: undefined})"}); @@ -109,17 +109,17 @@ function veMenu(CacheService, $state, $templateCache, $sce) { parentId = child._groupId; } } - if(parentId) { + if (parentId) { while(groupsMap[parentId] !== undefined) { var id = groupsMap[parentId].id; bcrumbs.push({name: groupsMap[id].name, id: id, type: "group", link: "project.ref.preview({documentId: 'site_' + breadcrumb.id + '_cover', search: undefined})"}); - parentId = groupsMap[id].parentId; - } + parentId = groupsMap[id].parentId; + } } scope.breadcrumbs = bcrumbs.reverse(); - if (scope.breadcrumbs.length) { - scope.breadcrumbs[scope.breadcrumbs.length-1].showAlf = true; - } + // if (scope.breadcrumbs.length) { + // scope.breadcrumbs[scope.breadcrumbs.length-1].showAlf = true; + // } var eltWidth = element.parent().width(); var crumbcount = scope.breadcrumbs.length; var liWidth = (eltWidth * 0.75)/crumbcount; diff --git a/app/js/mms/directives/veNav.js b/app/js/mms/directives/veNav.js index b94a092d8..bb214e234 100644 --- a/app/js/mms/directives/veNav.js +++ b/app/js/mms/directives/veNav.js @@ -89,7 +89,7 @@ function veNav($templateCache, $rootScope, $state, hotkeys, growl, $location, $u hotkeys.toggleCheatSheet(); }; scope.toggleAbout = function() { - scope.veV = '3.1.0'; + scope.veV = '3.2.0'; scope.mmsV = 'Loading...'; ApplicationService.getMmsVersion().then(function(data) { scope.mmsV = data; diff --git a/app/lib/redactor/fontcolor.js b/app/lib/redactor/fontcolor.js deleted file mode 100755 index a4b8b5961..000000000 --- a/app/lib/redactor/fontcolor.js +++ /dev/null @@ -1,81 +0,0 @@ -if (!RedactorPlugins) var RedactorPlugins = {}; - -RedactorPlugins.fontcolor = { - init: function() - { - var colors = [ - '#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00', - '#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca', - '#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694', - '#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314', - '#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100', - '#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000' - ]; - - var buttons = ['fontcolor', 'backcolor']; - - for (var i = 0; i < 2; i++) - { - var name = buttons[i]; - - var $dropdown = $('