Skip to content

Commit

Permalink
Merge pull request CIDARLAB#15 from CIDARLAB/version_control
Browse files Browse the repository at this point in the history
Version control
  • Loading branch information
nroehner authored May 24, 2019
2 parents df359df + 91ae63c commit 4fdaa77
Show file tree
Hide file tree
Showing 80 changed files with 14,479 additions and 4,865 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ target
*.settings
*.classpath
.DS_Store
**/node_modules
**package-lock.json
5 changes: 5 additions & 0 deletions src/main/java/knox/spring/data/neo4j/domain/Branch.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public Commit getLatestCommit() {
public String getBranchID() {
return branchID;
}

public void setBranchID(String branchID) {

this.branchID = branchID;
}

public boolean hasLatestCommit() {
return latestCommit != null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,11 @@ public void deleteBranch(String targetSpaceID, String targetBranchID) {

public void copyHeadBranch(String targetSpaceID, String outputBranchID) {
DesignSpace targetSpace = loadDesignSpace(targetSpaceID);

targetSpace.addBranch(targetSpace.getHeadBranch().copy());

Branch outputBranch = targetSpace.getHeadBranch().copy();
outputBranch.setBranchID(outputBranchID);

targetSpace.addBranch(outputBranch);

saveDesignSpace(targetSpace);
}
Expand All @@ -626,7 +629,9 @@ public void checkoutBranch(String targetSpaceID, String targetBranchID) {
DesignSpace targetSpace = loadDesignSpace(targetSpaceID);

targetSpace.clearNodes();


targetSpace.setHeadBranch(targetSpace.getBranch(targetBranchID));

targetSpace.copyNodeSpace(targetSpace.getHeadSnapshot());

saveDesignSpace(targetSpace);
Expand All @@ -646,12 +651,12 @@ public void commitToHeadBranch(String targetSpaceID) {
commitToBranch(targetSpace, targetSpace.getHeadBranch());
}

public void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
private void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
Commit commit = targetSpace.createCommit(targetBranch);
targetBranch.setLatestCommit(commit);
commit.getSnapshot().copyNodeSpace(targetSpace);

commit.createSnapshot().copyNodeSpace(targetSpace);

targetBranch.setLatestCommit(commit);

saveDesignSpace(targetSpace);
}
Expand Down
191 changes: 124 additions & 67 deletions src/main/resources/static/css/knox.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ a {
a:hover,
a:focus {
color: #eb3812;
cursor: pointer
}

h1,
Expand Down Expand Up @@ -547,7 +548,7 @@ section {
}

#search-tb {
background-image: url("http://i47.tinypic.com/r02vbq.png");
background-image: url('../img/search.jpg');
background-repeat: no-repeat;
background-position: left center;
display: inline-block;
Expand Down Expand Up @@ -599,70 +600,6 @@ textarea:focus, input:focus{
background: #EEEEEE;
}

.btn-holder {
text-align: center;
position: absolute;
width: 100%;
bottom: 0;
padding-bottom: 40px;
}

.circle-float-btn {
background-color: white;
width: 70px;
height: 70px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 35px;
display: inline-block;
border: 1px solid #EEEEEE;
box-shadow: 0px 2px 5px #EEEEEE;
-webkit-transition: box-shadow ease-in-out .35s;
-moz-transition: box-shadow ease-in-out .35s;
transition: box-shadow ease-in-out .35s;
margin: 10px;
overflow: hidden;
}

.btn-img {
margin-left: -5px;
margin-top: -1px;
}

#combine-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#combine-btn:hover img.btn-img {
opacity: 1;
}

#delete-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#delete-btn:hover img.btn-img {
opacity: 1;
}

#list-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

#list-btn:hover img.btn-img {
opacity: 1;
}

.circle-float-btn:hover {
box-shadow: 0px 4px 5px #CCCCCC;
}
Expand Down Expand Up @@ -702,6 +639,126 @@ textarea:focus, input:focus{
padding: 10px;
}

#swal-svg-box {
overflow: scroll;
/**********************
VERSION HISTORY SIDEBAR
***********************/
#branch-selector{
display: block;
position: absolute;
top: 95px;
left: 120px;
text-align:center;
z-index: 2;
height: 40px;
background-color: white;
border: 1px solid #ccc
}

#vh-sidebar {
display:none;
background: #e5e5e5;
position: absolute;
height: 100%;

/*the left value is what hides the width */
/*if these are changed, must change in knox.js as well*/
left: -380px;
width: 400px;
}

#vh-toggle-button {
position: absolute;
left: 20px; /*this is the offset of the vh-sidebar*/
top: 95px;
display: none; /*hide the button until a design is selected*/
width: 30px;
height: 40px;
background-color: transparent;
outline:none;
border: 2px solid #e5e5e5;
cursor:pointer;
z-index: 2;
}

/*********
TOOLTIP
**********/
.tooltip-templates {
display: none;
}

/************
SWEET ALERT
*************/
.swal-button--confirm {
background-color: #F05F40;
}

.swal-button--confirm:not([disabled]):hover{
background-color: #d35234
}

.swal-button--confirm:active {
background-color: #b85435;
}

.swal-content__input {
border-color: #bbbbbb;
}

.swal-content__input:focus,.swal-content__textarea:focus{
border-color:#999
}

.enumeration-swal .swal-content{
height: 400px
}

/*************
DESIGN SPACE
**************/
#design-space {
height: 100%;
}

#btn-holder {
text-align: center;
position: absolute;
width: 100%;
bottom: 0;
padding-bottom: 40px;
}

.circle-float-btn {
background-color: white;
width: 70px;
height: 70px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 35px;
display: inline-block;
border: 1px solid #EEEEEE;
box-shadow: 0px 2px 5px #EEEEEE;
-webkit-transition: box-shadow ease-in-out .35s;
-moz-transition: box-shadow ease-in-out .35s;
transition: box-shadow ease-in-out .35s;
margin: 10px;
overflow: hidden;
}

.btn-img {
margin-left: -5px;
margin-top: -1px;
}

.circle-float-btn img {
opacity: 0.5;
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
transition: box-shadow .35s, opacity ease-in-out .35s;
}

.circle-float-btn:hover img.btn-img {
opacity: 1;
}
8 changes: 8 additions & 0 deletions src/main/resources/static/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ gulp.task('copy', function() {
gulp.src(['node_modules/scrollreveal/dist/*.js'])
.pipe(gulp.dest('vendor/scrollreveal'))

gulp.src(['node_modules/tooltipster/dist/css/plugins/tooltipster/sideTip/themes/*.css',
'node_modules/tooltipster/dist/css/*.css',
'node_modules/tooltipster/dist/js/*.js'])
.pipe(gulp.dest('vendor/tooltipster'))

gulp.src(['node_modules/sweetalert/dist/*'])
.pipe(gulp.dest('vendor/sweet'))

gulp.src([
'node_modules/font-awesome/**',
'!node_modules/font-awesome/**/*.map',
Expand Down
Binary file added src/main/resources/static/img/save.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 src/main/resources/static/img/search.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4fdaa77

Please sign in to comment.