2010-09-14 23:38:29 +02:00
|
|
|
function spawnLink(link) {
|
|
|
|
var url = link.href;
|
|
|
|
return spawnURL(url);
|
|
|
|
}
|
|
|
|
|
|
|
|
function spawnURL(url) {
|
|
|
|
var w = window.open();
|
|
|
|
w.opener = null;
|
|
|
|
w.document.write('<meta http-equiv="refresh" content="0;' + url + '">');
|
|
|
|
w.document.close();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function openContactList()
|
|
|
|
{
|
|
|
|
window.open("https://hostedtalkgadget.google.com/talkgadget/popout?nav=true#", "Buddy List", "menubar=0,resizable=0,width=320,height=360")
|
|
|
|
}
|
|
|
|
|
|
|
|
function openTodo()
|
|
|
|
{
|
|
|
|
window.open("http://www.rememberthemilk.com", "ToDo List", "menubar=0,resizable=0,width=870,height=450")
|
|
|
|
}
|
|
|
|
|
|
|
|
function openCalendar()
|
|
|
|
{
|
|
|
|
window.open("https://www.google.com/calendar/gp?hl=en", "Calendar", "menubar=0,resizable=0,width=320,height=360")
|
|
|
|
}
|
|
|
|
|
|
|
|
function openNotepad()
|
|
|
|
{
|
|
|
|
window.open("notepad.html", "Notepad", "menubar=0,resizable=0,width=320,height=360")
|
|
|
|
}
|
|
|
|
|
|
|
|
function openCalculator()
|
|
|
|
{
|
|
|
|
window.open("calculator.html", "Calc", "menubar=0,resizable=0,width=320,height=360")
|
|
|
|
}
|
2010-09-21 17:09:31 +02:00
|
|
|
|
|
|
|
var zIndex = 0;
|
|
|
|
|
|
|
|
function make_draggable(elements)
|
|
|
|
{
|
|
|
|
/* Elements is a jquery object: */
|
|
|
|
elements.draggable({
|
|
|
|
snap:true,
|
|
|
|
containment:'parent',
|
|
|
|
start:function(e,ui){ ui.helper.css('z-index',++zIndex); },
|
|
|
|
stop:function(e,ui){
|
|
|
|
|
|
|
|
/* Sending the z-index and positon of the note to update_position.php via AJAX GET: */
|
|
|
|
$.get('ajax/update.php',{
|
|
|
|
x : ui.position.left,
|
|
|
|
y : ui.position.top,
|
|
|
|
id : ui.helper.attr('id')
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2010-09-22 16:02:40 +02:00
|
|
|
|
2010-09-14 23:38:29 +02:00
|
|
|
$(document).ready(function(){
|
2010-09-22 16:02:40 +02:00
|
|
|
$('a.popup').bind("click", function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
var url = $(this).attr('href');
|
|
|
|
spawnURL(url);
|
|
|
|
});
|
2010-09-17 15:38:57 +02:00
|
|
|
$('body').prepend('<div id="menu-bar"></div>');
|
|
|
|
$('#menu-bar').prepend($('#config-menu'));
|
|
|
|
|
2010-09-14 23:38:29 +02:00
|
|
|
$("#q").focus(); //focus sur la recherche
|
|
|
|
//$('.iconlist').sortable();
|
|
|
|
$('#config-menu').fancybox({
|
|
|
|
'zoomSpeedIn' : 600,
|
|
|
|
'zoomSpeedOut' : 500,
|
|
|
|
'easingIn' : 'easeOutBack',
|
|
|
|
'easingOut' : 'easeInBack',
|
|
|
|
'hideOnContentClick': false,
|
|
|
|
'padding' : 15
|
|
|
|
});
|
|
|
|
$('#blog-links-manager').fancybox({
|
|
|
|
'zoomSpeedIn' : 600,
|
|
|
|
'zoomSpeedOut' : 500,
|
|
|
|
'easingIn' : 'easeOutBack',
|
|
|
|
'easingOut' : 'easeInBack',
|
|
|
|
'hideOnContentClick': false,
|
|
|
|
'padding' : 15
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|