]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/static/js/specifics.js
misc: cleanup section name stuff
[panikweb.git] / panikweb_templates / static / js / specifics.js
index 0076cf3db75416ae26e34b4058673cbe1e7de1cd..32a7f17199546dbbeabee8b60e315db5a51068d3 100644 (file)
@@ -61,18 +61,6 @@ $(function() {
                var newTitle = html?html.match(/<title>(.*?)<\/title>/):'';
                if(newTitle){document.title = newTitle[1].trim().decodeHTML();}
 
-               /*
-               Quite UGLY but needed for styling the whole body with ID
-               Feel free to correct and find a better way
-               According to this link the probles is that $(html).filter('body').Attr('id') will not work!
-               http://www.devnetwork.net/viewtopic.php?f=13&t=117065
-               */
-               if(sectionName = $(html).find('[data-section]').attr('data-section')){
-                       $('body').attr('id',sectionName);
-               }else{
-                       var bodyID = html.match(/<body id="(.*?)">/);   
-                       if(bodyID){$('body').attr('id',bodyID[1].trim());}      
-               }
                $.scrollTo('#Changing',1000,{offset:-$('#metaNav').height()+2});
                init();
 
@@ -158,7 +146,6 @@ $(function() {
        /****************************************************/
 
        var timer = null;
-       var refresh_onair_interval = 25000;
        var ticker_interval = null;
        $('#WhatsOnAir').on('load',function(){
                var WhatsOnAir = $(this);
@@ -206,6 +193,8 @@ $(function() {
                });
        });
         $('#WhatsOnAir').trigger('load');
+       var refresh_onair_interval = 25000;
+       setInterval("$('#WhatsOnAir').trigger('load');", refresh_onair_interval);
        $("#DirectStreamPanikControler").on('click',function(e) {
                e.preventDefault();
                var stream = $('#DirectStreamPanik').get(0);
@@ -309,7 +298,7 @@ $(function() {
                        activeTab.trigger('load');
                });
                $('[data-player-action]').on('click',function(){
-                       var audio = $('#'+$(this).attr('data-player-audio'));
+                       var audio = $('audio[data-sound-id=' + $(this).attr('data-sound-id') + ']');
                        var sound_id = audio.data('sound-id');
                        if($(this).attr('data-player-action') == "registerAudio"){
                                $localList.playlist("registerAudio",audio);
@@ -335,7 +324,7 @@ $(function() {
                        }
                });
                $('[data-player-control]').each(function(){
-                       var audio = $('#'+$(this).attr('data-player-audio'));
+                       var audio = $('audio[data-sound-id=' + $(this).attr('data-sound-id') + ']');
                        $localList.playlist("bindControl",$(this).attr('data-player-control'),audio,$(this));
                });