Improve output: distinguish between failed assertions (failures) and unexpected exceptions (errors), and print a filtered stack trace for any exception.

This commit is contained in:
jeb228 2010-01-29 22:13:57 +00:00
commit 4f2e303079
1839 changed files with 235630 additions and 0 deletions

View file

@ -0,0 +1,123 @@
/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/
(function(jQuery){
// We override the animation for all of these color styles
jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
jQuery.fx.step[attr] = function(fx){
if ( fx.state == 0 ) {
fx.start = getColor( fx.elem, attr );
fx.end = getRGB( fx.end );
}
fx.elem.style[attr] = "rgb(" + [
Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
].join(",") + ")";
}
});
// Color Conversion functions from highlightFade
// By Blair Mitchelmore
// http://jquery.offput.ca/highlightFade/
// Parse strings looking for color tuples [255,255,255]
function getRGB(color) {
var result;
// Check if we're already dealing with an array of colors
if ( color && color.constructor == Array && color.length == 3 )
return color;
// Look for rgb(num,num,num)
if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];
// Look for rgb(num%,num%,num%)
if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
// Look for #a0b1c2
if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
// Look for #fff
if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
// Otherwise, we're most likely dealing with a named color
return colors[jQuery.trim(color).toLowerCase()];
}
function getColor(elem, attr) {
var color;
do {
color = jQuery.curCSS(elem, attr);
// Keep going until we find an element that has color, or we hit the body
if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
break;
attr = "backgroundColor";
} while ( elem = elem.parentNode );
return getRGB(color);
};
// Some named colors to work with
// From Interface by Stefan Petre
// http://interface.eyecon.ro/
var colors = {
aqua:[0,255,255],
azure:[240,255,255],
beige:[245,245,220],
black:[0,0,0],
blue:[0,0,255],
brown:[165,42,42],
cyan:[0,255,255],
darkblue:[0,0,139],
darkcyan:[0,139,139],
darkgrey:[169,169,169],
darkgreen:[0,100,0],
darkkhaki:[189,183,107],
darkmagenta:[139,0,139],
darkolivegreen:[85,107,47],
darkorange:[255,140,0],
darkorchid:[153,50,204],
darkred:[139,0,0],
darksalmon:[233,150,122],
darkviolet:[148,0,211],
fuchsia:[255,0,255],
gold:[255,215,0],
green:[0,128,0],
indigo:[75,0,130],
khaki:[240,230,140],
lightblue:[173,216,230],
lightcyan:[224,255,255],
lightgreen:[144,238,144],
lightgrey:[211,211,211],
lightpink:[255,182,193],
lightyellow:[255,255,224],
lime:[0,255,0],
magenta:[255,0,255],
maroon:[128,0,0],
navy:[0,0,128],
olive:[128,128,0],
orange:[255,165,0],
pink:[255,192,203],
purple:[128,0,128],
violet:[128,0,128],
red:[255,0,0],
silver:[192,192,192],
white:[255,255,255],
yellow:[255,255,0]
};
})(jQuery);

View file

@ -0,0 +1,39 @@
/* Copyright (c) 2006 Mathias Bank (http://www.mathias-bank.de)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Thanks to Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
*/
jQuery.extend({
/**
* Returns get parameters.
*
* If the desired param does not exist, null will be returned
*
* @example value = $.getURLParam("paramName");
*/
getURLParam: function(strParamName){
var strReturn = "";
var strHref = window.location.href;
var bFound=false;
var cmpstring = strParamName + "=";
var cmplen = cmpstring.length;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf("?")+1);
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (aQueryString[iParam].substr(0,cmplen)==cmpstring){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
bFound=true;
break;
}
}
}
if (bFound==false) return null;
return strReturn;
}
});

View file

