Skip to content

Commit 4fdaa77

Browse files
authored
Merge pull request #15 from CIDARLAB/version_control
Version control
2 parents df359df + 91ae63c commit 4fdaa77

File tree

80 files changed

+14479
-4865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+14479
-4865
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ target
88
*.settings
99
*.classpath
1010
.DS_Store
11+
**/node_modules
12+
**package-lock.json

src/main/java/knox/spring/data/neo4j/domain/Branch.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ public Commit getLatestCommit() {
8484
public String getBranchID() {
8585
return branchID;
8686
}
87+
88+
public void setBranchID(String branchID) {
89+
90+
this.branchID = branchID;
91+
}
8792

8893
public boolean hasLatestCommit() {
8994
return latestCommit != null;

src/main/java/knox/spring/data/neo4j/services/DesignSpaceService.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,11 @@ public void deleteBranch(String targetSpaceID, String targetBranchID) {
616616

617617
public void copyHeadBranch(String targetSpaceID, String outputBranchID) {
618618
DesignSpace targetSpace = loadDesignSpace(targetSpaceID);
619-
620-
targetSpace.addBranch(targetSpace.getHeadBranch().copy());
619+
620+
Branch outputBranch = targetSpace.getHeadBranch().copy();
621+
outputBranch.setBranchID(outputBranchID);
622+
623+
targetSpace.addBranch(outputBranch);
621624

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

628631
targetSpace.clearNodes();
629-
632+
633+
targetSpace.setHeadBranch(targetSpace.getBranch(targetBranchID));
634+
630635
targetSpace.copyNodeSpace(targetSpace.getHeadSnapshot());
631636

632637
saveDesignSpace(targetSpace);
@@ -646,12 +651,12 @@ public void commitToHeadBranch(String targetSpaceID) {
646651
commitToBranch(targetSpace, targetSpace.getHeadBranch());
647652
}
648653

649-
public void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
654+
private void commitToBranch(DesignSpace targetSpace, Branch targetBranch) {
650655
Commit commit = targetSpace.createCommit(targetBranch);
651-
652-
targetBranch.setLatestCommit(commit);
653-
654-
commit.getSnapshot().copyNodeSpace(targetSpace);
656+
657+
commit.createSnapshot().copyNodeSpace(targetSpace);
658+
659+
targetBranch.setLatestCommit(commit);
655660

656661
saveDesignSpace(targetSpace);
657662
}

src/main/resources/static/css/knox.css

Lines changed: 124 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ a {
3737
a:hover,
3838
a:focus {
3939
color: #eb3812;
40+
cursor: pointer
4041
}
4142

4243
h1,
@@ -547,7 +548,7 @@ section {
547548
}
548549

549550
#search-tb {
550-
background-image: url("http://i47.tinypic.com/r02vbq.png");
551+
background-image: url('../img/search.jpg');
551552
background-repeat: no-repeat;
552553
background-position: left center;
553554
display: inline-block;
@@ -599,70 +600,6 @@ textarea:focus, input:focus{
599600
background: #EEEEEE;
600601
}
601602

602-
.btn-holder {
603-
text-align: center;
604-
position: absolute;
605-
width: 100%;
606-
bottom: 0;
607-
padding-bottom: 40px;
608-
}
609-
610-
.circle-float-btn {
611-
background-color: white;
612-
width: 70px;
613-
height: 70px;
614-
padding: 10px 16px;
615-
font-size: 18px;
616-
line-height: 1.33;
617-
border-radius: 35px;
618-
display: inline-block;
619-
border: 1px solid #EEEEEE;
620-
box-shadow: 0px 2px 5px #EEEEEE;
621-
-webkit-transition: box-shadow ease-in-out .35s;
622-
-moz-transition: box-shadow ease-in-out .35s;
623-
transition: box-shadow ease-in-out .35s;
624-
margin: 10px;
625-
overflow: hidden;
626-
}
627-
628-
.btn-img {
629-
margin-left: -5px;
630-
margin-top: -1px;
631-
}
632-
633-
#combine-btn img {
634-
opacity: 0.5;
635-
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
636-
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
637-
transition: box-shadow .35s, opacity ease-in-out .35s;
638-
}
639-
640-
#combine-btn:hover img.btn-img {
641-
opacity: 1;
642-
}
643-
644-
#delete-btn img {
645-
opacity: 0.5;
646-
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
647-
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
648-
transition: box-shadow .35s, opacity ease-in-out .35s;
649-
}
650-
651-
#delete-btn:hover img.btn-img {
652-
opacity: 1;
653-
}
654-
655-
#list-btn img {
656-
opacity: 0.5;
657-
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
658-
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
659-
transition: box-shadow .35s, opacity ease-in-out .35s;
660-
}
661-
662-
#list-btn:hover img.btn-img {
663-
opacity: 1;
664-
}
665-
666603
.circle-float-btn:hover {
667604
box-shadow: 0px 4px 5px #CCCCCC;
668605
}
@@ -702,6 +639,126 @@ textarea:focus, input:focus{
702639
padding: 10px;
703640
}
704641

