select all button

This commit is contained in:
Devin Howard 2017-03-01 21:38:06 -08:00
parent b8d99a2f9a
commit c4c5e1d0d8
3 changed files with 37 additions and 24 deletions

View file

@ -2311,6 +2311,9 @@ and it won't be important on password protected instances */
}
/* switch metacode set */
#switchMetacodes > p {
margin: 16px 0 16px 0;
}
#metacodeSwitchTabs {
width: 100%;
font-size: 17px;
@ -2318,28 +2321,36 @@ and it won't be important on password protected instances */
border: none;
background: none;
padding: 0;
}
#metacodeSwitchTabs .setDesc {
margin-bottom: 5px;
font-family: 'din-medium', helvetica, sans-serif;
color: #424242;
font-size: 14px;
text-align: justify;
padding-right: 16px;
}
#switchMetacodes > p {
margin: 16px 0 16px 0;
}
#metacodeSwitchTabs > ul {
width: 130px;
}
#metacodeSwitchTabs > ul li {
font-size: 14px;
text-transform: uppercase;
}
#metacodeSwitchTabs li.ui-state-active a {
color: #00BCD4;
cursor: pointer;
.setDesc,
.selectAll {
margin-bottom: 5px;
font-family: 'din-medium', helvetica, sans-serif;
color: #424242;
font-size: 14px;
text-align: justify;
padding-right: 16px;
display: inline-block;
}
.selectAll {
float: right;
cursor: pointer;
}
& > ul {
width: 130px;
li {
font-size: 14px;
text-transform: uppercase;
}
}
li.ui-state-active a {
color: #00BCD4;
cursor: pointer;
}
}
.metacodeSwitchTab {
max-height: 300px;

View file

@ -91,7 +91,8 @@
</div>
<% end %>
<div id="metacodeSwitchTabsCustom">
<p class="setDesc">Choose Your Metacodes</p>
<div class="setDesc">Choose Your Metacodes</div>
<div class="selectAll">Select all</div> <%# hidden by default %>
<% @list = '' %>
<% metacodesInUse = user_metacodes() %>
<% Metacode.order("name").all.each_with_index do |m, index| %>

View file

@ -28,6 +28,7 @@ const Create = {
}).addClass('ui-tabs-vertical ui-helper-clearfix')
$('#metacodeSwitchTabs .ui-tabs-nav li').removeClass('ui-corner-top').addClass('ui-corner-left')
$('.customMetacodeList li').click(self.toggleMetacodeSelected) // within the custom metacode set tab
$('.selectAll').click(self.metacodeSelectorToggleSelectAll)
},
toggleMetacodeSelected: function() {
var self = Create