]> git.mxchange.org Git - friendica-addons.git/blobdiff - jappixmini/jappix/js/popup.js
jappixmini: include jappix source
[friendica-addons.git] / jappixmini / jappix / js / popup.js
diff --git a/jappixmini/jappix/js/popup.js b/jappixmini/jappix/js/popup.js
new file mode 100644 (file)
index 0000000..0d799cc
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+
+Jappix - An open social platform
+These are the popup JS scripts for Jappix
+
+-------------------------------------------------
+
+License: AGPL
+Author: Vanaryon
+Last revision: 26/04/11
+
+*/
+
+// Creates a popup code
+function createPopup(id, content) {
+       // Popup exists?
+       if(exists('#' + id))
+               return false;
+       
+       // Append the popup code
+       $('body').append(
+               '<div id="' + id + '" class="lock removable">' + 
+                       '<div class="popup">' + 
+                               content + 
+                       '</div>' + 
+               '</div>'
+       );
+       
+       return true;
+}
+
+// Destroys a popup code
+function destroyPopup(id) {
+       // Stop the popup timers
+       $('#' + id + ' *').stopTime();
+       
+       // Remove the popup
+       $('#' + id).remove();
+       
+       // Manage input focus
+       inputFocus();
+}