@ -0,0 +1,48 @@
.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0px;
padding: 2px 5px;
cursor: default;
display: block;
/*
if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
/*
it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
overflow: hidden;
}
.ac_loading {
background: white url('indicator.gif') right center no-repeat;
}
.ac_odd {
background-color: #eee;
}
.ac_over {
background-color: #0A246A;
color: white;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,501 @@
/*
### jQuery Multiple File Upload Plugin v1.28 - 2008-05-02 ###
By Diego A., http://www.fyneworks.com, diego@fyneworks.com
Project: http://jquery.com/plugins/project/MultiFile/
Website: http://www.fyneworks.com/jquery/multiple-file-upload/
Forums: http://www.nabble.com/jQuery-Multiple-File-Upload-f20931.html
*/
/*
CHANGE LOG:
12-April-2007: v1.1
Added events and file extension validation
See website for details.
06-June-2007: v1.2
Now works in Opera.
12-June-2007: v1.21
Preserves name of file input so all current server-side
functions don't need to be changed on new installations.
24-June-2007: v1.22
Now works perfectly in Opera, thanks to Adrian Wróbel <adrian [dot] wrobel [at] gmail.com>
10-Jan-2008: v1.24
Fixed bug in event trigger - sending incorrect parameters to event handlers
14-Jan-2008: v1.24
Fixed bug 1251: http://plugins.jquery.com/project/comments/add/1251
25-Jan-2008: v1.24
Implemented feature request: http://plugins.jquery.com/node/1363
The plugin now automatically intercepts ajaxSubmit function (form plugin)
and disbales empty file input elements for submission
08-Feb-2008: v1.25
Fixed bug: http://plugins.jquery.com/node/1495
The last change caused the plugin to disabled input files that shouldn't have been ignored
Now, every newly created input file (by this plugin) is marked by the MultiFile class.
11-Feb-2008: v1.25
Fixed bug: http://plugins.jquery.com/node/1495
Plugin would override element ID everytime.
11-Feb-2008: v1.26
Modified plugin structure. After selecting and removing a file, the plugin would
remove the original element from DOM. Now the plugin works back on its own tracks
and removes the last generated element.
This will resolve compatibility issues with validation plugins and custom code.
12-Feb-2008: v1.26
Try to clear elements using the browser's native behaviour: .reset()
This works around security policies in IE6 and Opera.
17-Mar-2008: v1.27
Added properties/methods for easier form integration
$.MultiFile.autoIntercept - array of known jQuery plugins to intercept (default: 'submit', 'ajaxSubmit', 'validate');
$.MultiFile.intercept - intercepts a jQuery plugin / anonymous function
$.MultiFile.disableEmpty - disable empty inputs (required for some upload scripts)
$.MultiFile.reEnableEmpty - re-enables empty inputs
17-Mar-2008: v1.28
MAJOR FIX - OPERA BUG
MASTER.labels was a readyonly property and cause the script to fail.
Renamed to MASTER.eLBL. Problem solved!
29-Apr-2008: v1.28
Added validation to stop duplicate selections
Extracted default configuration to $.MultiFile.options
Improved code organization / performance
Default name is now files[] - square brackets indicate an array is being submitted
Added namePattern options - allows user to configure name of slave elements
- $name = master name, $id = master id, $g = group count, $i = slave count
- eg.: $name$i will result in file1, file2, file3 and so on...
*/
/*# AVOID COLLISIONS #*/
;if(jQuery) (function($){
/*# AVOID COLLISIONS #*/
// extend jQuery - $.MultiFile hook
$.extend($, {
MultiFile: function( o /* Object */ ){
//return $("INPUT[@type='file'].multi").MultiFile(o);
return $("input:file.multi").MultiFile(o);
}
});
//===
// extend $.MultiFile - default options
$.extend($.MultiFile, {
options: {
accept: '', max: -1,
// error handling function
error: function(s){
if($.blockUI){
$.blockUI({
message: s.replace(/\n/gi,'<br/>'),
css: {
border:'none', padding:'15px', size:'12.0pt',
backgroundColor:'#900', color:'#fff',
opacity:'.8','-webkit-border-radius': '10px','-moz-border-radius': '10px'
}
});
window.setTimeout($.unblockUI, 2000);
}
else{
alert(s);
}
},
// namePattern: $name/$id (from master element), $i (slave count), $g (group count)
namePattern: '$name',
// STRING: collection lets you show messages in different languages
STRING: {
remove:'remove',
denied:'You cannot select a $ext file.\nTry again...',
selected:'File selected: $file',
duplicate:'This file has already been selected:\n$file'
}
}
});
//===
// extend $.MultiFile - global methods
$.extend($.MultiFile, {
disableEmpty: function(){
$('input:file'/*.multi'*/).each(function(){
var $this = $(this);
if($this.val()=='') $this.addClass('mfD').each(function(){ this.disabled = true });
});
},
reEnableEmpty: function(){
$('input:file.mfD').removeClass('mfD').each(function(){ this.disabled = false });
},
autoIntercept: [ 'submit', 'ajaxSubmit', 'validate' /* array of methods to intercept */ ],
intercepted: {},
intercept: function(methods, context, args){
var method, value; args = args || [];
if(args.constructor.toString().indexOf("Array")<0) args = [ args ];
if(typeof(methods)=='function'){
$.MultiFile.disableEmpty();
value = methods.apply(context || window, args);
$.MultiFile.reEnableEmpty();
return value;
};
if(methods.constructor.toString().indexOf("Array")<0) methods = [methods];
for(var i=0;i<methods.length;i++){
method = methods[i]+''; // make sure that we have a STRING
if(method) (function(method){ // make sure that method is ISOLATED for the interception
$.MultiFile.intercepted[method] = $.fn[method] || function(){};
$.fn[method] = function(){
$.MultiFile.disableEmpty();
//if(console) console.log(['$.MultiFile.intercepted', method, this, arguments]);
value = $.MultiFile.intercepted[method].apply(this, arguments);
$.MultiFile.reEnableEmpty();
return value;
}; // interception
})(method); // MAKE SURE THAT method IS ISOLATED for the interception
};// for each method
}
});
//===
// extend jQuery function library
$.extend($.fn, {
// Use this function to clear values of file inputs
// This doesn't always work: $(element).val('').attr('value', '')[0].value = '';
reset: function(){ return this.each(function(){ try{ this.reset(); }catch(e){} }); },
// MultiFile function
MultiFile: function( o /* Object */ ){
//### http://plugins.jquery.com/node/1363
// utility method to integrate this plugin with others...
if($.MultiFile.autoIntercept){
$.MultiFile.intercept( $.MultiFile.autoIntercept /* array of methods to intercept */ );
$.MultiFile.autoIntercept = null; /* only run this once */
};
//===
// Bind to each element in current jQuery object
return $(this).each(function(group_count){
if(this._MultiFile) return; this._MultiFile = true;
// BUG 1251 FIX: http://plugins.jquery.com/project/comments/add/1251
// variable group_count would repeat itself on multiple calls to the plugin.
// this would cause a conflict with multiple elements
// changes scope of variable to global so id will be unique over n calls
window.MultiFile = (window.MultiFile || 0) + 1;
group_count = window.MultiFile;
// Copy parent attributes - Thanks to Jonas Wagner
// we will use this one to create new input elements
var MASTER = this, xCLONE = $(MASTER).clone();
//===
//# USE CONFIGURATION
if(typeof o=='number') o = {max:o};
if(typeof o=='string') o = {accept:o};
o = $.extend({},
$.MultiFile.options,
($.metadata ? $(MASTER).metadata()/*NEW metadata plugin*/ :
($.meta ? $(MASTER).data()/*OLD metadata plugin*/ :
null/*metadata plugin not available*/)) || {},
o || {}
);
// limit number of files that can be selected?
if(!(o.max>0) /*IsNull(MASTER.max)*/){
o.max = $(MASTER).attr('maxlength');
if(!(o.max>0) /*IsNull(MASTER.max)*/){
o.max = (String(MASTER.className.match(/\b(max|limit)\-([0-9]+)\b/gi) || ['']).match(/[0-9]+/gi) || [''])[0];
if(!(o.max>0)) o.max = -1;
else o.max = String(o.max).match(/[0-9]+/gi)[0];
}
};
o.max = new Number(o.max);
// limit extensions?
o.accept = o.accept || $(MASTER).attr('accept') || '';
if(!o.accept){
o.accept = (MASTER.className.match(/\b(accept\-[\w\|]+)\b/gi)) || '';
o.accept = new String(o.accept).replace(/^(accept|ext)\-/i,'');
};
//===
// APPLY CONFIGURATION
$.extend(MASTER, o || {});
MASTER.STRING = $.extend({},$.MultiFile.options.STRING,MASTER.STRING);
//===
//#########################################
// PRIVATE PROPERTIES/METHODS
$.extend(MASTER, {
n: 0, // How many elements are currently selected?
slaves: [], files: [],
instanceKey: MASTER.id || 'MultiFile'+String(group_count), // Instance Key?
generateID: function(z){ return MASTER.instanceKey + (z>0 ?'_F'+String(z):''); },
trigger: function(event, element){
var handler = MASTER[event], value = $(element).attr('value');
if(handler){
var returnValue = handler(element, value, MASTER);
if( returnValue!=null ) return returnValue;
}
return true;
}
});
//===
// Setup dynamic regular expression for extension validation
// - thanks to John-Paul Bader: http://smyck.de/2006/08/11/javascript-dynamic-regular-expresions/
if(String(MASTER.accept).length>1){
MASTER.rxAccept = new RegExp('\\.('+(MASTER.accept?MASTER.accept:'')+')$','gi');
};
//===
// Create wrapper to hold our file list
MASTER.wrapID = MASTER.instanceKey+'_wrap'; // Wrapper ID?
$(MASTER).wrap('<div id="'+MASTER.wrapID+'"></div>');
MASTER.eWRP = $('#'+MASTER.wrapID+'');
//===
// MASTER MUST have a name
MASTER.name = MASTER.name || 'file[]';
//===
// Create a wrapper for the labels
// * OPERA BUG: NO_MODIFICATION_ALLOWED_ERR ('labels' is a read-only property)
// this changes allows us to keep the files in the order they were selected
MASTER.eWRP.append( '<span id="'+MASTER.wrapID+'_labels"></span>' );
MASTER.eLBL = $('#'+MASTER.wrapID+'_labels');
//===
// Bind a new element
MASTER.addSlave = function( slave, slave_count ){
// Keep track of how many elements have been displayed
MASTER.n++;
// Add reference to master element
slave.MASTER = MASTER;
// Count slaves
slave.i = slave_count;
// BUG FIX: http://plugins.jquery.com/node/1495
// Clear identifying properties from clones
if(slave.i>0) slave.id = slave.name = null;
// Define element's ID and name (upload components need this!)
slave.id = slave.id || MASTER.generateID(slave.i);
//slave.name = (slave.name || $(MASTER).attr('name') || 'file');// + (slave.i>0?slave.i:''); // same name as master element
// 2008-Apr-29: New customizable naming convention (see url below)
// http://groups.google.com/group/jquery-dev/browse_frm/thread/765c73e41b34f924#
slave.name = String(MASTER.namePattern
/*master name*/.replace(/\$name/gi,$(MASTER).attr('name'))
/*master id */.replace(/\$id/gi, $(MASTER).attr('id'))
/*group count*/.replace(/\$g/gi, (group_count>0?group_count:''))
/*slave count*/.replace(/\$i/gi, (slave_count>0?slave_count:''))
);
// Clear value
$(slave).val('').attr('value','')[0].value = '';
// If we've reached maximum number, disable input slave
if( (MASTER.max > 0) && ((MASTER.n-1) > (MASTER.max)) )//{ // MASTER.n Starts at 1, so subtract 1 to find true count
slave.disabled = true;
//};
// Remember most recent slave
MASTER.eCur = MASTER.slaves[slave.i] = slave;
/// now let's use jQuery
slave = $(slave);
// Triggered when a file is selected
$(slave).change(function(){
//# Trigger Event! onFileSelect
if(!MASTER.trigger('onFileSelect', this, MASTER)) return false;
//# End Event!
//# Retrive value of selected file from element
var ERROR = '', v = String(this.value || ''/*.attr('value)*/);
// check extension
if(MASTER.accept){
if(v!=''){
if(!v.match(MASTER.rxAccept)){
ERROR = MASTER.STRING.denied.replace('$ext', String(v.match(/\.\w{1,4}$/gi)));
}
}
};
// Disallow duplicates
for(var f=0;f<MASTER.slaves.length;f++){
if(MASTER.slaves[f]!=this){
if(MASTER.slaves[f].value==v){
ERROR = MASTER.STRING.duplicate.replace('$file', v.match(/[^\/\\]+$/gi));
}
}
};
// Create a new file input element
//var newEle = $('<input name="'+($(MASTER).attr('name') || '')+'" type="file"/>');
var newEle = xCLONE.clone();// Copy parent attributes - Thanks to Jonas Wagner
//# Let's remember which input we've generated so
// we can disable the empty ones before submission
// See: http://plugins.jquery.com/node/1495
newEle.addClass('MultiFile');
// Handle error
if(ERROR!=''){
// Handle error
MASTER.error(ERROR);
// Clear element value (DOES NOT WORK in some browsers)
//slave.reset().val('').attr('value', '')[0].value = '';
// 2007-06-24: BUG FIX - Thanks to Adrian Wróbel <adrian [dot] wrobel [at] gmail.com>
// Ditch the trouble maker and add a fresh new element
MASTER.n--;
MASTER.addSlave(newEle[0], this.i);
slave.parent().prepend(newEle);
slave.remove();
return false;
};
// Hide this element (NB: display:none is evil!)
$(this).css({ position:'absolute', top: '-3000px' });
// Add new element to the form
MASTER.eLBL.before(newEle);//.append(newEle);
// Update list
MASTER.addToList( this );
// Bind functionality
MASTER.addSlave( newEle[0], this.i+1 );
//# Trigger Event! afterFileSelect
if(!MASTER.trigger('afterFileSelect', this, MASTER)) return false;
//# End Event!
}); // slave.change()
};// MASTER.addSlave
// Bind a new element
// Add a new file to the list
MASTER.addToList = function( slave ){
//# Trigger Event! onFileAppend
if(!MASTER.trigger('onFileAppend', slave, MASTER)) return false;
//# End Event!
// Create label elements
var
r = $('<div></div>'),
v = String(slave.value || ''/*.attr('value)*/),
a = $('<span class="file" title="'+MASTER.STRING.selected.replace('$file', v)+'">'+v.match(/[^\/\\]+$/gi)[0]+'</span>'),
b = $('<a href="#'+MASTER.wrapID+'">'+MASTER.STRING.remove+'</a>');
// Insert label
MASTER.eLBL.append(
r.append('[', b, ']&nbsp;', a)//.prepend(slave.i+': ')
);
b.click(function(){
//# Trigger Event! onFileRemove
if(!MASTER.trigger('onFileRemove', slave, MASTER)) return false;
//# End Event!
MASTER.n--;
MASTER.eCur.disabled = false;
// Remove element, remove label, point to current
if(slave.i==0){
$(MASTER.eCur).remove();
MASTER.eCur = slave;
}
else{
$(slave).remove();
};
$(this).parent().remove();
// Show most current element again (move into view) and clear selection
$(MASTER.eCur).css({ position:'', top: '' }).reset().val('').attr('value', '')[0].value = '';
//# Trigger Event! afterFileRemove
if(!MASTER.trigger('afterFileRemove', slave, MASTER)) return false;
//# End Event!
return false;
});
//# Trigger Event! afterFileAppend
if(!MASTER.trigger('afterFileAppend', slave, MASTER)) return false;
//# End Event!
}; // MASTER.addToList
// Add element to selected files list
// Bind functionality to the first element
if(!MASTER.MASTER) MASTER.addSlave(MASTER, 0);
// Increment control count
//MASTER.I++; // using window.MultiFile
MASTER.n++;
});
// each element
}
// MultiFile function
});
// extend jQuery function library
/*
### Default implementation ###
The plugin will attach itself to file inputs
with the class 'multi' when the page loads
Use the jQuery start plugin to
*/
/*
if($.start){ $.start('MultiFile', $.MultiFile) }
else $(function(){ $.MultiFile() });
*/
if($.start)
$.start('MultiFile', function(context){ context = context || this; // attach to start-up
$("INPUT[@type='file'].multi", context).MultiFile();
});
// $.start
else
$(function(){ $.MultiFile() });
// $()
/*# AVOID COLLISIONS #*/
})(jQuery);
/*# AVOID COLLISIONS #*/

