# HG changeset patch # User veltr # Date 1354213690 -3600 # Node ID e36c35fb44682a370fc65adefb01302c1de7a4d6 # Parent 393e595cd1acdc61811195e22282056295cdcf90 Corrected some bugs diff -r 393e595cd1ac -r e36c35fb4468 integration/js/compile.bat --- a/integration/js/compile.bat Thu Nov 29 17:54:48 2012 +0100 +++ b/integration/js/compile.bat Thu Nov 29 19:28:10 2012 +0100 @@ -6,4 +6,6 @@ FOR %%f IN (%jsfiles%) DO (type %%f.js >> hashcut.js) +copy hashcut.js ..\..\src\hashcut\static\hashcut\js + echo Hashcut.js compiled successfully! diff -r 393e595cd1ac -r e36c35fb4468 integration/js/compile.sh --- a/integration/js/compile.sh Thu Nov 29 17:54:48 2012 +0100 +++ b/integration/js/compile.sh Thu Nov 29 19:28:10 2012 +0100 @@ -8,3 +8,5 @@ do cat $jsfile.js >> hashcut.js done + +cp hashcut.js ../../src/hashcut/static/hashcut/js diff -r 393e595cd1ac -r e36c35fb4468 integration/js/mashupplayer.js --- a/integration/js/mashupplayer.js Thu Nov 29 17:54:48 2012 +0100 +++ b/integration/js/mashupplayer.js Thu Nov 29 19:28:10 2012 +0100 @@ -20,8 +20,6 @@ IriSP.mashupcore(project, mashup); project.trigger("set-current",mashup); - $(".info-title a").text(mashup.title); - $(".title-video-wrap .title-video").text(mashup.title); $(".info-duration td").text(mashup.duration.toString()); $(".info-author a").text(mashup.creator); $(".info-description td").text(mashup.description); diff -r 393e595cd1ac -r e36c35fb4468 integration/js/mediaplayer.js --- a/integration/js/mediaplayer.js Thu Nov 29 17:54:48 2012 +0100 +++ b/integration/js/mediaplayer.js Thu Nov 29 19:28:10 2012 +0100 @@ -125,8 +125,6 @@ content.trigger("set-current", media); - $(".info-title a").text(media.title); - $(".title-video-wrap .title-video").text(media.title); $(".info-duration td").text(media.duration.toString()); $(".info-description td").text(media.description); $(".info-tags td").text(media.keywords); diff -r 393e595cd1ac -r e36c35fb4468 integration/js/social.js --- a/integration/js/social.js Thu Nov 29 17:54:48 2012 +0100 +++ b/integration/js/social.js Thu Nov 29 19:28:10 2012 +0100 @@ -1,15 +1,21 @@ -IriSP.social = function(sel, url) { +IriSP.social = function(opts) { + + var opts = opts || {}; + opts.sel = opts.sel || $(".Ldt-Social"); + opts.url = opts.url || document.location.href; - var sel = sel || $(".Ldt-Social"), - url = url || document.location.href, - text = sel.find("title").text(), + if (opts.swf) { + ZeroClipboard.setMoviePath(opts.swf); + } + + var text = opts.sel.find("title").text(), clipId = IriSP.Model.getUID(), clip; - sel.find(".Ldt-Social-CopyBtn").attr("id", this.clipId); + opts.sel.find(".Ldt-Social-CopyBtn").attr("id", clipId); - sel.find(".Ldt-Social-Url").click(function() { - var _pop = sel.find(".Ldt-Social-UrlPop"); + opts.sel.find(".Ldt-Social-Url").click(function() { + var _pop = opts.sel.find(".Ldt-Social-UrlPop"); _pop.toggle(); if (_pop.is(":visible")) { if (typeof clip == "undefined") { @@ -23,28 +29,28 @@ }); } clip.show(); - clip.setText( url ); - sel.find(".Ldt-Social-Input").val(url).focus(); + clip.setText( opts.url ); + opts.sel.find(".Ldt-Social-Input").val(opts.url).focus(); } else { clip.hide(); } return false; }); - sel.find(".Ldt-Social-Input").focus(function() { + opts.sel.find(".Ldt-Social-Input").focus(function() { this.select(); }); - sel.find(".Ldt-Social-Ext").click(function() { + opts.sel.find(".Ldt-Social-Ext").click(function() { window.open( - sel.find(this).attr("href"), + opts.sel.find(this).attr("href"), "_blank", "height=300,width=450,left=100,top=100,toolbar=0,menubar=0,status=0,location=0"); return false; }); - sel.find(".Ldt-Social-Fb").attr("href", "http://www.facebook.com/share.php?" + $.param({ u: url, t: text })); - sel.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + $.param({ url: url, text: text })); - sel.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + $.param({ url: url, title: text })); - sel.find(".Ldt-Social-Mail").attr("href", "mailto:?" + $.param({ subject: text, body: text + ": " + url })); + opts.sel.find(".Ldt-Social-Fb").attr("href", "http://www.facebook.com/share.php?" + $.param({ u: opts.url, t: text })); + opts.sel.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + $.param({ url: opts.url, text: text })); + opts.sel.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + $.param({ url: opts.url, title: text })); + opts.sel.find(".Ldt-Social-Mail").attr("href", "mailto:?" + $.param({ subject: text, body: text + ": " + opts.url })); } /* END social.js */ diff -r 393e595cd1ac -r e36c35fb4468 src/hashcut/static/hashcut/js/hashcut.js --- a/src/hashcut/static/hashcut/js/hashcut.js Thu Nov 29 17:54:48 2012 +0100 +++ b/src/hashcut/static/hashcut/js/hashcut.js Thu Nov 29 19:28:10 2012 +0100 @@ -3151,8 +3151,6 @@ IriSP.mashupcore(project, mashup); project.trigger("set-current",mashup); - $(".info-title a").text(mashup.title); - $(".title-video-wrap .title-video").text(mashup.title); $(".info-duration td").text(mashup.duration.toString()); $(".info-author a").text(mashup.creator); $(".info-description td").text(mashup.description); @@ -3357,8 +3355,6 @@ content.trigger("set-current", media); - $(".info-title a").text(media.title); - $(".title-video-wrap .title-video").text(media.title); $(".info-duration td").text(media.duration.toString()); $(".info-description td").text(media.description); $(".info-tags td").text(media.keywords); @@ -3389,18 +3385,24 @@ /* END mediaplayer.js */ -IriSP.social = function(sel, url) { +IriSP.social = function(opts) { + + var opts = opts || {}; + opts.sel = opts.sel || $(".Ldt-Social"); + opts.url = opts.url || document.location.href; - var sel = sel || $(".Ldt-Social"), - url = url || document.location.href, - text = sel.find("title").text(), + if (opts.swf) { + ZeroClipboard.setMoviePath(opts.swf); + } + + var text = opts.sel.find("title").text(), clipId = IriSP.Model.getUID(), clip; - sel.find(".Ldt-Social-CopyBtn").attr("id", this.clipId); + opts.sel.find(".Ldt-Social-CopyBtn").attr("id", clipId); - sel.find(".Ldt-Social-Url").click(function() { - var _pop = sel.find(".Ldt-Social-UrlPop"); + opts.sel.find(".Ldt-Social-Url").click(function() { + var _pop = opts.sel.find(".Ldt-Social-UrlPop"); _pop.toggle(); if (_pop.is(":visible")) { if (typeof clip == "undefined") { @@ -3414,28 +3416,28 @@ }); } clip.show(); - clip.setText( url ); - sel.find(".Ldt-Social-Input").val(url).focus(); + clip.setText( opts.url ); + opts.sel.find(".Ldt-Social-Input").val(opts.url).focus(); } else { clip.hide(); } return false; }); - sel.find(".Ldt-Social-Input").focus(function() { + opts.sel.find(".Ldt-Social-Input").focus(function() { this.select(); }); - sel.find(".Ldt-Social-Ext").click(function() { + opts.sel.find(".Ldt-Social-Ext").click(function() { window.open( - sel.find(this).attr("href"), + opts.sel.find(this).attr("href"), "_blank", "height=300,width=450,left=100,top=100,toolbar=0,menubar=0,status=0,location=0"); return false; }); - sel.find(".Ldt-Social-Fb").attr("href", "http://www.facebook.com/share.php?" + $.param({ u: url, t: text })); - sel.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + $.param({ url: url, text: text })); - sel.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + $.param({ url: url, title: text })); - sel.find(".Ldt-Social-Mail").attr("href", "mailto:?" + $.param({ subject: text, body: text + ": " + url })); + opts.sel.find(".Ldt-Social-Fb").attr("href", "http://www.facebook.com/share.php?" + $.param({ u: opts.url, t: text })); + opts.sel.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + $.param({ url: opts.url, text: text })); + opts.sel.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + $.param({ url: opts.url, title: text })); + opts.sel.find(".Ldt-Social-Mail").attr("href", "mailto:?" + $.param({ subject: text, body: text + ": " + opts.url })); } /* END social.js */ diff -r 393e595cd1ac -r e36c35fb4468 src/hashcut/templates/bpi_mashup_content.html --- a/src/hashcut/templates/bpi_mashup_content.html Thu Nov 29 17:54:48 2012 +0100 +++ b/src/hashcut/templates/bpi_mashup_content.html Thu Nov 29 19:28:10 2012 +0100 @@ -1,10 +1,44 @@ -{% extends "bpi_mashup_edit.html" %} +{% extends "bpi_mashup_home.html" %} {% load static %} {% load i18n %} {% load analytics %} {% load thumbnail %} - {% block title %}Hashcut Media - BPI{% endblock %} + {% block title %}Lecture de la Vidéo '{{content.title}}'{% endblock %} + {% block css_page %} + + {% endblock %} +{% block wrap_header %} +
+
+ {% include 'partial/bpi_mashup_popin_user.html' %} + {% include 'partial/bpi_hashcut_logo.html' %} +
+
+
+ + + +
Copier
+
+
+ + + + +
+

