# HG changeset patch # User rougeronj # Date 1349885260 -7200 # Node ID 7f237270b61cacf04e8852aa8268827780ae5d68 # Parent e5b5e9d56eece63b6e22d2c77aacb2238f5fb985# Parent b38c88bdefa2b95fd3817872131694960f5468a0 Merge with b38c88bdefa2b95fd3817872131694960f5468a0 diff -r b38c88bdefa2 -r 7f237270b61c .settings/org.eclipse.core.resources.prefs --- a/.settings/org.eclipse.core.resources.prefs Wed Oct 10 18:00:00 2012 +0200 +++ b/.settings/org.eclipse.core.resources.prefs Wed Oct 10 18:07:40 2012 +0200 @@ -1,43 +1,43 @@ -#Fri Sep 28 10:36:06 CEST 2012 -eclipse.preferences.version=1 -encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8 -encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8 -encoding//src/ldt/ldt/indexation/highlighter.py=utf-8 -encoding//src/ldt/ldt/indexation/models.py=utf-8 -encoding//src/ldt/ldt/indexation/query_parser.py=utf-8 -encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8 -encoding//src/ldt/ldt/indexation/tests.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8 -encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8 -encoding//src/ldt/ldt/management/utils.py=utf-8 -encoding//src/ldt/ldt/test/test_runner.py=utf-8 -encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8 -encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8 -encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8 -encoding//virtualenv/web/env/venv_platform/lib/python2.7/site-packages/haystack/backends/__init__.py=utf-8 -encoding//web/ldtplatform/config.py=utf-8 -encoding//web/ldtplatform/settings.py=utf-8 +eclipse.preferences.version=1 +encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8 +encoding//src/ldt/ldt/indexation/backends/elasticsearch_backend.py=utf-8 +encoding//src/ldt/ldt/indexation/highlighter.py=utf-8 +encoding//src/ldt/ldt/indexation/models.py=utf-8 +encoding//src/ldt/ldt/indexation/query_parser.py=utf-8 +encoding//src/ldt/ldt/indexation/search_indexes.py=utf-8 +encoding//src/ldt/ldt/indexation/tests.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0006_auto__add_field_media_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0008_auto__add_field_project_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0012_auto__add_field_content_last_annotated.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0013_auto__add_field_content_front_project__chg_field_content_last_annotate.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0014_auto__del_annotationstat__chg_field_content_last_annotated.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0015_auto__add_contentstat__del_field_content_last_annotated__del_field_con.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0016_one_to_one_stat_annotation.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0017_correct_image_path.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0018_auto__chg_field_content_iri_id__chg_field_project_ldt_id__chg_field_au.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0019_recalculate_media_hash_src.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0020_auto__add_field_segment_id_hash__chg_field_segment_iri_id__chg_field_s.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0021_recalculate_segment_id_hash_script.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0022_auto__add_unique_media_src_hash__chg_field_segment_cutting_id__chg_fie.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/migrations/0023_auto__add_field_segment_audio_src__add_field_segment_audio_href.py=utf-8 +encoding//src/ldt/ldt/ldt_utils/views/json.py=utf-8 +encoding//src/ldt/ldt/management/utils.py=utf-8 +encoding//src/ldt/ldt/test/test_runner.py=utf-8 +encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8 +encoding//src/ldt/ldt/user/migrations/0008_auto__chg_field_groupprofile_image__chg_field_groupprofile_group__chg_.py=utf-8 +encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8 +encoding//virtualenv/web/env/venv_platform/lib/python2.7/site-packages/haystack/backends/__init__.py=utf-8 +encoding//web/ldtplatform/config.py=utf-8 +encoding//web/ldtplatform/settings.py=utf-8 +encoding/=UTF-8 diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Wed Oct 10 18:00:00 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Wed Oct 10 18:07:40 2012 +0200 @@ -1,4 +1,5 @@ {% load i18n %} +{% load set_var %} {% load analytics %} - - - + + - + - -
+ +
{% trans 'project id' %} ({% trans 'Select' %}) :
- + {% trans 'Show Player' %}
- -
- - -
-
-
-
- - +

+ +
+
+ {% trans 'Use the div integration mode' %}
+ {% trans 'Use the iframe integration mode' %}
+

