# HG changeset patch # User grandjoncl # Date 1352733442 -3600 # Node ID cc5442349bdd9b7ed5c20f2b572b25142cdc172f # Parent fd2d4a7a5de69aa8a0dfe67982020c89b9daba00# Parent e107b22256805bd992817fc0161f0611235eff51 Merge with e107b22256805bd992817fc0161f0611235eff51 diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_iframe.html Mon Nov 12 16:17:22 2012 +0100 @@ -1,4 +1,5 @@ {% load i18n %} +{% load thumbnail %} {% load analytics %} Ligne de Temps - IRI - Metadata Player +
- {% include "ldt/ldt_utils/partial/embed_player.html" %} + +
+
+ + +
+ {% if social %} +
+
+ {% endif %} + {% if slideshare %} +
+
+ {% endif %} {% if annotations_list %}
{% endif %} + {% analytics %} diff -r fd2d4a7a5de6 -r cc5442349bdd 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 Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/embed_popup.html Mon Nov 12 16:17:22 2012 +0100 @@ -1,77 +1,219 @@ +{% extends "ldt/ldt_utils/workspace_base.html" %} {% load i18n %} +{% load front_tags %} {% load analytics %} - - - - - - - - - - Ligne de Temps - IRI + {% block js_import %} + {{ block.super }} + + + {{ content_form.media.js }} + {% endblock %} + + {% block js_declaration %} - - + {% endblock %} + {% block css_import %} + {{ block.super }} + {{ content_form.media.css }} + - + {% endblock %} - - - + {% block content %}
{% trans 'project id' %} ({% trans 'Select' %}) :
- - {% trans 'Show Player' %} - +
- + + + +
-
-

- -
-

{% trans 'Integration mode' %} + +
+ + +
+ +
+
+ +
+ +
+
+

{% trans 'Integration mode' %} {% trans 'div' %} {% trans 'iframe' %}
-

