]> git.sesse.net Git - vlc/commitdiff
HTTP interface playlist sort commands based on patch by Laurent Mutricy.
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 17 Mar 2006 22:01:13 +0000 (22:01 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 17 Mar 2006 22:01:13 +0000 (22:01 +0000)
share/http/dialogs/playlist
share/http/images/white.png [new file with mode: 0644]
share/http/js/functions.js
share/http/style.css

index 95644c284270d0e8863bfb680e74be40d62223c8..1113e2b5bbc869f571603dbf87f7e1e361d8cc61 100644 (file)
@@ -38,12 +38,6 @@ This dialog needs the following dialogs to be fully functional: <none>
       <img src="images/empty.png" alt="Empty" />
       <span class="btn_text">Empty</span>
     </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" >
       <img src="images/shuffle.png" alt="Shuffle" />
       <span class="btn_text">Shuffle</span>
@@ -56,6 +50,20 @@ This dialog needs the following dialogs to be fully functional: <none>
       <img src="images/repeat.png" alt="Repeat" />
       <span class="btn_text">Repeat</span>
     </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 id="playtree">
     (?)
diff --git a/share/http/images/white.png b/share/http/images/white.png
new file mode 100644 (file)
index 0000000..3d3841b
Binary files /dev/null and b/share/http/images/white.png differ
index 94bada86d8b6f9a2c969e5c41ebb6c7a8a7c4038..0e3d06c1964cd280ea29b2896742eb0567e7d627 100644 (file)
@@ -228,6 +228,10 @@ function enable( id ){ document.getElementById( id ).disabled = false; }
 function button_over( element ){ element.style.border = "1px solid #000"; }
 
 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 */
 function toggle_btn_text()
index 6699191b63fec5f50841fabffce7ba765b39d618..c080c30ab31d51a598588415a643de6b595ca8fb 100644 (file)
@@ -187,3 +187,15 @@ div.controls button.off {
        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;
+}