+ +
+
+
+
+
+ +
{% trans 'clik here to see the project content' %} diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/iframe_embed_player.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/iframe_embed_player.html Wed Oct 10 18:00:00 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{% spaceless %} -{% load i18n %} -{% load thumbnail %} - - -{% endspaceless %} \ No newline at end of file diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/ldt_utils/views/workspace.py --- a/src/ldt/ldt/ldt_utils/views/workspace.py Wed Oct 10 18:00:00 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/views/workspace.py Wed Oct 10 18:07:40 2012 +0200 @@ -25,6 +25,8 @@ import ldt.auth as ldt_auth import lxml.etree import logging +from django.utils.safestring import SafeUnicode, mark_safe + @login_required @@ -108,9 +110,6 @@ (lambda s:escape(render_to_string("ldt/ldt_utils/partial/embed_%s.html" % (s), rend_dict, context_instance=RequestContext(request))))(typestr)) for typestr in ('player', 'seo_body', 'seo_meta', 'links')) rend_dict['embed_rendered'] = embed_rendered - iframe=render_to_string("ldt/ldt_utils/partial/iframe_embed_player.html", rend_dict, context_instance=RequestContext(request)) - rend_dict['iframe']=iframe - logging.debug("louiseredhotpeppers iframe : "+str(iframe)+" bla") return render_to_response("ldt/ldt_utils/embed_popup.html", rend_dict, context_instance=RequestContext(request)) @@ -153,7 +152,7 @@ project = Project.safe_objects.get(ldt_id=ldt_id); #@UndefinedVariable project_contents = project.contents.all() content=project_contents[0] - iri_id=content.iri_id + iframe_url = mark_safe(settings.WEB_URL+settings.BASE_URL+"ldtplatform/ldt/embediframe/?content_id="+content.iri_id) external_url = None if content.src is not None: for external_src in settings.EXTERNAL_STREAM_SRC: @@ -178,7 +177,7 @@ annotations = ps.get_annotations(first_cutting=True) rend_dict = {'json_url':json_url, 'player_id':player_id, 'annotations':annotations, 'ldt_id': ldt_id, 'stream_mode': stream_mode, 'player_width': player_width, 'player_height': player_height, 'external_url': external_url, - 'polemic':False, 'show_mic_record':False, 'annotations_list':False, 'iri_id': iri_id} + 'polemic':False, 'show_mic_record':False, 'annotations_list':False, 'iframe_url':iframe_url} return rend_dict diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/locale/fr/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Wed Oct 10 18:00:00 2012 +0200 +++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Wed Oct 10 18:07:40 2012 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-10 17:49+0200\n" +"POT-Creation-Date: 2012-10-08 18:09+0200\n" "PO-Revision-Date: 2010-03-09 15:52+0100\n" "Last-Translator: Yves-Marie Haussonne \n" "Language-Team: LANGUAGE \n" @@ -37,7 +37,7 @@ msgid "all" msgstr "tous" -#: .\ldt_utils\forms.py:33 .\ldt_utils\models.py:57 +#: .\ldt_utils\forms.py:33 .\ldt_utils\models.py:53 #: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:69 msgid "title" msgstr "titre" @@ -62,7 +62,7 @@ msgid "Content Tag" msgstr "Catégorie de contenu" -#: .\ldt_utils\forms.py:52 .\ldt_utils\models.py:159 +#: .\ldt_utils\forms.py:52 .\ldt_utils\models.py:155 msgid "content.content_creation_date" msgstr "Date de création du contenu" @@ -94,119 +94,119 @@ msgid "content.front_project" msgstr "Choisir le front project" -#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:158 +#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:154 msgid "content.duration" msgstr "Durée" -#: .\ldt_utils\models.py:46 +#: .\ldt_utils\models.py:42 msgid "media.external_id" msgstr "id externe" -#: .\ldt_utils\models.py:47 +#: .\ldt_utils\models.py:43 msgid "media.external_permalink" msgstr "permalien externe" -#: .\ldt_utils\models.py:48 +#: .\ldt_utils\models.py:44 msgid "media.external_publication_url" msgstr "url de publication externe" -#: .\ldt_utils\models.py:49 +#: .\ldt_utils\models.py:45 msgid "media.external_src_url" msgstr "url source" -#: .\ldt_utils\models.py:50 +#: .\ldt_utils\models.py:46 msgid "media.creation_date" msgstr "Date de création" -#: .\ldt_utils\models.py:51 +#: .\ldt_utils\models.py:47 msgid "media.media_creation_date" msgstr "Date de création du média" -#: .\ldt_utils\models.py:52 +#: .\ldt_utils\models.py:48 msgid "media.update_date" msgstr "Date de maj" -#: .\ldt_utils\models.py:53 +#: .\ldt_utils\models.py:49 msgid "media.videopath" msgstr "videopath" -#: .\ldt_utils\models.py:54 +#: .\ldt_utils\models.py:50 msgid "media.duration" msgstr "Durée du contenu (ms)" -#: .\ldt_utils\models.py:55 +#: .\ldt_utils\models.py:51 msgid "media.creator" msgstr "Créateur" -#: .\ldt_utils\models.py:56 +#: .\ldt_utils\models.py:52 msgid "description" msgstr "description" -#: .\ldt_utils\models.py:58 +#: .\ldt_utils\models.py:54 msgid "media.src" msgstr "Sources" -#: .\ldt_utils\models.py:60 +#: .\ldt_utils\models.py:56 msgid "media.src_hash" msgstr "Hash de la source" -#: .\ldt_utils\models.py:61 +#: .\ldt_utils\models.py:57 msgid "media.mimetype" msgstr "mimetype" -#: .\ldt_utils\models.py:151 +#: .\ldt_utils\models.py:147 msgid "content.iri_id" msgstr "iri id" -#: .\ldt_utils\models.py:152 +#: .\ldt_utils\models.py:148 msgid "content.iriurl" msgstr "iri url" -#: .\ldt_utils\models.py:153 +#: .\ldt_utils\models.py:149 msgid "content.creation_date" msgstr "date de création" -#: .\ldt_utils\models.py:154 +#: .\ldt_utils\models.py:150 msgid "content.update_date" msgstr "Date de maj" -#: .\ldt_utils\models.py:155 +#: .\ldt_utils\models.py:151 msgid "content.title" msgstr "titre" -#: .\ldt_utils\models.py:156 +#: .\ldt_utils\models.py:152 msgid "content.description" msgstr "Description" -#: .\ldt_utils\models.py:157 +#: .\ldt_utils\models.py:153 msgid "content.authors" msgstr "Auteurs" -#: .\ldt_utils\models.py:527 +#: .\ldt_utils\models.py:472 msgid "content_stat.content" msgstr "statistiques d'annotation" -#: .\ldt_utils\models.py:528 +#: .\ldt_utils\models.py:473 msgid "content_stat.annotations_volume" msgstr "Volume d'annotations" -#: .\ldt_utils\models.py:529 +#: .\ldt_utils\models.py:474 msgid "content_stat.polemics_volume" msgstr "Volume d'annotations" -#: .\ldt_utils\models.py:530 +#: .\ldt_utils\models.py:475 msgid "content.nb_annotation" msgstr "nombre d'annotations" -#: .\ldt_utils\models.py:531 +#: .\ldt_utils\models.py:476 msgid "content.last_annotated" msgstr "annoté pour la dernière foiss" -#: .\ldt_utils\models.py:586 +#: .\ldt_utils\models.py:531 msgid "created by" msgstr "créé par" -#: .\ldt_utils\models.py:587 +#: .\ldt_utils\models.py:532 msgid "changed by" msgstr "modifié par" @@ -654,40 +654,48 @@ msgid "create_project" msgstr "Créer un nouveau projet Ligne de Temps" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:60 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:50 msgid "Hide Player" msgstr "Masquer le Lecteur métadata " -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:64 -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:77 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:54 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:67 msgid "Show Player" msgstr "Afficher le Lecteur métadata" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:74 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:64 msgid "project id" msgstr "Identifiant du projet " -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:74 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:64 msgid "Select" msgstr "Sélectionner" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:83 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:73 msgid "popup_player" msgstr "Code Lecteur métadata" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:83 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:73 msgid "popup_seo_body" msgstr "Code SEO" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:83 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:73 msgid "popup_seo_meta" msgstr "Code balise meta en-tête" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:83 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:73 msgid "popup_links" msgstr "Liste de liens" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:100 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:82 +msgid "Use the div integration mode" +msgstr "Utiliser le mode d'integration div" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:83 +msgid "Use the iframe integration mode" +msgstr "Utiliser le mode d'integration iframe" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:95 msgid "clik here to see the project content" msgstr "cliquer ici pour voir le contenu du projet" diff -r b38c88bdefa2 -r 7f237270b61c src/ldt/ldt/static/ldt/js/embed_popup.js --- a/src/ldt/ldt/static/ldt/js/embed_popup.js Wed Oct 10 18:00:00 2012 +0200 +++ b/src/ldt/ldt/static/ldt/js/embed_popup.js Wed Oct 10 18:07:40 2012 +0200 @@ -16,6 +16,13 @@ $j(document).ready(function(){ toggle_display(); + $j("#player_id_code").focus(); + $j("#player_id_code").select(); + + $j("#project_id_select").click(function(){ + $j("#project_id_input").focus(); + $j("#project_id_input").select(); + }); $j('.ldt_json_link').click(function(e) { e.preventDefault(); @@ -44,6 +51,22 @@ $j("#copy_button").click(function(e) { alert($j("#"+display_state+"_code").html()); - }); + }); + + $j("#player_button").click(function(){ + $j("#player_id_code").focus(); + $j("#player_id_code").select(); + }); + + $j("#seo_body_button").click(function(){ + $j("#seo_body_id_code").focus(); + $j("#seo_body_id_code").select(); + }); + $j("#seo_meta_button").click(function(){ + $j("#seo_meta_id_code").focus(); + $j("#seo_meta_id_code").select(); + }); }); + +