1
$(document).ready(function() {
3
$('table.pie').visualize({type: 'pie', height: '300px', width: '620px'});
4
$('table.bar').visualize({type: 'bar', height: '300px', width: '620px'});
5
$('table.area').visualize({type: 'area', height: '300px', width: '620px'});
6
$('table.line').visualize({type: 'line', height: '300px', width: '620px'});
9
$('.styledselect_pages_1').selectbox({ inputClass: "styledselect_form_1" });
12
$("table.stats").each(function() {
14
$("table.stats thead th:not(:first)").each(function() {
15
colors.push($(this).css("color"));
30
$("table.stats-date").each(function() {
32
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
34
$("table.stats-date thead th:not(:first)").each(function() {
35
colors.push($(this).css("color"));
43
xaxisTransform: function(month) {
45
while ((i < 12) && (month != months[i])) {
53
tickFormatter: function(v, a) {
60
if ($('div#space').length <= 0) {
61
$('.flot-graph').before('<div class="space"></div>');
64
function showTooltip(x, y, contents) {
65
$('<div id="tooltip">' + contents + '</div>').css({
70
}).appendTo("body").fadeIn("fast");
73
var previousPoint = null;
74
$(".flot-graph").bind("plothover", function(event, pos, item) {
79
if (previousPoint != item.dataIndex) {
80
previousPoint = item.dataIndex;
82
$("#tooltip").remove();
83
var x = item.datapoint[0],
84
y = item.datapoint[1];
86
showTooltip(item.pageX, item.pageY, "<b>" + item.series.label + "</b>: " + y);
90
$("#tooltip").remove();
96
$('input').checkBox();
97
$('#toggle-all').click(function(){
98
$('#toggle-all').toggleClass('toggle-checked');
99
$('#mainform input[type=checkbox]').checkBox('toggle');
105
target: '#output', // target element(s) to be updated with server response
106
beforeSubmit: showRequest, // pre-submit callback
107
success: showResponse // post-submit callback
109
// other available options:
110
//url: url // override for form's 'action' attribute
111
//type: type // 'get' or 'post', override for form's 'method' attribute
112
//dataType: null // 'xml', 'script', or 'json' (expected server response type)
113
//clearForm: true // clear all form fields after successful submit
114
//resetForm: true // reset the form after successful submit
116
// $.ajax options can be used here too, for example:
120
// bind to the form's submit event
121
$('form[id$=form]').each( function() {
122
$(this).ajaxForm(options);
125
// Exception Info Expander
126
$("a#exceptiondetails").click(function() {
127
var exceptionid = $(this).parent().parent().attr("id");
128
$("div[class='exceptiondetails']").hide();
129
$(".exceptiondetailscontainer").show();
130
$("div[class='exceptiondetails'][id='"+exceptionid+"']").show();
134
$("#tabs, #graphs").tabs();
136
// Select all checkboxes
137
$("#checkboxall").click(function() {
138
var checked_status = this.checked;
139
$("input[name=checkall]").each(function() { this.checked = checked_status; });
142
// Rich text editor/WYSIWYG
143
$('#wysiwyg').wysiwyg();
148
var arrInfoWindows = [];
151
var centerCoord = new google.maps.LatLng(18.23, -66.39); // Puerto Rico
155
mapTypeId: google.maps.MapTypeId.TERRAIN
157
map = new google.maps.Map(document.getElementById("map"), mapOptions);
159
$.getJSON("inc/map.json", {}, function(data){
160
$.each(data.places, function(i, item){
161
$("#markers").append('<li><a href="#" rel="' + i + '">' + item.title + '</a></li>');
162
var marker = new google.maps.Marker({
163
position: new google.maps.LatLng(item.lat, item.lng),
167
arrMarkers[i] = marker;
168
var infowindow = new google.maps.InfoWindow({
169
content: "<h3>"+ item.title +"</h3><p>"+ item.description +"</p>"
171
arrInfoWindows[i] = infowindow;
172
google.maps.event.addListener(marker, 'click', function() {
173
infowindow.open(map, marker);
179
// initialize map (create markers, infowindows and list)
182
// "live" bind click event
183
$("#markers a").live("click", function(){
184
var i = $(this).attr("rel");
185
// this next line closes all open infowindows before opening the selected one
186
//for(x=0; x < arrInfoWindows.length; x++){ arrInfoWindows[x].close(); }
187
arrInfoWindows[i].open(map, arrMarkers[i]);
192
$(".action-slider").click(function () {
193
$("#actions-box-slider").slideToggle("fast");
194
$(this).toggleClass("activated");
199
$('.datatable').dataTable({"sPaginationType": "full_numbers"});
202
$("input#validate-text").keyup(function () {
203
if ($(this).val() == "") {
204
$(this).removeClass("inp-form");
205
$(this).addClass("inp-form-error");
207
$(this).parent().parent().find("td#error").html("<div class='error-left'></div><div class='error-inner'>This field is required.</div>");
209
$(this).addClass("inp-form");
210
$(this).removeClass("inp-form-error");
212
$(this).parent().parent().find("td#error").html("");
221
var refreshIntegration = function () {
222
$("div#integration div").each(function() { $(this).hide(); });
223
$("div#"+programmingLang).show();
224
$("div#"+installer).show();
227
$("input#appname").keyup(function () {
228
appName = $(this).val();
230
$("input#appname").removeClass("inp-form");
231
$("input#appname").addClass("inp-form-error");
232
$("tr#appname td#error").html("<div class='error-left'></div><div class='error-inner'>This field is required.</div>");
234
$("input#appname").addClass("inp-form");
235
$("input#appname").removeClass("inp-form-error");
236
$("tr#appname td#error").html("");
239
$("div#language_container ul").click(function () { programmingLang = $("#language_container ul li.selected2").attr('title'); refreshIntegration(); });
240
$("div#installer_container ul").click(function () { installer = $("#installer_container ul li.selected2").attr('title'); refreshIntegration(); });
243
// pre-submit callback
244
function showRequest(formData, jqForm, options) {
245
$('#output').html('<center><img src="images/forms/ajaxloader.gif" width="220" height="19" /></center><br />');
247
// here we could return false to prevent the form from being submitted;
248
// returning anything other than false will allow the form submit to continue
252
// post-submit callback
253
function showResponse(responseText, statusText, xhr, $form) {
254
// for normal html responses, the first argument to the success callback
255
// is the XMLHttpRequest object's responseText property
257
// if the ajaxForm method was passed an Options Object with the dataType
258
// property set to 'xml' then the first argument to the success callback
259
// is the XMLHttpRequest object's responseXML property
261
// if the ajaxForm method was passed an Options Object with the dataType
262
// property set to 'json' then the first argument to the success callback
263
// is the json data object returned by the server
265
// Message Box Fading Scripts
266
$(".close-yellow").click(function () {
267
$("#message-yellow").fadeOut("slow");
269
$(".close-red").click(function () {
270
$("#message-red").fadeOut("slow");
272
$(".close-blue").click(function () {
273
$("#message-blue").fadeOut("slow");
275
$(".close-green").click(function () {
276
$("#message-green").fadeOut("slow");
b'\\ No newline at end of file'