3
* author: Anthony Dillon
6
function ShutdownSystem(){
9
this.init = function(){
10
$('#shutdown-window .control .close').bind('click', function(){
13
$('#shutdown-window .content .shutdown-buttons div').bind('click', function(){
14
var clickedClass = $(this).attr('class').replace(' highlight', '');
17
_this.shutdownClicked();
20
_this.cancelClicked();
27
this.cancelClicked = function(){
31
this.shutdownClicked = function(){
32
window.location.href = 'http://www.ubuntu.com/ubuntu/take-the-tour';
35
this.open = function(){
37
$('#shutdown-window').show();
38
$('#shutdown-window ').trigger('mousedown');
41
this.close = function(){
42
$('#shutdown-window').hide();
46
this.resize = function(){
47
var left = ($(document).width() / 2) - ($('#shutdown-window').width() / 2);
48
var top = ($(document).height() / 2) - ($('#shutdown-window').height() / 2);
49
$('#shutdown-window').css('left',left);
50
$('#shutdown-window').css('top',top-100);
53
this.center = function(){
54
var left = ($(document).width() / 2) - ($('#shutdown-window').width() / 2);
55
var top = ($(document).height() / 2) - ($('#shutdown-window').height() / 2);
56
$('#shutdown-window').css('left',left);
57
$('#shutdown-window').css('top',top-100);