mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-14 03:43:13 +00:00
42 lines
697 B
JavaScript
42 lines
697 B
JavaScript
/*
|
|
|
|
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();
|
|
}
|