Commit 698eec4b authored by Antoine Cellerier's avatar Antoine Cellerier

HTTP interface playlist sort commands based on patch by Laurent Mutricy.

parent af404258
...@@ -38,12 +38,6 @@ This dialog needs the following dialogs to be fully functional: <none> ...@@ -38,12 +38,6 @@ This dialog needs the following dialogs to be fully functional: <none>
<img src="images/empty.png" alt="Empty" /> <img src="images/empty.png" alt="Empty" />
<span class="btn_text">Empty</span> <span class="btn_text">Empty</span>
</button> </button>
&nbsp;
<button id="btn_sort" onclick="pl_sort();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Sort" >
<img src="images/sort.png" alt="Sort" />
<span class="btn_text">Sort</span>
</button>
&nbsp;
<button id="btn_shuffle" onclick="pl_shuffle();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Shuffle" > <button id="btn_shuffle" onclick="pl_shuffle();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Shuffle" >
<img src="images/shuffle.png" alt="Shuffle" /> <img src="images/shuffle.png" alt="Shuffle" />
<span class="btn_text">Shuffle</span> <span class="btn_text">Shuffle</span>
...@@ -56,6 +50,20 @@ This dialog needs the following dialogs to be fully functional: <none> ...@@ -56,6 +50,20 @@ This dialog needs the following dialogs to be fully functional: <none>
<img src="images/repeat.png" alt="Repeat" /> <img src="images/repeat.png" alt="Repeat" />
<span class="btn_text">Repeat</span> <span class="btn_text">Repeat</span>
</button> </button>
<button id="btn_sort" onmouseover="show_menu('menu_sort');" onmouseout="hide_menu('menu_sort');" title="Sort" >
<img src="images/sort.png" alt="Sort" />
<span class="btn_text">Sort</span>
<div id="menu_sort" class="menu" >
<button onclick="pl_sort(1,0);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Name ascending" >Name</button><br/>
<button onclick="pl_sort(1,1);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Name descending" >Name reverse</button><br/>
<button onclick="pl_sort(3,0);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Author ascending" >Author</button><br/>
<button onclick="pl_sort(3,1);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Author ascending" >Author reverse</button><br/>
<button onclick="pl_sort(5,0);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Randomize" >Random</button><br/>
<button onclick="pl_sort(7,0);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Track number" >Track number</button><br/>
<button onclick="pl_sort(0,0);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Id ascending" >Id</button><br/>
<button onclick="pl_sort(0,1);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Id descending" >Id reverse</button><br/>
</div>
</button>
</div> </div>
<div id="playtree"> <div id="playtree">
(?) (?)
......
...@@ -228,6 +228,10 @@ function enable( id ){ document.getElementById( id ).disabled = false; } ...@@ -228,6 +228,10 @@ function enable( id ){ document.getElementById( id ).disabled = false; }
function button_over( element ){ element.style.border = "1px solid #000"; } function button_over( element ){ element.style.border = "1px solid #000"; }
function button_out( element ){ element.style.border = "1px solid #fff"; } function button_out( element ){ element.style.border = "1px solid #fff"; }
function button_out_menu( element ){ element.style.border = "1px solid transparent"; }
function show_menu( id ){ document.getElementById(id).style.display = 'block'; }
function hide_menu( id ){ document.getElementById(id).style.display = 'none'; }
/* toggle show help under the buttons */ /* toggle show help under the buttons */
function toggle_btn_text() function toggle_btn_text()
......
...@@ -187,3 +187,15 @@ div.controls button.off { ...@@ -187,3 +187,15 @@ div.controls button.off {
background-color: #fff; background-color: #fff;
} }
div.menu {
position: absolute;
border: 1px solid #ccc;
padding: 5px;
background: url('images/white.png') repeat;
display: none;
}
div.menu button {
background: transparent;
border: 1px solid transparent;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment