Permalink
Browse files

test

  • Loading branch information...
1 parent dd29cd7 commit a4db362a8ef88beb678e9474703223ecbb65ad9f @Evangenieur committed Dec 2, 2012
Showing with 23 additions and 7 deletions.
  1. +1 −1 package.json
  2. +16 −4 public/javascripts/hvidio.js
  3. +4 −0 public/stylesheets/style.css
  4. +1 −1 server.coffee
  5. +1 −1 views/index.jade
View
@@ -1,6 +1,6 @@
{
"name": "hvid.io",
- "version": "0.0.0-16",
+ "version": "0.0.0-18",
"description": "RealTime Video Search Twitter / Facebook / GooglePlus",
"main": "server.coffee",
"scripts": {
@@ -13,6 +13,17 @@
$header = $('#header'),
$clickjack = $('#clickjack');
+ var urlify = function (str) {
+ return str.replace(/\s/g, '_')
+ .replace(/:/g, '-')
+ .replace(/\\/g, '-')
+ .replace(/\//g, '-')
+ .replace(/[^a-zA-Z0-9\-_]+/g, '')
+ .replace(/-{2,}/g, '-')
+ .toLowerCase();
+ }
+
+
window.hvidio = {
init: function() {
@@ -37,6 +48,7 @@
// socket
socket = io.connect("http://"+window.location.host);
socket.on("connect", function() {
+ console.log("CONNECTED");
Search.com_init(socket);
});
@@ -180,7 +192,7 @@
console.log("PASSE PAR LA CALLBACK");
$main.addClass('large');
- hvidio.templatize('#videosTemplate', { videos: data }, '#results');
+ hvidio.templatize('#videosTemplate', { search: urlify(keyword), videos: data }, '#results');
hvidio.initScroll();
@@ -266,11 +278,11 @@
search.initiated = true;
scroll = false;
callback([this]);
- $list = $("#video-list")
} else {
var html = hvidio.templatize('#videoTemplate', { video: this });
//$list.append(html);
- $list.append(html);
+ var $mylist = $("#video-list-" + urlify(keyword));
+ $mylist.append(html);
$(html).fadeIn()
hvidio.initScroll();
}
@@ -363,7 +375,7 @@
} else {
embed += "&"
}
- embed += "wmode=transparent&autoplay=1"
+ embed += "wmode=transparent&autoplay=1&autohide=1"
$player.attr('src', embed);
@@ -266,9 +266,13 @@ p.tagline {
font-size: 10px;
}
#results .video .video-cell img.preview {
+ width: 217px;
+ height: 127px;
+ /*
min-width: 215px;
min-height: 122px;
max-height: 120px;
+ */
border: 1px solid gray;
box-shadow: 0px 5px 30px black;
}
View
@@ -6,7 +6,7 @@ require('zappajs') ->
@use "static", "favicon", require('less-middleware')({ src: __dirname + '/public' })
@set 'view engine': 'jade'
- @io.set 'log level', 1
+ @io.set 'log level', 2
@get "/": ->
@render "index"
View
@@ -33,7 +33,7 @@ block content
div#close
script#videosTemplate(type='text/template')
- | <ul id="video-list">
+ | <ul id="video-list-<%= search %>">
| <% _.each(videos, function(video) { %>
| <% include videoTemplate %>
| <% }) %>

0 comments on commit a4db362

Please sign in to comment.