]> git.0d.be Git - panikweb.git/commitdiff
add stop button to playing podcast
authorFrédéric Péters <fpeters@0d.be>
Sun, 6 Aug 2017 07:18:09 +0000 (09:18 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sun, 6 Aug 2017 07:18:09 +0000 (09:18 +0200)
panikweb_templates/static/css/_specifics.scss
panikweb_templates/static/js/audioPlayer.js

index 5703d3ea629813ac0734a5c93ba29be17e5b0917..c9b627bd0c0101515f8a3fa177b629422c4d89f4 100644 (file)
@@ -591,7 +591,6 @@ h1.top#frequence {
 }
 
 #player-container #myPlaylist a {
-       margin-right: 30px;
        white-space: normal;
 }
 
@@ -653,14 +652,16 @@ h1.top#frequence {
        margin:0;
 }
 #Playlist ol li .soundControls{
-       line-height:1.5em;
-       height:1.5em;
-       clear:right;
-       float:right;
+       margin-left: 1ex;
+       position: relative;
+       top: -0.5ex;
+       visibility: hidden;
+}
+#Playlist ol li.active .soundControls {
+       visibility: visible;
 }
 #Playlist ol li .title{
-       margin-right:70px;
-       display:block;
+       display:inline-block;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
@@ -2305,3 +2306,7 @@ div#Playlist {
        text-align: right;
        padding: 1ex;
 }
+
+button.no-icon-remove::after {
+       content: "\0025fc";
+}
index f01358f9bd4057fb6a257f30b69547018edb8559..f02a81f2e6476fe13d3ab8f6fec650395c85d74c 100644 (file)
                        var html5 = $('<button>',{title:"Display HTML5 audio",'class':'icon-html5',click:function(){
                                audio.toggle();
                        }}).hide();
-                       var remove = $('<button>',{title:"Remove from list",'class':'icon-remove',click:function(){
+                       var remove = $('<button>',{title:"Remove from list",'class':'no-icon-remove',click:function(){
                                container.remove();
                                thePlaylist._update();
                        }});
                                        audio.trigger('beforePlay').trigger('play');
                                }
                        }});
+                       controls.append(remove);
                        var title = $('<a>',{href:sound.url,'class':"button title",html:sound.title});
-                       container.append(title).append(audio);
+                       container.append(title).append(controls).append(audio);
                        if(sound.focus){thePlaylist.setFocus(container);}
                        return container;
                },