JS corrections
authorveltr
Fri, 08 Jun 2012 18:14:50 +0200
changeset 45 203991e94842
parent 41 602df918fbc5
child 46 3a7cefaa6846
JS corrections
crea/integration/metadataplayer/MusitagAnnotator.js
web/tralalere/static/tralalere/metadataplayer/MusitagAnnotator.js
--- a/crea/integration/metadataplayer/MusitagAnnotator.js	Fri Jun 08 17:43:27 2012 +0200
+++ b/crea/integration/metadataplayer/MusitagAnnotator.js	Fri Jun 08 18:14:50 2012 +0200
@@ -155,7 +155,6 @@
     this.$.find('.Musitag-Annotator-close').click(function() {
         _this.recorder.stopRecord();
         _this.hide();
-        _this.player.popcorn.trigger("IriSP.MusitagAndYou.show");
     });
     
     this.$.find('.Musitag-Annotator-Note').click(function() {
@@ -188,7 +187,9 @@
 }
 
 IriSP.Widgets.MusitagAnnotator.prototype.show = function() {
-    this.player.popcorn.pause();
+    if (!this.player.popcorn.media.paused) {
+        this.player.popcorn.pause();
+    }
     this.$.show();
     this.showScreen('Main');
     this.$.find('.Musitag-Annotator-tagInSelector').removeClass("down");
@@ -206,6 +207,7 @@
 
 IriSP.Widgets.MusitagAnnotator.prototype.hide = function() {
     var _this = this;
+    this.player.popcorn.trigger("IriSP.MusitagAndYou.show");
     this.position_bar.slideUp(200, function() {
         _this.$.hide();
     });
--- a/web/tralalere/static/tralalere/metadataplayer/MusitagAnnotator.js	Fri Jun 08 17:43:27 2012 +0200
+++ b/web/tralalere/static/tralalere/metadataplayer/MusitagAnnotator.js	Fri Jun 08 18:14:50 2012 +0200
@@ -155,7 +155,6 @@
     this.$.find('.Musitag-Annotator-close').click(function() {
         _this.recorder.stopRecord();
         _this.hide();
-        _this.player.popcorn.trigger("IriSP.MusitagAndYou.show");
     });
     
     this.$.find('.Musitag-Annotator-Note').click(function() {
@@ -188,7 +187,9 @@
 }
 
 IriSP.Widgets.MusitagAnnotator.prototype.show = function() {
-    this.player.popcorn.pause();
+    if (!this.player.popcorn.media.paused) {
+        this.player.popcorn.pause();
+    }
     this.$.show();
     this.showScreen('Main');
     this.$.find('.Musitag-Annotator-tagInSelector').removeClass("down");
@@ -206,6 +207,7 @@
 
 IriSP.Widgets.MusitagAnnotator.prototype.hide = function() {
     var _this = this;
+    this.player.popcorn.trigger("IriSP.MusitagAndYou.show");
     this.position_bar.slideUp(200, function() {
         _this.$.hide();
     });