friendica-addons/jappixmini/jappix/js/popup.js

43 lines
697 B
JavaScript
Raw Normal View History

2012-04-17 23:12:24 +00:00
/*
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();
}