View file

@ -0,0 +1,9 @@
/*
### jQuery Multiple File Upload Plugin v1.28 - 2008-05-02 ###
By Diego A., http://www.fyneworks.com, diego@fyneworks.com
Project: http://jquery.com/plugins/project/MultiFile/
Website: http://www.fyneworks.com/jquery/multiple-file-upload/
Forums: http://www.nabble.com/jQuery-Multiple-File-Upload-f20931.html
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';2(1n)(3($){$.y($,{5:3(o){7 $("17:m.1s").5(o)}});$.y($.5,{X:{k:\'\',h:-1,1I:3(s){2($.1A){$.1A({2s:s.u(/\\n/l,\'<27/>\'),11:{Z:\'23\',1Z:\'1T\',1Q:\'12.1K\',2K:\'#2G\',2A:\'#2x\',2w:\'.8\',\'-2r-Z-1v\':\'1u\',\'-2h-Z-1v\':\'1u\'}});J.2b($.29,28)}T{26(s)}},1m:\'$D\',A:{E:\'E\',1j:\'20 1X 1W a $W m.\\1P 1N...\',M:\'1L M: $m\',1d:\'1J m 2J 2I 2F M:\\n$m\'}}});$.y($.5,{1b:3(){$(\'17:m\').H(3(){t a=$(6);2(a.1c()==\'\')a.1C(\'16\').H(3(){6.S=R})})},15:3(){$(\'17:m.16\').2p(\'16\').H(3(){6.S=q})},L:[\'2m\',\'2j\',\'2g\'],19:{},1t:3(b,c,d){t e,j;d=d||[];2(d.1r.1q().1p("1o")<0)d=[d];2(13(b)==\'3\'){$.5.1b();j=b.1l(c||J,d);$.5.15();7 j};2(b.1r.1q().1p("1o")<0)b=[b];1k(t i=0;i<b.10;i++){e=b[i]+\'\';2(e)(3(a){$.5.19[a]=$.Y[a]||3(){};$.Y[a]=3(){$.5.1b();j=$.5.19[a].1l(6,25);$.5.15();7 j}})(e)}}});$.y($.Y,{1a:3(){7 6.H(3(){24{6.1a()}22(e){}})},5:3(o){2($.5.L){$.5.1t($.5.L);$.5.L=N};7 $(6).H(3(e){2(6.1i)7;6.1i=R;J.5=(J.5||0)+1;e=J.5;t g=6,1h=$(g).1g();2(13 o==\'1V\')o={h:o};2(13 o==\'1U\')o={k:o};o=$.y({},$.5.X,($.1e?$(g).1e():($.1S?$(g).1R():N))||{},o||{});2(!(o.h>0)){o.h=$(g).C(\'1O\');2(!(o.h>0)){o.h=(p(g.1f.x(/\\b(h|1M)\\-([0-9]+)\\b/l)||[\'\']).x(/[0-9]+/l)||[\'\'])[0];2(!(o.h>0))o.h=-1;T o.h=p(o.h).x(/[0-9]+/l)[0]}};o.h=V 1Y(o.h);o.k=o.k||$(g).C(\'k\')||\'\';2(!o.k){o.k=(g.1f.x(/\\b(k\\-[\\w\\|]+)\\b/l))||\'\';o.k=V p(o.k).u(/^(k|W)\\-/i,\'\')};$.y(g,o||{});g.A=$.y({},$.5.X.A,g.A);$.y(g,{n:0,K:[],21:[],U:g.B||\'5\'+p(e),1H:3(z){7 g.U+(z>0?\'2H\'+p(z):\'\')},F:3(a,b){t c=g[a],j=$(b).C(\'j\');2(c){t d=c(b,j,g);2(d!=N)7 d}7 R}});2(p(g.k).10>1){g.1G=V 2D(\'\\\\.(\'+(g.k?g.k:\'\')+\')$\',\'l\')};g.G=g.U+\'2z\';$(g).2y(\'<O B="\'+g.G+\'"></O>\');g.1E=$(\'#\'+g.G+\'\');g.D=g.D||\'m[]\';g.1E.18(\'<P B="\'+g.G+\'1D"></P>\');g.14=$(\'#\'+g.G+\'1D\');g.Q=3(c,d){g.n++;c.1B=g;c.i=d;2(c.i>0)c.B=c.D=N;c.B=c.B||g.1H(c.i);c.D=p(g.1m.u(/\\$D/l,$(g).C(\'D\')).u(/\\$B/l,$(g).C(\'B\')).u(/\\$g/l,(e>0?e:\'\')).u(/\\$i/l,(d>0?d:\'\')));$(c).1c(\'\').C(\'j\',\'\')[0].j=\'\';2((g.h>0)&&((g.n-1)>(g.h)))c.S=R;g.I=g.K[c.i]=c;c=$(c);$(c).2v(3(){2(!g.F(\'2u\',6,g))7 q;t a=\'\',v=p(6.j||\'\');2(g.k){2(v!=\'\'){2(!v.x(g.1G)){a=g.A.1j.u(\'$W\',p(v.x(/\\.\\w{1,4}$/l)))}}};1k(t f=0;f<g.K.10;f++){2(g.K[f]!=6){2(g.K[f].j==v){a=g.A.1d.u(\'$m\',v.x(/[^\\/\\\\]+$/l))}}};t b=1h.1g();b.1C(\'5\');2(a!=\'\'){g.1I(a);g.n--;g.Q(b[0],6.i);c.1x().2q(b);c.E();7 q};$(6).11({1w:\'2t\',1y:\'-2o\'});g.14.2n(b);g.1z(6);g.Q(b[0],6.i+1);2(!g.F(\'2l\',6,g))7 q})};g.1z=3(c){2(!g.F(\'2k\',c,g))7 q;t r=$(\'<O></O>\'),v=p(c.j||\'\'),a=$(\'<P 2i="m" 2B="\'+g.A.M.u(\'$m\',v)+\'">\'+v.x(/[^\\/\\\\]+$/l)[0]+\'</P>\'),b=$(\'<a 2C="#\'+g.G+\'">\'+g.A.E+\'</a>\');g.14.18(r.18(\'[\',b,\']&2f;\',a));b.2E(3(){2(!g.F(\'2e\',c,g))7 q;g.n--;g.I.S=q;2(c.i==0){$(g.I).E();g.I=c}T{$(c).E()};$(6).1x().E();$(g.I).11({1w:\'\',1y:\'\'}).1a().1c(\'\').C(\'j\',\'\')[0].j=\'\';2(!g.F(\'2d\',c,g))7 q;7 q});2(!g.F(\'2c\',c,g))7 q};2(!g.1B)g.Q(g,0);g.n++})}});2($.1F)$.1F(\'5\',3(a){a=a||6;$("2a[@2L=\'m\'].1s",a).5()});T $(3(){$.5()})})(1n);',62,172,'||if|function||MultiFile|this|return||||||||||max||value|accept|gi|file|||String|false|||var|replace|||match|extend||STRING|id|attr|name|remove|trigger|wrapID|each|eCur|window|slaves|autoIntercept|selected|null|div|span|addSlave|true|disabled|else|instanceKey|new|ext|options|fn|border|length|css||typeof|eLBL|reEnableEmpty|mfD|input|append|intercepted|reset|disableEmpty|val|duplicate|metadata|className|clone|xCLONE|_MultiFile|denied|for|apply|namePattern|jQuery|Array|indexOf|toString|constructor|multi|intercept|10px|radius|position|parent|top|addToList|blockUI|MASTER|addClass|_labels|eWRP|start|rxAccept|generateID|error|This|0pt|File|limit|again|maxlength|nTry|size|data|meta|15px|string|number|select|cannot|Number|padding|You|files|catch|none|try|arguments|alert|br|2000|unblockUI|INPUT|setTimeout|afterFileAppend|afterFileRemove|onFileRemove|nbsp|validate|moz|class|ajaxSubmit|onFileAppend|afterFileSelect|submit|before|3000px|removeClass|prepend|webkit|message|absolute|onFileSelect|change|opacity|fff|wrap|_wrap|color|title|href|RegExp|click|been|900|_F|already|has|backgroundColor|type'.split('|'),0,{}))

View file

@ -0,0 +1,10 @@
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
* $Rev: 2446 $
*
* Version 2.1.1
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(b($){$.m.E=$.m.g=b(s){h($.x.10&&/6.0/.I(D.B)){s=$.w({c:\'3\',5:\'3\',8:\'3\',d:\'3\',k:M,e:\'F:i;\'},s||{});C a=b(n){f n&&n.t==r?n+\'4\':n},p=\'<o Y="g"W="0"R="-1"e="\'+s.e+\'"\'+\'Q="P:O;N:L;z-H:-1;\'+(s.k!==i?\'G:J(K=\\\'0\\\');\':\'\')+\'c:\'+(s.c==\'3\'?\'7(((l(2.9.j.A)||0)*-1)+\\\'4\\\')\':a(s.c))+\';\'+\'5:\'+(s.5==\'3\'?\'7(((l(2.9.j.y)||0)*-1)+\\\'4\\\')\':a(s.5))+\';\'+\'8:\'+(s.8==\'3\'?\'7(2.9.S+\\\'4\\\')\':a(s.8))+\';\'+\'d:\'+(s.d==\'3\'?\'7(2.9.v+\\\'4\\\')\':a(s.d))+\';\'+\'"/>\';f 2.T(b(){h($(\'> o.g\',2).U==0)2.V(q.X(p),2.u)})}f 2}})(Z);',62,63,'||this|auto|px|left||expression|width|parentNode||function|top|height|src|return|bgiframe|if|false|currentStyle|opacity|parseInt|fn||iframe|html|document|Number||constructor|firstChild|offsetHeight|extend|browser|borderLeftWidth||borderTopWidth|userAgent|var|navigator|bgIframe|javascript|filter|index|test|Alpha|Opacity|absolute|true|position|block|display|style|tabindex|offsetWidth|each|length|insertBefore|frameborder|createElement|class|jQuery|msie'.split('|'),0,{}))

View file

@ -0,0 +1,546 @@
/*
* jQuery clueTip plugin
* Version 0.9.7 (05/11/2008)
* @requires jQuery v1.1.1+
* @requires Dimensions plugin
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
;(function($) {
/*
* @name clueTip
* @type jQuery
* @cat Plugins/tooltip
* @return jQuery
* @author Karl Swedberg
*
* @credit Inspired by Cody Lindley's jTip (http://www.codylindley.com)
* @credit Thanks to the following people for their many and varied contributions:
Shelane Enos, Glen Lipka, Hector Santos, Torben Schreiter, Dan G. Switzer, Jörn Zaefferer
* @credit Thanks to Jonathan Chaffer, as always, for help with the hard parts. :-)
*/
/**
*
* Displays a highly customizable tooltip when the user hovers (default) or clicks (optional) the matched element.
* By default, the clueTip plugin loads a page indicated by the "rel" attribute via ajax and displays its contents.
* If a "title" attribute is specified, its value is used as the clueTip's heading.
* The attribute to be used for both the body and the heading of the clueTip is user-configurable.
* Optionally, the clueTip's body can display content from an element on the same page.
* * Just indicate the element's id (e.g. "#some-id") in the rel attribute.
* Optionally, the clueTip's body can display content from the title attribute, when a delimiter is indicated.
* * The string before the first instance of the delimiter is set as the clueTip's heading.
* * All subsequent strings are wrapped in separate DIVs and placed in the clueTip's body.
* The clueTip plugin allows for many, many more options. Pleasee see the examples and the option descriptions below...
*
*
* @example $('#tip).cluetip();
* @desc This is the most basic clueTip. It displays a 275px-wide clueTip on mouseover of the element with an ID of "tip." On mouseout of the element, the clueTip is hidden.
*
*
* @example $('a.clue').cluetip({
* hoverClass: 'highlight',
* sticky: true,
* closePosition: 'bottom',
* closeText: '<img src="cross.png" alt="close" />',
* truncate: 60,
* ajaxSettings: {
* type: 'POST'
* }
* });
* @desc Displays a clueTip on mouseover of all <a> elements with class="clue". The hovered element gets a class of "highlight" added to it (so that it can be styled appropriately. This is esp. useful for non-anchor elements.). The clueTip is "sticky," which means that it will not be hidden until the user either clicks on its "close" text/graphic or displays another clueTip. The "close" text/graphic is set to diplay at the bottom of the clueTip (default is top) and display an image rather than the default "Close" text. Moreover, the body of the clueTip is truncated to the first 60 characters, which are followed by an ellipsis (...). Finally, the clueTip retrieves the content using POST rather than the $.ajax method's default "GET."
*
* More examples can be found at http://plugins.learningjquery.com/cluetip/demo/
*
* Full list of options/settings can be found at the bottom of this file and at http://plugins.learningjquery.com/cluetip/
*/
var $cluetip, $cluetipInner, $cluetipOuter, $cluetipTitle, $cluetipArrows, $dropShadow, imgCount;
$.fn.cluetip = function(options) {
return this.each(function(index) {
// support metadata plugin (v1.0 and 2.0)
var opts = $.extend({}, $.fn.cluetip.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
if (options && options.ajaxSettings) {
$.extend(opts.ajaxSettings, options.ajaxSettings);
delete options.ajaxSettings;
}
if (options && options.hoverIntent) {
$.extend(opts.hoverIntent, options.hoverIntent);
delete options.hoverIntent;
}
if (options && options.fx) {
$.extend(opts.fx, options.fx);
delete options.fx;
}
// start out with no contents (for ajax activation)
var cluetipContents = false;
var cluezIndex = parseInt(opts.cluezIndex, 10)-1;
var isActive = false, closeOnDelay = 0;
// create the cluetip divs
if (!$('#cluetip').length) {
$cluetipInner = $('<div id="cluetip-inner"></div>');
$cluetipTitle = $('<h3 id="cluetip-title"></h3>');
$cluetipOuter = $('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);
$cluetip = $('<div id="cluetip"></div>').css({zIndex: opts.cluezIndex})
.append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();
$('<div id="cluetip-waitimage"></div>').css({position: 'absolute', zIndex: cluezIndex-1})
.insertBefore('#cluetip').hide();
$cluetip.css({position: 'absolute', zIndex: cluezIndex});
$cluetipOuter.css({position: 'relative', zIndex: cluezIndex+1});
$cluetipArrows = $('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex: cluezIndex+1}).appendTo('#cluetip');
}
var dropShadowSteps = (opts.dropShadow) ? +opts.dropShadowSteps : 0;
if (!$dropShadow) {
$dropShadow = $([]);
for (var i=0; i < dropShadowSteps; i++) {
$dropShadow = $dropShadow.add($('<div></div>').css({zIndex: cluezIndex-i-1, opacity:.1, top: 1+i, left: 1+i}));
};
$dropShadow.css({position: 'absolute', backgroundColor: '#000'})
.prependTo($cluetip);
}
var $this = $(this);
var tipAttribute = $this.attr(opts.attribute), ctClass = opts.cluetipClass;
if (!tipAttribute && !opts.splitTitle) return true;
// if hideLocal is set to true, on DOM ready hide the local content that will be displayed in the clueTip
if (opts.local && opts.hideLocal) { $(tipAttribute + ':first').hide(); }
var tOffset = parseInt(opts.topOffset, 10), lOffset = parseInt(opts.leftOffset, 10);
// vertical measurement variables
var tipHeight, wHeight;
var defHeight = isNaN(parseInt(opts.height, 10)) ? 'auto' : (/\D/g).test(opts.height) ? opts.height : opts.height + 'px';
var sTop, linkTop, posY, tipY, mouseY, baseline;
// horizontal measurement variables
var tipInnerWidth = isNaN(parseInt(opts.width, 10)) ? 275 : parseInt(opts.width, 10);
var tipWidth = tipInnerWidth + (parseInt($cluetip.css('paddingLeft'))||0) + (parseInt($cluetip.css('paddingRight'))||0) + dropShadowSteps;
var linkWidth = this.offsetWidth;
var linkLeft, posX, tipX, mouseX, winWidth;
// parse the title
var tipParts;
var tipTitle = (opts.attribute != 'title') ? $this.attr(opts.titleAttribute) : '';
if (opts.splitTitle) {
if(tipTitle == undefined) {tipTitle = '';}
tipParts = tipTitle.split(opts.splitTitle);
tipTitle = tipParts.shift();
}
var localContent;
/***************************************
* ACTIVATION
****************************************/
//activate clueTip
var activate = function(event) {
if (!opts.onActivate($this)) {
return false;
}
isActive = true;
$cluetip.removeClass().css({width: tipInnerWidth});
if (tipAttribute == $this.attr('href')) {
$this.css('cursor', opts.cursor);
}
$this.attr('title','');
if (opts.hoverClass) {
$this.addClass(opts.hoverClass);
}
linkTop = posY = $this.offset().top;
linkLeft = $this.offset().left;
mouseX = event.pageX;
mouseY = event.pageY;
if ($this[0].tagName.toLowerCase() != 'area') {
sTop = $(document).scrollTop();
winWidth = $(window).width();
}
// position clueTip horizontally
if (opts.positionBy == 'fixed') {
posX = linkWidth + linkLeft + lOffset;
$cluetip.css({left: posX});
} else {
posX = (linkWidth > linkLeft && linkLeft > tipWidth)
|| linkLeft + linkWidth + tipWidth + lOffset > winWidth
? linkLeft - tipWidth - lOffset
: linkWidth + linkLeft + lOffset;
if ($this[0].tagName.toLowerCase() == 'area' || opts.positionBy == 'mouse' || linkWidth + tipWidth > winWidth) { // position by mouse
if (mouseX + 20 + tipWidth > winWidth) {
$cluetip.addClass(' cluetip-' + ctClass);
posX = (mouseX - tipWidth - lOffset) >= 0 ? mouseX - tipWidth - lOffset - parseInt($cluetip.css('marginLeft'),10) + parseInt($cluetipInner.css('marginRight'),10) : mouseX - (tipWidth/2);
} else {
posX = mouseX + lOffset;
}
}
var pY = posX < 0 ? event.pageY + tOffset : event.pageY;
$cluetip.css({left: (posX > 0 && opts.positionBy != 'bottomTop') ? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 : Math.max(mouseX - (tipWidth/2),0)});
}
wHeight = $(window).height();
/***************************************
* load the title attribute only (or user-selected attribute).
* clueTip title is the string before the first delimiter
* subsequent delimiters place clueTip body text on separate lines
***************************************/
if (tipParts) {
var tpl = tipParts.length;
for (var i=0; i < tpl; i++){
if (i == 0) {
$cluetipInner.html(tipParts[i]);
} else {
$cluetipInner.append('<div class="split-body">' + tipParts[i] + '</div>');
}
};
cluetipShow(pY);
}
/***************************************
* load external file via ajax
***************************************/
else if (!opts.local && tipAttribute.indexOf('#') != 0) {
if (cluetipContents && opts.ajaxCache) {
$cluetipInner.html(cluetipContents);
cluetipShow(pY);
}
else {
var ajaxSettings = opts.ajaxSettings;
ajaxSettings.url = tipAttribute;
ajaxSettings.beforeSend = function() {
$cluetipOuter.children().empty();
if (opts.waitImage) {
$('#cluetip-waitimage')
.css({top: mouseY+20, left: mouseX+20})
.show();
}
};
ajaxSettings.error = function() {
if (isActive) {
$cluetipInner.html('<i>sorry, the contents could not be loaded</i>');
}
};
ajaxSettings.success = function(data) {
cluetipContents = opts.ajaxProcess(data);
if (isActive) {
$cluetipInner.html(cluetipContents);
}
};
ajaxSettings.complete = function() {
imgCount = $('#cluetip-inner img').length;
if (imgCount && !$.browser.opera) {
$('#cluetip-inner img').load(function() {
imgCount--;
if (imgCount<1) {
$('#cluetip-waitimage').hide();
if (isActive) cluetipShow(pY);
}
});
} else {
$('#cluetip-waitimage').hide();
if (isActive) cluetipShow(pY);
}
};
$.ajax(ajaxSettings);
}
/***************************************
* load an element from the same page
***************************************/
} else if (opts.local){
var $localContent = $(tipAttribute + ':first');
var localCluetip = $.fn.wrapInner ? $localContent.wrapInner('<div></div>').children().clone(true) : $localContent.html();
$.fn.wrapInner ? $cluetipInner.empty().append(localCluetip) : $cluetipInner.html(localCluetip);
cluetipShow(pY);
}
};
// get dimensions and options for cluetip and prepare it to be shown
var cluetipShow = function(bpY) {
$cluetip.addClass('cluetip-' + ctClass);
if (opts.truncate) {
var $truncloaded = $cluetipInner.text().slice(0,opts.truncate) + '...';
$cluetipInner.html($truncloaded);
}
function doNothing() {}; //empty function
tipTitle ? $cluetipTitle.show().html(tipTitle) : (opts.showTitle) ? $cluetipTitle.show().html('&nbsp;') : $cluetipTitle.hide();
if (opts.sticky) {
var $closeLink = $('<div id="cluetip-close"><a href="#">' + opts.closeText + '</a></div>');
(opts.closePosition == 'bottom') ? $closeLink.appendTo($cluetipInner) : (opts.closePosition == 'title') ? $closeLink.prependTo($cluetipTitle) : $closeLink.prependTo($cluetipInner);
$closeLink.click(function() {
cluetipClose();
return false;
});
if (opts.mouseOutClose) {
if ($.fn.hoverIntent && opts.hoverIntent) {
$cluetip.hoverIntent({
over: doNothing,
timeout: opts.hoverIntent.timeout,
out: function() { $closeLink.trigger('click'); }
});
} else {
$cluetip.hover(doNothing,
function() {$closeLink.trigger('click'); });
}
} else {
$cluetip.unbind('mouseout');
}
}
// now that content is loaded, finish the positioning
var direction = '';
$cluetipOuter.css({overflow: defHeight == 'auto' ? 'visible' : 'auto', height: defHeight});
tipHeight = defHeight == 'auto' ? Math.max($cluetip.outerHeight(),$cluetip.height()) : parseInt(defHeight,10);
tipY = posY;
baseline = sTop + wHeight;
if (opts.positionBy == 'fixed') {
tipY = posY - opts.dropShadowSteps + tOffset;
} else if ( (posX < mouseX && Math.max(posX, 0) + tipWidth > mouseX) || opts.positionBy == 'bottomTop') {
if (posY + tipHeight + tOffset > baseline && mouseY - sTop > tipHeight + tOffset) {
tipY = mouseY - tipHeight - tOffset;
direction = 'top';
} else {
tipY = mouseY + tOffset;
direction = 'bottom';
}
} else if ( posY + tipHeight + tOffset > baseline ) {
tipY = (tipHeight >= wHeight) ? sTop : baseline - tipHeight - tOffset;
} else if ($this.css('display') == 'block' || $this[0].tagName.toLowerCase() == 'area' || opts.positionBy == "mouse") {
tipY = bpY - tOffset;
} else {
tipY = posY - opts.dropShadowSteps;
}
if (direction == '') {
posX < linkLeft ? direction = 'left' : direction = 'right';
}
$cluetip.css({top: tipY + 'px'}).removeClass().addClass('clue-' + direction + '-' + ctClass).addClass(' cluetip-' + ctClass);
if (opts.arrows) { // set up arrow positioning to align with element
var bgY = (posY - tipY - opts.dropShadowSteps);
$cluetipArrows.css({top: (/(left|right)/.test(direction) && posX >=0 && bgY > 0) ? bgY + 'px' : /(left|right)/.test(direction) ? 0 : ''}).show();
} else {
$cluetipArrows.hide();
}
// (first hide, then) ***SHOW THE CLUETIP***
$dropShadow.hide();
$cluetip.hide()[opts.fx.open](opts.fx.open != 'show' && opts.fx.openSpeed);
if (opts.dropShadow) $dropShadow.css({height: tipHeight, width: tipInnerWidth}).show();
if ($.fn.bgiframe) { $cluetip.bgiframe(); }
// trigger the optional onShow function
if (opts.delayedClose > 0) {
closeOnDelay = setTimeout(cluetipClose, opts.delayedClose);
}
opts.onShow($cluetip, $cluetipInner);
};
/***************************************
=INACTIVATION
-------------------------------------- */
var inactivate = function() {
isActive = false;
$('#cluetip-waitimage').hide();
if (!opts.sticky || (/click|toggle/).test(opts.activation) ) {
cluetipClose();
clearTimeout(closeOnDelay);
};
if (opts.hoverClass) {
$this.removeClass(opts.hoverClass);
}
$('.cluetip-clicked').removeClass('cluetip-clicked');
};
// close cluetip and reset some things
var cluetipClose = function() {
$cluetipOuter
.parent().hide().removeClass().end()
.children().empty();
if (tipTitle) {
$this.attr(opts.titleAttribute, tipTitle);
}
$this.css('cursor','');
if (opts.arrows) $cluetipArrows.css({top: ''});
};
/***************************************
=BIND EVENTS
-------------------------------------- */
// activate by click
if ( (/click|toggle/).test(opts.activation) ) {
$this.click(function(event) {
if ($cluetip.is(':hidden') || !$this.is('.cluetip-clicked')) {
activate(event);
$('.cluetip-clicked').removeClass('cluetip-clicked');
$this.addClass('cluetip-clicked');
} else {
inactivate(event);
}
this.blur();
return false;
});
// activate by focus; inactivate by blur
} else if (opts.activation == 'focus') {
$this.focus(function(event) {
activate(event);
});
$this.blur(function(event) {
inactivate(event);
});
// activate by hover
// clicking is returned false if cluetip url is same as href url
} else {
$this.click(function() {
if ($this.attr('href') && $this.attr('href') == tipAttribute && !opts.clickThrough) {
return false;
}
});
//set up mouse tracking
var mouseTracks = function(evt) {
if (opts.tracking == true) {
var trackX = posX - evt.pageX;
var trackY = tipY ? tipY - evt.pageY : posY - evt.pageY;
$this.mousemove(function(evt) {
$cluetip.css({left: evt.pageX + trackX, top: evt.pageY + trackY });
});
}
};
if ($.fn.hoverIntent && opts.hoverIntent) {
$this.mouseover(function() {$this.attr('title',''); })
.hoverIntent({
sensitivity: opts.hoverIntent.sensitivity,
interval: opts.hoverIntent.interval,
over: function(event) {
activate(event);
mouseTracks(event);
},
timeout: opts.hoverIntent.timeout,
out: function(event) {inactivate(event); $this.unbind('mousemove');}
});
} else {
$this.hover(function(event) {
activate(event);
mouseTracks(event);
}, function(event) {
inactivate(event);
$this.unbind('mousemove');
});
}
}
});
};
/*
* options for clueTip
*
* each one can be explicitly overridden by changing its value.
* for example: $.fn.cluetip.defaults.width = 200;
* would change the default width for all clueTips to 200.
*
* each one can also be overridden by passing an options map to the cluetip method.
* for example: $('a.example').cluetip({width: 200});
* would change the default width to 200 for clueTips invoked by a link with class of "example"
*
*/
$.fn.cluetip.defaults = { // set up default options
width: 275, // The width of the clueTip
height: 'auto', // The height of the clueTip
cluezIndex: 97, // Sets the z-index style property of the clueTip
positionBy: 'auto', // Sets the type of positioning: 'auto', 'mouse','bottomTop', 'fixed'
topOffset: 15, // Number of px to offset clueTip from top of invoking element
leftOffset: 15, // Number of px to offset clueTip from left of invoking element
local: false, // Whether to use content from the same page for the clueTip's body
hideLocal: true, // If local option is set to true, this determines whether local content
// to be shown in clueTip should be hidden at its original location
attribute: 'rel', // the attribute to be used for fetching the clueTip's body content
titleAttribute: 'title', // the attribute to be used for fetching the clueTip's title
splitTitle: '', // A character used to split the title attribute into the clueTip title and divs
// within the clueTip body. more info below [6]
showTitle: true, // show title bar of the clueTip, even if title attribute not set
cluetipClass: 'default',// class added to outermost clueTip div in the form of 'cluetip-' + clueTipClass.
hoverClass: '', // class applied to the invoking element onmouseover and removed onmouseout
waitImage: true, // whether to show a "loading" img, which is set in jquery.cluetip.css
cursor: 'help',
arrows: false, // if true, displays arrow on appropriate side of clueTip
dropShadow: true, // set to false if you don't want the drop-shadow effect on the clueTip
dropShadowSteps: 6, // adjusts the size of the drop shadow
sticky: false, // keep visible until manually closed
mouseOutClose: false, // close when clueTip is moused out
activation: 'hover', // set to 'click' to force user to click to show clueTip
// set to 'focus' to show on focus of a form element and hide on blur
clickThrough: false, // if true, and activation is not 'click', then clicking on link will take user to the link's href,
// even if href and tipAttribute are equal
tracking: false, // if true, clueTip will track mouse movement (experimental)
delayedClose: 0, // close clueTip on a timed delay (experimental)
closePosition: 'top', // location of close text for sticky cluetips; can be 'top' or 'bottom' or 'title'
closeText: 'Close', // text (or HTML) to to be clicked to close sticky clueTips
truncate: 0, // number of characters to truncate clueTip's contents. if 0, no truncation occurs
// effect and speed for opening clueTips
fx: {
open: 'show', // can be 'show' or 'slideDown' or 'fadeIn'
openSpeed: ''
},
// settings for when hoverIntent plugin is used
hoverIntent: {
sensitivity: 3,
interval: 50,
timeout: 0
},
// function to run just before clueTip is shown.
onActivate: function(e) {return true;},
// function to run just after clueTip is shown.
onShow: function(ct, c){},
// whether to cache results of ajax request to avoid unnecessary hits to server
ajaxCache: true,
// process data retrieved via xhr before it's displayed
ajaxProcess: function(data) {
data = data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g, '').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,'');
return data;
},
// can pass in standard $.ajax() parameters, not including error, complete, success, and url
ajaxSettings: {
dataType: 'html'
},
debug: false
};
/*
* Global defaults for clueTips. Apply to all calls to the clueTip plugin.
*
* @example $.cluetip.setup({
* insertionType: 'prependTo',
* insertionElement: '#container'
* });
*
* @property
* @name $.cluetip.setup
* @type Map
* @cat Plugins/tooltip
* @option String insertionType: Default is 'appendTo'. Determines the method to be used for inserting the clueTip into the DOM. Permitted values are 'appendTo', 'prependTo', 'insertBefore', and 'insertAfter'
* @option String insertionElement: Default is 'body'. Determines which element in the DOM the plugin will reference when inserting the clueTip.
*
*/
var insertionType = 'appendTo', insertionElement = 'body';
$.cluetip = {};
$.cluetip.setup = function(options) {
if (options && options.insertionType && (options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)) {
insertionType = options.insertionType;
}
if (options && options.insertionElement) {
insertionElement = options.insertionElement;
}
};
})(jQuery);

