Commits

roma milushov committed 6f8e0cc

slider

  • Participants
  • Parent commits 815502c

Comments (0)

Files changed (6)

File app/assets/javascripts/backbone/templates/users/show_me.jst.hamlc

       %img{src: "#{@user.photo_big}"}
 #center_block.fl_l
   #name
-    %a#vk.fl_l{href: "http://vk.com/#{@user.screen_name}", data: {type: 'ext'}}
+    %a#vk.fl_l{href: "http://vk.com/#{@user.screen_name}", target: 'blank', data: {type: 'ext'}}
       %img{src: '/assets/vk.png'}
     %h2.fl_l
       = "#{@user.first_name} #{@user.last_name}"

File app/assets/javascripts/common.js.coffee

     delay:
       show: 420, hide: 100
 
+  $('.navbar.navbar-fixed-top').hover () ->
+    $('#slider').show()
+  , () -> setTimeout ( -> $('#slider').hide() ), 3000
+
+  $('#slider').draggable(
+    drag: (event, ui) -> 
+      cur = ui.position.left
+      all = $('#progress_line').width()
+      proc = cur/all*100
+      l all, cur
+      $('#play').width "#{proc}%"
+    ,
+    stop: (event, ui) -> 
+      cur = ui.originalPosition.left
+      all = $('#progress_line').width()
+      # App.player.asldkfjlasd
+    , axis: 'x'
+  )
+
 window.l = (a, b)->
   if not a or arguments.length == 0 then return 'not arguments'
   if arguments.length > 2

File app/assets/stylesheets/player.css.scss

 
 #progress_line {
   //overflow: hidden;
-  width: 100%; height: 30px;
-  background-color: #fafafa;
+  width: 100%; //height: 30px;
+  //background-color: #fafafa;
+  //margin-top:5px;
+  position: relative;
   
   #load {
     position: absolute;
   }
 
   #slider {
-    //position: absolute;
+    display: none;
+    position: absolute;
     overflow: hidden;
     width: 40px; height: 20px;
     background: url(/assets/player_ui/slider.png) 0 -10px no-repeat;
     margin: -5px -20px 0 -14px;
-    cursor: pointer
+    cursor: pointer;
+    z-index: 3;
+    left: 111px;
     }
 
   #slider:hover {
   #play_btn {
     background-position: 0px 0px;
     height: 23px;
+    margin-left: 12px;
   }
 
   #prev_btn {

File app/views/layouts/application.html.haml

   %body
     = yield
     :plain
-      <!-- Yandex.Metrika counter --><script type="text/javascript">(function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter13060828 = new Ya.Metrika({id:13060828, trackLinks:true, accurateTrackBounce:true}); } catch(e) {} }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script><noscript><div><img src="//mc.yandex.ru/watch/13060828" style="position:absolute; left:-9999px;" alt="" /></div></noscript><!-- /Yandex.Metrika counter -->
+      <script type="text/javascript">(function (d, w, c) { (w[c] = w[c] || []).push(function() { try { w.yaCounter13060828 = new Ya.Metrika({id:13060828, trackLinks:true, accurateTrackBounce:true}); } catch(e) {} }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script><noscript><div><img src="//mc.yandex.ru/watch/13060828" style="position:absolute; left:-9999px;" alt="" /></div></noscript>

File app/views/main/index.html.haml

             %a{href: "/popular"} Популярные
           %li
             #player_ui
-              %a#play_btn
               %a#prev_btn
+              %a#play_btn
               %a#next_btn
               %a#repeat_btn
               #track_info
                   %a{href: '/logout', data: {type: 'ext'} } Выход
             
       / /.nav-collapse
-  #progress_line{style:'margin-top:10px;'}
+  #progress_line
+    #slider.ui-draggable
     #load
     #play
-    #slider.ui-draggable
+    
 
 #app.container
   %center

File app/views/main/start.html.haml

   %center
     %a{href:'http://vk.com/milushov', data: {type: 'ext'} }сделано
     с 
-    %span{style: 'color:#EF0063; cursor: pointer;', rel: 'tooltip', title: 'с любовью же, к хорошей музыке'}
+    %span{style: 'color:#EF0063; cursor: pointer;', rel: 'tooltip', title: 'с любовью же, к хорошей музыке'}