# HG changeset patch # User durandn # Date 1442483881 -7200 # Node ID a5a4c902253486a28665c8df19587a4ae54f9452 # Parent 4914a246ae46a9e679d557fb73f5397696b5dd6a Added support for deleting annotations for teacher scenario diff -r 4914a246ae46 -r a5a4c9022534 server/src/remie/static/remie/css/style.css --- a/server/src/remie/static/remie/css/style.css Fri Sep 18 13:04:51 2015 +0200 +++ b/server/src/remie/static/remie/css/style.css Thu Sep 17 11:58:01 2015 +0200 @@ -330,7 +330,7 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - width: 320px !important; + width: 270px !important; display: inline-block !important; margin: 0px !important; font-size: 12px !important; @@ -340,6 +340,8 @@ .Ldt-AnnotationsList-li p.Ldt-AnnotationsList-Title{ color: #848484; font-weight: normal; + position: relative; + right: 40px; } .Ldt-AnnotationsList-li .Ldt-AnnotationsList-CreationDate{ float:left; diff -r 4914a246ae46 -r a5a4c9022534 server/src/remie/static/remie/css/teacher.css --- a/server/src/remie/static/remie/css/teacher.css Fri Sep 18 13:04:51 2015 +0200 +++ b/server/src/remie/static/remie/css/teacher.css Thu Sep 17 11:58:01 2015 +0200 @@ -23,6 +23,40 @@ margin-left: 0; } +.Ldt-AnnotationsList-DeleteButton { + position: relative; + top: 0px !important; +} + +.Ldt-AnnotationsList-Screen{ + background-color: #F3F7F8; +} + +.Ldt-AnnotationsList-ScreenMain{ + margin: 0px; + padding: 0px; +} + +.Ldt-AnnotationsList-ul-ToDelete .Ldt-AnnotationsList-li{ + background-color: white; +} + +ul.Ldt-AnnotationsList-ul { + padding: 0px; + margin: 0px; +} + +.Ldt-AnnotationsList-Close{ + position: relative; + top: -45px; + left: 200px; +} + +.Ldt-AnnotationsList-ScreenDelete{ + margin-top: 15px; + padding-top: 15px; +} + /* ----- Filter style ----- */ .Ldt-AnnotationsListWidget .Ldt-AnnotationsList-Filters{ diff -r 4914a246ae46 -r a5a4c9022534 server/src/remie/static/remie/metadataplayer/AnnotationsList.css --- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.css Fri Sep 18 13:04:51 2015 +0200 +++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.css Thu Sep 17 11:58:01 2015 +0200 @@ -45,11 +45,12 @@ margin: 4px 2px; } -ul.Ldt-AnnotationsList-ul { +ul.Ldt-AnnotationsList-ul, ul.Ldt-AnnotationsList-ul-toDelete { list-style: none; - padding: 2px; - margin: 0; + padding: 0px; + margin: 0px; } + li.Ldt-AnnotationsList-li { width: 100%; clear: both; @@ -73,6 +74,21 @@ max-height: 100%; margin: 0 auto; } + +.Ldt-AnnotationsList-DeleteButton { + margin: 0px; + float: right; + font-size: 20px; + position: relative; + top: -50px; + left: -5px; + color: #787878 +} +.Ldt-AnnotationsList-DeleteButton:hover { + color: #f7268e; + cursor: pointer; +} + .Ldt-AnnotationsList-Duration { color: #f7268e; float: right; @@ -144,4 +160,26 @@ .Ldt-AnnotationsList-Play:hover { background-position: 0 bottom; +} + +.Ldt-AnnotationsList-ScreenMain{ + margin: 0px; + padding: 0px; +} + +.Ldt-AnnotationsList-ScreenDelete, .Ldt-AnnotationsList-ScreenSending, +.Ldt-AnnotationsList-ScreenError, .Ldt-AnnotationsList-ScreenSuccess{ + margin-top: 15px; + width: 100% + text-align: center; + vertical-align: middle; + font-size: 14px; + font-weight: bold; + color: #68273C; +} + +a.Ldt-AnnotationsList-Close { + position: absolute; right: 2px; + display: inline-block; width: 17px; height: 17px; margin: 4px; + background: url(img/widget-control.png); } \ No newline at end of file diff -r 4914a246ae46 -r a5a4c9022534 server/src/remie/static/remie/metadataplayer/AnnotationsList.js --- a/server/src/remie/static/remie/metadataplayer/AnnotationsList.js Fri Sep 18 13:04:51 2015 +0200 +++ b/server/src/remie/static/remie/metadataplayer/AnnotationsList.js Thu Sep 17 11:58:01 2015 +0200 @@ -45,12 +45,18 @@ current_day_filter: true, show_header : false, custom_header : false, - annotation_count_header : true, + annotations_count_header : true, show_creation_date : false, show_timecode : true, /* * Only annotation in the current segment will be displayed. Designed to work with the Segments Widget. */ + allow_annotations_deletion: false, + /* + * URL to call when deleting annotation. Expects a mustache template with {{annotation_id}}, ex /api/anotations/{{annotation_id}}/ + */ + api_delete_endpoint : "", + api_delete_method: "DELETE", filter_by_segments: false, segment_filter: true, segments_annotation_type: "chap", @@ -85,6 +91,13 @@ header: "Annotations for this content", segment_filter: "All cuttings", latest_contributions: "Latest contributions", + close_widget: "Close", + confirm: "Confirm", + cancel: "Cancel", + annotation_deletion_delete: "You will delete this annotation : ", + annotation_deletion_sending: "Your deletion request is being sent ... ", + annotation_deletion_success: "The annotation has been deleted.", + annotation_deletion_error: "There was an error contacting the server. The annotation has not been deleted." }, fr: { voice_annotation: "Annotation Vocale", @@ -93,6 +106,13 @@ header: "Annotations sur ce contenu", segment_filter: "Tous les segments", latest_contributions: "Dernières contributions", + close_widget: "Fermer", + confirm: "Confirmer", + cancel: "Annuler", + annotation_deletion_delete: "Vous allez supprimer cette annotation: ", + annotation_deletion_sending: "Votre demande de suppression est en cours d'envoi ... ", + annotation_deletion_success: "L'annotation a été supprimée.", + annotation_deletion_error: "Une erreur s'est produite en contactant le serveur. L'annotation n'a pas été supprimée." } }; @@ -102,30 +122,54 @@ + '{{^custom_header}}{{l10n.header}}{{/custom_header}}' + '
{{/show_header}}' + '{{{hdescription}}}
' + '{{#created}}' @@ -142,7 +186,7 @@ + '{{/tags}}' + '' + '{{/tags.length}}' - + '{{#audio}}