Skip to content

Commit

Permalink
Add a profile chooser.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed May 16, 2019
1 parent 54e229c commit 3dc3d11
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/snippets/managerSidebar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<div class="w3-bar-block sidebar leftShow" id="managerSidebar">
<button class="w3-bar-item w3-button w3-large" id="sidebarClose">Close &times;</button>

<select id="profileSelect" class="profile green" style='display:none'>
<option value="0">Select an use case</option>
<option value="1">Use case 1</option>
<option value="2">Use case 2</option>
<option value="3">Use case 3</option>
<option value="4">Use case 4</option>
<option value="5">Use case 5</option>
<option value="6">Use case 6</option>
<option value="7">Use case 7</option>
<option value="8">Use case 8</option>
</select>
<button class="w3-bar-item w3-button sidebar-topbutton" id="addManager">+ Add Manager</button>
<div style="width:100%;position:absolute;bottom:1%;">
<button class="w3-bar-item w3-button sidebar-topbutton" id="Feedback" style="text-align:center!important;">Feedback</button>
Expand Down
31 changes: 31 additions & 0 deletions src/styles/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,34 @@
to {left: -30px; opacity: 0;visibility: hidden;height:0%}
}


select.profile {
background-image: url(./images/SelectArrow.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
-webkit-appearance: button;
border-radius: 10px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
-webkit-padding-end: 20px;
-webkit-padding-start: 2px;
-webkit-user-select: none;
background-position: 97% center;
background-repeat: no-repeat;
border: 1px solid #AAA;
color: #555;
font-size: inherit;
margin: 20px;
overflow: hidden;
padding: 5px 10px;
text-overflow: ellipsis;
white-space: nowrap;
width: 80%;
left:10%;
cursor: pointer;
}

select.green {
background-image: url(./images/SelectArrow.png), -webkit-linear-gradient(#207978, #207978 40%, #207978);
color: #fff;
background-color: #207978;
padding-left: 10px;
}

5 changes: 5 additions & 0 deletions src/ui/ManagerSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ var ManagerSidebar = function(parentIn) {
jelem.find("#sidebarOpen")[0].style.display = "block";
}

this.showProfileSelect = function() {
jelem.find("#profileSelect")[0].style.display = "block";
}

this.setWidth = function(widthIn) {
sidebarEle.style.width = widthIn;
}
Expand Down Expand Up @@ -384,6 +388,7 @@ var ManagerSidebar = function(parentIn) {
});

addUICallback();

}

this.addManager = function(manager) {
Expand Down

0 comments on commit 3dc3d11

Please sign in to comment.