- -
-
-
-
-
- -
+
+
+ {% trans 'Player Size : ' %} + x + +
+ + + + {% trans 'Preset Modes' %} +
+
+ {% trans 'Basic configuration' %}
+ {% trans 'Polemic configuration' %}
+ {% trans 'Polemic configuration with tagcloud, annotationsList and Social widgets' %}
+
+
+ + + + + {% trans 'Create your own configuration' %} +
+
+
+ + CreateAnnotation +
+
+ + {% trans 'Audio annotation' %} +
+ {% trans 'Use most used tags ' %} + + {%trans 'Set your own tags : ' %} + + +
+
+ + Segments +
+ + AnnotationsList +
+
+ + Polemic +
+
+
{% trans 'Display in the polemic timeline : ' %} + {% trans 'only tweets' %} + {% trans 'all annotations' %}
+ + {% trans "Personalize tweet's color" %} + +
+
+
+ {% trans "Default color" %} + +
+
+ {% trans "Polemic's color : ++ : " %} + + -- : + + == : + + ? : + +
+
+ {% trans "Found color" %} + +
+
+
+
+
+ + Sparkline +
+
+ + {% trans "personalize sparkline's color" %} + +
+
+ {% trans 'line color' %} + +
+ +
+ {% trans 'fill color' %} + +
+
+
+
+ + Slideshare +
+
+ + Social +
+
+ Url + Twitter + Facebook + Google Plus + {% trans 'share with email' %}
+
+
+ + Annotation +
+ + Tweet +
+ + Tagcloud +
+
+ +
+ {% trans 'Show Player' %} + + {% endblock %} {% analytics %} - - + diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html Mon Nov 12 16:17:22 2012 +0100 @@ -84,7 +84,7 @@ },{ type: "Tweet", hide_timeout: 5000 - },{% if annotation_block %}{ + },{ type: "CreateAnnotation", api_endpoint_template: "{{WEB_URL}}{% url api_dispatch_list resource_name='annotations' api_name='1.0' %}", after_send_timeout: 8000, @@ -93,7 +93,7 @@ slice_annotation_type: ["chap","découpage"], creator_name: '{{request.user.username}}', creator_avatar: '{% thumbnail request.user.get_profile.image "48x48" format="PNG" crop="center" as im %}{{WEB_URL}}{{ im.url }}{% endthumbnail %}' || "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" - },{% endif %}{ + },{ type: "Slideshare", container: "Slideshare_ext", embed_width: 400, diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/projectslist.html Mon Nov 12 16:17:22 2012 +0100 @@ -38,7 +38,11 @@ {% endif %}
{% trans 'copy project' %}
-
{% trans 'link json by id' %}
+
+ + {% trans 'link json by id' %}
+ + {% ifequal project.state 2 %} {% trans 'Project published, click to unpublish' %}
diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/ldt_utils/views/workspace.py --- a/src/ldt/ldt/ldt_utils/views/workspace.py Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/views/workspace.py Mon Nov 12 16:17:22 2012 +0100 @@ -23,7 +23,6 @@ import django.core.urlresolvers import ldt.auth as ldt_auth from django.utils.safestring import mark_safe -import logging @@ -99,9 +98,10 @@ embed_rendered = dict((typestr, (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')) + for typestr in ('seo_body', 'seo_meta', 'links')) rend_dict['embed_rendered'] = embed_rendered + return render_to_response("ldt/ldt_utils/embed_popup.html", rend_dict, context_instance=RequestContext(request)) @@ -125,17 +125,52 @@ rend_dict = get_datas_for_embed(request, json_url, player_id, ldt_id) # Manage iframe options + rend_dict["player_height"]=request.GET.get("player_height") + rend_dict["player_width"]=request.GET.get("player_width") if request.GET.has_key("polemic"): rend_dict["polemic"] = request.GET.get("polemic") + rend_dict["polemic_defaultColor"] = request.GET.get("polemic_defaultColor") + rend_dict["polemic_foundColor"] = request.GET.get("polemic_foundColor") + rend_dict["polemic_okColor"] = request.GET.get("polemic_okColor") + rend_dict["polemic_koColor"] = request.GET.get("polemic_koColor") + rend_dict["polemic_refColor"] = request.GET.get("polemic_refColor") + rend_dict["polemic_qColor"] = request.GET.get("polemic_qColor") + if request.GET.has_key("show_mic_record"): rend_dict["show_mic_record"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_mic_record").lower()) if request.GET.has_key("annotations_list"): rend_dict["annotations_list"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("annotations_list").lower()) rend_dict["player_width"] = 550 - - rend_dict["annotation_block"]= True - - + if request.GET.has_key("createannotation"): + rend_dict["createannotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("createannotation").lower()) + if request.GET.has_key("tag_titles"): + rend_dict["tag_titles"] = request.GET.get("tag_titles") + if request.GET.has_key("sparkline"): + rend_dict["sparkline"] = request.GET.get("sparkline") + rend_dict["sparkline_lineColor"] = request.GET.get("sparkline_lineColor") + rend_dict["sparkline_fillColor"] = request.GET.get("sparkline_fillColor") + if request.GET.has_key("slideshare"): + rend_dict["slideshare"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("slideshare").lower()) + if request.GET.has_key("social"): + rend_dict["social"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("social").lower()) + if request.GET.has_key("show_url"): + rend_dict["show_url"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_url").lower()) + if request.GET.has_key("show_twitter"): + rend_dict["show_twitter"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_twitter").lower()) + if request.GET.has_key("show_fb"): + rend_dict["show_fb"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_fb").lower()) + if request.GET.has_key("show_gplus"): + rend_dict["show_gplus"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_gplus").lower()) + if request.GET.has_key("show_mail"): + rend_dict["show_mail"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("show_mail").lower()) + if request.GET.has_key("annotation"): + rend_dict["annotation"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("annotation").lower()) + if request.GET.has_key("tweet"): + rend_dict["tweet"] ={'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("tweet").lower()) + if request.GET.has_key("segments"): + rend_dict["segments"] = request.GET.get("segments") + if request.GET.has_key("tagcloud"): + rend_dict["tagcloud"] = {'true': True, 'false': False, "0": False, "1": True}.get(request.GET.get("tagcloud").lower()) return render_to_response("ldt/ldt_utils/embed_iframe.html", rend_dict, context_instance=RequestContext(request)) @@ -155,21 +190,21 @@ stream_mode = project.stream_mode if stream_mode != "video": stream_mode = 'radio' - - player_width = 550 - player_height = 380 if stream_mode == 'radio': player_height = 1 if not ldt_auth.check_access(request.user, project): return HttpResponseForbidden(_("You can not access this project")) - + WEB_URL=settings.WEB_URL + LDT_MEDIA_PREFIX=settings.LDT_MEDIA_PREFIX + LANGUAGE_CODE=settings.LANGUAGE_CODE ps = ProjectJsonSerializer(project, from_contents=True, from_display=True) 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, 'iframe_url':iframe_url} + 'external_url': external_url, + 'polemic':False, 'show_mic_record':False, 'annotations_list':False, 'iframe_url':iframe_url, 'WEB_URL':WEB_URL, + 'LDT_MEDIA_PREFIX':LDT_MEDIA_PREFIX, 'LANGUAGE_CODE':LANGUAGE_CODE} return rend_dict diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/fr/LC_MESSAGES/django.mo has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/locale/fr/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/locale/fr/LC_MESSAGES/django.po Mon Nov 12 16:17:22 2012 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-10-17 18:07+0200\n" +"POT-Creation-Date: 2012-11-12 16:10+0100\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:58 +#: .\ldt_utils\forms.py:33 .\ldt_utils\models.py:56 #: .\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:160 +#: .\ldt_utils\forms.py:52 .\ldt_utils\models.py:157 msgid "content.content_creation_date" msgstr "Date de création du contenu" @@ -94,91 +94,91 @@ msgid "content.front_project" msgstr "Choisir le front project" -#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:159 +#: .\ldt_utils\forms.py:57 .\ldt_utils\models.py:156 msgid "content.duration" msgstr "Durée" -#: .\ldt_utils\models.py:47 +#: .\ldt_utils\models.py:45 msgid "media.external_id" msgstr "id externe" -#: .\ldt_utils\models.py:48 +#: .\ldt_utils\models.py:46 msgid "media.external_permalink" msgstr "permalien externe" -#: .\ldt_utils\models.py:49 +#: .\ldt_utils\models.py:47 msgid "media.external_publication_url" msgstr "url de publication externe" -#: .\ldt_utils\models.py:50 +#: .\ldt_utils\models.py:48 msgid "media.external_src_url" msgstr "url source" -#: .\ldt_utils\models.py:51 +#: .\ldt_utils\models.py:49 msgid "media.creation_date" msgstr "Date de création" -#: .\ldt_utils\models.py:52 +#: .\ldt_utils\models.py:50 msgid "media.media_creation_date" msgstr "Date de création du média" -#: .\ldt_utils\models.py:53 +#: .\ldt_utils\models.py:51 msgid "media.update_date" msgstr "Date de maj" -#: .\ldt_utils\models.py:54 +#: .\ldt_utils\models.py:52 msgid "media.videopath" msgstr "videopath" -#: .\ldt_utils\models.py:55 +#: .\ldt_utils\models.py:53 msgid "media.duration" msgstr "Durée du contenu (ms)" -#: .\ldt_utils\models.py:56 +#: .\ldt_utils\models.py:54 msgid "media.creator" msgstr "Créateur" -#: .\ldt_utils\models.py:57 +#: .\ldt_utils\models.py:55 msgid "description" msgstr "description" -#: .\ldt_utils\models.py:59 +#: .\ldt_utils\models.py:57 msgid "media.src" msgstr "Sources" -#: .\ldt_utils\models.py:61 +#: .\ldt_utils\models.py:58 msgid "media.src_hash" msgstr "Hash de la source" -#: .\ldt_utils\models.py:62 +#: .\ldt_utils\models.py:59 msgid "media.mimetype" msgstr "mimetype" -#: .\ldt_utils\models.py:152 +#: .\ldt_utils\models.py:149 msgid "content.iri_id" msgstr "iri id" -#: .\ldt_utils\models.py:153 +#: .\ldt_utils\models.py:150 msgid "content.iriurl" msgstr "iri url" -#: .\ldt_utils\models.py:154 +#: .\ldt_utils\models.py:151 msgid "content.creation_date" msgstr "date de création" -#: .\ldt_utils\models.py:155 +#: .\ldt_utils\models.py:152 msgid "content.update_date" msgstr "Date de maj" -#: .\ldt_utils\models.py:156 +#: .\ldt_utils\models.py:153 msgid "content.title" msgstr "titre" -#: .\ldt_utils\models.py:157 +#: .\ldt_utils\models.py:154 msgid "content.description" msgstr "Description" -#: .\ldt_utils\models.py:158 +#: .\ldt_utils\models.py:155 msgid "content.authors" msgstr "Auteurs" @@ -210,7 +210,7 @@ msgid "changed by" msgstr "modifié par" -#: .\ldt_utils\utils.py:203 .\ldt_utils\utils.py:386 +#: .\ldt_utils\utils.py:204 .\ldt_utils\utils.py:387 msgid "Personal cutting" msgstr "Découpages personnels" @@ -408,13 +408,13 @@ msgstr "Toutes les annotations sur le média" #: .\ldt_utils\templates\front\front_search_results.html.py:6 -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:101 -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:113 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:100 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:112 #: .\ldt_utils\templates\ldt\ldt_utils\ldt_list.html.py:80 #: .\ldt_utils\templates\ldt\ldt_utils\published_projects.html.py:70 #: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:56 #: .\ldt_utils\templates\ldt\ldt_utils\workspace_base.html.py:71 -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:129 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:131 #: .\templates\ldt\ldt_base.html.py:127 msgid "search" msgstr "Recherche" @@ -471,14 +471,6 @@ msgid "duration" msgstr "durée" -#: .\ldt_utils\templates\ldt\ldt_utils\500.html.py:6 -msgid "Error 500" -msgstr "Erreur 500" - -#: .\ldt_utils\templates\ldt\ldt_utils\500.html.py:10 -msgid "Internal server error" -msgstr "Erreur interne du serveur" - #: .\ldt_utils\templates\ldt\ldt_utils\content_list.html.py:55 #: .\templates\admin\page_base.html.py:19 #: .\user\templates\ldt\user\login_form.html.py:33 @@ -565,7 +557,7 @@ msgstr "Le fichier média est en cours de traitement. Veuillez patienter." #: .\ldt_utils\templates\ldt\ldt_utils\create_content.html.py:145 -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:101 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:77 #: .\ldt_utils\templates\ldt\ldt_utils\create_ldt.html.py:145 #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:37 #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm_popup.html.py:53 @@ -582,36 +574,36 @@ msgid "write" msgstr "Enregistrer" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:57 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:36 msgid "Do you really want to delete this group ?" msgstr "Voulez-vous quitter ce groupe ?" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:78 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:54 msgid "Update a group" msgstr "Mettre à jour votre groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:78 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:54 msgid "Create a group" msgstr "Créer un groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:85 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:61 #: .\user\templates\ldt\user\change_profile.html.py:62 msgid "Name" msgstr "Nom" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:91 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:67 msgid "Description" msgstr "Description" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:103 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:79 msgid "update_group" msgstr "Mettre à jour le groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:105 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:81 msgid "delete_group" msgstr "Effacer le groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:108 +#: .\ldt_utils\templates\ldt\ldt_utils\create_group.html.py:84 msgid "create_group" msgstr "Créer un nouveau groupe" @@ -663,7 +655,7 @@ msgstr "Créer un nouveau projet Ligne de Temps" #: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:23 -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:46 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:208 msgid "Show Player" msgstr "Afficher le Lecteur métadata" @@ -671,42 +663,174 @@ msgid "Hide Player" msgstr "Masquer le Lecteur métadata " -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:43 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 msgid "project id" msgstr "Identifiant du projet " -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:43 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 msgid "Select" msgstr "Sélectionner" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:56 msgid "popup_player" msgstr "Code Lecteur métadata" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:57 msgid "popup_seo_body" msgstr "Code SEO" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:58 msgid "popup_seo_meta" msgstr "Code balise meta en-tête" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:51 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:59 msgid "popup_links" msgstr "Liste de liens" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:59 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:76 msgid "Integration mode" msgstr "Utiliser le mode d'intégration " -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:60 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:77 msgid "div" msgstr "div" -#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:61 +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:78 msgid "iframe" msgstr "iframe" +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:81 +msgid "Player Size : " +msgstr "Taille de la vidéo : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:88 +msgid "Preset Modes" +msgstr "Modes prédéfinis" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:91 +msgid "Basic configuration" +msgstr "Confirmation de base" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:92 +msgid "Polemic configuration" +msgstr "Configuration avec widget polemic" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:93 +msgid "Polemic configuration with tagcloud, annotationsList and Social widgets" +msgstr "Configuration avec widget polemic, annotationsList, social et tagcloud" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:100 +msgid "Create your own configuration" +msgstr "Personnaliser votre configuration" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:105 +msgid "Displays a form to create a new annotation" +msgstr "Permet de créer une annotation en affichant un formulaire" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:108 +msgid "audio annotation" +msgstr "Annotation audio" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109 +msgid "Audio annotation" +msgstr "Annotation audio" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:109 +msgid "Allows the user to record an annotation" +msgstr "Permet à l'utilisateur d'enregistrer une annotation à l'aide d'un micro" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:111 +msgid "Use most used tags " +msgstr "Utiliser les tags les plus utilisés" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113 +msgid "Set your own tags : " +msgstr "Ajouter vos propres tags" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:113 +msgid "Write your tags separeted by a comma" +msgstr "Ecrire la liste des tags séparés par une virgule" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:119 +msgid "Displays segments of a media as rectangles on an horizontal line" +msgstr "Affiche le chapitrage du média, en horizontal" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:122 +msgid "Show a list of annotations" +msgstr "Affiche une liste d’annotations " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:126 +msgid "Shows the polemical timeline, i.e. tweets colored according to the polemical syntax" +msgstr "Affiche la timeline polémique, c’est à dire les tweets colorés en fonction de la syntaxe polémique " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:129 +msgid "Display in the polemic timeline : " +msgstr "Afficher dans la timeline polemic : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:130 +msgid "only tweets" +msgstr "seulement les annotations de type tweet" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:131 +msgid "all annotations" +msgstr "toutes les annotations" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:133 +msgid "Personalize tweet's color" +msgstr "Personnaliser les couleurs des tweets" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:138 +msgid "Default color" +msgstr "Couleur des tweets sans annotation polémique : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:142 +msgid "Polemic's color : ++ : " +msgstr "Couleur des tweets polémiques de type : ++ : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:152 +msgid "Found color" +msgstr "Couleur d'affichage des tweets lors d'une recherche : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:160 +msgid "Displays a curve showing the volume of tweets across time" +msgstr "Affiche une courbe indiquant l’évolution du volume d’annotations au cours du temps" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:164 +msgid "personalize sparkline's color" +msgstr "Personnaliser les couleurs de la courbe" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:168 +msgid "line color" +msgstr "Couleur de la courbe : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:173 +msgid "fill color" +msgstr "Couleur sous la courbe : " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:180 +msgid "Displays a div in order to watch the slides displayed in the media" +msgstr "Permet d'afficher les slides d'un média" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:184 +msgid " Adds buttons to share an URL on social networks" +msgstr "Affiche des boutons pour partager une URL sur les réseaux sociaux" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:191 +msgid "share with email" +msgstr "Partager par email" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:195 +msgid "Displays information relative to a single segment/annotation while it is being played" +msgstr "Affiche les informations relatives à une annotation au moment où celle-ci est jouée" + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:198 +msgid "Show the contents on a tweet when clicked (in Polemic Widget)" +msgstr "Affiche furtivement le contenu d’un tweet " + +#: .\ldt_utils\templates\ldt\ldt_utils\embed_popup.html.py:201 +msgid "Shows a tag cloud" +msgstr "Affiche un nuage de mots-clés " + #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm.html.py:21 #: .\ldt_utils\templates\ldt\ldt_utils\error_confirm_popup.html.py:34 #: .\ldt_utils\templates\ldt\ldt_utils\reset_confirm.html.py:22 @@ -730,20 +854,20 @@ msgid "close_error" msgstr "Fermer" -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:68 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:67 msgid "Do you want to leave this group ?" msgstr "Voulez-vous quitter ce groupe ?" -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:93 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:92 #: .\templates\ldt\ldt_base.html.py:115 msgid "My groups" msgstr "Groupes" -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:95 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:94 msgid "Create group" msgstr "Créer un nouveau groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:111 +#: .\ldt_utils\templates\ldt\ldt_utils\groups.html.py:110 msgid "The group's projects" msgstr "projets du groupe" @@ -838,12 +962,12 @@ #: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:52 #: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:79 -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:174 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:178 msgid "share.eye" msgstr "Cet utilisateur ou ce groupe a le droit de voir cet élement" #: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:60 -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:172 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:176 msgid "share.pencil" msgstr "cet utilisateur ou ce groupe a le droit de modifier cet élement" @@ -855,41 +979,41 @@ msgid "publish for everyone" msgstr "publier pour tout le monde" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:124 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:125 msgid "publish the title on the front" msgstr "publier le titre sur le front" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:127 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:129 msgid "User and group list" msgstr "Liste des groupes et des utilisateurs" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:142 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:144 msgid "select all displayed elements" msgstr "ajouter tous les élements affichés" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:147 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:149 msgid "select users" msgstr "choisir des utilisateurs" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:148 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:150 msgid "remove users" msgstr "enlever des utilisateurs" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:153 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:157 msgid "Members list" msgstr "liste des membres" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:163 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:167 #: .\ldt_utils\templates\ldt\ldt_utils\partial\sharewith.html.py:7 msgid "user" msgstr "utilisateur" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:165 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:169 #: .\ldt_utils\templates\ldt\ldt_utils\partial\sharewith.html.py:9 msgid "group" msgstr "groupe" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:185 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\permissions.html.py:189 msgid "remove all" msgstr "tout enlever" @@ -912,22 +1036,22 @@ msgid "copy project" msgstr "Copier votre projet" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:41 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:43 #: .\ldt_utils\templates\ldt\ldt_utils\partial\publishedprojectslist.html.py:26 msgid "link json by id" msgstr "Ouvrir le lecteur de métadata" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:44 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:48 msgid "Project published, click to unpublish" msgstr "Projet publié, cliquer pour de-publier" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:44 -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:46 -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:57 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:48 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:50 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:61 msgid "You are not allowed to change this project" msgstr "vous n'avez pas l'autorisation de modifier ce projet" -#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:46 +#: .\ldt_utils\templates\ldt\ldt_utils\partial\projectslist.html.py:50 msgid "Project not published, click to publish" msgstr "Projet non publié, cliquer pour publier" @@ -939,71 +1063,63 @@ msgid "Project published" msgstr "Projet publié" -#: .\ldt_utils\views\content.py:189 +#: .\ldt_utils\views\content.py:114 msgid "Problem when downloading file from url : " msgstr "Problème lors du téléchargement du fichier : " -#: .\ldt_utils\views\content.py:192 +#: .\ldt_utils\views\content.py:117 msgid "Problem when uploading file : " msgstr "Problème lors de l'upload du fichier : " -#: .\ldt_utils\views\content.py:297 -msgid "Content creation failure" -msgstr "Echec lors de la creation du contenu" - -#: .\ldt_utils\views\content.py:305 -msgid "Commit of the content creation failed" -msgstr "Echec lors du commit de la creation du contenu" - -#: .\ldt_utils\views\content.py:319 +#: .\ldt_utils\views\content.py:334 #, python-format msgid "There is %(count)d error when deleting content" msgid_plural "There are %(count)d errors when deleting content" msgstr[0] "Il y a %(count)d erreur lors de l'effacement du contenu" msgstr[1] "Il y a %(count)d erreurs lors de l'effacement du contenu" -#: .\ldt_utils\views\content.py:320 +#: .\ldt_utils\views\content.py:335 msgid "title error deleting content" msgstr "Erreur lors de l'effacement du contenu" -#: .\ldt_utils\views\content.py:325 +#: .\ldt_utils\views\content.py:340 #, python-format msgid "Confirm delete content %(titles)s" msgstr "Veuillez confirmer l'effacement du contenu %(titles)s" -#: .\ldt_utils\views\content.py:326 +#: .\ldt_utils\views\content.py:341 msgid "confirm delete content" msgstr "Confirmation effacement contenu" -#: .\ldt_utils\views\content.py:337 +#: .\ldt_utils\views\content.py:352 #, python-format msgid "Please unpublish the front project %(title)s" msgstr "Veuillez dépublier le projet : %(title)s" -#: .\ldt_utils\views\content.py:338 +#: .\ldt_utils\views\content.py:353 msgid "The front project is published" msgstr "Projet publié" -#: .\ldt_utils\views\content.py:339 .\ldt_utils\views\content.py:342 +#: .\ldt_utils\views\content.py:354 .\ldt_utils\views\content.py:357 #: .\ldt_utils\views\project.py:137 msgid "confirm reset" msgstr "Confirmer la réinitialisation" -#: .\ldt_utils\views\content.py:341 .\ldt_utils\views\project.py:136 +#: .\ldt_utils\views\content.py:356 .\ldt_utils\views\project.py:136 #, python-format msgid "please confirm reseting project %(title)s" msgstr "Veuillez confirmer la réinitialisation du projet %(title)s" -#: .\ldt_utils\views\content.py:369 +#: .\ldt_utils\views\content.py:384 msgid "An error occurred - Please try again or contact webmaster" msgstr "" "Une erreur est apparue - Merci de réessayer ou de contacter le webmaster" -#: .\ldt_utils\views\content.py:370 +#: .\ldt_utils\views\content.py:385 msgid "Error" msgstr "Erreur" -#: .\ldt_utils\views\content.py:413 +#: .\ldt_utils\views\content.py:428 #, python-format msgid "" "Content '%(title)s' is referenced by this project : %(project_titles)s. " @@ -1018,7 +1134,7 @@ "Le contenu '%(title)s' est référencé par les projets suivants : '%" "(project_titles)s'.Veuillez les effacer préalablement." -#: .\ldt_utils\views\content.py:416 +#: .\ldt_utils\views\content.py:431 #, python-format msgid "" "The project '%(project_title)s' pointing on the content '%(title)s' has " @@ -1028,16 +1144,16 @@ "Le projet '%(project_title)s' référençant le contenu '%(title)s' comporte " "plusieurs annotations. Voulez vous quand même supprimer le contenu ?" -#: .\ldt_utils\views\content.py:442 +#: .\ldt_utils\views\content.py:457 msgid "Content deletion failure" msgstr "Echec lors de la suppression du contenu" -#: .\ldt_utils\views\content.py:452 +#: .\ldt_utils\views\content.py:468 msgid "Commit of the content deletion failed" msgstr "Echec lors du commit de la suppression du contenu" -#: .\ldt_utils\views\json.py:40 .\ldt_utils\views\rdf.py:15 -#: .\ldt_utils\views\workspace.py:178 +#: .\ldt_utils\views\json.py:39 .\ldt_utils\views\rdf.py:15 +#: .\ldt_utils\views\workspace.py:198 msgid "You can not access this project" msgstr "vous n'avez pas l'autorisation d'accéder à ce projet" @@ -1073,12 +1189,12 @@ msgid "confirm deletion" msgstr "Confirmation d'effacement" -#: .\ldt_utils\views\workspace.py:128 +#: .\ldt_utils\views\workspace.py:116 msgid "" "The content does not exists or you are not allowed to access this content" msgstr "Ce contenu n'existe pas, ou vous n'êtes pas autorisé a y acceder" -#: .\ldt_utils\views\workspace.py:132 +#: .\ldt_utils\views\workspace.py:120 msgid "Parameters project_id or content_id must be given in the url" msgstr "Les paramètres project_id et content_id doivent être passés dans l'URL" @@ -1730,5 +1846,17 @@ "Nous vous avons envoyé par courriel les instructions pour activer le compte " "à l'adresse que vous avez indiquée. Vous devriez le recevoir rapidement." +#~ msgid "Content creation failure" +#~ msgstr "Echec lors de la creation du contenu" + +#~ msgid "Commit of the content creation failed" +#~ msgstr "Echec lors du commit de la creation du contenu" + +#~ msgid "Error 500" +#~ msgstr "Erreur 500" + +#~ msgid "Internal server error" +#~ msgstr "Erreur interne du serveur" + #~ msgid "clik here to see the project content" #~ msgstr "cliquer ici pour voir le contenu du projet" diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/css/embed_popup.css --- a/src/ldt/ldt/static/ldt/css/embed_popup.css Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/static/ldt/css/embed_popup.css Mon Nov 12 16:17:22 2012 +0100 @@ -6,12 +6,17 @@ word-wrap: break-word; /* Internet Explorer 5.5+ */ } + input { background: #ededed; } - -input[type="button"] { +.embed_checkbox{ + text-indent:25px; + +} +.code_button +{ background-color: #656565; color: white; width: auto; @@ -19,6 +24,47 @@ padding: 5px 10px; } +.codeColor_text{ + width: 50px; + text-align: center; + color: #949494; + font-size: 12px; + padding: 3px; +} + +.number_area{ + width: 30px; + text-align: center; + padding: 3px; + font-size: 12px; + color: #7B8084; + border: 3px solid lightGrey; +} + +.tags_area{ + padding: 3px; + font-size: 12px; + color: #7B8084; + border: 3px solid lightGrey; +} +.refresh_button{ + background-color:#fcfcfc; + -moz-border-radius:6px; + -webkit-border-radius:6px; + border-radius:6px; + border:1px solid #dcdcdc; + display:inline-block; + color:#777777; + padding:6px 6px; +} +.refresh_button:hover { + background-color:#fffaff; +} + +.refresh_button:active { + position:relative; + top:1px; +} #button_row input { margin: 10px; } @@ -80,11 +126,87 @@ margin-bottom: 5px; } -#embed_options { +.configuration { + color: #949494; + font-family: Arial, Helvetica, sans serif; + font-weight: lighter; + font-style: normal; + font-size: 12px; + text-align: left; +} + +#embed_options .title { + font-weight: bold; + margin-right: 9px; +} + +.OptionsEmbedDisplay { + color: #949494; + font-family: Arial, Helvetica, sans serif; + font-weight: lighter; + font-style: normal; + font-size: 12px; + text-align: left; + cursor: pointer; + font-weight: bold; + margin-right: 9px; + text-decoration: none; + line-height: 12px; + top: 10px; + vertical-align: top; + +} + +.AdvancedOptionsDisplay{ color: #949494; font-family: Arial, Helvetica, sans serif; font-weight: lighter; font-style: normal; font-size: 12px; text-align: left; -} \ No newline at end of file + cursor: pointer; + margin-right: 9px; + text-decoration: none; + line-height: 12px; + top: 10px; + vertical-align: top; +} +.embedPersonnalisation{ + margin-left: 21px; +} + +.embedPersonnalisationSecondLevel{ + margin-left: 22px; +} + +.expArrow { + width:0px; + height:0px; + border-bottom:6px solid transparent; /* left arrow slant */ + border-top:6px solid transparent; /* right arrow slant */ + border-left:6px solid #949494; /* bottom, add background color here */ + font-size:0px; + line-height:12px; + margin-right: 8px; + position: relative; + top: 0px; + vertical-align: top; + display: inline-block; + +} + +.collArrow { + width:0px; + height:0px; + border-left:6px solid transparent; + border-right:6px solid transparent; + border-top:6px solid #949494; + font-size:0px; + line-height:12px; + margin-right: 8px; + position: relative; + top: 5px; + vertical-align: top; + display: inline-block; +} + diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/img/arrow_refresh.png Binary file src/ldt/ldt/static/ldt/img/arrow_refresh.png has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/embed_popup.js --- a/src/ldt/ldt/static/ldt/js/embed_popup.js Mon Nov 12 13:28:31 2012 +0100 +++ b/src/ldt/ldt/static/ldt/js/embed_popup.js Mon Nov 12 16:17:22 2012 +0100 @@ -4,7 +4,7 @@ $j.each(["player","seo_body","seo_meta","links"], function(i,display_str) { var div_selector = "#"+display_str+"_code"; - if(display_str == display_state) { + if(display_str === display_state) { $j(div_selector).show(); } else { @@ -14,10 +14,33 @@ } function init_events(){ - toggle_display(); + $j("#iframe_div_premode").toggle(false); + $j("#embed_personnalisation").toggle(false); + $j("#player_width").val(550); + $j("#player_height").val(300); + $j("#optionsExpArrow").toggle(true); + $j("#optionsCollArrow").toggle(false); + $j("#preModeExpArrow").toggle(true); + $j("#preModeCollArrow").toggle(false); + $j("#createannotation_block").toggle(false); $j("#player_id_code").focus(); $j("#player_id_code").select(); + $j("#polemic_color_options").toggle(false); + $j("#sparkline_color_options").toggle(false); + $j("#social_options").toggle(false); + $j("#displayPolemicOptions").toggle(false); + $j("#displaySparklineOptions").toggle(false); + $j("#polemic_default_color").val("#585858"); + $j("#polemic_found_color").val("#fc00ff"); + $j("#polemic_ok_color").val("#1d973d"); + $j("#polemic_ko_color").val("#ce0a15"); + $j("#polemic_ref_color").val("#c5a62d"); + $j("#polemic_q_color").val("#036aae"); + $j("#sparkline_line_color").val("#7492b4"); + $j("#sparkline_fill_color").val("#aeaeb8"); + $j("#createannotation_options").toggle(false); + mode1(); $j("#project_id_select").click(function(){ $j("#project_id_input").focus(); @@ -53,120 +76,782 @@ alert($j("#"+display_state+"_code").html()); }); + $j("#refresh_player_button").click(function(e){ + refresh_player(); + }); + + $j("#refresh_player_button").click(function(){ + $j("#player_id_code").focus(); + $j("#player_id_code").select(); + }); + $j("#player_button").click(function(){ $j("#player_id_code").focus(); $j("#player_id_code").select(); }); $j("#seo_body_button").click(function(){ + display_state = "seo_body"; + toggle_display(); $j("#seo_body_id_code").focus(); - $j("#seo_body_id_code").select(); + $j("#seo_body_id_code").select(); + }); $j("#seo_meta_button").click(function(){ $j("#seo_meta_id_code").focus(); $j("#seo_meta_id_code").select(); - }); + }); $j('#links_button').click(function() { var range = document.createRange(); range.selectNode(document.getElementById('links_code')); window.getSelection().addRange(range); }); + + $j('#displayPreMode').click(function(){ + $j("#iframe_div_premode").slideToggle("fast"); + $j("#preModeExpArrow").toggle(); + $j("#preModeCollArrow").toggle(); + }); + + $j("#displayEmbedOptions").click(function(){ + $j("#embed_personnalisation").slideToggle("fast"); + $j("#optionsExpArrow").toggle(); + $j("#optionsCollArrow").toggle(); + + }); + + $j("#displayPolemicColorOptions").click(function(){ + $j("#polemic_color_options").slideToggle("fast"); + }); + $j("#displaySparklineOptions").click(function(){ + $j("#sparkline_color_options").slideToggle("fast"); + }); + + $('.infostooltip').each( function () { + var desc = $(this).attr('data-desc'); + if (desc == 'None') { + desc = ''; + } + $(this).qtip({ + content : { + text: '' + $(this).attr('data-title') + '
' + desc + }, + style: { + classes: 'ui-tooltip-dark ui-tooltip-rounded qtipldt' + }, + border: { + 'width': 0, + 'color': '#505050' + }, + position: { + my: 'top left', + at: 'bottom left' + } + }); + }); + +} + +function select_code(){ + $j("#player_id_code").focus(); + $j("#player_id_code").select(); +} + +function generate_base_embed_code(){ + var player_width_val=$j("#player_width").val(); + base='\ +
\n \ +
\n\ +
\n\ +\n\ +\n'; + if(social_val.checked){ + code+='\ +
\n\ +
\n'; + } + if(slideshare_val.checked){ + code+='\ +
\n\ +
\n'; + } + + if(annotationslist_val.checked){ + code+='\ +
\n'; + } + + code+='\ +
\n'; + return code; +} + +function put_new_code(){ + var type_embed=document.getElementById("type_embed_div"); + wrapper = "wrapper_"+player_id; + wrapper_id = "#"+wrapper; + var element = document.getElementById(wrapper); + var code_embed=document.getElementById("player_id_code"); + if(type_embed.checked){ + var new_code=generate_div_code(); + } + else{ + var new_code=generate_iframe_code(); + } + code_embed.value= new_code; + $j("#player_id_code").focus(); + $j("#player_id_code").select(); +} + +function div_event(){ + $j("#iframe_div_premode").toggle(false); + $j("#preModeExpArrow").toggle(true); + $j("#preModeCollArrow").toggle(false); + $j("#createannotation_block").toggle(false); + put_new_code(); } function toggle() { wrapper="wrapper_"+player_id; wrapper_id="#"+wrapper; + var player_div = document.getElementById("player_div"); var element = document.getElementById(wrapper); var text = document.getElementById("displayPlayer"); var type_embed=document.getElementById("type_embed_div"); - if(element.style.display==="none") { + if(player_div.style.display==="none") { if (type_embed.checked){ - var new_code=document.getElementById("embed_code_var").value; + var new_code=generate_div_code(); $j(wrapper_id).html(new_code); } else{ - wrapper = "#wrapper_"+player_id; - iframeUrl= iframe_url+"&polemic="+polemic+"&show_mic_record="+show_mic_record+"&annotations_list="+annotations_list+""; - player_width=570; - player_height=678; - if(annotations_list!='False'){ - player_width+=430; - } - if(polemic!='False'){ - player_height+=100; - - } - if(show_mic_record!='False'){ - - player_height+=55; - } - frame = document.createElement("iframe"); - frame.width = player_width; - frame.height = player_height; - frame.src = iframeUrl; - frame.frameBorder = 0; - frame.seamless = "seamless"; - $j(wrapper).html(frame); - + display_iframe_player(); } - element.style.display="block"; + player_div.style.display="block"; text.innerHTML = translate_hide; } else { $j(wrapper_id).html(''); - element.style.display="none"; + player_div.style.display="none"; text.innerHTML = translate_show; } } -function div_event(){ - wrapper = "wrapper_"+player_id; - wrapper_id = "#"+wrapper; +function display_polemic(){ + $j("#displayPolemicOptions").slideToggle("fast"); + $j("#polemic_color_options").toggle(false); +} + +function display_sparkline(){ + $j("#displaySparklineOptions").slideToggle("fast"); + $j("#sparkline_color_options").toggle(false); +} + +function display_social(){ + $j("#social_options").slideToggle("fast"); +} + +function display_createannotation(){ + $j("#createannotation_options").slideToggle("fast"); +} + +function mode1(){ + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var social_val=document.getElementById('social_checkbox'); + var annotation_val=document.getElementById('annotation_checkbox'); + var tweet_val=document.getElementById('tweet_checkbox'); + var segments_val=document.getElementById('segments_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var sparkline_val=document.getElementById('sparkline_checkbox'); + var tagcloud_val=document.getElementById('tagcloud_checkbox'); + var createannotation_val=document.getElementById('createannotation_checkbox'); + + var type_embed=document.getElementById("type_embed_div"); + + if(type_embed.checked){ + createannotation_val.checked=false; + } + else{ + $j("#createannotation_options").toggle(true); + createannotation_val.checked=true; + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); + show_mic_record_val.checked=false; + } + $j("#displayPolemicOptions").toggle(false); + $j("#displaySparklineOptions").toggle(false); + $j("#social_options").toggle(false); + $j("#sparkline_color_options").toggle(false); + polemic_val.checked=false; + segments_val.checked=true; + annotationslist_val.checked=false; + slideshare_val.checked=false; + social_val.checked=false; + annotation_val.checked=false; + tweet_val.checked=false; + sparkline_val.checked=false; + tagcloud_val.checked=false; + put_new_code(); +} + +function mode2(){ + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var social_val=document.getElementById('social_checkbox'); + var annotation_val=document.getElementById('annotation_checkbox'); + var tweet_val=document.getElementById('tweet_checkbox'); + var segments_val=document.getElementById('segments_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var sparkline_val=document.getElementById('sparkline_checkbox'); + var tagcloud_val=document.getElementById('tagcloud_checkbox'); + var createannotation_val=document.getElementById('createannotation_checkbox'); + var type_embed=document.getElementById("type_embed_div"); + $j("#displayPolemicOptions").toggle(false); + $j("#displaySparklineOptions").toggle(false); + $j("#social_options").toggle(false); + $j("#sparkline_color_options").toggle(false); + display_polemic(); + display_sparkline(); + + if(type_embed.checked){ + createannotation_val.checked=false; + } + else{ + $j("#createannotation_options").toggle(true); + createannotation_val.checked=true; + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); + show_mic_record_val.checked=false; + + } + polemic_val.checked=true; + segments_val.checked=true; + annotationslist_val.checked=false; + slideshare_val.checked=false; + social_val.checked=false; + annotation_val.checked=true; + sparkline_val.checked=true; + tweet_val.checked=false; + tagcloud_val.checked=false; + put_new_code(); + +} + +function mode3(){ + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var social_val=document.getElementById('social_checkbox'); + var annotation_val=document.getElementById('annotation_checkbox'); + var tweet_val=document.getElementById('tweet_checkbox'); + var segments_val=document.getElementById('segments_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var sparkline_val=document.getElementById('sparkline_checkbox'); + var tagcloud_val=document.getElementById('tagcloud_checkbox'); + var createannotation_val=document.getElementById('createannotation_checkbox'); + var type_embed=document.getElementById("type_embed_div"); + $j("#displayPolemicOptions").toggle(false); + $j("#displaySparklineOptions").toggle(false); + $j("#social_options").toggle(false); + $j("#sparkline_color_options").toggle(false); + display_polemic(); + display_social(); + display_sparkline(); + if(type_embed.checked){ + createannotation_val.checked=false; + } + else{ + $j("#createannotation_options").toggle(true); + createannotation_val.checked=true; + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); + show_mic_record_val.checked=false; + } + polemic_val.checked=true; + segments_val.checked=true; + annotationslist_val.checked=true; + slideshare_val.checked=false; + social_val.checked=true; + annotation_val.checked=true; + tweet_val.checked=false; + sparkline_val.checked=true; + tagcloud_val.checked=true; + put_new_code(); + +} +function iframe_event(){ + $j("#createannotation_block").toggle(true); + $j("#createannotation_options").toggle(true); var element = document.getElementById(wrapper); - var new_code=document.getElementById("embed_code_var").value; - var code_embed=document.getElementById("player_id_code"); + var createannotation_val=document.getElementById('createannotation_checkbox'); + createannotation_val.checked=true; if(element.style.display=="block"){ - $j(wrapper_id).html(new_code); + display_iframe_player(); } - code_embed.value= new_code; + iframe_code=generate_iframe_code(); + $j("#player_id_code").val(iframe_code); $j("#player_id_code").focus(); - $j("#player_id_code").select(); + $j("#player_id_code").select(); + } -function iframe_event(){ +function generate_iframeUrl(){ + var createannotation_val=document.getElementById('createannotation_checkbox'); + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var social_val=document.getElementById('social_checkbox'); + var annotation_val=document.getElementById('annotation_checkbox'); + var tweet_val=document.getElementById('tweet_checkbox'); + var segments_val=document.getElementById('segments_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var sparkline_val=document.getElementById('sparkline_checkbox'); + var tagcloud_val=document.getElementById('tagcloud_checkbox'); + iframeUrl= iframe_url; + iframeUrl+="&player_height="+$j("#player_height").val()+"&player_width="+$j("#player_width").val(); + if(createannotation_val.checked){ + iframeUrl+="&createannotation=True"; + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); + var set_tags_val=document.getElementById('set_tags'); + if(show_mic_record_val.checked){ + iframeUrl+="&show_mic_record=True"; + } + if(set_tags_val.checked){ + iframeUrl+="&tag_titles="+$j("#tag_list").val(); + } + } + if (polemic_val.checked){ + tweet_type=document.getElementById("tweet_polemic"); + if(tweet_type.checked){ + iframeUrl+="&polemic=tweet"; + } + else{ + iframeUrl+="&polemic=all"; + } + polemic_defaultColor=$j("#polemic_default_color").val(); + defaultColor_code_array= polemic_defaultColor.split("#"); + defaultColor_code=defaultColor_code_array[1]; + polemic_foundColor=$j("#polemic_found_color").val(); + foundColor_code_array = polemic_foundColor.split("#"); + foundColor_code=foundColor_code_array[1]; + polemic_okColor =$j("#polemic_ok_color").val(); + polemic_okColor_code_array=polemic_okColor.split("#"); + okColor_code=polemic_okColor_code_array[1]; + polemic_koColor =$j("#polemic_ko_color").val(); + polemic_koColor_code_array=polemic_koColor.split("#"); + koColor_code=polemic_koColor_code_array[1]; + polemic_refColor =$j("#polemic_ref_color").val(); + polemic_refColor_code_array=polemic_refColor.split("#"); + refColor_code=polemic_refColor_code_array[1]; + polemic_qColor =$j("#polemic_q_color").val(); + polemic_qColor_code_array=polemic_qColor.split("#"); + qColor_code=polemic_qColor_code_array[1]; + iframeUrl+="&polemic_defaultColor="+defaultColor_code; + iframeUrl+="&polemic_foundColor="+foundColor_code; + iframeUrl+="&polemic_okColor="+okColor_code; + iframeUrl+="&polemic_koColor="+koColor_code; + iframeUrl+="&polemic_refColor="+refColor_code; + iframeUrl+="&polemic_qColor="+qColor_code; + + } + else{ + iframeUrl+="&polemic=False"; + } + if(annotationslist_val.checked){ + iframeUrl+="&annotations_list=True"; + } + if(slideshare_val.checked){ + iframeUrl+="&slideshare=True"; + } + if(social_val.checked){ + show_url=document.getElementById("show_url_checkbox"); + show_twitter=document.getElementById("show_twitter_checkbox"); + show_fb=document.getElementById("show_fb_checkbox"); + show_gplus=document.getElementById("show_gplus_checkbox"); + show_mail=document.getElementById("show_mail_checkbox"); + iframeUrl+="&social=True"; + if(show_url.checked){ + iframeUrl+="&show_url=True"; + } + if(show_twitter.checked){ + iframeUrl+="&show_twitter=True"; + } + if(show_fb.checked){ + iframeUrl+="&show_fb=True"; + } + if(show_gplus.checked){ + iframeUrl+="&show_gplus=True"; + } + if(show_mail.checked){ + iframeUrl+="&show_mail=True"; + } + } + if(tweet_val.checked){ + iframeUrl+="&tweet=True"; + } + if(segments_val.checked){ + iframeUrl+="&segments=True"; + } + if(sparkline_val.checked){ + iframeUrl+="&sparkline=True"; + sparkline_lineColor=$j("#sparkline_line_color").val(); + lineColor_code_array= sparkline_lineColor.split("#"); + lineColor_code=lineColor_code_array[1]; + sparkline_fillColor=$j("#sparkline_fill_color").val(); + fillColor_code_array = sparkline_fillColor.split("#"); + fillColor_code=fillColor_code_array[1]; + iframeUrl+="&sparkline_lineColor="+lineColor_code; + iframeUrl+="&sparkline_fillColor="+fillColor_code; + } + if(tagcloud_val.checked){ + iframeUrl+="&tagcloud=True"; + } + + return iframeUrl; +} + +function generate_iframe_code(){ + var createannotation_val=document.getElementById('createannotation_checkbox'); + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); + iframeUrl=generate_iframeUrl(); + player_width=parseInt($j("#player_width").val())+20; + player_height=parseInt($j("#player_height").val())+130; + if (createannotation_val.checked){ + player_height+=281; + } + if(annotationslist_val.checked || slideshare_val.checked){ + player_width+=430; + } + if(polemic_val.checked){ + player_height+=100; + + } + if(show_mic_record_val.checked){ + + player_height+=55; + } + iframe_code=""; + + return iframe_code; +} + +function display_iframe_player(){ + var createannotation_val=document.getElementById('createannotation_checkbox'); + var annotationslist_val=document.getElementById('annotations_list_checkbox'); + var polemic_val=document.getElementById('polemic_checkbox'); + var slideshare_val=document.getElementById('slideshare_checkbox'); + var show_mic_record_val = document.getElementById('show_mic_record_checkbox'); var code_embed=document.getElementById("player_id_code"); wrapper = "wrapper_"+player_id; wrapper_id = "#"+wrapper; - var element = document.getElementById(wrapper); - iframeUrl= iframe_url+"&polemic="+polemic+"&show_mic_record="+show_mic_record+"&annotations_list="+annotations_list+""; - player_width=570; - player_height=678; - if(annotations_list!='False'){ + iframeUrl= generate_iframeUrl(); + player_width=parseInt($j("#player_width").val())+20; + player_height=parseInt($j("#player_height").val())+130; + if (createannotation_val.checked){ + player_height+=300; + player_width+=50; + } + if(annotationslist_val.checked || slideshare_val.checked){ player_width+=430; } - if(polemic!='False'){ + if(polemic_val.checked){ player_height+=100; } - if(show_mic_record!='False'){ + if(show_mic_record_val.checked){ player_height+=55; } - - if(element.style.display=="block"){ - frame = document.createElement("iframe"); - frame.width = player_width; - frame.height = player_height; - frame.src = iframeUrl; - frame.frameBorder = 0; - frame.seamless = "seamless"; - $j(wrapper_id).html(frame); + frame = document.createElement("iframe"); + frame.width = player_width; + frame.height = player_height; + frame.src = iframeUrl; + frame.frameBorder = 0; + frame.seamless = "seamless"; + $j(wrapper_id).html(frame); +} + +function set_default_color(code){ + $j("#polemic_default_color").val("#"+code); + put_new_code(); +} + +function set_found_color(code){ + $j("#polemic_found_color").val("#"+code); + put_new_code(); +} + +function set_line_color(code){ + $j("#sparkline_line_color").val("#"+code); + put_new_code(); +} + +function set_fill_color(code){ + $j("#sparkline_fill_color").val("#"+code); + put_new_code(); +} + +function refresh_player(){ + var type_embed=document.getElementById("type_embed_div"); + if (type_embed.checked){ + var new_code=generate_div_code(); + $j(wrapper_id).html(new_code); } - iframe_code=""; - $j("#player_id_code").val(iframe_code); - $j("#player_id_code").focus(); - $j("#player_id_code").select(); -} + else{ + display_iframe_player(); + } +} diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/jscolor/arrow.gif Binary file src/ldt/ldt/static/ldt/js/jscolor/arrow.gif has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/jscolor/cross.gif Binary file src/ldt/ldt/static/ldt/js/jscolor/cross.gif has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/jscolor/hs.png Binary file src/ldt/ldt/static/ldt/js/jscolor/hs.png has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/jscolor/hv.png Binary file src/ldt/ldt/static/ldt/js/jscolor/hv.png has changed diff -r fd2d4a7a5de6 -r cc5442349bdd src/ldt/ldt/static/ldt/js/jscolor/jscolor.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ldt/ldt/static/ldt/js/jscolor/jscolor.js Mon Nov 12 16:17:22 2012 +0100 @@ -0,0 +1,953 @@ +/** + * jscolor, JavaScript Color Picker + * + * @version 1.4.0 + * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html + * @author Jan Odvarko, http://odvarko.cz + * @created 2008-06-15 + * @updated 2012-07-06 + * @link http://jscolor.com + */ + + +var jscolor = { + + + dir : '', // location of jscolor directory (leave empty to autodetect) + bindClass : 'color', // class name + binding : true, // automatic binding via + preloading : true, // use image preloading? + + + install : function() { + jscolor.addEvent(window, 'load', jscolor.init); + }, + + + init : function() { + if(jscolor.binding) { + jscolor.bind(); + } + if(jscolor.preloading) { + jscolor.preload(); + } + }, + + + getDir : function() { + if(!jscolor.dir) { + var detected = jscolor.detectDir(); + jscolor.dir = detected!==false ? detected : 'jscolor/'; + } + return jscolor.dir; + }, + + + detectDir : function() { + var base = location.href; + + var e = document.getElementsByTagName('base'); + for(var i=0; i vs[a] ? + (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) : + tp[a], + -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ? + (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) : + (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c) + ]; + } + drawPicker(pp[a], pp[b]); + } + }; + + + this.importColor = function() { + if(!valueElement) { + this.exportColor(); + } else { + if(!this.adjust) { + if(!this.fromString(valueElement.value, leaveValue)) { + styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage; + styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor; + styleElement.style.color = styleElement.jscStyle.color; + this.exportColor(leaveValue | leaveStyle); + } + } else if(!this.required && /^\s*$/.test(valueElement.value)) { + valueElement.value = ''; + styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage; + styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor; + styleElement.style.color = styleElement.jscStyle.color; + this.exportColor(leaveValue | leaveStyle); + + } else if(this.fromString(valueElement.value)) { + // OK + } else { + this.exportColor(); + } + } + }; + + + this.exportColor = function(flags) { + if(!(flags & leaveValue) && valueElement) { + var value = this.toString(); + if(this.caps) { value = value.toUpperCase(); } + if(this.hash) { value = '#'+value; } + valueElement.value = value; + } + if(!(flags & leaveStyle) && styleElement) { + styleElement.style.backgroundImage = "none"; + styleElement.style.backgroundColor = + '#'+this.toString(); + styleElement.style.color = + 0.213 * this.rgb[0] + + 0.715 * this.rgb[1] + + 0.072 * this.rgb[2] + < 0.5 ? '#FFF' : '#000'; + } + if(!(flags & leavePad) && isPickerOwner()) { + redrawPad(); + } + if(!(flags & leaveSld) && isPickerOwner()) { + redrawSld(); + } + }; + + + this.fromHSV = function(h, s, v, flags) { // null = don't change + if(h !== null) { h = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, h)); } + if(s !== null) { s = Math.max(0.0, this.minS, Math.min(1.0, this.maxS, s)); } + if(v !== null) { v = Math.max(0.0, this.minV, Math.min(1.0, this.maxV, v)); } + + this.rgb = HSV_RGB( + h===null ? this.hsv[0] : (this.hsv[0]=h), + s===null ? this.hsv[1] : (this.hsv[1]=s), + v===null ? this.hsv[2] : (this.hsv[2]=v) + ); + + this.exportColor(flags); + }; + + + this.fromRGB = function(r, g, b, flags) { // null = don't change + if(r !== null) { r = Math.max(0.0, Math.min(1.0, r)); } + if(g !== null) { g = Math.max(0.0, Math.min(1.0, g)); } + if(b !== null) { b = Math.max(0.0, Math.min(1.0, b)); } + + var hsv = RGB_HSV( + r===null ? this.rgb[0] : r, + g===null ? this.rgb[1] : g, + b===null ? this.rgb[2] : b + ); + if(hsv[0] !== null) { + this.hsv[0] = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, hsv[0])); + } + if(hsv[2] !== 0) { + this.hsv[1] = hsv[1]===null ? null : Math.max(0.0, this.minS, Math.min(1.0, this.maxS, hsv[1])); + } + this.hsv[2] = hsv[2]===null ? null : Math.max(0.0, this.minV, Math.min(1.0, this.maxV, hsv[2])); + + // update RGB according to final HSV, as some values might be trimmed + var rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]); + this.rgb[0] = rgb[0]; + this.rgb[1] = rgb[1]; + this.rgb[2] = rgb[2]; + + this.exportColor(flags); + }; + + + this.fromString = function(hex, flags) { + var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i); + if(!m) { + return false; + } else { + if(m[1].length === 6) { // 6-char notation + this.fromRGB( + parseInt(m[1].substr(0,2),16) / 255, + parseInt(m[1].substr(2,2),16) / 255, + parseInt(m[1].substr(4,2),16) / 255, + flags + ); + } else { // 3-char notation + this.fromRGB( + parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255, + parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255, + parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255, + flags + ); + } + return true; + } + }; + + + this.toString = function() { + return ( + (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) + + (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) + + (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1) + ); + }; + + + function RGB_HSV(r, g, b) { + var n = Math.min(Math.min(r,g),b); + var v = Math.max(Math.max(r,g),b); + var m = v - n; + if(m === 0) { return [ null, 0, v ]; } + var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m); + return [ h===6?0:h, m/v, v ]; + } + + + function HSV_RGB(h, s, v) { + if(h === null) { return [ v, v, v ]; } + var i = Math.floor(h); + var f = i%2 ? h-i : 1-(h-i); + var m = v * (1 - s); + var n = v * (1 - s*f); + switch(i) { + case 6: + case 0: return [v,n,m]; + case 1: return [n,v,m]; + case 2: return [m,v,n]; + case 3: return [m,n,v]; + case 4: return [n,m,v]; + case 5: return [v,m,n]; + } + } + + + function removePicker() { + delete jscolor.picker.owner; + document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB); + } + + + function drawPicker(x, y) { + if(!jscolor.picker) { + jscolor.picker = { + box : document.createElement('div'), + boxB : document.createElement('div'), + pad : document.createElement('div'), + padB : document.createElement('div'), + padM : document.createElement('div'), + sld : document.createElement('div'), + sldB : document.createElement('div'), + sldM : document.createElement('div'), + btn : document.createElement('div'), + btnS : document.createElement('span'), + btnT : document.createTextNode(THIS.pickerCloseText) + }; + for(var i=0,segSize=4; i', { - href: embed_url+'?json_url='+escape(json_url)+'&player_id='+escape(player_id)+'&ldt_id='+escape(ldt_id), - target: "_blank" - }).nyroModal({ - filters: ['iframe'], - sizes: { - minW: '750', - minH: '662' - }, - callbacks: { - afterShowCont: function(nm) { - nm.store.iframe.height(662); - nm.store.iframe.width(750); - } - } - }).trigger('nyroModal'); - return false; - }); - - $('.imageline',base_node).each(function(i) { var tr = $(this); tr.mouseover(function() {