web/static/res/js/popUp.js
changeset 93 7c37aaa2a8ae
parent 78 8c3f0b94d056
--- a/web/static/res/js/popUp.js	Mon Jan 21 21:00:24 2013 +0100
+++ b/web/static/res/js/popUp.js	Mon Jan 21 21:04:36 2013 +0100
@@ -6,6 +6,7 @@
 }
 
 var popupOn = false;
+var playOnClose = false;
 function popupPosition(windowname, contantId)
 {
 	if (!popupOn) {
@@ -32,4 +33,17 @@
 	popupPosition(windowname, contantId);
 	toggle('blanket');
 	toggle(windowname);
-}
\ No newline at end of file
+}
+
+function openClosePopup() {
+	if (popupOn) {
+		if (!incPlayer.popSeq.playing && playOnClose) {
+			incPlayer.ctrlPlay();
+			playOnClose = false;
+		}
+	} else if (incPlayer.popSeq.playing) {
+		incPlayer.ctrlPlay();
+		playOnClose = true;
+	}
+	popup('popUpDiv', 'content');
+}