diff --git a/lib/js/neompc.js b/lib/js/neompc.js index f55cbc7..bb4c924 100644 --- a/lib/js/neompc.js +++ b/lib/js/neompc.js @@ -109,15 +109,19 @@ $(document).ready(function(){ $('#volume_slider').draggable({ axis: 'y', - containment: 'parent', - opacity: 0.5, + containment: $('#slider_container'), start: function() { this.rel = '1'; + vol_int = setInterval('ajax_control(\'volume\', new_volume);', 250); + }, + drag: function() { + new_volume = pos_to_volume(parseInt($('#volume_slider').css('top'))); + //ajax_control('volume', new_volume); }, stop: function() { - pos = parseInt($('#volume_slider').css('top')); - ajax_control('volume', pos_to_volume(pos)); - this.rel = ''; + clearInterval(vol_int); + ajax_control('volume', new_volume); + setTimeout('$(\'#volume_slider\').attr(\'rel\', \'\');', 1000); } }); diff --git a/smarty/templates_c/%%FD^FD6^FD689738%%neompc.js.php b/smarty/templates_c/%%FD^FD6^FD689738%%neompc.js.php index e4d7540..743a9b8 100644 --- a/smarty/templates_c/%%FD^FD6^FD689738%%neompc.js.php +++ b/smarty/templates_c/%%FD^FD6^FD689738%%neompc.js.php @@ -1,4 +1,4 @@ - progressbar_width = _tpl_vars['progressbar_width']; ?> ; @@ -116,15 +116,19 @@ $(document).ready(function(){ $('#volume_slider').draggable({ axis: 'y', - containment: 'parent', - opacity: 0.5, + containment: $('#slider_container'), start: function() { this.rel = '1'; + vol_int = setInterval('ajax_control(\'volume\', new_volume);', 250); + }, + drag: function() { + new_volume = pos_to_volume(parseInt($('#volume_slider').css('top'))); + //ajax_control('volume', new_volume); }, stop: function() { - pos = parseInt($('#volume_slider').css('top')); - ajax_control('volume', pos_to_volume(pos)); - this.rel = ''; + clearInterval(vol_int); + ajax_control('volume', new_volume); + setTimeout('$(\'#volume_slider\').attr(\'rel\', \'\');', 1000); } }); diff --git a/templates/default/control.html b/templates/default/control.html index 5734e42..11f26ce 100644 --- a/templates/default/control.html +++ b/templates/default/control.html @@ -39,8 +39,8 @@
diff --git a/templates/default/styles.css b/templates/default/styles.css index 5202bf5..6ceed1f 100644 --- a/templates/default/styles.css +++ b/templates/default/styles.css @@ -230,27 +230,29 @@ img.button { background: url(templates/{:$template:}/images/volume_container.png) center center no-repeat; height: 160px; width: 30px; -} -#volume_container #slider_container { - position: absolute; - top: 5px; - height: 130px; - width: 28px; -} -#volume_container a#volume_hide { - position: absolute; - top: 140px; - left: 0px; - width: 30px; - height: 20px; -} -#volume_container #volume_slider { - background: url(templates/{:$template:}/images/volume_slider.png) center center no-repeat; - position: absolute; - top: 5px; - left: 5px; - width: 20px; - height: 30px; +} +#volume_container #slider_container { + position: absolute; + padding: 0; + margin: 0; + top: 5px; + height: 130px; + width: 28px; +} +#volume_container a#volume_hide { + position: absolute; + top: 140px; + left: 0px; + width: 30px; + height: 20px; +} +#volume_container #volume_slider { + background: url(templates/{:$template:}/images/volume_slider.png) center center no-repeat; + position: absolute; + top: 5px; + left: 5px; + width: 20px; + height: 30px; } #crumb_trail ul {