Merge branch 'devel'

This commit is contained in:
Sebastien 2018-09-18 10:03:11 +03:00
commit a8973a85e7
3 changed files with 40 additions and 21 deletions

View File

@ -27,6 +27,7 @@ $(document).ready(function() {
btn_add = $('#add_btn');
switchAutoFlow = $("#autoflow");
$('.tooltipped').tooltip();
setInterval("getCurentMusic()", 1000);
$('#modalAdd').modal();
@ -398,12 +399,10 @@ function listeners() {
$('#input_link').on("input", function () {
if($('#input_link').val() == ""){
disableBtn($('#btn_add_bottom'));
disableBtn($('#btn_add_top'));
disableBtn($('#btn_add'));
}
else{
enableBtn($('#btn_add_bottom'));
enableBtn($('#btn_add_top'));
enableBtn($('#btn_add'));
}
});
@ -420,24 +419,13 @@ function listeners() {
sendCommand(command);
});
$('#btn_add_top').click(function () {
$('#btn_add').click(function () {
console.log(!$('#bottom').is(':checked'));
var command = {
command: "ADD",
url: $('#input_link').val(),
playlistLimit: $('#limit_range').val(),
onHead: true
};
$('#input_link').val('');
sendCommand(command);
});
$('#btn_add_bottom').click(function () {
var command = {
command: "ADD",
url: $('#input_link').val(),
playlistLimit: $('#limit_range').val(),
onHead: false
onHead: !$('#bottom').is(':checked')
};
$('#input_link').val('');
sendCommand(command);

View File

@ -40,6 +40,15 @@
</nav>
<ul id="nav-mobile" class="sidenav">
<li class="center">
<a class="brand-logo" href="/" style="font-weight: bold"><h3 class="blue-grey-text text-darken-4" style="font-weight: bold">Claptrap Bot</h3></a>
</li>
<li><div class="divider"></div></li>
<li class="center ">
<a class="nav-change-guild truncate waves-effect waves-light btn grey lighten-2 black-text " th:text="${guild_name}" style=""></a>
</li>
<li><div class="divider"></div></li>
<li class="center" th:classappend="(${page} == 'home')? 'active' : ''">
<a class="waves-effect waves-light sidenav-trigger" href="/" data-target="slide-out">Home</a>
</li>

View File

@ -88,7 +88,7 @@
<a class="waves-effect waves-light btn modal-trigger green darken-4" id="add_btn" href="#modalAdd"><i class="material-icons">add_circle_outline</i></a>
<!-- Modal Structure -->
<div id="modalAdd" class="modal disabled">
<div id="modalAdd" class="modal modal ">
<div class="modal-content" style="padding-bottom: 0px">
<div class="row" style="margin-bottom: 0px">
<h3 class="col l12 m12 s12"> Add Music</h3>
@ -105,18 +105,40 @@
Playlist Limit
</div>
</div>
<div class="row" style="margin-bottom: 0px">
<p class="range-field">
<input type="range" id="limit_range" min="1" max="300" step="1" value="30" />
</p>
</div>
<div class="row" style="margin-bottom: 0px">
<div class="col l12 m12 s12 center">
Add on
</div>
</div>
<div class="row">
<div class="col l4 offset-l4 m4 offset-m4 s4 offset-s4 left-align ">
<p>
<label>
<input name="group1" type="radio" checked="checked" id="bottom"/>
<span>Bottom</span>
</label>
</p>
<p>
<label>
<input name="group1" type="radio" />
<span>Top</span>
</label>
</p>
</div>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Cancel</a>
<a href="#!" id="btn_add_top" class="modal-action modal-close waves-effect waves-green btn-flat disabled">Add On Top</a>
<a href="#!" id="btn_add_bottom" class="modal-action modal-close waves-effect waves-green btn-flat disabled">Add On Bottom</a>
<a href="#!" id="btn_add" class="modal-action modal-close waves-effect waves-green btn-flat disabled">Add</a>
</div>
</div>
</div>