Skip to content

Commit

Permalink
Merge branch 'release/3.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lam, Doris T (393A) authored and Lam, Doris T (393A) committed Feb 21, 2019
2 parents 8f02efc + 09a8677 commit ff66ead
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 37 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ module.exports = function(grunt) {
artifactory: {
options: {
url: artifactoryUrl,
repository: releaseRepo,
repository: releaseRepo, //snapshotRepo,
username: artifactoryUser,
password: artifactoryPassword
},
Expand All @@ -358,7 +358,7 @@ module.exports = function(grunt) {
options: {
publish: [{
id: groupId + ':ve:zip',
version: '3.5.0',
version: '3.5.1',
path: 'deploy/'
}]
}
Expand Down
5 changes: 4 additions & 1 deletion app/assets/styles/ve/layout/_ve-dropdowns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@
}

/*Clearing bootstrap styling*/
>li>a {
>li>a,
>li>span {
padding: 1px 10px;
}
>li>a{
color: white;

&:hover {
Expand Down
19 changes: 5 additions & 14 deletions app/assets/styles/ve/layout/_ve-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
2.2.2 Search
2.3 User Profile
3. Project Level Header
3.1 Select Project Dropdown
3.2 Breadcrumbs
3.3 Dropdowns
3.1 Breadcrumbs
3.2 Dropdowns
-------------------------------------------------------------------*/

Expand Down Expand Up @@ -236,15 +235,7 @@ nav.project-level-header {
}

/*------------------------------------------------------------------
3.1 Select Project Dropdown
-------------------------------------------------------------------*/

.select-project-dropdown {
float: left;
}

/*------------------------------------------------------------------
3.2 Breadcrumbs
3.1 Breadcrumbs
-------------------------------------------------------------------*/

.navbar{
Expand Down Expand Up @@ -366,13 +357,13 @@ nav.project-level-header {


/*------------------------------------------------------------------
3.3 Dropdowns
3.2 Dropdowns
-------------------------------------------------------------------*/

.project-level-header .ve-dark-dropdown-nav ul.dropdown-menu {
max-width: 400px;
overflow: hidden;
text-align: left;
min-width: 260px;
/*Clearing bootstrap styling so long names can wrap*/
> li > a{
white-space: normal;
Expand Down
3 changes: 2 additions & 1 deletion app/js/mms/controllers/tree.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function($anchorScroll, $q, $filter, $location, $uibModal, $scope, $rootScope, $
orgOb, projectOb, refOb, refObs, groupObs, docMeta) {

$scope.filterInputPlaceholder = 'Filter groups/docs';
if ($state.current.name === 'project.ref.document.view' || $state.current.name === 'project.ref.document.full') {
if ($state.includes('project.ref.document')) {
$scope.filterInputPlaceholder = 'Filter table of contents';
}

Expand Down Expand Up @@ -484,6 +484,7 @@ function($anchorScroll, $q, $filter, $location, $uibModal, $scope, $rootScope, $
if (documentOb && docMeta) {
$scope.treeOptions.numberingDepth = docMeta.numberingDepth;
$scope.treeOptions.numberingSeparator = docMeta.numberingSeparator;
$scope.treeOptions.startChapter = documentOb._startChapter;
}

$scope.fullDocMode = function() {
Expand Down
2 changes: 1 addition & 1 deletion app/js/mms/directives/veNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function veNav($templateCache, $rootScope, $state, hotkeys, growl, $location, $u
hotkeys.toggleCheatSheet();
};
scope.toggleAbout = function() {
scope.veV = '3.5.0';
scope.veV = '3.5.1';
scope.mmsV = 'Loading...';
ApplicationService.getMmsVersion().then(function(data) {
scope.mmsV = data;
Expand Down
6 changes: 2 additions & 4 deletions app/partials/mms/veMenu.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<nav class="project-level-header navbar navbar-inverse navbar-fixed-top block" role="navigation">
<div class="btn-group ve-dark-dropdown-nav select-project-dropdown" uib-dropdown keyboard-nav>
<div class="btn-group ve-dark-dropdown-nav pull-left" uib-dropdown keyboard-nav>
<button type="button" class="dropdown-toggle" ng-click="updateProjectChecked()" uib-dropdown-toggle>
<span class="selected-dropdown">
<span class="label-dropdown">Project:&nbsp;</span>{{ currentProject }}
</span>
<span class="label-dropdown">Project:&nbsp;</span><span class="selected-dropdown">{{ currentProject }}</span>
<span><i class="fa fa-caret-down" aria-hidden="true"></i></span>
</button>
<ul class="dropdown-menu list-with-selected-item" uib-dropdown-menu role="menu">
Expand Down
2 changes: 1 addition & 1 deletion app/partials/mms/veNav.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</a>
<ul class="dropdown-menu pull-right" uib-dropdown-menu aria-labelledby="login-dropdown" style="white-space: nowrap" role="login-menu">
<li ng-if="username" class="ve-secondary">
Logged in as <b>{{ username }}</b>
<span>Logged in as <b>{{ username }}</b></span>
</li>
<li class="divider"></li>
<li>
Expand Down
19 changes: 19 additions & 0 deletions src/assets/styles/components/_mms-transclude.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@ mms-view:not(.reviewing) mms-transclude-com {
display: none;
}

/*Add a name label that is hidden by default*/
mms-transclude-name .input-group > .input-group-addon.transclude-name-label{
position: absolute;
top: -1.8em;
display: table;
opacity: 0;
border-radius: 4px 4px 0 0;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
visibility: 0;
opacity: 0;
@include transition(all .3s);
}

/*Label becomes visible on hover*/
mms-transclude-name:hover .input-group > .input-group-addon.transclude-name-label{
visibility: 1;
opacity: 1;
}

/*------------------------------------------------------------------
Element not found styling
Expand Down
13 changes: 9 additions & 4 deletions src/directives/mmsTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function mmsTree(ApplicationService, $timeout, $log, $templateCache, $filter, Ut
aggr = "";
else
aggr = '-' + aggr.toLowerCase();
var i, j = 0;
var i = 0;
if (!branch.expanded)
branch.expanded = false;
if ((branch.children && branch.children.length > 0) || (branch.expandable === true)) {
Expand Down Expand Up @@ -354,23 +354,28 @@ function mmsTree(ApplicationService, $timeout, $log, $templateCache, $filter, Ut
if (scope.options.sort) {
branch.children.sort(scope.options.sort);
}
for (i = 0, j = 0; i < branch.children.length; i++) {
var j = scope.options.startChapter;
if (j === null || j === undefined || level != 1) {
j = 1;
}
for (i = 0; i < branch.children.length; i++) {
var child_visible = visible && branch.expanded;
//if (branch.children[i].type === 'section')
// add_branch_to_list(level + 1, '§ ', branch.children[i], child_visible);
if (branch.children[i].type === 'figure' || branch.children[i].type === 'table' || branch.children[i].type === 'equation') {
add_branch_to_list(level + 1, section, branch.children[i], child_visible, peNums);
} else {
j++;
if (scope.options.sectionNumbering) {
var nextSection = section.slice();
nextSection.push(j);
if (nextSection.length <= scope.options.numberingDepth) {
peNums.table = 0; peNums.figure = 0; peNums.equaton = 0;
}
add_branch_to_list(level + 1, nextSection, branch.children[i], child_visible, peNums);
} else
} else {
add_branch_to_list(level + 1, [], branch.children[i], child_visible, peNums);
}
j++;
}
}
}
Expand Down
17 changes: 11 additions & 6 deletions src/directives/mmsTsDiagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ angular.module('mms.directives')
*
*/
function mmsTsDiagram(ElementService, $templateCache, $window, $timeout, growl, ApplicationService, AuthService, URLService) {
var importedTsJs = false;
var template = $templateCache.get('mms/templates/mmsTsDiagram.html');
var mapping = {};
// var deferreds = {};
Expand Down Expand Up @@ -71,12 +72,7 @@ function mmsTsDiagram(ElementService, $templateCache, $window, $timeout, growl,
REQ: 'REQ Relationships',
UC: 'UC Relationships'
};
$('body').append(
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/tsperspectives.nocache.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/dojo/dojo/dojo.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/TSHovering.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/TSButtonTooltip.js"></script>');


$window.onPerspectivesCommandSuccess = function(successfulCommand) {
console.log("Perspectives command: " + successfulCommand.command + " completed successfully");
$window.hidePerspectivesProgressIndicator();
Expand Down Expand Up @@ -122,6 +118,15 @@ function mmsTsDiagram(ElementService, $templateCache, $window, $timeout, growl,
};
//store global mapping of project name to hash, on*** functions can lookup the hash
var mmsTsDiagramLink = function(scope, element, attrs) {
if (!$window.invokePerspectivesCommand && !importedTsJs) {
$('body').append(
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/tsperspectives.nocache.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/dojo/dojo/dojo.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/TSHovering.js"></script>\n' +
'<script type="text/javascript" language="javascript" src="/mms-ts/tsperspectives/TSButtonTooltip.js"></script>');

importedTsJs = true;
}
var id = ApplicationService.createUniqueId();
if (peId2projectId[scope.mmsPeId]) {
id = peId2projectId[scope.mmsPeId];
Expand Down
2 changes: 1 addition & 1 deletion src/directives/mmsViewLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function mmsViewLink(ElementService, UtilsService, $compile, growl, ViewService,
},
require: ['?^^mmsCf', '?^^mmsView'],
template: '<span ng-if="!loading"><a target="{{target}}" ng-class="linkClass" ng-href="{{href}}"><i ng-class="linkIconClass" aria-hidden="true"></i><span ng-if="linkText">{{linkText}}</span><span ng-if="!linkText && change">{{type}}{{element._veNumber}}{{suffix}}</span><span ng-if="!linkText && !change">{{name || "Unnamed View"}}</span></a>' +
'<a class="external-link no-print" target="_blank" ng-href="{{href}}" ng-if="mmsExternalLink"><i class="fa fa-external-link" aria-hidden="true" title="Open document in new tab"></i></a></span>',
'<a class="external-link no-print" target="_blank" ng-href="{{href}}" ng-if="mmsExternalLink"><i class="fa fa-external-link ve-secondary-text pull-right" aria-hidden="true" title="Open document in new tab"></i></a></span>',
link: mmsViewLinkLink
};
}
5 changes: 3 additions & 2 deletions src/directives/templates/mmsTranscludeName.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<form class="input-group" ng-submit="save($event)">
<input type="text" class="form-control" ng-model="edit.name" aria-describedby="basic-addon2">
<span class="input-group-addon" ng-click="save($event)">
<span class="input-group-addon transclude-name-label">Name</span>
<span class="input-group-addon" ng-click="save($event)" title="Save">
<i ng-if="!elementSaving" class="fa fa-save"></i>
<i ng-if="elementSaving" class="fa fa-spinner fa-spin"></i>
</span>
<span class="input-group-addon" ng-click="cancel($event)"><i class="fa fa-times"></i></span>
<span class="input-group-addon" ng-click="cancel($event)"><i class="fa fa-times" title="Cancel"></i></span>
</form>

0 comments on commit ff66ead

Please sign in to comment.