1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
jQuery.noConflict();
window.onscroll = function()
{
if( window.XMLHttpRequest ) {
if (document.documentElement.scrollTop > 0 || self.pageYOffset > 0) {
jQuery('#primary_left').css('position','fixed');
jQuery('#primary_left').css('top','0');
} else if (document.documentElement.scrollTop < 0 || self.pageYOffset < 0) {
jQuery('#primary_left').css('position','absolute');
jQuery('#primary_left').css('top','175px');
}
}
}
function initMenu() {
jQuery('#menu ul ul').hide();
jQuery('#menu ul li').click(function() {
jQuery(this).parent().find("ul").slideUp('fast');
jQuery(this).parent().find("li").removeClass("current");
jQuery(this).find("ul").slideToggle('fast');
jQuery(this).toggleClass("current");
});
}
jQuery(document).ready(function() {
Cufon.replace('h1, h2, h5, .notification strong', { hover: 'true' }); // Cufon font replacement
initMenu(); // Initialize the menu!
jQuery(".tablesorter").tablesorter(); // Tablesorter plugin
jQuery('#dialog').dialog({
autoOpen: false,
width: 650,
buttons: {
"Done": function() {
jQuery(this).dialog("close");
},
"Cancel": function() {
jQuery(this).dialog("close");
}
}
}); // Default dialog. Each should have it's own instance.
jQuery('.dialog_link').click(function(){
jQuery('#dialog').dialog('open');
return false;
}); // Toggle dialog
jQuery('.notification').hover(function() {
jQuery(this).css('cursor','pointer');
}, function() {
jQuery(this).css('cursor','auto');
}); // Close notifications
jQuery('.checkall').click(
function(){
jQuery(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked', jQuery(this).is(':checked'));
}
); // Top checkbox in a table will select all other checkboxes in a specified column
jQuery('.iphone').iphoneStyle(); //iPhone like checkboxes
jQuery('.notification span').click(function() {
jQuery(this).parents('.notification').fadeOut(800);
}); // Close notifications on clicking the X button
jQuery(".tooltip").easyTooltip({
xOffset: -60,
yOffset: 70
}); // Tooltips!
jQuery('#menu li:not(".current"), #menu ul ul li a').hover(function() {
jQuery(this).find('span').animate({ marginLeft: '5px' }, 100);
}, function() {
jQuery(this).find('span').animate({ marginLeft: '0px' }, 100);
}); // Menu simple animation
jQuery('.fade_hover').hover(
function() {
jQuery(this).stop().animate({opacity:0.6},200);
},
function() {
jQuery(this).stop().animate({opacity:1},200);
}
); // The fade function
//sortable, portlets
jQuery(".column").sortable({
connectWith: '.column',
placeholder: 'ui-sortable-placeholder',
forcePlaceholderSize: true,
scroll: false,
helper: 'clone'
});
jQuery(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all").find(".portlet-header").addClass("ui-widget-header ui-corner-all").prepend('<span class="ui-icon ui-icon-circle-arrow-s"></span>').end().find(".portlet-content");
jQuery(".portlet-header .ui-icon").click(function() {
jQuery(this).toggleClass("ui-icon-minusthick");
jQuery(this).parents(".portlet:first").find(".portlet-content").toggle();
});
jQuery(".column").disableSelection();
jQuery("table.stats").each(function() {
if(jQuery(this).attr('rel')) { var statsType = jQuery(this).attr('rel'); }
else { var statsType = 'area'; }
var chart_width = (jQuery(this).parent().parent(".ui-widget").width()) - 60;
jQuery(this).hide().visualize({
type: statsType, // 'bar', 'area', 'pie', 'line'
width: '800px',
height: '240px',
colors: ['#6fb9e8', '#ec8526', '#9dc453', '#ddd74c']
}); // used with the visualize plugin. Statistics.
});
jQuery(".tabs").tabs(); // Enable tabs on all '.tabs' classes
jQuery( ".datepicker" ).datepicker();
jQuery(".editor").cleditor({
width: '800px'
}); // The WYSIWYG editor for '.editor' classes
// Slider
jQuery(".slider").slider({
range: true,
values: [20, 70]
});
// Progressbar
jQuery(".progressbar").progressbar({
value: 40
});
});
|