]> git.sesse.net Git - vlc/blob - share/lua/http/dialogs/browse_window.html
luahttp: fix document parsing with inline javascript
[vlc] / share / lua / http / dialogs / browse_window.html
1 <script language="javascript" type="text/javascript">
2 //<![CDATA[
3         var browse_target               =       'default';
4         $(function(){
5                 $('#window_browse').dialog({
6                         autoOpen: false,
7                         width: 600,
8                         height: 650,
9                         modal: true,
10                         resizable: false,
11                         buttons: {
12                                 "Open":function(){
13                                         $('li.ui-selected','#browse_elements').each(function(){
14                                                 $(this).dblclick();
15                                         });
16                                 },
17                                 "Enqueue": function() {
18                                         $('li.ui-selected','#browse_elements').each(function(){
19                                                 var path        =       this.getAttribute('opendir') ? this.getAttribute('opendir') : this.getAttribute('openfile');
20                                                 switch(browse_target){
21                                                         default:
22                                                                 sendCommand('command=in_enqueue&input='+encodeURI(path));
23                                                                 break;
24                                                 }
25                                         });
26                                         $(this).dialog("close");
27                                 },
28                                 "Cancel" : function(){
29                                         $(this).dialog("close")
30                                 }
31                         }
32                 });
33         });
34 //]]>
35 </script>
36
37 <div id="window_browse" title="Media Browser">
38         <div style="height:500px;overflow: scroll;">
39                 <ol id='browse_elements' selectable="selectable">
40                         <li>Play List</li>
41                 </ol>
42         </div>
43 </div>