diff --git a/capsule-prototype/js/MosaicPanelWidget.js b/capsule-prototype/js/MosaicPanelWidget.js index de9d9474c06b92efe4a348531b1d10a36989c2ff..d9c8d41e287e9a813908362197d318cd6ddd686e 100644 --- a/capsule-prototype/js/MosaicPanelWidget.js +++ b/capsule-prototype/js/MosaicPanelWidget.js @@ -164,7 +164,7 @@ localOptions.rekall().timeline.pause(); fillPanel(); localOptions.htmlElement().show(); - localOptions.updateObserver = localOptions.pubsub().subscribe('popupEdit.updated', this.refresh); + localOptions.updateObserver = localOptions.pubsub().subscribe('popupEdit.Closed', this.refresh); localOptions.isOpen = true; }, hide: function () { diff --git a/capsule-prototype/js/PopupPanelWidget.js b/capsule-prototype/js/PopupPanelWidget.js index f5b7cf97c8e8d18010174a530a034eb186d4e649..f73e5c1dd0e9271e0fa0decadfee371fc7ebff4d 100644 --- a/capsule-prototype/js/PopupPanelWidget.js +++ b/capsule-prototype/js/PopupPanelWidget.js @@ -941,6 +941,7 @@ PopupPanelWidget.prototype.createPopupContent = function (tag) { function createRightPopup(popupPanelWidget) { let popupRightTd = $('#popupRight'); + popupRightTd.attr('keyDoc', tag.document.key) popupRightTd.empty(); let commonDataForPanels = { @@ -996,4 +997,5 @@ PopupPanelWidget.prototype.close = function() { if(this.videoWasPlayingOnContentCreation) { window.app.rekall.Rekall().timeline.play(); } + window.app.rekall.Rekall('pubSub').publish('popupEdit.Closed', {}); } diff --git a/capsule-prototype/js/online-script.js b/capsule-prototype/js/online-script.js index d2ac82c63e7b49e88a9bab83756981edf00c3303..4cd35c149311ef296b2ac609a2c38fd8866949ee 100644 --- a/capsule-prototype/js/online-script.js +++ b/capsule-prototype/js/online-script.js @@ -104,11 +104,7 @@ window.onload = function() { $("#popupSpace").click(function(event){ event.stopPropagation(); - closeEdit(); - }); - $("#closePopupEdit").click(function(event){ - event.stopPropagation(); - closeEdit(); + popupPanel.close(); }); $("#popupAlertButtonCancel").click(function(){ @@ -699,7 +695,7 @@ function closeInputs() { function closeEdit() { popupPanel.close(); - window.app.rekall.Rekall('pubSub').publish('popupEdit.updated', {}); + window.app.rekall.Rekall('pubSub').publish('popupEdit.Closed', {}); } function openVideo() { @@ -840,7 +836,7 @@ function deleteFromDom(keyDoc) { function deleteFromDomFinished() { closeAlert(); - closeEdit(); + popupPanel.close(); } //Gestion d'upload