integration/js/editor.js
changeset 64 2de3ca9542ed
parent 50 89e152523cb6
child 65 60a1e58b0a08
--- a/integration/js/editor.js	Tue Nov 27 15:03:20 2012 +0100
+++ b/integration/js/editor.js	Tue Nov 27 18:58:38 2012 +0100
@@ -509,10 +509,15 @@
     $("#segment-description").on("keyup change input paste", function() {
         if (currentMedia && currentSegment) {
             currentSegment.description = $(this).val();
+            updateSegmentUI();
             mashup.trigger("change");
         }
     });
     $("#segment-form").submit(function() {
+        currentSegment.title = $("#segment-title").val();
+        currentSegment.description = $("#segment-description").val();
+        currentSegment.keywords = $("#segment-tags").tagit("assignedTags");
+        updateSegmentUI();
         if (addMode) {
             mashup.addAnnotation(currentSegment);
             currentSegment = undefined;
@@ -539,6 +544,8 @@
         window.setTimeout(function() {
             if (currentMedia && currentSegment) {
                 currentSegment.keywords = $("#segment-tags").tagit("assignedTags");
+                updateSegmentUI();
+                mashup.trigger("change");
             }
         }, 0);
     }