Media » {{content.title}}

+
+ +
+
+{% endblock %} {% block content %}
@@ -37,7 +71,7 @@
00:00
/
-
1:03:30
+
00:00
@@ -59,7 +93,7 @@ Titre : - Titre du Média + {{content.title}} Durée : @@ -112,7 +146,9 @@ IriSP.mediaplayer({ id: "{{ctt_id}}" }); - IriSP.social(); + IriSP.social({ + swf: "{% static 'hashcut/lib/ZeroClipboard.swf' %}" + }); }); {% endblock %} diff -r 393e595cd1ac -r e36c35fb4468 src/hashcut/templates/bpi_mashup_edit.html --- a/src/hashcut/templates/bpi_mashup_edit.html Thu Nov 29 17:54:48 2012 +0100 +++ b/src/hashcut/templates/bpi_mashup_edit.html Thu Nov 29 19:28:10 2012 +0100 @@ -3,9 +3,8 @@ {% load i18n %} {% load analytics %} {% load thumbnail %} - {% block title %}Hashcut Edition - BPI{% endblock %} - {% block css_import %} - {{ block.super }} + {% block title %}Création de Hashcut{% endblock %} + {% block css_page %} {% endblock %} diff -r 393e595cd1ac -r e36c35fb4468 src/hashcut/templates/bpi_mashup_hashcut.html --- a/src/hashcut/templates/bpi_mashup_hashcut.html Thu Nov 29 17:54:48 2012 +0100 +++ b/src/hashcut/templates/bpi_mashup_hashcut.html Thu Nov 29 19:28:10 2012 +0100 @@ -3,9 +3,8 @@ {% load i18n %} {% load analytics %} {% load thumbnail %} - {% block title %}Hashcut Playing - BPI{% endblock %} - {% block css_import %} - {{ block.super }} + {% block title %}Lecture du Hashcut '{{proj.title}}'{% endblock %} + {% block css_page %} {% endblock %} @@ -28,7 +27,7 @@
-

Hashcut sans titre

+

Hashcut » {{proj.title}}