Add "search as you type" to the HTTP interface.
[vlc.git] / share / http-lua / dialogs / playlist
1 <?vlc --[[
2 vim:syntax=html
3 <!--  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
4 <  playlist: VLC media player web interface - playlist dialog
5 < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
6 <  Copyright (C) 2005-2006 the VideoLAN team
7 <  $Id$
8
9 <  Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
10
11 <  This program is free software; you can redistribute it and/or modify
12 <  it under the terms of the GNU General Public License as published by
13 <  the Free Software Foundation; either version 2 of the License, or
14 <  (at your option) any later version.
15
16 <  This program is distributed in the hope that it will be useful,
17 <  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 <  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 <  GNU General Public License for more details.
20
21 <  You should have received a copy of the GNU General Public License
22 <  along with this program; if not, write to the Free Software
23 <  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
24 < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
25 This dialog needs the following dialogs to be fully functional: <none>
26 ]]?>
27
28 <div id="playlist" class="dialog" >
29   <div class="title">
30     Playlist
31     <img class="close" src="images/white_cross_small.png" alt="Close" onclick="hide('playlist');"/>
32   </div>
33   <div class="controls">
34     <table>
35       <tr>
36         <td>
37           <!--<button id="btn_delete" onmouseover="button_over(this);" onmouseout="button_out(this);">
38             <img src="images/delete.png" alt="Delete" />
39             <span class="btn_text">Delete</span>
40           </button>-->
41           <button id="btn_empty" onclick="pl_empty();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Empty" >
42             <img src="images/empty.png" alt="Empty" />
43             <span class="btn_text">Empty</span>
44           </button>
45           <button id="btn_shuffle" onclick="pl_shuffle();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Shuffle" >
46             <img src="images/shuffle.png" alt="Shuffle" />
47             <span class="btn_text">Shuffle</span>
48           </button>
49           <button id="btn_loop" onclick="pl_loop();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Loop" >
50             <img src="images/loop.png" alt="Loop" />
51             <span class="btn_text">Loop</span>
52           </button>
53           <button id="btn_repeat" onclick="pl_repeat();" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Repeat" >
54             <img src="images/repeat.png" alt="Repeat" />
55             <span class="btn_text">Repeat</span>
56           </button>
57         </td>
58         <td onmouseout="hide_menu('menu_sort');" onmouseover="show_menu('menu_sort');" >
59           <button id="btn_sort" title="Sort" >
60             <img src="images/sort.png" alt="Sort" />
61             <span class="btn_text">Sort</span>
62           </button>
63           <div id="menu_sort" class="menu" >
64             <button class="menuout" onclick="pl_sort('title',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Title ascending" >Title</button><br/>
65             <button class="menuout" onclick="pl_sort('title',1);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Title descending" >Title reverse</button><br/>
66             <button class="menuout" onclick="pl_sort('artist',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Artist ascending" >Artist</button><br/>
67             <button class="menuout" onclick="pl_sort('artist',1);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Artist ascending" >Artist reverse</button><br/>
68             <button class="menuout" onclick="pl_sort('album',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Album ascending" >Album</button><br/>
69             <button class="menuout" onclick="pl_sort('album',1);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Album ascending" >Album reverse</button><br/>
70             <button class="menuout" onclick="pl_sort('genre',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Genre ascending" >Genre</button><br/>
71             <button class="menuout" onclick="pl_sort('genre',1);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Genre ascending" >Genre reverse</button><br/>
72             <button class="menuout" onclick="pl_sort('random',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Randomize" >Random</button><br/>
73             <button class="menuout" onclick="pl_sort('id',0);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Id ascending" >Id</button><br/>
74             <button class="menuout" onclick="pl_sort('id',1);hide_menu('menu_sort');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" title="Sort by Id descending" >Id reverse</button><br/>
75           </div>
76         </td>
77         <td onmouseover="show_menu('menu_sd');" onmouseout="hide_menu('menu_sd');">
78           <button id="btn_sd" title="Services Discovery" >
79             <img src="images/sd.png" alt="Services Discovery" />
80             <span class="btn_text">Services Discovery</span>
81           </button>
82           <div id="menu_sd" class="menu" >
83           <?vlc
84             local sd = vlc.sd.get_services_names()
85             for n,ln in pairs(sd) do
86               print([[<button onclick="pl_sd(']]..n..[[');hide_menu('menu_sd');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" class="menuout" title="Toggle ]]..ln..[[" >]]..ln..[[</button><br/>]])
87             end
88           ?>
89           </div>
90         </td>
91         <td style='width: 30px'></td>
92         <td>
93           <span class="btn_text">Live search:</span>
94           <input title="Live search" type="text" value="<?vlc if _G.search_key then print(search_key) else print('<search>') end ?>" id="search" onfocus="if( this.value == '<search>' ) this.value = ''" onblur="if( this.value == '' ) reset_search()" onchange="update_playlist_search(this.value)" onkeyup="update_playlist_search(this.value)" />
95           <button id="btn_search_reset" onclick="reset_search()" onmouseover="button_over(this);" onmouseout="button_out(this);" title="Reset search">
96             <img src="images/reset.png" alt="Reset" />
97             <span class="btn_text">Reset</span>
98           </button>
99         </td>
100       </tr>
101     </table>
102   </div>
103   <div id="playtree">
104     (?)
105   </div>
106 </div>