Permalink
Browse files

share url for single video in modal

  • Loading branch information...
1 parent e204ac8 commit f5b0ff3fc439ca2acb4f21f56cb0ef49a70c6392 @cjstewart88 committed Apr 12, 2012
Showing with 11 additions and 1 deletion.
  1. +4 −1 app/assets/javascripts/main.js
  2. +6 −0 app/assets/stylesheets/main.css
  3. +1 −0 app/views/index.html.erb
View
5 app/assets/javascripts/main.js
@@ -567,6 +567,7 @@ function share_single (video_id, video_title) {
$('#share-video div.facebook').data('video-title', video_title);
$('#share-video div.twitter').data('video-id', video_id);
$('#share-video div.twitter').data('video-title', video_title);
+ $('.url').val('http://www.tubalr.com/video/' + video_id);
}
function create_new_playlist (new_playlist_name) {
@@ -749,7 +750,7 @@ $(document).ready(function () {
autoOpen: false,
width: 200,
draggable: false,
- height: 128,
+ height: 158,
title: "Share Video"
});
@@ -820,6 +821,8 @@ $(document).ready(function () {
similarTo($('#q').val());
});
+ $('.url').click(function () { $(this).select(); });
+
$('input#q').keypress(function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13) { //Enter keycode
View
6 app/assets/stylesheets/main.css
@@ -304,6 +304,12 @@ nav a {
background: #4099FF;
}
+#share-video .url {
+ width: 150px;
+ margin: 0 auto;
+ display: block;
+}
+
#player {
width: 500px;
padding-bottom: 3px;
View
1 app/views/index.html.erb
@@ -41,6 +41,7 @@
<div id="share-video">
<div class='facebook'>share on facebook</div>
<div class='twitter'>tweet on twitter</div>
+ <input type='text' class='url' readonly></div>
</div>
<aside id="info"></aside>

0 comments on commit f5b0ff3

Please sign in to comment.