Skip to content

Commit

Permalink
Merge branch 'release-5.15.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Sep 2, 2020
2 parents ebfa2d5 + 566d5fb commit 232578f
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 173 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wise",
"version": "5.15.2",
"version": "5.15.3",
"description": "Web-based Inquiry Science Environment",
"main": "app.js",
"browserslist": [
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<artifactId>wise</artifactId>
<packaging>war</packaging>
<name>Web-based Inquiry Science Environment</name>
<version>5.15.2</version>
<version>5.15.3</version>
<url>http://wise5.org</url>
<licenses>
<license>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.15.2
5.15.3
4 changes: 2 additions & 2 deletions src/main/webapp/wise5/authoringTool/project/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<md-icon>check</md-icon>
<md-tooltip md-direction="top" class="projectButtonTooltip">{{ ::"create" | translate }}</md-tooltip>
</md-button>
<md-button id="createGroupCancelButton" class='createButton md-raised md-primary' ng-click='projectController.cancelCreateGroupClicked()'>
<md-button id="createGroupCancelButton" class='createButton md-raised md-primary' ng-click='projectController.showProjectView()'>
<md-icon>close</md-icon>
<md-tooltip md-direction="top" class="projectButtonTooltip">{{ ::"CANCEL" | translate }}</md-tooltip>
</md-button>
Expand All @@ -222,7 +222,7 @@
<md-icon>check</md-icon>
<md-tooltip md-direction="top" class="projectButtonTooltip">{{ ::"create" | translate }}</md-tooltip>
</md-button>
<md-button id="createNodeCancelButton" class='createButton md-raised md-primary' ng-click='projectController.cancelCreateNodeClicked()'>
<md-button id="createNodeCancelButton" class='createButton md-raised md-primary' ng-click='projectController.showProjectView()'>
<md-icon>close</md-icon>
<md-tooltip md-direction="top" class="projectButtonTooltip">{{ ::"CANCEL" | translate }}</md-tooltip>
</md-button>
Expand Down
90 changes: 19 additions & 71 deletions src/main/webapp/wise5/authoringTool/project/projectController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class ProjectController {
projectTitle: string;
showCreateGroup: boolean = false;
showCreateNode: boolean = false;
showTemplateChooser: boolean;

inactiveGroupNodes: any[];
inactiveStepNodes: any[];
Expand Down Expand Up @@ -59,13 +58,10 @@ class ProjectController {
];

static $inject = [
'$anchorScroll',
'$filter',
'$mdDialog',
'$rootScope',
'$scope',
'$state',
'$stateParams',
'$stomp',
'$timeout',
'$transitions',
Expand All @@ -77,13 +73,10 @@ class ProjectController {
];

constructor(
private $anchorScroll: any,
$filter,
private $mdDialog,
private $rootScope,
private $scope,
private $state,
$stateParams,
private $stomp,
private $timeout,
private $transitions,
Expand All @@ -98,7 +91,7 @@ class ProjectController {
this.ProjectService = ProjectService;
this.TeacherDataService = TeacherDataService;
this.UtilService = UtilService;
this.projectId = $stateParams.projectId;
this.projectId = this.ConfigService.getProjectId();
this.runId = this.ConfigService.getRunId();
this.items = this.ProjectService.idToOrder;
this.nodeIds = this.ProjectService.getFlattenedProjectAsNodeIds();
Expand Down Expand Up @@ -137,10 +130,6 @@ class ProjectController {
this.scrollToBottomOfPage();
});

this.$rootScope.$on('$stateChangeSuccess', (event, transition) => {
this.scrollToBottomOfPage();
});

this.saveEvent('projectOpened', 'Navigation');

/*
Expand Down Expand Up @@ -170,20 +159,16 @@ class ProjectController {
});
}

previewProject() {
const previewProjectEventData = { constraints: true };
previewProject(enableConstraints: boolean = true) {
const previewProjectEventData = { constraints: enableConstraints };
this.saveEvent('projectPreviewed', 'Navigation', previewProjectEventData);
window.open(
`${this.ConfigService.getConfigParam('previewProjectURL')}`
`${this.ConfigService.getConfigParam('previewProjectURL')}?constraints=${enableConstraints}`
);
}

previewProjectWithoutConstraints() {
const previewProjectEventData = { constraints: false };
this.saveEvent('projectPreviewed', 'Navigation', previewProjectEventData);
window.open(
`${this.ConfigService.getConfigParam('previewProjectURL')}?constraints=false`
);
this.previewProject(false);
}

viewProjectAssets() {
Expand Down Expand Up @@ -244,11 +229,6 @@ class ProjectController {
this.$state.go('root.at.project.node', { projectId: this.projectId, nodeId: nodeId });
}

/**
* The constraint icon on a step in the project view was clicked.
* We will open the constraint view for the step.
* @param nodeId The node id of the step.
*/
constraintIconClicked(nodeId) {
this.TeacherDataService.endCurrentNodeAndSetCurrentNodeByNodeId(nodeId);
this.$state.go('root.at.project.nodeConstraints', {
Expand All @@ -257,11 +237,6 @@ class ProjectController {
});
}

/**
* The branch icon on a step in the project view was clicked.
* We will open the transitions view for the step.
* @param nodeId The node id of the step.
*/
branchIconClicked(nodeId) {
this.TeacherDataService.endCurrentNodeAndSetCurrentNodeByNodeId(nodeId);
this.$state.go('root.at.project.nodeEditPaths', { projectId: this.projectId, nodeId: nodeId });
Expand Down Expand Up @@ -710,11 +685,6 @@ class ProjectController {
});
}

projectTitleChanged() {
this.ProjectService.setProjectTitle(this.projectTitle);
this.ProjectService.saveProject();
}

importStep() {
this.$state.go('root.at.project.import-step.choose-step', { projectId: this.projectId });
}
Expand All @@ -731,48 +701,34 @@ class ProjectController {
});
}

/**
* Check if the specified node is in any branch path
* @param nodeId the node id of the node
* @return whether the node is in any branch path
*/
isNodeInAnyBranchPath(nodeId) {
return this.ProjectService.isNodeInAnyBranchPath(nodeId);
}

showProjectView() {
this.clearNodeAndGroupTitle();
this.showCreateGroup = false;
this.showCreateNode = false;
}

toggleView(view) {
this.createGroupTitle = '';
this.createNodeTitle = '';
if (view === 'project') {
this.showCreateGroup = false;
this.showCreateNode = false;
} else if (view === 'createGroup') {
this.clearNodeAndGroupTitle();
if (view === 'createGroup') {
this.showCreateGroup = !this.showCreateGroup;
this.showCreateNode = false;
} else if (view === 'createNode') {
this.showCreateGroup = false;
this.showCreateNode = !this.showCreateNode;
this.showTemplateChooser = false;
}
}

goBackToProjectList() {
this.$state.go('root.at.main');
}

projectHomeClicked() {
this.showProjectHome();
}

showProjectHome() {
// we are going to the project view so we will set the current node to null
this.TeacherDataService.setCurrentNode(null);
this.toggleView('project');
this.scrollToTopOfPage();
clearNodeAndGroupTitle() {
this.createGroupTitle = '';
this.createNodeTitle = '';
}

scrollToTopOfPage() {
this.$anchorScroll('top');
goBackToProjectList() {
this.$state.go('root.at.main');
}

scrollToBottomOfPage() {
Expand All @@ -784,14 +740,6 @@ class ProjectController {
);
}

cancelCreateGroupClicked() {
this.toggleView('project');
}

cancelCreateNodeClicked() {
this.toggleView('project');
}

/**
* Temporarily highlight the new nodes to draw attention to them
* @param newNodes the new nodes to highlight
Expand Down Expand Up @@ -964,7 +912,7 @@ class ProjectController {
}

getNumberOfConstraintsOnNode(nodeId) {
let constraints = this.ProjectService.getConstraintsOnNode(nodeId);
const constraints = this.ProjectService.getConstraintsOnNode(nodeId);
return constraints.length;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class PeriodSelectController {

getSelectedText() {
if (this.currentPeriod.periodId === -1) {
return this.currentPeriod.periodName;
return this.$translate('allPeriods');
} else {
return this.$translate('periodLabel', { name: this.currentPeriod.periodName });
}
Expand Down
Loading

0 comments on commit 232578f

Please sign in to comment.