705-
#swal-svg-box {
706-
overflow: scroll;
642+
/**********************
643+
VERSION HISTORY SIDEBAR
644+
***********************/
645+
#branch-selector{
646+
display: block;
647+
position: absolute;
648+
top: 95px;
649+
left: 120px;
650+
text-align:center;
651+
z-index: 2;
652+
height: 40px;
653+
background-color: white;
654+
border: 1px solid #ccc
655+
}
656+
657+
#vh-sidebar {
658+
display:none;
659+
background: #e5e5e5;
660+
position: absolute;
661+
height: 100%;
662+
663+
/*the left value is what hides the width */
664+
/*if these are changed, must change in knox.js as well*/
665+
left: -380px;
666+
width: 400px;
667+
}
668+
669+
#vh-toggle-button {
670+
position: absolute;
671+
left: 20px; /*this is the offset of the vh-sidebar*/
672+
top: 95px;
673+
display: none; /*hide the button until a design is selected*/
674+
width: 30px;
675+
height: 40px;
676+
background-color: transparent;
677+
outline:none;
678+
border: 2px solid #e5e5e5;
679+
cursor:pointer;
680+
z-index: 2;
681+
}
682+
683+
/*********
684+
TOOLTIP
685+
**********/
686+
.tooltip-templates {
687+
display: none;
688+
}
689+
690+
/************
691+
SWEET ALERT
692+
*************/
693+
.swal-button--confirm {
694+
background-color: #F05F40;
695+
}
696+
697+
.swal-button--confirm:not([disabled]):hover{
698+
background-color: #d35234
699+
}
700+
701+
.swal-button--confirm:active {
702+
background-color: #b85435;
703+
}
704+
705+
.swal-content__input {
706+
border-color: #bbbbbb;
707+
}
708+
709+
.swal-content__input:focus,.swal-content__textarea:focus{
710+
border-color:#999
711+
}
712+
713+
.enumeration-swal .swal-content{
714+
height: 400px
715+
}
716+
717+
/*************
718+
DESIGN SPACE
719+
**************/
720+
#design-space {
721+
height: 100%;
722+
}
723+
724+
#btn-holder {
725+
text-align: center;
726+
position: absolute;
727+
width: 100%;
728+
bottom: 0;
729+
padding-bottom: 40px;
707730
}
731+
732+
.circle-float-btn {
733+
background-color: white;
734+
width: 70px;
735+
height: 70px;
736+
padding: 10px 16px;
737+
font-size: 18px;
738+
line-height: 1.33;
739+
border-radius: 35px;
740+
display: inline-block;
741+
border: 1px solid #EEEEEE;
742+
box-shadow: 0px 2px 5px #EEEEEE;
743+
-webkit-transition: box-shadow ease-in-out .35s;
744+
-moz-transition: box-shadow ease-in-out .35s;
745+
transition: box-shadow ease-in-out .35s;
746+
margin: 10px;
747+
overflow: hidden;
748+
}
749+
750+
.btn-img {
751+
margin-left: -5px;
752+
margin-top: -1px;
753+
}
754+
755+
.circle-float-btn img {
756+
opacity: 0.5;
757+
-webkit-transition: box-shadow .35s, opacity ease-in-out .35s;
758+
-moz-transition: box-shadow .35s, opacity ease-in-out .35s;
759+
transition: box-shadow .35s, opacity ease-in-out .35s;
760+
}
761+
762+
.circle-float-btn:hover img.btn-img {
763+
opacity: 1;
764+
}

src/main/resources/static/gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ gulp.task('copy', function() {
6464
gulp.src(['node_modules/scrollreveal/dist/*.js'])
6565
.pipe(gulp.dest('vendor/scrollreveal'))
6666

67+
gulp.src(['node_modules/tooltipster/dist/css/plugins/tooltipster/sideTip/themes/*.css',
68+
'node_modules/tooltipster/dist/css/*.css',
69+
'node_modules/tooltipster/dist/js/*.js'])
70+
.pipe(gulp.dest('vendor/tooltipster'))
71+
72+
gulp.src(['node_modules/sweetalert/dist/*'])
73+
.pipe(gulp.dest('vendor/sweet'))
74+
6775
gulp.src([
6876
'node_modules/font-awesome/**',
6977
'!node_modules/font-awesome/**/*.map',
2.31 KB
Loading
6.58 KB
Loading

0 commit comments

Comments
 (0)