View file

@ -0,0 +1,56 @@
/*
* jQuery delegate plug-in v1.0
*
* Copyright (c) 2007 Jörn Zaefferer
*
* $Id$
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jQuery-object for event.target
// provides triggerEvent(type: String, target: Element) to trigger delegated events
;(function($) {
$.each({
focus: 'focusin',
blur: 'focusout'
}, function( original, fix ){
$.event.special[fix] = {
setup:function() {
if ( $.browser.msie ) return false;
this.addEventListener( original, $.event.special[fix].handler, true );
},
teardown:function() {
if ( $.browser.msie ) return false;
this.removeEventListener( original,
$.event.special[fix].handler, true );
},
handler: function(e) {
arguments[0] = $.event.fix(e);
arguments[0].type = fix;
return $.event.handle.apply(this, arguments);
}
};
});
$.extend($.fn, {
delegate: function(type, delegate, handler) {
return this.bind(type, function(event) {
var target = $(event.target);
if (target.is(delegate)) {
return handler.apply(target, arguments);
}
});
},
triggerEvent: function(type, target) {
return this.triggerHandler(type, [jQuery.event.fix({ type: type, target: target })]);
}
})
})(jQuery);

View file

@ -0,0 +1,601 @@
/*
* jQuery Form Plugin
* version: 2.12 (06/07/2008)
* @requires jQuery v1.2.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id$
*/
(function($) {
/*
Usage Note:
-----------
Do not use both ajaxSubmit and ajaxForm on the same form. These
functions are intended to be exclusive. Use ajaxSubmit if you want
to bind your own submit handler to the form. For example,
$(document).ready(function() {
$('#myForm').bind('submit', function() {
$(this).ajaxSubmit({
target: '#output'
});
return false; // <-- important!
});
});
Use ajaxForm when you want the plugin to manage all the event binding
for you. For example,
$(document).ready(function() {
$('#myForm').ajaxForm({
target: '#output'
});
});
When using ajaxForm, the ajaxSubmit function will be invoked for you
at the appropriate time.
*/
/**
* ajaxSubmit() provides a mechanism for immediately submitting
* an HTML form using AJAX.
*/
$.fn.ajaxSubmit = function(options) {
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
if (!this.length) {
log('ajaxSubmit: skipping submit process - no element selected');
return this;
}
if (typeof options == 'function')
options = { success: options };
options = $.extend({
url: this.attr('action') || window.location.toString(),
type: this.attr('method') || 'GET'
}, options || {});
// hook for manipulating the form data before it is extracted;
// convenient for use with rich editors like tinyMCE or FCKEditor
var veto = {};
this.trigger('form-pre-serialize', [this, options, veto]);
if (veto.veto) {
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
return this;
}
var a = this.formToArray(options.semantic);
if (options.data) {
options.extraData = options.data;
for (var n in options.data)
a.push( { name: n, value: options.data[n] } );
}
// give pre-submit callback an opportunity to abort the submit
if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
log('ajaxSubmit: submit aborted via beforeSubmit callback');
return this;
}
// fire vetoable 'validate' event
this.trigger('form-submit-validate', [a, this, options, veto]);
if (veto.veto) {
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
return this;
}
var q = $.param(a);
if (options.type.toUpperCase() == 'GET') {
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
options.data = null; // data is null for 'get'
}
else
options.data = q; // data is the query string for 'post'
var $form = this, callbacks = [];
if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
// perform a load on the target only if dataType is not provided
if (!options.dataType && options.target) {
var oldSuccess = options.success || function(){};
callbacks.push(function(data) {
$(options.target).html(data).each(oldSuccess, arguments);
});
}
else if (options.success)
callbacks.push(options.success);
options.success = function(data, status) {
for (var i=0, max=callbacks.length; i < max; i++)
callbacks[i](data, status, $form);
};
// are there files to upload?
var files = $('input:file', this).fieldValue();
var found = false;
for (var j=0; j < files.length; j++)
if (files[j])
found = true;
// options.iframe allows user to force iframe mode
if (options.iframe || found) {
// hack to fix Safari hang (thanks to Tim Molendijk for this)
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
if ($.browser.safari && options.closeKeepAlive)
$.get(options.closeKeepAlive, fileUpload);
else
fileUpload();
}
else
$.ajax(options);
// fire 'notify' event
this.trigger('form-submit-notify', [this, options]);
return this;
// private function for handling file uploads (hat tip to YAHOO!)
function fileUpload() {
var form = $form[0];
if ($(':input[@name=submit]', form).length) {
alert('Error: Form elements must not be named "submit".');
return;
}
var opts = $.extend({}, $.ajaxSettings, options);
var id = 'jqFormIO' + (new Date().getTime());
var $io = $('<iframe id="' + id + '" name="' + id + '" />');
var io = $io[0];
if ($.browser.msie || $.browser.opera)
io.src = 'javascript:false;document.write("");';
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
var xhr = { // mock object
responseText: null,
responseXML: null,
status: 0,
statusText: 'n/a',
getAllResponseHeaders: function() {},
getResponseHeader: function() {},
setRequestHeader: function() {}
};
var g = opts.global;
// trigger ajax global events so that activity/block indicators work like normal
if (g && ! $.active++) $.event.trigger("ajaxStart");
if (g) $.event.trigger("ajaxSend", [xhr, opts]);
var cbInvoked = 0;
var timedOut = 0;
// add submitting element to data if we know it
var sub = form.clk;
if (sub) {
var n = sub.name;
if (n && !sub.disabled) {
options.extraData = options.extraData || {};
options.extraData[n] = sub.value;
if (sub.type == "image") {
options.extraData[name+'.x'] = form.clk_x;
options.extraData[name+'.y'] = form.clk_y;
}
}
}
// take a breath so that pending repaints get some cpu time before the upload starts
setTimeout(function() {
// make sure form attrs are set
var t = $form.attr('target'), a = $form.attr('action');
$form.attr({
target: id,
encoding: 'multipart/form-data',
enctype: 'multipart/form-data',
method: 'POST',
action: opts.url
});
// support timout
if (opts.timeout)
setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
// add "extra" data to form if provided in options
var extraInputs = [];
try {
if (options.extraData)
for (var n in options.extraData)
extraInputs.push(
$('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
.appendTo(form)[0]);
// add iframe to doc and submit the form
$io.appendTo('body');
io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
form.submit();
}
finally {
// reset attrs and remove "extra" input elements
$form.attr('action', a);
t ? $form.attr('target', t) : $form.removeAttr('target');
$(extraInputs).remove();
}
}, 10);
function cb() {
if (cbInvoked++) return;
io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
var operaHack = 0;
var ok = true;
try {
if (timedOut) throw 'timeout';
// extract the server response from the iframe
var data, doc;
doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
if (doc.body == null && !operaHack && $.browser.opera) {
// In Opera 9.2.x the iframe DOM is not always traversable when
// the onload callback fires so we give Opera 100ms to right itself
operaHack = 1;
cbInvoked--;
setTimeout(cb, 100);
return;
}
xhr.responseText = doc.body ? doc.body.innerHTML : null;
xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
xhr.getResponseHeader = function(header){
var headers = {'content-type': opts.dataType};
return headers[header];
};
if (opts.dataType == 'json' || opts.dataType == 'script') {
var ta = doc.getElementsByTagName('textarea')[0];
xhr.responseText = ta ? ta.value : xhr.responseText;
}
else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
xhr.responseXML = toXml(xhr.responseText);
}
data = $.httpData(xhr, opts.dataType);
}
catch(e){
ok = false;
$.handleError(opts, xhr, 'error', e);
}
// ordering of these callbacks/triggers is odd, but that's how $.ajax does it
if (ok) {
opts.success(data, 'success');
if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
}
if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
if (g && ! --$.active) $.event.trigger("ajaxStop");
if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
// clean up
setTimeout(function() {
$io.remove();
xhr.responseXML = null;
}, 100);
};
function toXml(s, doc) {
if (window.ActiveXObject) {
doc = new ActiveXObject('Microsoft.XMLDOM');
doc.async = 'false';
doc.loadXML(s);
}
else
doc = (new DOMParser()).parseFromString(s, 'text/xml');
return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
};
};
};
/**
* ajaxForm() provides a mechanism for fully automating form submission.
*
* The advantages of using this method instead of ajaxSubmit() are:
*
* 1: This method will include coordinates for <input type="image" /> elements (if the element
* is used to submit the form).
* 2. This method will include the submit element's name/value data (for the element that was
* used to submit the form).
* 3. This method binds the submit() method to the form for you.
*
* The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
* passes the options argument along after properly binding events for submit elements and
* the form itself.
*/
$.fn.ajaxForm = function(options) {
return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
$(this).ajaxSubmit(options);
return false;
}).each(function() {
// store options in hash
$(":submit,input:image", this).bind('click.form-plugin',function(e) {
var $form = this.form;
$form.clk = this;
if (this.type == 'image') {
if (e.offsetX != undefined) {
$form.clk_x = e.offsetX;
$form.clk_y = e.offsetY;
} else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
var offset = $(this).offset();
$form.clk_x = e.pageX - offset.left;
$form.clk_y = e.pageY - offset.top;
} else {
$form.clk_x = e.pageX - this.offsetLeft;
$form.clk_y = e.pageY - this.offsetTop;
}
}
// clear form vars
setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
});
});
};
// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
this.unbind('submit.form-plugin');
return this.each(function() {
$(":submit,input:image", this).unbind('click.form-plugin');
});
};
/**
* formToArray() gathers form element data into an array of objects that can
* be passed to any of the following ajax functions: $.get, $.post, or load.
* Each object in the array has both a 'name' and 'value' property. An example of
* an array for a simple login form might be:
*
* [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
*
* It is this array that is passed to pre-submit callback functions provided to the
* ajaxSubmit() and ajaxForm() methods.
*/
$.fn.formToArray = function(semantic) {
var a = [];
if (this.length == 0) return a;
var form = this[0];
var els = semantic ? form.getElementsByTagName('*') : form.elements;
if (!els) return a;
for(var i=0, max=els.length; i < max; i++) {
var el = els[i];
var n = el.name;
if (!n) continue;
if (semantic && form.clk && el.type == "image") {
// handle image inputs on the fly when semantic == true
if(!el.disabled && form.clk == el)
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
continue;
}
var v = $.fieldValue(el, true);
if (v && v.constructor == Array) {
for(var j=0, jmax=v.length; j < jmax; j++)
a.push({name: n, value: v[j]});
}
else if (v !== null && typeof v != 'undefined')
a.push({name: n, value: v});
}
if (!semantic && form.clk) {
// input type=='image' are not found in elements array! handle them here
var inputs = form.getElementsByTagName("input");
for(var i=0, max=inputs.length; i < max; i++) {
var input = inputs[i];
var n = input.name;
if(n && !input.disabled && input.type == "image" && form.clk == input)
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
}
}
return a;
};
/**
* Serializes form data into a 'submittable' string. This method will return a string
* in the format: name1=value1&amp;name2=value2
*/
$.fn.formSerialize = function(semantic) {
//hand off to jQuery.param for proper encoding
return $.param(this.formToArray(semantic));
};
/**
* Serializes all field elements in the jQuery object into a query string.
* This method will return a string in the format: name1=value1&amp;name2=value2
*/
$.fn.fieldSerialize = function(successful) {
var a = [];
this.each(function() {
var n = this.name;
if (!n) return;
var v = $.fieldValue(this, successful);
if (v && v.constructor == Array) {
for (var i=0,max=v.length; i < max; i++)
a.push({name: n, value: v[i]});
}
else if (v !== null && typeof v != 'undefined')
a.push({name: this.name, value: v});
});
//hand off to jQuery.param for proper encoding
return $.param(a);
};
/**
* Returns the value(s) of the element in the matched set. For example, consider the following form:
*
* <form><fieldset>
* <input name="A" type="text" />
* <input name="A" type="text" />
* <input name="B" type="checkbox" value="B1" />
* <input name="B" type="checkbox" value="B2"/>
* <input name="C" type="radio" value="C1" />
* <input name="C" type="radio" value="C2" />
* </fieldset></form>
*
* var v = $(':text').fieldValue();
* // if no values are entered into the text inputs
* v == ['','']
* // if values entered into the text inputs are 'foo' and 'bar'
* v == ['foo','bar']
*
* var v = $(':checkbox').fieldValue();
* // if neither checkbox is checked
* v === undefined
* // if both checkboxes are checked
* v == ['B1', 'B2']
*
* var v = $(':radio').fieldValue();
* // if neither radio is checked
* v === undefined
* // if first radio is checked
* v == ['C1']
*
* The successful argument controls whether or not the field element must be 'successful'
* (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
* The default value of the successful argument is true. If this value is false the value(s)
* for each element is returned.
*
* Note: This method *always* returns an array. If no valid value can be determined the
* array will be empty, otherwise it will contain one or more values.
*/
$.fn.fieldValue = function(successful) {
for (var val=[], i=0, max=this.length; i < max; i++) {
var el = this[i];
var v = $.fieldValue(el, successful);
if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
continue;
v.constructor == Array ? $.merge(val, v) : val.push(v);
}
return val;
};
/**
* Returns the value of the field element.
*/
$.fieldValue = function(el, successful) {
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
if (typeof successful == 'undefined') successful = true;
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
(t == 'checkbox' || t == 'radio') && !el.checked ||
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
tag == 'select' && el.selectedIndex == -1))
return null;
if (tag == 'select') {
var index = el.selectedIndex;
if (index < 0) return null;
var a = [], ops = el.options;
var one = (t == 'select-one');
var max = (one ? index+1 : ops.length);
for(var i=(one ? index : 0); i < max; i++) {
var op = ops[i];
if (op.selected) {
// extra pain for IE...
var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
if (one) return v;
a.push(v);
}
}
return a;
}
return el.value;
};
/**
* Clears the form data. Takes the following actions on the form's input fields:
* - input text fields will have their 'value' property set to the empty string
* - select elements will have their 'selectedIndex' property set to -1
* - checkbox and radio inputs will have their 'checked' property set to false
* - inputs of type submit, button, reset, and hidden will *not* be effected
* - button elements will *not* be effected
*/
$.fn.clearForm = function() {
return this.each(function() {
$('input,select,textarea', this).clearFields();
});
};
/**
* Clears the selected form elements.
*/
$.fn.clearFields = $.fn.clearInputs = function() {
return this.each(function() {
var t = this.type, tag = this.tagName.toLowerCase();
if (t == 'text' || t == 'password' || tag == 'textarea')
this.value = '';
else if (t == 'checkbox' || t == 'radio')
this.checked = false;
else if (tag == 'select')
this.selectedIndex = -1;
});
};
/**
* Resets the form data. Causes all form elements to be reset to their original value.
*/
$.fn.resetForm = function() {
return this.each(function() {
// guard against an input with the name of 'reset'
// note that IE reports the reset function as an 'object'
if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
this.reset();
});
};
/**
* Enables or disables any matching elements.
*/
$.fn.enable = function(b) {
if (b == undefined) b = true;
return this.each(function() {
this.disabled = !b
});
};
/**
* Checks/unchecks any matching checkboxes or radio buttons and
* selects/deselects and matching option elements.
*/
$.fn.select = function(select) {
if (select == undefined) select = true;
return this.each(function() {
var t = this.type;
if (t == 'checkbox' || t == 'radio')
this.checked = select;
else if (this.tagName.toLowerCase() == 'option') {
var $sel = $(this).parent('select');
if (select && $sel[0] && $sel[0].type == 'select-one') {
// deselect all other options
$sel.find('option').select(false);
}
this.selected = select;
}
});
};
// helper fn for console logging
// set $.fn.ajaxSubmit.debug to true to enable debug logging
function log() {
if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
};
})(jQuery);

