CreateAnnotation: now triggering events for hiding and showing widget after submitting to make it easier for other widgets to catch these events
authordurandn
Tue, 22 Sep 2015 12:04:36 +0200
changeset 1061 7d22bfd6b73b
parent 1060 3a4f2217a04f
child 1062 f8adaa2caecb
CreateAnnotation: now triggering events for hiding and showing widget after submitting to make it easier for other widgets to catch these events
src/widgets/CreateAnnotation.js
--- a/src/widgets/CreateAnnotation.js	Mon Sep 21 18:25:06 2015 +0200
+++ b/src/widgets/CreateAnnotation.js	Tue Sep 22 12:04:36 2015 +0200
@@ -234,7 +234,7 @@
     });
     this.$.find(".Ldt-CreateAnnotation-Close").click(function() {
         _this.close_after_send
-        ? _this.hide()
+        ? _this.player.trigger("CreateAnnotation.hide")
         : _this.showScreen("Main");
         return false;
     });
@@ -505,8 +505,8 @@
                 window.setTimeout(
                     function() {
                         _this.close_after_send
-                        ? _this.hide()
-                        : _this.show();
+                        ? _this.player.trigger("CreateAnnotation.hide")
+                        : _this.player.trigger("CreateAnnotation.show");
                     },
                     _this.after_send_timeout
                 );