View file

@ -0,0 +1,9 @@
/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
* @param f onMouseOver function || An object with configuration options
* @param g onMouseOut function || Nothing (use configuration options object)
* @author Brian Cherne <brian@cherne.net>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,163 @@
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
*{padding: 0; margin: 0;}
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
#TB_window {
font: 12px Arial, Helvetica, sans-serif;
color: #333333;
}
#TB_secondLine {
font: 10px Arial, Helvetica, sans-serif;
color:#666666;
}
#TB_window a:link {color: #666666;}
#TB_window a:visited {color: #666666;}
#TB_window a:hover {color: #000;}
#TB_window a:active {color: #666666;}
#TB_window a:focus{color: #666666;}
/* ----------------------------------------------------------------------------------------------------------------*/
/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/
/* ----------------------------------------------------------------------------------------------------------------*/
#TB_overlay {
position: fixed;
z-index:100;
top: 0px;
left: 0px;
height:100%;
width:100%;
}
.TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;}
.TB_overlayBG {
background-color:#000;
filter:alpha(opacity=75);
-moz-opacity: 0.75;
opacity: 0.75;
}
* html #TB_overlay { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
#TB_window {
position: fixed;
background: #ffffff;
z-index: 102;
color:#000000;
display:none;
border: 4px solid #525252;
text-align:left;
top:50%;
left:50%;
}
* html #TB_window { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}
#TB_window img#TB_Image {
display:block;
margin: 15px 0 0 15px;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
border-top: 1px solid #666;
border-left: 1px solid #666;
}
#TB_caption{
height:25px;
padding:7px 30px 10px 25px;
float:left;
}
#TB_closeWindow{
height:25px;
padding:11px 25px 10px 0;
float:right;
}
#TB_closeAjaxWindow{
padding:7px 10px 5px 0;
margin-bottom:1px;
text-align:right;
float:right;
}
#TB_ajaxWindowTitle{
float:left;
padding:7px 0 5px 10px;
margin-bottom:1px;
}
#TB_title{
background-color:#e8e8e8;
height:27px;
}
#TB_ajaxContent{
clear:both;
padding:2px 15px 15px 15px;
overflow:auto;
text-align:left;
line-height:1.4em;
}
#TB_ajaxContent.TB_modal{
padding:15px;
}
#TB_ajaxContent p{
padding:5px 0px 5px 0px;
}
#TB_load{
position: fixed;
display:none;
height:13px;
width:208px;
z-index:103;
top: 50%;
left: 50%;
margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */
}
* html #TB_load { /* ie6 hack */
position: absolute;
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
}
#TB_HideSelect{
z-index:99;
position:fixed;
top: 0;
left: 0;
background-color:#fff;
border:none;
filter:alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
height:100%;
width:100%;
}
* html #TB_HideSelect { /* ie6 hack */
position: absolute;
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
}
#TB_iframeContent{
clear:both;
border:none;
margin-bottom:-1px;
margin-top:1px;
_margin-bottom:1px;
}

View file

@ -0,0 +1,208 @@
/* Main Style Sheet for jQuery UI date picker */
#datepicker_div, .datepicker_inline {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
padding: 0;
margin: 0;
background: #ddd;
width: 185px;
}
#datepicker_div {
display: none;
border: 1px solid #777;
z-index: 9999; /*must have*/
}
.datepicker_inline {
float: left;
display: block;
border: 0;
}
.datepicker_rtl {
direction: rtl;
}
.datepicker_dialog {
padding: 5px !important;
border: 4px ridge #ddd !important;
}
button.datepicker_trigger {
width: 25px;
}
img.datepicker_trigger {
margin: 2px;
vertical-align: middle;
}
.datepicker_prompt {
float: left;
padding: 2px;
background: #ddd;
color: #000;
}
* html .datepicker_prompt {
width: 185px;
}
.datepicker_control, .datepicker_links, .datepicker_header, .datepicker {
clear: both;
float: left;
width: 100%;
color: #fff;
}
.datepicker_control {
background: #400;
padding: 2px 0px;
}
.datepicker_links {
background: #000;
padding: 2px 0px;
}
.datepicker_control, .datepicker_links {
font-weight: bold;
font-size: 80%;
letter-spacing: 1px;
}
.datepicker_links label { /* disabled links */
padding: 2px 5px;
color: #888;
}
.datepicker_clear, .datepicker_prev {
float: left;
width: 34%;
}
.datepicker_rtl .datepicker_clear, .datepicker_rtl .datepicker_prev {
float: right;
text-align: right;
}
.datepicker_current {
float: left;
width: 30%;
text-align: center;
}
.datepicker_close, .datepicker_next {
float: right;
width: 34%;
text-align: right;
}
.datepicker_rtl .datepicker_close, .datepicker_rtl .datepicker_next {
float: left;
text-align: left;
}
.datepicker_header {
padding: 1px 0 3px;
background: #333;
text-align: center;
font-weight: bold;
height: 1.3em;
}
.datepicker_header select {
background: #333;
color: #fff;
border: 0px;
font-weight: bold;
}
.datepicker {
background: #ccc;
text-align: center;
font-size: 100%;
}
.datepicker a {
display: block;
width: 100%;
}
.datepicker_titleRow {
background: #777;
}
.datepicker_daysRow {
background: #eee;
color: #666;
}
.datepicker_weekCol {
background: #777;
color: #fff;
}
.datepicker_daysCell {
color: #000;
border: 1px solid #ddd;
}
.datepicker_daysCell a{
display: block;
}
.datepicker_weekEndCell {
background: #ddd;
}
.datepicker_titleRow .datepicker_weekEndCell {
background: #777;
}
.datepicker_daysCellOver {
background: #fff;
border: 1px solid #777;
}
.datepicker_unselectable {
color: #888;
}
.datepicker_today {
background: #fcc !important;
}
.datepicker_currentDay {
background: #999 !important;
}
.datepicker_status {
background: #ddd;
width: 100%;
font-size: 80%;
text-align: center;
}
/* ________ Datepicker Links _______
** Reset link properties and then override them with !important */
#datepicker_div a, .datepicker_inline a {
cursor: pointer;
margin: 0;
padding: 0;
background: none;
color: #000;
}
.datepicker_inline .datepicker_links a {
padding: 0 5px !important;
}
.datepicker_control a, .datepicker_links a {
padding: 2px 5px !important;
color: #eee !important;
}
.datepicker_titleRow a {
color: #eee !important;
}
.datepicker_control a:hover {
background: #fdd !important;
color: #333 !important;
}
.datepicker_links a:hover, .datepicker_titleRow a:hover {
background: #ddd !important;
color: #333 !important;
}
/* ___________ MULTIPLE MONTHS _________*/
.datepicker_multi .datepicker {
border: 1px solid #777;
}
.datepicker_oneMonth {
float: left;
width: 185px;
}
.datepicker_newRow {
clear: left;
}
/* ___________ IE6 IFRAME FIX ________ */
.datepicker_cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}

File diff suppressed because it is too large Load diff