parent
d7796fe283
commit
2671d9c549
@ -1,11 +0,0 @@ |
||||
$(document).ready(function() { |
||||
//get the path to mediaelement plugins
|
||||
var scripts = document.getElementsByTagName('script'); |
||||
var scriptPath = scripts[scripts.length-1].src; |
||||
var basePath = scriptPath.substring(0, scriptPath.indexOf('/main/')+1) + 'web/assets/mediaelement/build/'; |
||||
$('video:not(.skip), audio:not(.skip)').mediaelementplayer({ |
||||
pluginPath: basePath, |
||||
shimScriptAccess: 'always' |
||||
// more configuration
|
||||
}); |
||||
}); |
@ -1,48 +0,0 @@ |
||||
.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; |
||||
} |
@ -1,759 +0,0 @@ |
||||
/* |
||||
* Autocomplete - jQuery plugin 1.0.2 |
||||
* |
||||
* Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer |
||||
* |
||||
* 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: jquery.autocomplete.js 5747 2008-06-25 18:30:55Z joern.zaefferer $ |
||||
* |
||||
*/ |
||||
|
||||
;(function($) { |
||||
|
||||
$.fn.extend({ |
||||
autocomplete: function(urlOrData, options) { |
||||
var isUrl = typeof urlOrData == "string"; |
||||
options = $.extend({}, $.Autocompleter.defaults, { |
||||
url: isUrl ? urlOrData : null, |
||||
data: isUrl ? null : urlOrData, |
||||
delay: isUrl ? $.Autocompleter.defaults.delay : 10, |
||||
max: options && !options.scroll ? 10 : 150 |
||||
}, options); |
||||
|
||||
// if highlight is set to false, replace it with a do-nothing function
|
||||
options.highlight = options.highlight || function(value) { return value; }; |
||||
|
||||
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
|
||||
options.formatMatch = options.formatMatch || options.formatItem; |
||||
|
||||
return this.each(function() { |
||||
new $.Autocompleter(this, options); |
||||
}); |
||||
}, |
||||
result: function(handler) { |
||||
return this.bind("result", handler); |
||||
}, |
||||
search: function(handler) { |
||||
return this.trigger("search", [handler]); |
||||
}, |
||||
flushCache: function() { |
||||
return this.trigger("flushCache"); |
||||
}, |
||||
setOptions: function(options){ |
||||
return this.trigger("setOptions", [options]); |
||||
}, |
||||
unautocomplete: function() { |
||||
return this.trigger("unautocomplete"); |
||||
} |
||||
}); |
||||
|
||||
$.Autocompleter = function(input, options) { |
||||
|
||||
var KEY = { |
||||
UP: 38, |
||||
DOWN: 40, |
||||
DEL: 46, |
||||
TAB: 9, |
||||
RETURN: 13, |
||||
ESC: 27, |
||||
COMMA: 188, |
||||
PAGEUP: 33, |
||||
PAGEDOWN: 34, |
||||
BACKSPACE: 8 |
||||
}; |
||||
|
||||
// Create $ object for input element
|
||||
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); |
||||
|
||||
var timeout; |
||||
var previousValue = ""; |
||||
var cache = $.Autocompleter.Cache(options); |
||||
var hasFocus = 0; |
||||
var lastKeyPressCode; |
||||
var config = { |
||||
mouseDownOnSelect: false |
||||
}; |
||||
var select = $.Autocompleter.Select(options, input, selectCurrent, config); |
||||
|
||||
var blockSubmit; |
||||
|
||||
// prevent form submit in opera when selecting with return key
|
||||
$.browser.opera && $(input.form).bind("submit.autocomplete", function() { |
||||
if (blockSubmit) { |
||||
blockSubmit = false; |
||||
return false; |
||||
} |
||||
}); |
||||
|
||||
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
|
||||
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) { |
||||
// track last key pressed
|
||||
lastKeyPressCode = event.keyCode; |
||||
switch(event.keyCode) { |
||||
|
||||
case KEY.UP: |
||||
event.preventDefault(); |
||||
if ( select.visible() ) { |
||||
select.prev(); |
||||
} else { |
||||
onChange(0, true); |
||||
} |
||||
break; |
||||
|
||||
case KEY.DOWN: |
||||
event.preventDefault(); |
||||
if ( select.visible() ) { |
||||
select.next(); |
||||
} else { |
||||
onChange(0, true); |
||||
} |
||||
break; |
||||
|
||||
case KEY.PAGEUP: |
||||
event.preventDefault(); |
||||
if ( select.visible() ) { |
||||
select.pageUp(); |
||||
} else { |
||||
onChange(0, true); |
||||
} |
||||
break; |
||||
|
||||
case KEY.PAGEDOWN: |
||||
event.preventDefault(); |
||||
if ( select.visible() ) { |
||||
select.pageDown(); |
||||
} else { |
||||
onChange(0, true); |
||||
} |
||||
break; |
||||
|
||||
// matches also semicolon
|
||||
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: |
||||
case KEY.TAB: |
||||
case KEY.RETURN: |
||||
if( selectCurrent() ) { |
||||
// stop default to prevent a form submit, Opera needs special handling
|
||||
event.preventDefault(); |
||||
blockSubmit = true; |
||||
return false; |
||||
} |
||||
break; |
||||
|
||||
case KEY.ESC: |
||||
select.hide(); |
||||
break; |
||||
|
||||
default: |
||||
clearTimeout(timeout); |
||||
timeout = setTimeout(onChange, options.delay); |
||||
break; |
||||
} |
||||
}).focus(function(){ |
||||
// track whether the field has focus, we shouldn't process any
|
||||
// results if the field no longer has focus
|
||||
hasFocus++; |
||||
}).blur(function() { |
||||
hasFocus = 0; |
||||
if (!config.mouseDownOnSelect) { |
||||
hideResults(); |
||||
} |
||||
}).click(function() { |
||||
// show select when clicking in a focused field
|
||||
if ( hasFocus++ > 1 && !select.visible() ) { |
||||
onChange(0, true); |
||||
} |
||||
}).bind("search", function() { |
||||
// TODO why not just specifying both arguments?
|
||||
var fn = (arguments.length > 1) ? arguments[1] : null; |
||||
function findValueCallback(q, data) { |
||||
var result; |
||||
if( data && data.length ) { |
||||
for (var i=0; i < data.length; i++) { |
||||
if( data[i].result.toLowerCase() == q.toLowerCase() ) { |
||||
result = data[i]; |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
if( typeof fn == "function" ) fn(result); |
||||
else $input.trigger("result", result && [result.data, result.value]); |
||||
} |
||||
$.each(trimWords($input.val()), function(i, value) { |
||||
request(value, findValueCallback, findValueCallback); |
||||
}); |
||||
}).bind("flushCache", function() { |
||||
cache.flush(); |
||||
}).bind("setOptions", function() { |
||||
$.extend(options, arguments[1]); |
||||
// if we've updated the data, repopulate
|
||||
if ( "data" in arguments[1] ) |
||||
cache.populate(); |
||||
}).bind("unautocomplete", function() { |
||||
select.unbind(); |
||||
$input.unbind(); |
||||
$(input.form).unbind(".autocomplete"); |
||||
}); |
||||
|
||||
|
||||
function selectCurrent() { |
||||
var selected = select.selected(); |
||||
if( !selected ) |
||||
return false; |
||||
|
||||
var v = selected.result; |
||||
previousValue = v; |
||||
|
||||
if ( options.multiple ) { |
||||
var words = trimWords($input.val()); |
||||
if ( words.length > 1 ) { |
||||
v = words.slice(0, words.length - 1).join( options.multipleSeparator ) + options.multipleSeparator + v; |
||||
} |
||||
v += options.multipleSeparator; |
||||
} |
||||
|
||||
$input.val(v); |
||||
hideResultsNow(); |
||||
$input.trigger("result", [selected.data, selected.value]); |
||||
return true; |
||||
} |
||||
|
||||
function onChange(crap, skipPrevCheck) { |
||||
if( lastKeyPressCode == KEY.DEL ) { |
||||
select.hide(); |
||||
return; |
||||
} |
||||
|
||||
var currentValue = $input.val(); |
||||
|
||||
if ( !skipPrevCheck && currentValue == previousValue ) |
||||
return; |
||||
|
||||
previousValue = currentValue; |
||||
|
||||
currentValue = lastWord(currentValue); |
||||
if ( currentValue.length >= options.minChars) { |
||||
$input.addClass(options.loadingClass); |
||||
if (!options.matchCase) |
||||
currentValue = currentValue.toLowerCase(); |
||||
request(currentValue, receiveData, hideResultsNow); |
||||
} else { |
||||
stopLoading(); |
||||
select.hide(); |
||||
} |
||||
}; |
||||
|
||||
function trimWords(value) { |
||||
if ( !value ) { |
||||
return [""]; |
||||
} |
||||
var words = value.split( options.multipleSeparator ); |
||||
var result = []; |
||||
$.each(words, function(i, value) { |
||||
if ( $.trim(value) ) |
||||
result[i] = $.trim(value); |
||||
}); |
||||
return result; |
||||
} |
||||
|
||||
function lastWord(value) { |
||||
if ( !options.multiple ) |
||||
return value; |
||||
var words = trimWords(value); |
||||
return words[words.length - 1]; |
||||
} |
||||
|
||||
// fills in the input box w/the first match (assumed to be the best match)
|
||||
// q: the term entered
|
||||
// sValue: the first matching result
|
||||
function autoFill(q, sValue){ |
||||
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
|
||||
// if the last user key pressed was backspace, don't autofill
|
||||
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { |
||||
// fill in the value (keep the case the user has typed)
|
||||
$input.val($input.val() + sValue.substring(lastWord(previousValue).length)); |
||||
// select the portion of the value not typed by the user (so the next character will erase)
|
||||
$.Autocompleter.Selection(input, previousValue.length, previousValue.length + sValue.length); |
||||
} |
||||
}; |
||||
|
||||
function hideResults() { |
||||
clearTimeout(timeout); |
||||
timeout = setTimeout(hideResultsNow, 200); |
||||
}; |
||||
|
||||
function hideResultsNow() { |
||||
var wasVisible = select.visible(); |
||||
select.hide(); |
||||
clearTimeout(timeout); |
||||
stopLoading(); |
||||
if (options.mustMatch) { |
||||
// call search and run callback
|
||||
$input.search( |
||||
function (result){ |
||||
// if no value found, clear the input box
|
||||
if( !result ) { |
||||
if (options.multiple) { |
||||
var words = trimWords($input.val()).slice(0, -1); |
||||
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); |
||||
} |
||||
else |
||||
$input.val( "" ); |
||||
} |
||||
} |
||||
); |
||||
} |
||||
if (wasVisible) |
||||
// position cursor at end of input field
|
||||
$.Autocompleter.Selection(input, input.value.length, input.value.length); |
||||
}; |
||||
|
||||
function receiveData(q, data) { |
||||
if ( data && data.length && hasFocus ) { |
||||
stopLoading(); |
||||
select.display(data, q); |
||||
autoFill(q, data[0].value); |
||||
select.show(); |
||||
} else { |
||||
hideResultsNow(); |
||||
} |
||||
}; |
||||
|
||||
function request(term, success, failure) { |
||||
if (!options.matchCase) |
||||
term = term.toLowerCase(); |
||||
var data = cache.load(term); |
||||
// recieve the cached data
|
||||
if (data && data.length) { |
||||
success(term, data); |
||||
// if an AJAX url has been supplied, try loading the data now
|
||||
} else if( (typeof options.url == "string") && (options.url.length > 0) ){ |
||||
|
||||
var extraParams = { |
||||
timestamp: +new Date() |
||||
}; |
||||
$.each(options.extraParams, function(key, param) { |
||||
extraParams[key] = typeof param == "function" ? param() : param; |
||||
}); |
||||
|
||||
$.ajax({ |
||||
// try to leverage ajaxQueue plugin to abort previous requests
|
||||
mode: "abort", |
||||
// limit abortion to this input
|
||||
port: "autocomplete" + input.name, |
||||
dataType: options.dataType, |
||||
url: options.url, |
||||
data: $.extend({ |
||||
q: lastWord(term), |
||||
limit: options.max |
||||
}, extraParams), |
||||
success: function(data) { |
||||
var parsed = options.parse && options.parse(data) || parse(data); |
||||
cache.add(term, parsed); |
||||
success(term, parsed); |
||||
} |
||||
}); |
||||
} else { |
||||
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
|
||||
select.emptyList(); |
||||
failure(term); |
||||
} |
||||
}; |
||||
|
||||
function parse(data) { |
||||
var parsed = []; |
||||
var rows = data.split("\n"); |
||||
for (var i=0; i < rows.length; i++) { |
||||
var row = $.trim(rows[i]); |
||||
if (row) { |
||||
row = row.split("|"); |
||||
parsed[parsed.length] = { |
||||
data: row, |
||||
value: row[0], |
||||
result: options.formatResult && options.formatResult(row, row[0]) || row[0] |
||||
}; |
||||
} |
||||
} |
||||
return parsed; |
||||
}; |
||||
|
||||
function stopLoading() { |
||||
$input.removeClass(options.loadingClass); |
||||
}; |
||||
|
||||
}; |
||||
|
||||
$.Autocompleter.defaults = { |
||||
inputClass: "ac_input", |
||||
resultsClass: "ac_results", |
||||
loadingClass: "ac_loading", |
||||
minChars: 1, |
||||
delay: 400, |
||||
matchCase: false, |
||||
matchSubset: true, |
||||
matchContains: false, |
||||
cacheLength: 10, |
||||
max: 100, |
||||
mustMatch: false, |
||||
extraParams: {}, |
||||
selectFirst: true, |
||||
formatItem: function(row) { return row[0]; }, |
||||
formatMatch: null, |
||||
autoFill: false, |
||||
width: 0, |
||||
multiple: false, |
||||
multipleSeparator: ", ", |
||||
highlight: function(value, term) { |
||||
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); |
||||
}, |
||||
scroll: true, |
||||
scrollHeight: 180 |
||||
}; |
||||
|
||||
$.Autocompleter.Cache = function(options) { |
||||
|
||||
var data = {}; |
||||
var length = 0; |
||||
|
||||
function matchSubset(s, sub) { |
||||
if (!options.matchCase) |
||||
s = s.toLowerCase(); |
||||
var i = s.indexOf(sub); |
||||
if (i == -1) return false; |
||||
return i == 0 || options.matchContains; |
||||
}; |
||||
|
||||
function add(q, value) { |
||||
if (length > options.cacheLength){ |
||||
flush(); |
||||
} |
||||
if (!data[q]){ |
||||
length++; |
||||
} |
||||
data[q] = value; |
||||
} |
||||
|
||||
function populate(){ |
||||
if( !options.data ) return false; |
||||
// track the matches
|
||||
var stMatchSets = {}, |
||||
nullData = 0; |
||||
|
||||
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
|
||||
if( !options.url ) options.cacheLength = 1; |
||||
|
||||
// track all options for minChars = 0
|
||||
stMatchSets[""] = []; |
||||
|
||||
// loop through the array and create a lookup structure
|
||||
for ( var i = 0, ol = options.data.length; i < ol; i++ ) { |
||||
var rawValue = options.data[i]; |
||||
// if rawValue is a string, make an array otherwise just reference the array
|
||||
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; |
||||
|
||||
var value = options.formatMatch(rawValue, i+1, options.data.length); |
||||
if ( value === false ) |
||||
continue; |
||||
|
||||
var firstChar = value.charAt(0).toLowerCase(); |
||||
// if no lookup array for this character exists, look it up now
|
||||
if( !stMatchSets[firstChar] ) |
||||
stMatchSets[firstChar] = []; |
||||
|
||||
// if the match is a string
|
||||
var row = { |
||||
value: value, |
||||
data: rawValue, |
||||
result: options.formatResult && options.formatResult(rawValue) || value |
||||
}; |
||||
|
||||
// push the current match into the set list
|
||||
stMatchSets[firstChar].push(row); |
||||
|
||||
// keep track of minChars zero items
|
||||
if ( nullData++ < options.max ) { |
||||
stMatchSets[""].push(row); |
||||
} |
||||
}; |
||||
|
||||
// add the data items to the cache
|
||||
$.each(stMatchSets, function(i, value) { |
||||
// increase the cache size
|
||||
options.cacheLength++; |
||||
// add to the cache
|
||||
add(i, value); |
||||
}); |
||||
} |
||||
|
||||
// populate any existing data
|
||||
setTimeout(populate, 25); |
||||
|
||||
function flush(){ |
||||
data = {}; |
||||
length = 0; |
||||
} |
||||
|
||||
return { |
||||
flush: flush, |
||||
add: add, |
||||
populate: populate, |
||||
load: function(q) { |
||||
if (!options.cacheLength || !length) |
||||
return null; |
||||
/* |
||||
* if dealing w/local data and matchContains than we must make sure |
||||
* to loop through all the data collections looking for matches |
||||
*/ |
||||
if( !options.url && options.matchContains ){ |
||||
// track all matches
|
||||
var csub = []; |
||||
// loop through all the data grids for matches
|
||||
for( var k in data ){ |
||||
// don't search through the stMatchSets[""] (minChars: 0) cache
|
||||
// this prevents duplicates
|
||||
if( k.length > 0 ){ |
||||
var c = data[k]; |
||||
$.each(c, function(i, x) { |
||||
// if we've got a match, add it to the array
|
||||
if (matchSubset(x.value, q)) { |
||||
csub.push(x); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
return csub; |
||||
} else |
||||
// if the exact item exists, use it
|
||||
if (data[q]){ |
||||
return data[q]; |
||||
} else |
||||
if (options.matchSubset) { |
||||
for (var i = q.length - 1; i >= options.minChars; i--) { |
||||
var c = data[q.substr(0, i)]; |
||||
if (c) { |
||||
var csub = []; |
||||
$.each(c, function(i, x) { |
||||
if (matchSubset(x.value, q)) { |
||||
csub[csub.length] = x; |
||||
} |
||||
}); |
||||
return csub; |
||||
} |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
}; |
||||
}; |
||||
|
||||
$.Autocompleter.Select = function (options, input, select, config) { |
||||
var CLASSES = { |
||||
ACTIVE: "ac_over" |
||||
}; |
||||
|
||||
var listItems, |
||||
active = -1, |
||||
data, |
||||
term = "", |
||||
needsInit = true, |
||||
element, |
||||
list; |
||||
|
||||
// Create results
|
||||
function init() { |
||||
if (!needsInit) |
||||
return; |
||||
element = $("<div/>") |
||||
.hide() |
||||
.addClass(options.resultsClass) |
||||
.css("position", "absolute") |
||||
.appendTo(document.body); |
||||
|
||||
list = $("<ul/>").appendTo(element).mouseover( function(event) { |
||||
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { |
||||
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); |
||||
$(target(event)).addClass(CLASSES.ACTIVE); |
||||
} |
||||
}).click(function(event) { |
||||
$(target(event)).addClass(CLASSES.ACTIVE); |
||||
select(); |
||||
// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
|
||||
input.focus(); |
||||
return false; |
||||
}).mousedown(function() { |
||||
config.mouseDownOnSelect = true; |
||||
}).mouseup(function() { |
||||
config.mouseDownOnSelect = false; |
||||
}); |
||||
|
||||
if( options.width > 0 ) |
||||
element.css("width", options.width); |
||||
|
||||
needsInit = false; |
||||
} |
||||
|
||||
function target(event) { |
||||
var element = event.target; |
||||
while(element && element.tagName != "LI") |
||||
element = element.parentNode; |
||||
// more fun with IE, sometimes event.target is empty, just ignore it then
|
||||
if(!element) |
||||
return []; |
||||
return element; |
||||
} |
||||
|
||||
function moveSelect(step) { |
||||
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE); |
||||
movePosition(step); |
||||
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE); |
||||
if(options.scroll) { |
||||
var offset = 0; |
||||
listItems.slice(0, active).each(function() { |
||||
offset += this.offsetHeight; |
||||
}); |
||||
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { |
||||
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight()); |
||||
} else if(offset < list.scrollTop()) { |
||||
list.scrollTop(offset); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
function movePosition(step) { |
||||
active += step; |
||||
if (active < 0) { |
||||
active = listItems.size() - 1; |
||||
} else if (active >= listItems.size()) { |
||||
active = 0; |
||||
} |
||||
} |
||||
|
||||
function limitNumberOfItems(available) { |
||||
return options.max && options.max < available |
||||
? options.max |
||||
: available; |
||||
} |
||||
|
||||
function fillList() { |
||||
list.empty(); |
||||
var max = limitNumberOfItems(data.length); |
||||
for (var i=0; i < max; i++) { |
||||
if (!data[i]) |
||||
continue; |
||||
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term); |
||||
if ( formatted === false ) |
||||
continue; |
||||
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0]; |
||||
$.data(li, "ac_data", data[i]); |
||||
} |
||||
listItems = list.find("li"); |
||||
if ( options.selectFirst ) { |
||||
listItems.slice(0, 1).addClass(CLASSES.ACTIVE); |
||||
active = 0; |
||||
} |
||||
// apply bgiframe if available
|
||||
if ( $.fn.bgiframe ) |
||||
list.bgiframe(); |
||||
} |
||||
|
||||
return { |
||||
display: function(d, q) { |
||||
init(); |
||||
data = d; |
||||
term = q; |
||||
fillList(); |
||||
}, |
||||
next: function() { |
||||
moveSelect(1); |
||||
}, |
||||
prev: function() { |
||||
moveSelect(-1); |
||||
}, |
||||
pageUp: function() { |
||||
if (active != 0 && active - 8 < 0) { |
||||
moveSelect( -active ); |
||||
} else { |
||||
moveSelect(-8); |
||||
} |
||||
}, |
||||
pageDown: function() { |
||||
if (active != listItems.size() - 1 && active + 8 > listItems.size()) { |
||||
moveSelect( listItems.size() - 1 - active ); |
||||
} else { |
||||
moveSelect(8); |
||||
} |
||||
}, |
||||
hide: function() { |
||||
element && element.hide(); |
||||
listItems && listItems.removeClass(CLASSES.ACTIVE); |
||||
active = -1; |
||||
}, |
||||
visible : function() { |
||||
return element && element.is(":visible"); |
||||
}, |
||||
current: function() { |
||||
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]); |
||||
}, |
||||
show: function() { |
||||
var offset = $(input).offset(); |
||||
element.css({ |
||||
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(), |
||||
top: offset.top + input.offsetHeight, |
||||
left: offset.left |
||||
}).show(); |
||||
if(options.scroll) { |
||||
list.scrollTop(0); |
||||
list.css({ |
||||
maxHeight: options.scrollHeight, |
||||
overflow: 'auto' |
||||
}); |
||||
|
||||
if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { |
||||
var listHeight = 0; |
||||
listItems.each(function() { |
||||
listHeight += this.offsetHeight; |
||||
}); |
||||
var scrollbarsVisible = listHeight > options.scrollHeight; |
||||
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight ); |
||||
if (!scrollbarsVisible) { |
||||
// IE doesn't recalculate width when scrollbar disappears
|
||||
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) ); |
||||
} |
||||
} |
||||
|
||||
} |
||||
}, |
||||
selected: function() { |
||||
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); |
||||
return selected && selected.length && $.data(selected[0], "ac_data"); |
||||
}, |
||||
emptyList: function (){ |
||||
list && list.empty(); |
||||
}, |
||||
unbind: function() { |
||||
element && element.remove(); |
||||
} |
||||
}; |
||||
}; |
||||
|
||||
$.Autocompleter.Selection = function(field, start, end) { |
||||
if( field.createTextRange ){ |
||||
var selRange = field.createTextRange(); |
||||
selRange.collapse(true); |
||||
selRange.moveStart("character", start); |
||||
selRange.moveEnd("character", end); |
||||
selRange.select(); |
||||
} else if( field.setSelectionRange ){ |
||||
field.setSelectionRange(start, end); |
||||
} else { |
||||
if( field.selectionStart ){ |
||||
field.selectionStart = start; |
||||
field.selectionEnd = end; |
||||
} |
||||
} |
||||
field.focus(); |
||||
}; |
||||
|
||||
})(jQuery); |
@ -1,18 +0,0 @@ |
||||
/* |
||||
* jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 |
||||
* http://benalman.com/projects/jquery-bbq-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman |
||||
* Dual licensed under the MIT and GPL licenses. |
||||
* http://benalman.com/about/license/
|
||||
*/ |
||||
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this); |
||||
/* |
||||
* jQuery hashchange event - v1.2 - 2/11/2010 |
||||
* http://benalman.com/projects/jquery-hashchange-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman |
||||
* Dual licensed under the MIT and GPL licenses. |
||||
* http://benalman.com/about/license/
|
||||
*/ |
||||
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this); |
@ -1,143 +0,0 @@ |
||||
/* |
||||
* File: jquery.dataTables.min.js |
||||
* Version: 1.7.6 |
||||
* Author: Allan Jardine (www.sprymedia.co.uk) |
||||
* Info: www.datatables.net |
||||
*
|
||||
* Copyright 2008-2011 Allan Jardine, all rights reserved. |
||||
* |
||||
* This source file is free software, under either the GPL v2 license or a |
||||
* BSD style license, as supplied with this software. |
||||
*
|
||||
* This source file is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. |
||||
*/ |
||||
(function(j,ra,p){j.fn.dataTableSettings=[];var D=j.fn.dataTableSettings;j.fn.dataTableExt={};var n=j.fn.dataTableExt;n.sVersion="1.7.6";n.sErrMode="alert";n.iApiIndex=0;n.oApi={};n.afnFiltering=[];n.aoFeatures=[];n.ofnSearch={};n.afnSortData=[];n.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", |
||||
sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", |
||||
sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};n.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled", |
||||
sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl", |
||||
sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default", |
||||
sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner", |
||||
sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,m,r){var s,w,y;if(g.bJUI){s=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;s.appendChild(y)}else{s=p.createElement("div");w=p.createElement("div")}s.className= |
||||
g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;s.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;m.appendChild(s);m.appendChild(w);j(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});j(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});j(s).bind("selectstart.DT",function(){return false});j(w).bind("selectstart.DT",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){m.setAttribute("id", |
||||
g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var m=g.aanFeatures.p,r=0,s=m.length;r<s;r++)if(m[r].childNodes.length!==0){m[r].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;m[r].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g, |
||||
m,r){var s=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),F=p.createElement("span"),x=p.createElement("span");s.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;F.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var u=g.oClasses;s.className=u.sPageButton+" "+u.sPageFirst;w.className=u.sPageButton+" "+u.sPagePrevious;F.className=u.sPageButton+" "+u.sPageNext;x.className=u.sPageButton+" "+u.sPageLast;m.appendChild(s); |
||||
m.appendChild(w);m.appendChild(y);m.appendChild(F);m.appendChild(x);j(s).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&r(g)});j(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&r(g)});j(F).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&r(g)});j(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&r(g)});j("span",m).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p== |
||||
"undefined"){m.setAttribute("id",g.sTableId+"_paginate");s.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");F.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,m){if(g.aanFeatures.p){var r=n.oPagination.iFullNumbersShowPages,s=Math.floor(r/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,F="",x,u=g.oClasses;if(w<r){s=1;x=w}else if(y<=s){s=1;x=r}else if(y>=w-s){s= |
||||
w-r+1;x=w}else{s=y-Math.ceil(r/2)+1;x=s+r-1}for(r=s;r<=x;r++)F+=y!=r?'<span class="'+u.sPageButton+'">'+r+"</span>":'<span class="'+u.sPageButtonActive+'">'+r+"</span>";x=g.aanFeatures.p;var z,U=function(){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;m(g);return false},C=function(){return false};r=0;for(s=x.length;r<s;r++)if(x[r].childNodes.length!==0){z=j("span:eq(2)",x[r]);z.html(F);j("span",z).bind("click.DT",U).bind("mousedown.DT",C).bind("selectstart.DT",C);z=x[r].getElementsByTagName("span"); |
||||
z=[z[0],z[1],z[z.length-2],z[z.length-1]];j(z).removeClass(u.sPageButton+" "+u.sPageButtonActive+" "+u.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+u.sPageButtonStaticDisabled;z[1].className+=" "+u.sPageButtonStaticDisabled}else{z[0].className+=" "+u.sPageButton;z[1].className+=" "+u.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+u.sPageButtonStaticDisabled;z[3].className+=" "+u.sPageButtonStaticDisabled}else{z[2].className+=" "+u.sPageButton;z[3].className+=" "+ |
||||
u.sPageButton}}}}}};n.oSort={"string-asc":function(g,m){g=g.toLowerCase();m=m.toLowerCase();return g<m?-1:g>m?1:0},"string-desc":function(g,m){g=g.toLowerCase();m=m.toLowerCase();return g<m?1:g>m?-1:0},"html-asc":function(g,m){g=g.replace(/<.*?>/g,"").toLowerCase();m=m.replace(/<.*?>/g,"").toLowerCase();return g<m?-1:g>m?1:0},"html-desc":function(g,m){g=g.replace(/<.*?>/g,"").toLowerCase();m=m.replace(/<.*?>/g,"").toLowerCase();return g<m?1:g>m?-1:0},"date-asc":function(g,m){g=Date.parse(g);m=Date.parse(m); |
||||
if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(m)||m==="")m=Date.parse("01/01/1970 00:00:00");return g-m},"date-desc":function(g,m){g=Date.parse(g);m=Date.parse(m);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(m)||m==="")m=Date.parse("01/01/1970 00:00:00");return m-g},"numeric-asc":function(g,m){return(g=="-"||g===""?0:g*1)-(m=="-"||m===""?0:m*1)},"numeric-desc":function(g,m){return(m=="-"||m===""?0:m*1)-(g=="-"||g===""?0:g*1)}};n.aTypes=[function(g){if(g.length=== |
||||
0)return"numeric";var m,r=false;m=g.charAt(0);if("0123456789-".indexOf(m)==-1)return null;for(var s=1;s<g.length;s++){m=g.charAt(s);if("0123456789.".indexOf(m)==-1)return null;if(m=="."){if(r)return null;r=true}}return"numeric"},function(g){var m=Date.parse(g);if(m!==null&&!isNaN(m)||g.length===0)return"date";return null},function(g){if(g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];n.fnVersionCheck=function(g){var m=function(x,u){for(;x.length<u;)x+="0";return x},r=n.sVersion.split("."); |
||||
g=g.split(".");for(var s="",w="",y=0,F=g.length;y<F;y++){s+=m(r[y],3);w+=m(g[y],3)}return parseInt(s,10)>=parseInt(w,10)};n._oExternConfig={iNextUnique:0};j.fn.dataTable=function(g){function m(){this.fnRecordsTotal=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide? |
||||
this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance=this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true}; |
||||
this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster= |
||||
[];this.aoColumns=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=false;this.aoOpenRows= |
||||
[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.bAjaxDataGet=true;this.fnServerData=function(a,b,c){j.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(d,f){f=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})}; |
||||
this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=n.oStdClasses;this.bSorted=this.bFiltered=false;this.oInit=null}function r(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments)); |
||||
return n.oApi[a].apply(this,b)}}function s(a){var b,c;if(a.bInitialised===false)setTimeout(function(){s(a)},200);else{sa(a);U(a);K(a,true);a.oFeatures.bAutoWidth&&$(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=v(a.aoColumns[b].sWidth);if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide)a.fnServerData.call(a.oInstance,a.sAjaxSource,[],function(d){for(b=0;b<d.aaData.length;b++)u(a, |
||||
d.aaData[b]);a.iInitDisplayStart=a._iDisplayStart;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,d)});else if(!a.oFeatures.bServerSide){K(a,false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!="undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){o(a.oLanguage,b,"sProcessing");o(a.oLanguage,b,"sLengthMenu");o(a.oLanguage,b,"sEmptyTable");o(a.oLanguage, |
||||
b,"sZeroRecords");o(a.oLanguage,b,"sInfo");o(a.oLanguage,b,"sInfoEmpty");o(a.oLanguage,b,"sInfoFiltered");o(a.oLanguage,b,"sInfoPostFix");o(a.oLanguage,b,"sSearch");if(typeof b.oPaginate!="undefined"){o(a.oLanguage.oPaginate,b.oPaginate,"sFirst");o(a.oLanguage.oPaginate,b.oPaginate,"sPrevious");o(a.oLanguage.oPaginate,b.oPaginate,"sNext");o(a.oLanguage.oPaginate,b.oPaginate,"sLast")}typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sEmptyTable"); |
||||
c&&s(a)}function F(a,b){a.aoColumns[a.aoColumns.length++]={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:a.aoColumns.length-1,sSortDataType:"std",nTh:b?b:p.createElement("th"),nTf:null,anThExtra:[],anTfExtra:[]};b=a.aoColumns.length-1;if(typeof a.aoPreSearchCols[b]== |
||||
"undefined"||a.aoPreSearchCols[b]===null)a.aoPreSearchCols[b]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[b].bRegex=="undefined")a.aoPreSearchCols[b].bRegex=true;if(typeof a.aoPreSearchCols[b].bSmart=="undefined")a.aoPreSearchCols[b].bSmart=true}x(a,b,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}o(b,c,"bVisible");o(b,c,"bSearchable");o(b,c,"bSortable");o(b,c,"sTitle");o(b, |
||||
c,"sName");o(b,c,"sWidth");o(b,c,"sWidth","sWidthOrig");o(b,c,"sClass");o(b,c,"fnRender");o(b,c,"bUseRendered");o(b,c,"iDataSort");o(b,c,"asSorting");o(b,c,"sSortDataType")}if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||j.inArray("asc",b.asSorting)==-1&&j.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(j.inArray("asc",b.asSorting)!=-1&&j.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(j.inArray("asc", |
||||
b.asSorting)==-1&&j.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function u(a,b){if(b.length!=a.aoColumns.length&&a.iDrawError!=a.iDraw){H(a,0,"Added data (size "+b.length+") does not match known number of columns ("+a.aoColumns.length+")");a.iDrawError=a.iDraw;return-1}b=b.slice();var c=a.aoData.length;a.aoData.push({nTr:p.createElement("tr"),_iId:a.iNextId++,_aData:b,_anHidden:[],_sRowStripe:""});for(var d,f,e=0;e<b.length;e++){d= |
||||
p.createElement("td");if(b[e]===null)b[e]="";if(typeof a.aoColumns[e].fnRender=="function"){f=a.aoColumns[e].fnRender({iDataRow:c,iDataColumn:e,aData:b,oSettings:a});d.innerHTML=f;if(a.aoColumns[e].bUseRendered)a.aoData[c]._aData[e]=f}else d.innerHTML=b[e];if(typeof b[e]!="string")b[e]+="";b[e]=j.trim(b[e]);if(a.aoColumns[e].sClass!==null)d.className=a.aoColumns[e].sClass;if(a.aoColumns[e]._bAutoType&&a.aoColumns[e].sType!="string"){f=aa(a.aoData[c]._aData[e]);if(a.aoColumns[e].sType===null)a.aoColumns[e].sType= |
||||
f;else if(a.aoColumns[e].sType!=f)a.aoColumns[e].sType="string"}if(a.aoColumns[e].bVisible){a.aoData[c].nTr.appendChild(d);a.aoData[c]._anHidden[e]=null}else a.aoData[c]._anHidden[e]=d}a.aiDisplayMaster.push(c);return c}function z(a){var b,c,d,f,e,i,h,k;if(a.sAjaxSource===null){h=a.nTBody.childNodes;b=0;for(c=h.length;b<c;b++)if(h[b].nodeName.toUpperCase()=="TR"){i=a.aoData.length;a.aoData.push({nTr:h[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(i);k=a.aoData[i]._aData; |
||||
i=h[b].childNodes;d=e=0;for(f=i.length;d<f;d++)if(i[d].nodeName.toUpperCase()=="TD"){k[e]=j.trim(i[d].innerHTML);e++}}}h=R(a);i=[];b=0;for(c=h.length;b<c;b++){d=0;for(f=h[b].childNodes.length;d<f;d++){e=h[b].childNodes[d];e.nodeName.toUpperCase()=="TD"&&i.push(e)}}i.length!=h.length*a.aoColumns.length&&H(a,1,"Unexpected number of TD elements. Expected "+h.length*a.aoColumns.length+" and got "+i.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination."); |
||||
h=0;for(d=a.aoColumns.length;h<d;h++){if(a.aoColumns[h].sTitle===null)a.aoColumns[h].sTitle=a.aoColumns[h].nTh.innerHTML;f=a.aoColumns[h]._bAutoType;e=typeof a.aoColumns[h].fnRender=="function";k=a.aoColumns[h].sClass!==null;var l=a.aoColumns[h].bVisible,q,t;if(f||e||k||!l){b=0;for(c=a.aoData.length;b<c;b++){q=i[b*d+h];if(f)if(a.aoColumns[h].sType!="string"){t=aa(a.aoData[b]._aData[h]);if(a.aoColumns[h].sType===null)a.aoColumns[h].sType=t;else if(a.aoColumns[h].sType!=t)a.aoColumns[h].sType="string"}if(e){t= |
||||
a.aoColumns[h].fnRender({iDataRow:b,iDataColumn:h,aData:a.aoData[b]._aData,oSettings:a});q.innerHTML=t;if(a.aoColumns[h].bUseRendered)a.aoData[b]._aData[h]=t}if(k)q.className+=" "+a.aoColumns[h].sClass;if(l)a.aoData[b]._anHidden[h]=null;else{a.aoData[b]._anHidden[h]=q;q.parentNode.removeChild(q)}}}}}function U(a){var b,c,d,f,e,i=a.nTHead.getElementsByTagName("tr"),h=0,k;if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;a.aoColumns[b].sClass!== |
||||
null&&j(c).addClass(a.aoColumns[b].sClass);f=1;for(e=i.length;f<e;f++){k=j(i[f]).children();a.aoColumns[b].anThExtra.push(k[b-h]);a.aoColumns[b].bVisible||i[f].removeChild(k[b-h])}if(a.aoColumns[b].bVisible){if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{c.parentNode.removeChild(c);h++}}}else{f=p.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&j(c).addClass(a.aoColumns[b].sClass); |
||||
a.aoColumns[b].bVisible&&f.appendChild(c)}j(a.nTHead).html("")[0].appendChild(f)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");f.className=a.oClasses.sSortJUIWrapper;j(c).contents().appendTo(f);f.appendChild(p.createElement("span"));c.appendChild(f)}}d=function(){this.onselectstart=function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ba(a,a.aoColumns[b].nTh,b);j(a.aoColumns[b].nTh).bind("mousedown.DT", |
||||
d)}else j(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);if(a.nTFoot!==null){h=0;i=a.nTFoot.getElementsByTagName("tr");c=i[0].getElementsByTagName("th");b=0;for(d=c.length;b<d;b++)if(typeof a.aoColumns[b]!="undefined"){a.aoColumns[b].nTf=c[b-h];if(a.oClasses.sFooterTH!=="")a.aoColumns[b].nTf.className+=" "+a.oClasses.sFooterTH;f=1;for(e=i.length;f<e;f++){k=j(i[f]).children();a.aoColumns[b].anTfExtra.push(k[b-h]);a.aoColumns[b].bVisible||i[f].removeChild(k[b-h])}if(!a.aoColumns[b].bVisible){c[b- |
||||
h].parentNode.removeChild(c[b-h]);h++}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripClasses.length;c=a.aoOpenRows.length;a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(!(!a.bDestroying&&a.oFeatures.bServerSide&&!ta(a))){a.oFeatures.bServerSide||a.iDraw++;if(a.aiDisplay.length!==0){var i=a._iDisplayStart, |
||||
h=a._iDisplayEnd;if(a.oFeatures.bServerSide){i=0;h=a.aoData.length}for(i=i;i<h;i++){var k=a.aoData[a.aiDisplay[i]],l=k.nTr;if(b!==0){var q=a.asStripClasses[f%b];if(k._sRowStripe!=q){j(l).removeClass(k._sRowStripe).addClass(q);k._sRowStripe=q}}if(typeof a.fnRowCallback=="function"){l=a.fnRowCallback.call(a.oInstance,l,a.aoData[a.aiDisplay[i]]._aData,f,i);if(!l&&!e){H(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(l);f++;if(c!==0)for(k=0;k<c;k++)l==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]= |
||||
p.createElement("tr");if(typeof a.asStripClasses[0]!="undefined")d[0].className=a.asStripClasses[0];e=p.createElement("td");e.setAttribute("valign","top");e.colSpan=S(a);e.className=a.oClasses.sRowEmpty;e.innerHTML=typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0?a.oLanguage.sEmptyTable:a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));d[f].appendChild(e)}typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,j(">tr",a.nTHead)[0], |
||||
V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,j(">tr",a.nTFoot)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b<c;b++)f.appendChild(d[b]); |
||||
a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-1;b>=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function W(a){if(a.oFeatures.bSort)O(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)P(a,a.oPreviousSearch);else{E(a);C(a)}}function ta(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d;a.iDraw++;c.push({name:"sEcho", |
||||
value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ca(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:-1});if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(d=0;d<b;d++){c.push({name:"sSearch_"+d,value:a.aoPreSearchCols[d].sSearch});c.push({name:"bRegex_"+d,value:a.aoPreSearchCols[d].bRegex}); |
||||
c.push({name:"bSearchable_"+d,value:a.aoColumns[d].bSearchable})}}if(a.oFeatures.bSort!==false){var f=a.aaSortingFixed!==null?a.aaSortingFixed.length:0,e=a.aaSorting.length;c.push({name:"iSortingCols",value:f+e});for(d=0;d<f;d++){c.push({name:"iSortCol_"+d,value:a.aaSortingFixed[d][0]});c.push({name:"sSortDir_"+d,value:a.aaSortingFixed[d][1]})}for(d=0;d<e;d++){c.push({name:"iSortCol_"+(d+f),value:a.aaSorting[d][0]});c.push({name:"sSortDir_"+(d+f),value:a.aaSorting[d][1]})}for(d=0;d<b;d++)c.push({name:"bSortable_"+ |
||||
d,value:a.aoColumns[d].bSortable})}a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(i){ua(a,i)});return false}else return true}function ua(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))da(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ca(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=va(a,b.sColumns);for(var f=0,e=b.aaData.length;f< |
||||
e;f++)if(c){for(var i=[],h=0,k=a.aoColumns.length;h<k;h++)i.push(b.aaData[f][d[h]]);u(a,i)}else u(a,b.aaData[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function sa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");for(var c=a.nTableWrapper,d=a.sDom.split(""), |
||||
f,e,i,h,k,l,q,t=0;t<d.length;t++){e=0;i=d[t];if(i=="<"){h=p.createElement("div");k=d[t+1];if(k=="'"||k=='"'){l="";for(q=2;d[t+q]!=k;){l+=d[t+q];q++}if(l=="H")l="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(l=="F")l="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(l.indexOf(".")!=-1){k=l.split(".");h.setAttribute("id",k[0].substr(1,k[0].length-1));h.className=k[1]}else if(l.charAt(0)=="#")h.setAttribute("id",l.substr(1, |
||||
l.length-1));else h.className=l;t+=q}c.appendChild(h);c=h}else if(i==">")c=c.parentNode;else if(i=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=wa(a);e=1}else if(i=="f"&&a.oFeatures.bFilter){f=xa(a);e=1}else if(i=="r"&&a.oFeatures.bProcessing){f=ya(a);e=1}else if(i=="t"){f=za(a);e=1}else if(i=="i"&&a.oFeatures.bInfo){f=Aa(a);e=1}else if(i=="p"&&a.oFeatures.bPaginate){f=Ba(a);e=1}else if(n.aoFeatures.length!==0){h=n.aoFeatures;q=0;for(k=h.length;q<k;q++)if(i==h[q].cFeature){if(f=h[q].fnInit(a))e= |
||||
1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[i]!="object")a.aanFeatures[i]=[];a.aanFeatures[i].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function za(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),i=p.createElement("div"),h=a.nTable.cloneNode(false),k=a.nTable.cloneNode(false),l=a.nTable.getElementsByTagName("thead")[0],q=a.nTable.getElementsByTagName("tfoot").length=== |
||||
0?null:a.nTable.getElementsByTagName("tfoot")[0],t=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?n.oJUIClasses:n.oStdClasses;c.appendChild(d);e.appendChild(i);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(h);h.appendChild(l);if(q!==null){b.appendChild(e);i.appendChild(k);k.appendChild(q)}b.className=t.sScrollWrapper;c.className=t.sScrollHead;d.className=t.sScrollHeadInner;f.className=t.sScrollBody;e.className=t.sScrollFoot;i.className=t.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow= |
||||
"hidden";c.style.position="relative";e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";h.removeAttribute("id");h.style.marginLeft="0";a.nTable.style.marginLeft="0";if(q!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=j(">caption",a.nTable);i=0;for(k=d.length;i<k;i++)h.appendChild(d[i]);if(a.oScroll.sX!==""){c.style.width=v(a.oScroll.sX);f.style.width=v(a.oScroll.sX);if(q!==null)e.style.width=v(a.oScroll.sX);j(f).scroll(function(){c.scrollLeft= |
||||
this.scrollLeft;if(q!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=v(a.oScroll.sY);a.aoDrawCallback.push({fn:Ca,sName:"scrolling"});a.oScroll.bInfinite&&j(f).scroll(function(){if(!a.bDrawing)if(j(this).scrollTop()+j(this).height()>j(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ea(a,"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ca(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0], |
||||
d=a.nTable.parentNode,f,e,i,h,k,l,q,t,G=[];i=a.nTable.getElementsByTagName("thead");i.length>0&&a.nTable.removeChild(i[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}i=a.nTHead.cloneNode(true);a.nTable.insertBefore(i,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);a.nTable.insertBefore(k,a.nTable.childNodes[1])}var J=fa(i);f=0;for(e=J.length;f<e;f++){q=ga(a,f);J[f].style.width=a.aoColumns[q].sWidth}a.nTFoot!==null&&L(function(B){B.style.width= |
||||
""},k.getElementsByTagName("tr"));f=j(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(j.browser.msie&&j.browser.version<=7)a.nTable.style.width=v(j(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!=="")a.nTable.style.width=v(a.oScroll.sXInner);else if(f==j(d).width()&&j(d).height()<j(a.nTable).height()){a.nTable.style.width=v(f-a.oScroll.iBarWidth);if(j(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=v(f)}else a.nTable.style.width= |
||||
v(f);f=j(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");L(function(B,I){l=B.style;l.paddingTop="0";l.paddingBottom="0";l.borderTopWidth="0";l.borderBottomWidth="0";l.height=0;t=j(B).width();I.style.width=v(t);G.push(t)},i,e);j(i).height(0);if(a.nTFoot!==null){h=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");L(function(B,I){l=B.style;l.paddingTop="0";l.paddingBottom="0";l.borderTopWidth="0";l.borderBottomWidth="0";l.height=0;t=j(B).width(); |
||||
I.style.width=v(t);G.push(t)},h,k);j(h).height(0)}L(function(B){B.innerHTML="";B.style.width=v(G.shift())},i);a.nTFoot!==null&&L(function(B){B.innerHTML="";B.style.width=v(G.shift())},h);if(j(a.nTable).outerWidth()<f)if(a.oScroll.sX==="")H(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you enable x-scrolling or increase the width the table has in which to be drawn");else a.oScroll.sXInner!==""&&H(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation"); |
||||
if(a.oScroll.sY==="")if(j.browser.msie&&j.browser.version<=7)d.style.height=v(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=v(a.oScroll.sY);h=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=v(j(a.nTable).height()+h)}h=j(a.nTable).outerWidth();c.style.width=v(h);b.style.width=v(h+a.oScroll.iBarWidth);if(a.nTFoot!==null){b=a.nScrollFoot.getElementsByTagName("div")[0]; |
||||
c=b.getElementsByTagName("table")[0];b.style.width=v(a.nTable.offsetWidth+a.oScroll.iBarWidth);c.style.width=v(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function X(a){if(a.oFeatures.bAutoWidth===false)return false;$(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function xa(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&b.setAttribute("id",a.sTableId+"_filter");b.className=a.oClasses.sFilter; |
||||
b.innerHTML=a.oLanguage.sSearch+(a.oLanguage.sSearch===""?"":" ")+'<input type="text" />';var c=j("input",b);c.val(a.oPreviousSearch.sSearch.replace('"',"""));c.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f<e;f++)d[f]!=this.parentNode&&j("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&P(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});c.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return b} |
||||
function P(a,b,c){Da(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)Ea(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);n.afnFiltering.length!==0&&Fa(a);a.bFiltered=true;a._iDisplayStart=0;E(a);C(a);ha(a,0)}function Fa(a){for(var b=n.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,i=a.aiDisplay.length;e<i;e++){var h=a.aiDisplay[e-f];if(!b[c](a,a.aoData[h]._aData,h)){a.aiDisplay.splice(e-f,1);f++}}}function Ea(a,b,c,d,f){if(b!== |
||||
""){var e=0;b=ia(b,d,f);for(d=a.aiDisplay.length-1;d>=0;d--){f=ja(a.aoData[a.aiDisplay[d]]._aData[c],a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Da(a,b,c,d,f){var e=ia(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(n.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!== |
||||
0){a.aiDisplay.splice(0,a.aiDisplay.length);ha(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var i=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-i,1);i++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function ha(a,b){a.asDataSearch.splice(0,a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]= |
||||
ka(a,a.aoData[b[c]]._aData)}function ka(a,b){for(var c="",d=p.createElement("div"),f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=ja(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,"")}return c}function ia(a,b,c){if(c){a=b?a.split(" "):la(a).split(" ");a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:la(a);return new RegExp(a,"i")}}function ja(a,b){if(typeof n.ofnSearch[b]== |
||||
"function")return n.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");return a}function O(a,b){var c,d,f,e,i,h,k=[],l=[],q=n.oSort,t=a.aoData,G=a.aoColumns;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){k=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<k.length;f++){e=k[f][0];i=M(a,e);h=a.aoColumns[e].sSortDataType;if(typeof n.afnSortData[h]!= |
||||
"undefined"){var J=n.afnSortData[h](a,e,i);i=0;for(h=t.length;i<h;i++)t[i]._aData[e]=J[i]}}f=0;for(e=a.aiDisplayMaster.length;f<e;f++)l[a.aiDisplayMaster[f]]=f;var B=k.length;a.aiDisplayMaster.sort(function(I,Y){var N;for(f=0;f<B;f++){c=G[k[f][0]].iDataSort;d=G[c].sType;N=q[d+"-"+k[f][1]](t[I]._aData[c],t[Y]._aData[c]);if(N!==0)return N}return q["numeric-asc"](l[I],l[Y])})}if(typeof b=="undefined"||b)T(a);a.bSorted=true;if(a.oFeatures.bFilter)P(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice(); |
||||
a._iDisplayStart=0;E(a);C(a)}}function ba(a,b,c,d){j(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var i,h;if(f.shiftKey){for(var k=false,l=0;l<a.aaSorting.length;l++)if(a.aaSorting[l][0]==c){k=true;i=a.aaSorting[l][0];h=a.aaSorting[l][2]+1;if(typeof a.aoColumns[i].asSorting[h]=="undefined")a.aaSorting.splice(l,1);else{a.aaSorting[l][1]=a.aoColumns[i].asSorting[h];a.aaSorting[l][2]=h}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length== |
||||
1&&a.aaSorting[0][0]==c){i=a.aaSorting[0][0];h=a.aaSorting[0][2]+1;if(typeof a.aoColumns[i].asSorting[h]=="undefined")h=0;a.aaSorting[0][1]=a.aoColumns[i].asSorting[h];a.aaSorting[0][2]=h}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}O(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function T(a){var b,c,d,f,e,i=a.aoColumns.length,h=a.oClasses;for(b= |
||||
0;b<i;b++)a.aoColumns[b].bSortable&&j(a.aoColumns[b].nTh).removeClass(h.sSortAsc+" "+h.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?h.sSortAsc:h.sSortDesc;d=c;break}j(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=j("span",a.aoColumns[b].nTh);c.removeClass(h.sSortJUIAsc+ |
||||
" "+h.sSortJUIDesc+" "+h.sSortJUI+" "+h.sSortJUIAscAllowed+" "+h.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?h.sSortJUIAsc:h.sSortJUIDesc)}}else j(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);e=h.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=Z(a);if(d.length>=i)for(b=0;b<i;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=j.trim(d[i*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+ |
||||
"2")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=j.trim(d[i*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=j.trim(d[i*c+b].className.replace(" "+e+"3",""))}h=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/i;c<a;c++)d[i*c+k].className+=" "+e+h;h<3&&h++}}}function Ba(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;n.oPagination[a.sPaginationType].fnInit(a, |
||||
b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){n.oPagination[c.sPaginationType].fnUpdate(c,function(d){E(d);C(d)})},sName:"pagination"});return b}function ea(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay())a._iDisplayStart+= |
||||
a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(a._iDisplayLength>=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else H(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function Aa(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ga,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b} |
||||
function Ga(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),i=a.fnFormatNumber(c),h=a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_", |
||||
h)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",e).replace("_END_",i).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",e).replace("_END_",i).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)j(a[b]).html(e)}} |
||||
function wa(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var f=p.createElement("div"); |
||||
a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");f.className=a.oClasses.sLength;f.innerHTML=a.oLanguage.sLengthMenu.replace("_MENU_",b);j('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);j("select",f).bind("change.DT",function(){var e=j(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;c<d;c++)i[c]!=this.parentNode&&j("select",i[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart= |
||||
a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function ya(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r=="undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility= |
||||
b?"visible":"hidden"}}function ga(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function M(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function Q(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c; |
||||
return null}function S(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Ha(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=a;b.appendChild(c);a=c.offsetWidth; |
||||
b.removeChild(c);return a}function $(a){var b=0,c,d=0,f=a.aoColumns.length,e,i=j("th",a.nTHead);for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Ha(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==null)a.aoColumns[e].sWidth=v(c);b++}}if(f==i.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=j(i[e]).width();if(c!==null)a.aoColumns[e].sWidth=v(c)}else{b=a.nTable.cloneNode(false);e=p.createElement("tbody");c=p.createElement("tr"); |
||||
b.removeAttribute("id");b.appendChild(a.nTHead.cloneNode(true));if(a.nTFoot!==null){b.appendChild(a.nTFoot.cloneNode(true));L(function(h){h.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(e);e.appendChild(c);e=j("thead th",b);if(e.length===0)e=j("tbody tr:eq(0)>td",b);e.each(function(h){this.style.width="";h=ga(a,h);if(h!==null&&a.aoColumns[h].sWidthOrig!=="")this.style.width=a.aoColumns[h].sWidthOrig});for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Ia(a,e);if(d!==null){d=d.cloneNode(true); |
||||
c.appendChild(d)}}e=a.nTable.parentNode;e.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!=="")b.style.width=v(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(j(b).width()<e.offsetWidth)b.style.width=v(e.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=v(e.offsetWidth);b.style.visibility="hidden";Ja(a,b);f=j("tbody tr:eq(0)>td",b);if(f.length===0)f=j("thead tr:eq(0)>th",b);for(e=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){d=j(f[c]).outerWidth();if(d!==null&& |
||||
d>0)a.aoColumns[e].sWidth=v(d);c++}a.nTable.style.width=v(j(b).outerWidth());b.parentNode.removeChild(b)}}function Ja(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){j(b).width();b.style.width=v(j(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=v(j(b).outerWidth())}function Ia(a,b,c){if(typeof c=="undefined"||c){c=Ka(a,b);b=M(a,b);if(c<0)return null;return a.aoData[c].nTr.getElementsByTagName("td")[b]}var d=-1,f,e;c=-1;var i=p.createElement("div");i.style.visibility="hidden"; |
||||
i.style.position="absolute";p.body.appendChild(i);f=0;for(e=a.aoData.length;f<e;f++){i.innerHTML=a.aoData[f]._aData[b];if(i.offsetWidth>d){d=i.offsetWidth;c=f}}p.body.removeChild(i);if(c>=0){b=M(a,b);if(a=a.aoData[c].nTr.getElementsByTagName("td")[b])return a}return null}function Ka(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var e=a.aoData[f]._aData[b];if(e.length>c){c=e.length;d=f}}return d}function v(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b= |
||||
a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+"px"}function Oa(a,b){if(a.length!=b.length)return 1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function aa(a){for(var b=n.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function V(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function R(a){for(var b=[],c=a.aoData.length,d=0;d< |
||||
c;d++)b.push(a.aoData[d].nTr);return b}function Z(a){var b=R(a),c=[],d,f=[],e,i,h,k;e=0;for(i=b.length;e<i;e++){c=[];h=0;for(k=b[e].childNodes.length;h<k;h++){d=b[e].childNodes[h];d.nodeName.toUpperCase()=="TD"&&c.push(d)}h=d=0;for(k=a.aoColumns.length;h<k;h++)if(a.aoColumns[h].bVisible)f.push(c[h-d]);else{f.push(a.aoData[e]._anHidden[h]);d++}}return f}function la(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ma(a,b){for(var c= |
||||
-1,d=0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function va(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ca(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function H(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(n.sErrMode== |
||||
"alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function da(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function na(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+a._iDisplayStart+",";f+='"iEnd":'+a._iDisplayEnd+",";f+='"iLength":'+a._iDisplayLength+ |
||||
",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+"],";f=f.substring(0,f.length-1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+= |
||||
a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";La(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Ma(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=oa(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof j.parseJSON=="function"?j.parseJSON(d.replace(/'/g,'"')):eval("("+d+")")}catch(e){return}d=0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a, |
||||
c))return;a.oLoadedState=j.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]={sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]}; |
||||
if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function La(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=ra.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var i;if(f!==null){i=typeof j.parseJSON=="function"?j.parseJSON(b):eval("("+b+")");b=f(a,i,e.toGMTString(),c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+ |
||||
"; path="+c.join("/")+"/";f="";e=9999999999999;if((oa(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var h=0,k=a.length;h<k;h++)if(a[h].indexOf(d)!=-1){var l=a[h].split("=");try{i=eval("("+decodeURIComponent(l[1])+")")}catch(q){continue}if(typeof i.iCreate!="undefined"&&i.iCreate<e){f=l[0];e=i.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}p.cookie=b}function oa(a){var b=ra.location.pathname.split("/");a=a+"_"+ |
||||
b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function fa(a){a=a.getElementsByTagName("tr");if(a.length==1)return a[0].getElementsByTagName("th");var b=[],c=[],d,f,e,i,h,k,l=function(I,Y,N){for(;typeof I[Y][N]!="undefined";)N++;return N},q=function(I){if(typeof b[I]=="undefined")b[I]=[]};d=0;for(i= |
||||
a.length;d<i;d++){q(d);var t=0,G=[];f=0;for(h=a[d].childNodes.length;f<h;f++)if(a[d].childNodes[f].nodeName.toUpperCase()=="TD"||a[d].childNodes[f].nodeName.toUpperCase()=="TH")G.push(a[d].childNodes[f]);f=0;for(h=G.length;f<h;f++){var J=G[f].getAttribute("colspan")*1,B=G[f].getAttribute("rowspan")*1;if(!J||J===0||J===1){k=l(b,d,t);b[d][k]=G[f].nodeName.toUpperCase()=="TD"?4:G[f];if(B||B===0||B===1)for(e=1;e<B;e++){q(d+e);b[d+e][k]=2}t++}else{k=l(b,d,t);for(e=0;e<J;e++)b[d][k+e]=3;t+=J}}}d=0;for(i= |
||||
b.length;d<i;d++){f=0;for(h=b[d].length;f<h;f++)if(typeof b[d][f]=="object"&&typeof c[f]=="undefined")c[f]=b[d][f]}return c}function Na(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;p.body.removeChild(c); |
||||
return b-a}function L(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,i=b[d].childNodes.length;e<i;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function o(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}this.oApi={};this.fnDraw=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else W(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[n.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c== |
||||
"undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=true;if(typeof b=="undefined"||b===null){P(e,{sSearch:a,bRegex:c,bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)j("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;P(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[n.iApiIndex])};this.fnVersionCheck=n.fnVersionCheck;this.fnSort=function(a){var b= |
||||
A(this[n.iApiIndex]);b.aaSorting=a;O(b)};this.fnSortListener=function(a,b,c){ba(A(this[n.iApiIndex]),a,b,c)};this.fnAddData=function(a,b){if(a.length===0)return[];var c=[],d,f=A(this[n.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=u(f,a[e]);if(d==-1)return c;c.push(d)}else{d=u(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)W(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[n.iApiIndex]);a=typeof a=="object"?Q(d,a): |
||||
a;var f=d.aoData.splice(a,1),e=j.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ma(d.aiDisplayMaster,a);ma(d.aiDisplay,a);typeof b=="function"&&b.call(this,d,f);if(d._iDisplayStart>=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[n.iApiIndex]);da(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[n.iApiIndex]);this.fnClose(a);var f= |
||||
p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=S(d);e.innerHTML=b;b=j("tr",d.nTBody);j.inArray(a,b)!=-1&&j(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[n.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a){var b=A(this[n.iApiIndex]);if(typeof a!= |
||||
"undefined"){a=typeof a=="object"?Q(b,a):a;return(aRowData=b.aoData[a])?aRowData._aData:null}return V(b)};this.fnGetNodes=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined")return(aRowData=b.aoData[a])?aRowData.nTr:null;return R(b)};this.fnGetPosition=function(a){var b=A(this[n.iApiIndex]);if(a.nodeName.toUpperCase()=="TR")return Q(b,a);else if(a.nodeName.toUpperCase()=="TD")for(var c=Q(b,a.parentNode),d=0,f=0;f<b.aoColumns.length;f++)if(b.aoColumns[f].bVisible){if(b.aoData[c].nTr.getElementsByTagName("td")[f- |
||||
d]==a)return[c,f-d,f]}else d++;return null};this.fnUpdate=function(a,b,c,d,f){var e=A(this[n.iApiIndex]),i,h;b=typeof b=="object"?Q(e,b):b;if(typeof a!="object"){h=a;e.aoData[b]._aData[c]=h;if(e.aoColumns[c].fnRender!==null){h=e.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:e.aoData[b]._aData,oSettings:e});if(e.aoColumns[c].bUseRendered)e.aoData[b]._aData[c]=h}i=M(e,c);if(i!==null)e.aoData[b].nTr.getElementsByTagName("td")[i].innerHTML=h;else e.aoData[b]._anHidden[c].innerHTML=h}else{if(a.length!= |
||||
e.aoColumns.length){H(e,0,"An array passed to fnUpdate must have the same number of columns as the table in question - in this case "+e.aoColumns.length);return 1}for(c=0;c<a.length;c++){h=a[c];e.aoData[b]._aData[c]=h;if(e.aoColumns[c].fnRender!==null){h=e.aoColumns[c].fnRender({iDataRow:b,iDataColumn:c,aData:e.aoData[b]._aData,oSettings:e});if(e.aoColumns[c].bUseRendered)e.aoData[b]._aData[c]=h}i=M(e,c);if(i!==null)e.aoData[b].nTr.getElementsByTagName("td")[i].innerHTML=h;else e.aoData[b]._anHidden[c].innerHTML= |
||||
h}}a=j.inArray(b,e.aiDisplay);e.asDataSearch[a]=ka(e,e.aoData[b]._aData);if(typeof f=="undefined"||f)X(e);if(typeof d=="undefined"||d)W(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[n.iApiIndex]),f,e;e=d.aoColumns.length;var i,h,k,l,q;if(d.aoColumns[a].bVisible!=b){l=j(">tr",d.nTHead)[0];i=j(">tr",d.nTFoot)[0];q=[];h=[];for(f=0;f<e;f++){q.push(d.aoColumns[f].nTh);h.push(d.aoColumns[f].nTf)}if(b){for(f=b=0;f<a;f++)d.aoColumns[f].bVisible&&b++;if(b>=S(d)){l.appendChild(q[a]);l=j(">tr", |
||||
d.nTHead);f=1;for(e=l.length;f<e;f++)l[f].appendChild(d.aoColumns[a].anThExtra[f-1]);if(i){i.appendChild(h[a]);l=j(">tr",d.nTFoot);f=1;for(e=l.length;f<e;f++)l[f].appendChild(d.aoColumns[a].anTfExtra[f-1])}f=0;for(e=d.aoData.length;f<e;f++){i=d.aoData[f]._anHidden[a];d.aoData[f].nTr.appendChild(i)}}else{for(f=a;f<e;f++){k=M(d,f);if(k!==null)break}l.insertBefore(q[a],l.getElementsByTagName("th")[k]);l=j(">tr",d.nTHead);f=1;for(e=l.length;f<e;f++){q=j(l[f]).children();l[f].insertBefore(d.aoColumns[a].anThExtra[f- |
||||
1],q[k])}if(i){i.insertBefore(h[a],i.getElementsByTagName("th")[k]);l=j(">tr",d.nTFoot);f=1;for(e=l.length;f<e;f++){q=j(l[f]).children();l[f].insertBefore(d.aoColumns[a].anTfExtra[f-1],q[k])}}Z(d);f=0;for(e=d.aoData.length;f<e;f++){i=d.aoData[f]._anHidden[a];d.aoData[f].nTr.insertBefore(i,j(">td:eq("+k+")",d.aoData[f].nTr)[0])}}d.aoColumns[a].bVisible=true}else{l.removeChild(q[a]);f=0;for(e=d.aoColumns[a].anThExtra.length;f<e;f++){k=d.aoColumns[a].anThExtra[f];k.parentNode.removeChild(k)}if(i){i.removeChild(h[a]); |
||||
f=0;for(e=d.aoColumns[a].anTfExtra.length;f<e;f++){k=d.aoColumns[a].anTfExtra[f];k.parentNode.removeChild(k)}}h=Z(d);f=0;for(e=d.aoData.length;f<e;f++){i=h[f*d.aoColumns.length+a*1];d.aoData[f]._anHidden[a]=i;i.parentNode.removeChild(i)}d.aoColumns[a].bVisible=false}f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=S(d);if(typeof c=="undefined"||c){X(d);C(d)}na(d)}};this.fnPageChange=function(a,b){var c=A(this[n.iApiIndex]);ea(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy= |
||||
function(){var a=A(this[n.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;j(a.nTableWrapper).find("*").andSelf().unbind(".DT");d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);j("tbody>tr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();if(a.nTable!=a.nTHead.parentNode){j(">thead",a.nTable).remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&&a.nTable!=a.nTFoot.parentNode){j(">tfoot",a.nTable).remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable); |
||||
j(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];T(a);j(R(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){j("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oJUIClasses.sSortableAsc,n.oJUIClasses.sSortableDesc,n.oJUIClasses.sSortableNone].join(" "));j("th span",a.nTHead).remove()}else j("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oStdClasses.sSortableAsc,n.oStdClasses.sSortableDesc,n.oStdClasses.sSortableNone].join(" "));b.appendChild(a.nTable);d=0;for(f=a.aoData.length;d< |
||||
f;d++)c.appendChild(a.aoData[d].nTr);a.nTable.style.width=v(a.sDestroyWidth);j(">tr:even",c).addClass(a.asDestoryStrips[0]);j(">tr:odd",c).addClass(a.asDestoryStrips[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1)};this.fnAdjustColumnSizing=function(a){var b=A(this[n.iApiIndex]);X(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var pa in n.oApi)if(pa)this[pa]=r(pa);this.oApi._fnExternApiFunc=r;this.oApi._fnInitalise= |
||||
s;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=F;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=u;this.oApi._fnGatherData=z;this.oApi._fnDrawHead=U;this.oApi._fnDraw=C;this.oApi._fnReDraw=W;this.oApi._fnAjaxUpdate=ta;this.oApi._fnAjaxUpdateDraw=ua;this.oApi._fnAddOptionsHtml=sa;this.oApi._fnFeatureHtmlTable=za;this.oApi._fnScrollDraw=Ca;this.oApi._fnAjustColumnSizing=X;this.oApi._fnFeatureHtmlFilter=xa;this.oApi._fnFilterComplete=P;this.oApi._fnFilterCustom=Fa;this.oApi._fnFilterColumn= |
||||
Ea;this.oApi._fnFilter=Da;this.oApi._fnBuildSearchArray=ha;this.oApi._fnBuildSearchRow=ka;this.oApi._fnFilterCreateSearch=ia;this.oApi._fnDataToSearch=ja;this.oApi._fnSort=O;this.oApi._fnSortAttachListener=ba;this.oApi._fnSortingClasses=T;this.oApi._fnFeatureHtmlPaginate=Ba;this.oApi._fnPageChange=ea;this.oApi._fnFeatureHtmlInfo=Aa;this.oApi._fnUpdateInfo=Ga;this.oApi._fnFeatureHtmlLength=wa;this.oApi._fnFeatureHtmlProcessing=ya;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=ga; |
||||
this.oApi._fnColumnIndexToVisible=M;this.oApi._fnNodeToDataIndex=Q;this.oApi._fnVisbleColumns=S;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Ha;this.oApi._fnCalculateColumnWidths=$;this.oApi._fnScrollingWidthAdjust=Ja;this.oApi._fnGetWidestNode=Ia;this.oApi._fnGetMaxLenString=Ka;this.oApi._fnStringToCss=v;this.oApi._fnArrayCmp=Oa;this.oApi._fnDetectType=aa;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=V;this.oApi._fnGetTrNodes=R;this.oApi._fnGetTdNodes=Z;this.oApi._fnEscapeRegex= |
||||
la;this.oApi._fnDeleteIndex=ma;this.oApi._fnReOrderIndex=va;this.oApi._fnColumnOrdering=ca;this.oApi._fnLog=H;this.oApi._fnClearTable=da;this.oApi._fnSaveState=na;this.oApi._fnLoadState=Ma;this.oApi._fnCreateCookie=La;this.oApi._fnReadCookie=oa;this.oApi._fnGetUniqueThs=fa;this.oApi._fnScrollBarWidth=Na;this.oApi._fnApplyToChildren=L;this.oApi._fnMap=o;var qa=this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!= |
||||
"undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{H(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster)."); |
||||
return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new m;D.push(e);var i=false,h=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=n._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")H(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=qa.length==1?qa:j(this).dataTable();e.oApi=qa.oApi;e.sDestroyWidth=j(this).width();if(typeof g!= |
||||
"undefined"&&g!==null){e.oInit=g;o(e.oFeatures,g,"bPaginate");o(e.oFeatures,g,"bLengthChange");o(e.oFeatures,g,"bFilter");o(e.oFeatures,g,"bSort");o(e.oFeatures,g,"bInfo");o(e.oFeatures,g,"bProcessing");o(e.oFeatures,g,"bAutoWidth");o(e.oFeatures,g,"bSortClasses");o(e.oFeatures,g,"bServerSide");o(e.oScroll,g,"sScrollX","sX");o(e.oScroll,g,"sScrollXInner","sXInner");o(e.oScroll,g,"sScrollY","sY");o(e.oScroll,g,"bScrollCollapse","bCollapse");o(e.oScroll,g,"bScrollInfinite","bInfinite");o(e.oScroll, |
||||
g,"iScrollLoadGap","iLoadGap");o(e.oScroll,g,"bScrollAutoCss","bAutoCss");o(e,g,"asStripClasses");o(e,g,"fnRowCallback");o(e,g,"fnHeaderCallback");o(e,g,"fnFooterCallback");o(e,g,"fnCookieCallback");o(e,g,"fnInitComplete");o(e,g,"fnServerData");o(e,g,"fnFormatNumber");o(e,g,"aaSorting");o(e,g,"aaSortingFixed");o(e,g,"aLengthMenu");o(e,g,"sPaginationType");o(e,g,"sAjaxSource");o(e,g,"iCookieDuration");o(e,g,"sCookiePrefix");o(e,g,"sDom");o(e,g,"oSearch","oPreviousSearch");o(e,g,"aoSearchCols","aoPreSearchCols"); |
||||
o(e,g,"iDisplayLength","_iDisplayLength");o(e,g,"bJQueryUI","bJUI");o(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses&&e.aoDrawCallback.push({fn:T,sName:"server_side_sort_classes"}); |
||||
if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=n.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Na();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ma(e,g);e.aoDrawCallback.push({fn:na,sName:"state_save"})}if(typeof g.aaData!="undefined")h= |
||||
true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;j.getJSON(e.oLanguage.sUrl,null,function(q){y(e,q,true)});i=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=j(">tbody>tr",this);a=0;for(b=e.asStripClasses.length;a< |
||||
b;a++)if(d.filter(":lt(2)").hasClass(e.asStripClasses[a])){c=true;break}if(c){e.asDestoryStrips=["",""];if(j(d[0]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[0]+=e.oClasses.sStripOdd+" ";if(j(d[0]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[0]+=e.oClasses.sStripEven;if(j(d[1]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[1]+=e.oClasses.sStripOdd+" ";if(j(d[1]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[1]+=e.oClasses.sStripEven;d.removeClass(e.asStripClasses.join(" "))}a=this.getElementsByTagName("thead"); |
||||
c=a.length===0?[]:fa(a[0]);var k;if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}F(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){var l=g.aoColumnDefs[a].aTargets;j.isArray(l)||H(e,1,"aTargets must be an array of targets, not a "+typeof l); |
||||
c=0;for(d=l.length;c<d;c++)if(typeof l[c]=="number"&&l[c]>=0){for(;e.aoColumns.length<=l[c];)F(e);x(e,l[c],g.aoColumnDefs[a])}else if(typeof l[c]=="number"&&l[c]<0)x(e,e.aoColumns.length+l[c],g.aoColumnDefs[a]);else if(typeof l[c]=="string"){b=0;for(f=e.aoColumns.length;b<f;b++)if(l[c]=="_all"||e.aoColumns[b].nTh.className.indexOf(l[c])!=-1)x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=e.aoColumns.length)e.aaSorting[a][0]= |
||||
0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}T(e);this.getElementsByTagName("thead").length===0&&this.appendChild(p.createElement("thead"));this.getElementsByTagName("tbody").length===0&&this.appendChild(p.createElement("tbody"));e.nTHead=this.getElementsByTagName("thead")[0]; |
||||
e.nTBody=this.getElementsByTagName("tbody")[0];if(this.getElementsByTagName("tfoot").length>0)e.nTFoot=this.getElementsByTagName("tfoot")[0];if(h)for(a=0;a<g.aaData.length;a++)u(e,g.aaData[a]);else z(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;i===false&&s(e)}})}})(jQuery,window,document); |
@ -1,132 +0,0 @@ |
||||
/** |
||||
* Endless Scroll plugin for jQuery |
||||
* |
||||
* v1.4.8 |
||||
* |
||||
* Copyright (c) 2008 Fred Wu |
||||
* |
||||
* Dual licensed under the MIT and GPL licenses: |
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/ |
||||
|
||||
/** |
||||
* Usage: |
||||
* |
||||
* // using default options
|
||||
* $(document).endlessScroll(); |
||||
* |
||||
* // using some custom options
|
||||
* $(document).endlessScroll({ |
||||
* fireOnce: false, |
||||
* fireDelay: false, |
||||
* loader: "<div class=\"loading\"><div>", |
||||
* callback: function(){ |
||||
* alert("test"); |
||||
* } |
||||
* }); |
||||
* |
||||
* Configuration options: |
||||
* |
||||
* bottomPixels integer the number of pixels from the bottom of the page that triggers the event |
||||
* fireOnce boolean only fire once until the execution of the current event is completed |
||||
* fireDelay integer delay the subsequent firing, in milliseconds, 0 or false to disable delay |
||||
* loader string the HTML to be displayed during loading |
||||
* data string|function plain HTML data, can be either a string or a function that returns a string, |
||||
* when passed as a function it accepts one argument: fire sequence (the number |
||||
* of times the event triggered during the current page session) |
||||
* insertAfter string jQuery selector syntax: where to put the loader as well as the plain HTML data |
||||
* callback function callback function, accepts one argument: fire sequence (the number of times |
||||
* the event triggered during the current page session) |
||||
* resetCounter function resets the fire sequence counter if the function returns true, this function |
||||
* could also perform hook actions since it is applied at the start of the event |
||||
* ceaseFire function stops the event (no more endless scrolling) if the function returns true |
||||
* |
||||
* Usage tips: |
||||
* |
||||
* The plugin is more useful when used with the callback function, which can then make AJAX calls to retrieve content. |
||||
* The fire sequence argument (for the callback function) is useful for 'pagination'-like features. |
||||
*/ |
||||
|
||||
(function($){ |
||||
|
||||
$.fn.endlessScroll = function(options) { |
||||
|
||||
var defaults = { |
||||
bottomPixels: 50, |
||||
fireOnce: true, |
||||
fireDelay: 150, |
||||
loader: "<br />Loading...<br />", |
||||
data: "", |
||||
insertAfter: "div:last", |
||||
resetCounter: function() { return false; }, |
||||
callback: function() { return true; }, |
||||
ceaseFire: function() { return false; } |
||||
}; |
||||
|
||||
var options = $.extend({}, defaults, options); |
||||
|
||||
var firing = true; |
||||
var fired = false; |
||||
var fireSequence = 0; |
||||
|
||||
if (options.ceaseFire.apply(this) === true) { |
||||
firing = false; |
||||
} |
||||
|
||||
if (firing === true) { |
||||
$(this).scroll(function() { |
||||
if (options.ceaseFire.apply(this) === true) { |
||||
firing = false; |
||||
return; // Scroll will still get called, but nothing will happen
|
||||
} |
||||
|
||||
if (this == document || this == window) { |
||||
var is_scrollable = $(document).height() - $(window).height() <= $(window).scrollTop() + options.bottomPixels; |
||||
} else { |
||||
// calculates the actual height of the scrolling container
|
||||
var inner_wrap = $(".endless_scroll_inner_wrap", this); |
||||
if (inner_wrap.length == 0) { |
||||
inner_wrap = $(this).wrapInner("<div class=\"endless_scroll_inner_wrap\" />").find(".endless_scroll_inner_wrap"); |
||||
} |
||||
var is_scrollable = inner_wrap.length > 0 && |
||||
(inner_wrap.height() - $(this).height() <= $(this).scrollTop() + options.bottomPixels); |
||||
} |
||||
|
||||
if (is_scrollable && (options.fireOnce == false || (options.fireOnce == true && fired != true))) { |
||||
if (options.resetCounter.apply(this) === true) fireSequence = 0; |
||||
|
||||
fired = true; |
||||
fireSequence++; |
||||
|
||||
$(options.insertAfter).after("<div id=\"endless_scroll_loader\">" + options.loader + "</div>"); |
||||
|
||||
data = typeof options.data == 'function' ? options.data.apply(this, [fireSequence]) : options.data; |
||||
|
||||
if (data !== false) { |
||||
$(options.insertAfter).after("<div id=\"endless_scroll_data\">" + data + "</div>"); |
||||
$("div#endless_scroll_data").hide().fadeIn(); |
||||
$("div#endless_scroll_data").removeAttr("id"); |
||||
|
||||
options.callback.apply(this, [fireSequence]); |
||||
|
||||
if (options.fireDelay !== false || options.fireDelay !== 0) { |
||||
$("body").after("<div id=\"endless_scroll_marker\"></div>"); |
||||
// slight delay for preventing event firing twice
|
||||
$("div#endless_scroll_marker").fadeTo(options.fireDelay, 1, function() { |
||||
$(this).remove(); |
||||
fired = false; |
||||
}); |
||||
} |
||||
else { |
||||
fired = false; |
||||
} |
||||
} |
||||
|
||||
$("div#endless_scroll_loader").remove(); |
||||
} |
||||
}); |
||||
} |
||||
}; |
||||
|
||||
})(jQuery); |
@ -1,675 +0,0 @@ |
||||
/*! |
||||
* jQuery Form Plugin |
||||
* version: 2.43 (12-MAR-2010) |
||||
* @requires jQuery v1.3.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
|
||||
*/ |
||||
;(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 }; |
||||
|
||||
var url = $.trim(this.attr('action')); |
||||
if (url) { |
||||
// clean url (don't include hash vaue)
|
||||
url = (url.match(/^([^#]+)/)||[])[1]; |
||||
} |
||||
url = url || window.location.href || ''; |
||||
|
||||
options = $.extend({ |
||||
url: url, |
||||
type: this.attr('method') || 'GET', |
||||
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' |
||||
}, 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; |
||||
} |
||||
|
||||
// provide opportunity to alter form data before it is serialized
|
||||
if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { |
||||
log('ajaxSubmit: submit aborted via beforeSerialize callback'); |
||||
return this; |
||||
} |
||||
|
||||
var a = this.formToArray(options.semantic); |
||||
if (options.data) { |
||||
options.extraData = options.data; |
||||
for (var n in options.data) { |
||||
if(options.data[n] instanceof Array) { |
||||
for (var k in options.data[n]) |
||||
a.push( { name: n, value: options.data[n][k] } ); |
||||
} |
||||
else |
||||
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) { |
||||
var fn = options.replaceTarget ? 'replaceWith' : 'html'; |
||||
$(options.target)[fn](data).each(oldSuccess, arguments); |
||||
}); |
||||
} |
||||
else if (options.success) |
||||
callbacks.push(options.success); |
||||
|
||||
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
|
||||
for (var i=0, max=callbacks.length; i < max; i++) |
||||
callbacks[i].apply(options, [data, status, xhr || $form, $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; |
||||
|
||||
var multipart = false; |
||||
// var mp = 'multipart/form-data';
|
||||
// multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
|
||||
|
||||
// options.iframe allows user to force iframe mode
|
||||
// 06-NOV-09: now defaulting to iframe mode if file input is detected
|
||||
if ((files.length && options.iframe !== false) || options.iframe || found || multipart) { |
||||
// hack to fix Safari hang (thanks to Tim Molendijk for this)
|
||||
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
|
||||
if (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 s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts); |
||||
|
||||
var id = 'jqFormIO' + (new Date().getTime()); |
||||
var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ opts.iframeSrc +'" onload="(jQuery(this).data(\'form-plugin-onload\'))()" />'); |
||||
var io = $io[0]; |
||||
|
||||
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' }); |
||||
|
||||
var xhr = { // mock object
|
||||
aborted: 0, |
||||
responseText: null, |
||||
responseXML: null, |
||||
status: 0, |
||||
statusText: 'n/a', |
||||
getAllResponseHeaders: function() {}, |
||||
getResponseHeader: function() {}, |
||||
setRequestHeader: function() {}, |
||||
abort: function() { |
||||
this.aborted = 1; |
||||
$io.attr('src', opts.iframeSrc); // abort op in progress
|
||||
} |
||||
}; |
||||
|
||||
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]); |
||||
|
||||
if (s.beforeSend && s.beforeSend(xhr, s) === false) { |
||||
s.global && $.active--; |
||||
return; |
||||
} |
||||
if (xhr.aborted) |
||||
return; |
||||
|
||||
var cbInvoked = false; |
||||
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) { |
||||
opts.extraData = opts.extraData || {}; |
||||
opts.extraData[n] = sub.value; |
||||
if (sub.type == "image") { |
||||
opts.extraData[n+'.x'] = form.clk_x; |
||||
opts.extraData[n+'.y'] = form.clk_y; |
||||
} |
||||
} |
||||
} |
||||
|
||||
// take a breath so that pending repaints get some cpu time before the upload starts
|
||||
function doSubmit() { |
||||
// make sure form attrs are set
|
||||
var t = $form.attr('target'), a = $form.attr('action'); |
||||
|
||||
// update form attrs in IE friendly way
|
||||
form.setAttribute('target',id); |
||||
if (form.getAttribute('method') != 'POST') |
||||
form.setAttribute('method', 'POST'); |
||||
if (form.getAttribute('action') != opts.url) |
||||
form.setAttribute('action', opts.url); |
||||
|
||||
// ie borks in some cases when setting encoding
|
||||
if (! opts.skipEncodingOverride) { |
||||
$form.attr({ |
||||
encoding: 'multipart/form-data', |
||||
enctype: 'multipart/form-data' |
||||
}); |
||||
} |
||||
|
||||
// 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 (opts.extraData) |
||||
for (var n in opts.extraData) |
||||
extraInputs.push( |
||||
$('<input type="hidden" name="'+n+'" value="'+opts.extraData[n]+'" />') |
||||
.appendTo(form)[0]); |
||||
|
||||
// add iframe to doc and submit the form
|
||||
$io.appendTo('body'); |
||||
$io.data('form-plugin-onload', cb); |
||||
form.submit(); |
||||
} |
||||
finally { |
||||
// reset attrs and remove "extra" input elements
|
||||
form.setAttribute('action',a); |
||||
t ? form.setAttribute('target', t) : $form.removeAttr('target'); |
||||
$(extraInputs).remove(); |
||||
} |
||||
}; |
||||
|
||||
if (opts.forceSync) |
||||
doSubmit(); |
||||
else |
||||
setTimeout(doSubmit, 10); // this lets dom updates render
|
||||
|
||||
var domCheckCount = 100; |
||||
|
||||
function cb() { |
||||
if (cbInvoked)
|
||||
return; |
||||
|
||||
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; |
||||
|
||||
var isXml = opts.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc); |
||||
log('isXml='+isXml); |
||||
if (!isXml && (doc.body == null || doc.body.innerHTML == '')) { |
||||
if (--domCheckCount) { |
||||
// in some browsers (Opera) the iframe DOM is not always traversable when
|
||||
// the onload callback fires, so we loop a bit to accommodate
|
||||
log('requeing onLoad callback, DOM not available'); |
||||
setTimeout(cb, 250); |
||||
return; |
||||
} |
||||
log('Could not access iframe DOM after 100 tries.'); |
||||
return; |
||||
} |
||||
|
||||
log('response detected'); |
||||
cbInvoked = true; |
||||
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') { |
||||
// see if user embedded response in textarea
|
||||
var ta = doc.getElementsByTagName('textarea')[0]; |
||||
if (ta) |
||||
xhr.responseText = ta.value; |
||||
else { |
||||
// account for browsers injecting pre around json response
|
||||
var pre = doc.getElementsByTagName('pre')[0]; |
||||
if (pre) |
||||
xhr.responseText = pre.innerHTML; |
||||
}
|
||||
} |
||||
else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) { |
||||
xhr.responseXML = toXml(xhr.responseText); |
||||
} |
||||
data = $.httpData(xhr, opts.dataType); |
||||
} |
||||
catch(e){ |
||||
log('error caught:',e); |
||||
ok = false; |
||||
xhr.error = e; |
||||
$.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.removeData('form-plugin-onload'); |
||||
$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(e) { |
||||
e.preventDefault(); |
||||
$(this).ajaxSubmit(options); |
||||
}).bind('click.form-plugin', function(e) { |
||||
var target = e.target; |
||||
var $el = $(target); |
||||
if (!($el.is(":submit,input:image"))) { |
||||
// is this a child element of the submit el? (ex: a span within a button)
|
||||
var t = $el.closest(':submit'); |
||||
if (t.length == 0) |
||||
return; |
||||
target = t[0]; |
||||
} |
||||
var form = this; |
||||
form.clk = target; |
||||
if (target.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 = $el.offset(); |
||||
form.clk_x = e.pageX - offset.left; |
||||
form.clk_y = e.pageY - offset.top; |
||||
} else { |
||||
form.clk_x = e.pageX - target.offsetLeft; |
||||
form.clk_y = e.pageY - target.offsetTop; |
||||
} |
||||
} |
||||
// clear form vars
|
||||
setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100); |
||||
}); |
||||
}; |
||||
|
||||
// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
|
||||
$.fn.ajaxFormUnbind = function() { |
||||
return this.unbind('submit.form-plugin 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, value: $(el).val()}); |
||||
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 it here
|
||||
var $input = $(form.clk), input = $input[0], n = input.name; |
||||
if (n && !input.disabled && input.type == 'image') { |
||||
a.push({name: n, value: $input.val()}); |
||||
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&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&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) { |
||||
var v = op.value; |
||||
if (!v) // extra pain for IE...
|
||||
v = (op.attributes && op.attributes['value'] && !(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.selected = 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').selected(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) { |
||||
var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,''); |
||||
if (window.console && window.console.log) |
||||
window.console.log(msg); |
||||
else if (window.opera && window.opera.postError) |
||||
window.opera.postError(msg); |
||||
} |
||||
}; |
||||
|
||||
})(jQuery); |
File diff suppressed because one or more lines are too long
@ -1,215 +0,0 @@ |
||||
/* ---------------------------------- |
||||
jQuery Timelinr 0.9.5 |
||||
tested with jQuery v1.6+ |
||||
|
||||
Copyright 2011, CSSLab.cl |
||||
Free under the MIT license. |
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
instructions: http://www.csslab.cl/2011/08/18/jquery-timelinr/
|
||||
---------------------------------- */ |
||||
|
||||
jQuery.fn.timelinr = function(options){ |
||||
// default plugin settings
|
||||
settings = jQuery.extend({ |
||||
orientation: 'horizontal', // value: horizontal | vertical, default to horizontal
|
||||
containerDiv: '#timeline', // value: any HTML tag or #id, default to #timeline
|
||||
datesDiv: '#dates', // value: any HTML tag or #id, default to #dates
|
||||
datesSelectedClass: 'selected', // value: any class, default to selected
|
||||
datesSpeed: 'normal', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to normal
|
||||
issuesDiv: '#issues', // value: any HTML tag or #id, default to #issues
|
||||
issuesSelectedClass: 'selected', // value: any class, default to selected
|
||||
issuesSpeed: 'fast', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to fast
|
||||
issuesTransparency: 0.2, // value: integer between 0 and 1 (recommended), default to 0.2
|
||||
issuesTransparencySpeed: 500, // value: integer between 100 and 1000 (recommended), default to 500 (normal)
|
||||
prevButton: '#prev', // value: any HTML tag or #id, default to #prev
|
||||
nextButton: '#next', // value: any HTML tag or #id, default to #next
|
||||
arrowKeys: 'false', // value: true | false, default to false
|
||||
startAt: 1, // value: integer, default to 1 (first)
|
||||
autoPlay: 'false', // value: true | false, default to false
|
||||
autoPlayDirection: 'forward', // value: forward | backward, default to forward
|
||||
autoPlayPause: 2000 // value: integer (1000 = 1 seg), default to 2000 (2segs)
|
||||
|
||||
}, options); |
||||
|
||||
$(function(){ |
||||
// setting variables... many of them
|
||||
var howManyDates = $(settings.datesDiv+' li').length; |
||||
var howManyIssues = $(settings.issuesDiv+' li').length; |
||||
var currentDate = $(settings.datesDiv).find('a.'+settings.datesSelectedClass); |
||||
var currentIssue = $(settings.issuesDiv).find('li.'+settings.issuesSelectedClass); |
||||
var widthContainer = $(settings.containerDiv).width(); |
||||
var heightContainer = $(settings.containerDiv).height(); |
||||
var widthIssues = $(settings.issuesDiv).width(); |
||||
var heightIssues = $(settings.issuesDiv).height(); |
||||
var widthIssue = $(settings.issuesDiv+' li').width(); |
||||
var heightIssue = $(settings.issuesDiv+' li').height(); |
||||
var widthDates = $(settings.datesDiv).width(); |
||||
var heightDates = $(settings.datesDiv).height(); |
||||
var widthDate = $(settings.datesDiv+' li').width(); |
||||
var heightDate = $(settings.datesDiv+' li').height(); |
||||
|
||||
// set positions!
|
||||
if(settings.orientation == 'horizontal') {
|
||||
$(settings.issuesDiv).width(widthIssue*howManyIssues); |
||||
$(settings.datesDiv).width(widthDate*howManyDates).css('marginLeft',widthContainer/2-widthDate/2); |
||||
var defaultPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.issuesDiv).height(heightIssue*howManyIssues); |
||||
$(settings.datesDiv).height(heightDate*howManyDates).css('marginTop',heightContainer/2-heightDate/2); |
||||
var defaultPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
} |
||||
|
||||
$(settings.datesDiv+' a').click(function(event){ |
||||
event.preventDefault(); |
||||
// first vars
|
||||
var whichIssue = $(this).text(); |
||||
var currentIndex = $(this).parent().prevAll().length; |
||||
|
||||
// moving the elements
|
||||
if(settings.orientation == 'horizontal') { |
||||
$(settings.issuesDiv).animate({'marginLeft':-widthIssue*currentIndex},{queue:false, duration:settings.issuesSpeed}); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.issuesDiv).animate({'marginTop':-heightIssue*currentIndex},{queue:false, duration:settings.issuesSpeed}); |
||||
} |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}).removeClass(settings.issuesSelectedClass).eq(currentIndex).addClass(settings.issuesSelectedClass).fadeTo(settings.issuesTransparencySpeed,1); |
||||
|
||||
// now moving the dates
|
||||
$(settings.datesDiv+' a').removeClass(settings.datesSelectedClass); |
||||
$(this).addClass(settings.datesSelectedClass); |
||||
if(settings.orientation == 'horizontal') { |
||||
$(settings.datesDiv).animate({'marginLeft':defaultPositionDates-(widthDate*currentIndex)},{queue:false, duration:'settings.datesSpeed'}); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.datesDiv).animate({'marginTop':defaultPositionDates-(heightDate*currentIndex)},{queue:false, duration:'settings.datesSpeed'}); |
||||
} |
||||
}); |
||||
|
||||
$(settings.nextButton).bind('click', function(event){ |
||||
event.preventDefault(); |
||||
if(settings.orientation == 'horizontal') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginLeft').substring(0,$(settings.issuesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/widthIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates-widthDate; |
||||
if(currentPositionIssues <= -(widthIssue*howManyIssues-(widthIssue))) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:last-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
$(settings.issuesDiv).animate({'marginLeft':currentPositionIssues-widthIssue},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li.'+settings.issuesSelectedClass).removeClass(settings.issuesSelectedClass).next().fadeTo(settings.issuesTransparencySpeed, 1).addClass(settings.issuesSelectedClass); |
||||
$(settings.datesDiv).animate({'marginLeft':currentIssueDate},{queue:false, duration:'settings.datesSpeed'}); |
||||
$(settings.datesDiv+' a.'+settings.datesSelectedClass).removeClass(settings.datesSelectedClass).parent().next().children().addClass(settings.datesSelectedClass); |
||||
} |
||||
} |
||||
} else if(settings.orientation == 'vertical') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginTop').substring(0,$(settings.issuesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/heightIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates-heightDate; |
||||
if(currentPositionIssues <= -(heightIssue*howManyIssues-(heightIssue))) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:last-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
$(settings.issuesDiv).animate({'marginTop':currentPositionIssues-heightIssue},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li.'+settings.issuesSelectedClass).removeClass(settings.issuesSelectedClass).next().fadeTo(settings.issuesTransparencySpeed, 1).addClass(settings.issuesSelectedClass); |
||||
$(settings.datesDiv).animate({'marginTop':currentIssueDate},{queue:false, duration:'settings.datesSpeed'}); |
||||
$(settings.datesDiv+' a.'+settings.datesSelectedClass).removeClass(settings.datesSelectedClass).parent().next().children().addClass(settings.datesSelectedClass); |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
|
||||
$(settings.prevButton).click(function(event){ |
||||
event.preventDefault(); |
||||
if(settings.orientation == 'horizontal') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginLeft').substring(0,$(settings.issuesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/widthIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates+widthDate; |
||||
if(currentPositionIssues >= 0) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:first-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
$(settings.issuesDiv).animate({'marginLeft':currentPositionIssues+widthIssue},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li.'+settings.issuesSelectedClass).removeClass(settings.issuesSelectedClass).prev().fadeTo(settings.issuesTransparencySpeed, 1).addClass(settings.issuesSelectedClass); |
||||
$(settings.datesDiv).animate({'marginLeft':currentIssueDate},{queue:false, duration:'settings.datesSpeed'}); |
||||
$(settings.datesDiv+' a.'+settings.datesSelectedClass).removeClass(settings.datesSelectedClass).parent().prev().children().addClass(settings.datesSelectedClass); |
||||
} |
||||
} |
||||
} else if(settings.orientation == 'vertical') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginTop').substring(0,$(settings.issuesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/heightIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates+heightDate; |
||||
if(currentPositionIssues >= 0) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:first-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
$(settings.issuesDiv).animate({'marginTop':currentPositionIssues+heightIssue},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.issuesDiv+' li.'+settings.issuesSelectedClass).removeClass(settings.issuesSelectedClass).prev().fadeTo(settings.issuesTransparencySpeed, 1).addClass(settings.issuesSelectedClass); |
||||
$(settings.datesDiv).animate({'marginTop':currentIssueDate},{queue:false, duration:'settings.datesSpeed'},{queue:false, duration:settings.issuesSpeed}); |
||||
$(settings.datesDiv+' a.'+settings.datesSelectedClass).removeClass(settings.datesSelectedClass).parent().prev().children().addClass(settings.datesSelectedClass); |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
|
||||
// keyboard navigation, added since 0.9.1
|
||||
if(settings.arrowKeys=='true') { |
||||
if(settings.orientation=='horizontal') { |
||||
$(document).keydown(function(event){ |
||||
if (event.keyCode == 39) {
|
||||
$(settings.nextButton).click(); |
||||
} |
||||
if (event.keyCode == 37) {
|
||||
$(settings.prevButton).click(); |
||||
} |
||||
}); |
||||
} else if(settings.orientation=='vertical') { |
||||
$(document).keydown(function(event){ |
||||
if (event.keyCode == 40) {
|
||||
$(settings.nextButton).click(); |
||||
} |
||||
if (event.keyCode == 38) {
|
||||
$(settings.prevButton).click(); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
|
||||
// default position startAt, added since 0.9.3
|
||||
$(settings.datesDiv+' li').eq(settings.startAt-1).find('a').trigger('click'); |
||||
|
||||
// autoPlay, added since 0.9.4
|
||||
if(settings.autoPlay == 'true') {
|
||||
setInterval("autoPlay()", settings.autoPlayPause); |
||||
} |
||||
}); |
||||
|
||||
}; |
||||
|
||||
// autoPlay, added since 0.9.4
|
||||
function autoPlay(){ |
||||
var currentDate = $(settings.datesDiv).find('a.'+settings.datesSelectedClass); |
||||
if(settings.autoPlayDirection == 'forward') { |
||||
if(currentDate.parent().is('li:last-child')) { |
||||
$(settings.datesDiv+' li:first-child').find('a').trigger('click'); |
||||
} else { |
||||
currentDate.parent().next().find('a').trigger('click'); |
||||
} |
||||
} else if(settings.autoPlayDirection == 'backward') { |
||||
if(currentDate.parent().is('li:first-child')) { |
||||
$(settings.datesDiv+' li:last-child').find('a').trigger('click'); |
||||
} else { |
||||
currentDate.parent().prev().find('a').trigger('click'); |
||||
} |
||||
} |
||||
} |
@ -1,270 +0,0 @@ |
||||
/* ---------------------------------- |
||||
jQuery Timelinr 0.9.54 |
||||
tested with jQuery v1.6+ |
||||
|
||||
Copyright 2011, CSSLab.cl |
||||
Free under the MIT license. |
||||
http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
instructions: http://www.csslab.cl/2011/08/18/jquery-timelinr/
|
||||
---------------------------------- */ |
||||
|
||||
jQuery.fn.timelinr = function(options){ |
||||
// default plugin settings
|
||||
settings = jQuery.extend({ |
||||
orientation: 'horizontal', // value: horizontal | vertical, default to horizontal
|
||||
containerDiv: '#timeline', // value: any HTML tag or #id, default to #timeline
|
||||
datesDiv: '#dates', // value: any HTML tag or #id, default to #dates
|
||||
datesSelectedClass: 'selected', // value: any class, default to selected
|
||||
datesSpeed: 'normal', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to normal
|
||||
issuesDiv: '#issues', // value: any HTML tag or #id, default to #issues
|
||||
issuesSelectedClass: 'selected', // value: any class, default to selected
|
||||
issuesSpeed: 'fast', // value: integer between 100 and 1000 (recommended) or 'slow', 'normal' or 'fast'; default to fast
|
||||
issuesTransparency: 0.2, // value: integer between 0 and 1 (recommended), default to 0.2
|
||||
issuesTransparencySpeed: 500, // value: integer between 100 and 1000 (recommended), default to 500 (normal)
|
||||
prevButton: '#prev', // value: any HTML tag or #id, default to #prev
|
||||
nextButton: '#next', // value: any HTML tag or #id, default to #next
|
||||
arrowKeys: 'false', // value: true | false, default to false
|
||||
startAt: 1, // value: integer, default to 1 (first)
|
||||
autoPlay: 'false', // value: true | false, default to false
|
||||
autoPlayDirection: 'forward', // value: forward | backward, default to forward
|
||||
autoPlayPause: 2000 // value: integer (1000 = 1 seg), default to 2000 (2segs)
|
||||
}, options); |
||||
|
||||
$(function(){ |
||||
// setting variables... many of them
|
||||
var howManyDates = $(settings.datesDiv+' li').length; |
||||
var howManyIssues = $(settings.issuesDiv+' li').length; |
||||
var currentDate = $(settings.datesDiv).find('a.'+settings.datesSelectedClass); |
||||
var currentIssue = $(settings.issuesDiv).find('li.'+settings.issuesSelectedClass); |
||||
var widthContainer = $(settings.containerDiv).width(); |
||||
var heightContainer = $(settings.containerDiv).height(); |
||||
var widthIssues = $(settings.issuesDiv).width(); |
||||
var heightIssues = $(settings.issuesDiv).height(); |
||||
var widthIssue = $(settings.issuesDiv+' li').width(); |
||||
var heightIssue = $(settings.issuesDiv+' li').height(); |
||||
var widthDates = $(settings.datesDiv).width(); |
||||
var heightDates = $(settings.datesDiv).height(); |
||||
var widthDate = $(settings.datesDiv+' li').width(); |
||||
var heightDate = $(settings.datesDiv+' li').height(); |
||||
// set positions!
|
||||
if(settings.orientation == 'horizontal') {
|
||||
$(settings.issuesDiv).width(widthIssue*howManyIssues); |
||||
$(settings.datesDiv).width(widthDate*howManyDates).css('marginLeft',widthContainer/2-widthDate/2); |
||||
var defaultPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.issuesDiv).height(heightIssue*howManyIssues); |
||||
$(settings.datesDiv).height(heightDate*howManyDates).css('marginTop',heightContainer/2-heightDate/2); |
||||
var defaultPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
} |
||||
|
||||
$(settings.datesDiv+' a').click(function(event){ |
||||
event.preventDefault(); |
||||
// first vars
|
||||
var whichIssue = $(this).text(); |
||||
var currentIndex = $(this).parent().prevAll().length; |
||||
// moving the elements
|
||||
if(settings.orientation == 'horizontal') { |
||||
$(settings.issuesDiv).animate({'marginLeft':-widthIssue*currentIndex},{queue:false, duration:settings.issuesSpeed}); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.issuesDiv).animate({'marginTop':-heightIssue*currentIndex},{queue:false, duration:settings.issuesSpeed}); |
||||
} |
||||
$(settings.issuesDiv+' li').animate({'opacity':settings.issuesTransparency},{queue:false, duration:settings.issuesSpeed}).removeClass(settings.issuesSelectedClass).eq(currentIndex).addClass(settings.issuesSelectedClass).fadeTo(settings.issuesTransparencySpeed,1); |
||||
// prev/next buttons now disappears on first/last issue | bugfix from 0.9.51: lower than 1 issue hide the arrows | bugfixed: arrows not showing when jumping from first to last date
|
||||
if(howManyDates == 1) { |
||||
$(settings.prevButton+','+settings.nextButton).fadeOut('fast'); |
||||
} else if(howManyDates == 2) { |
||||
if($(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
$(settings.nextButton).fadeIn('fast'); |
||||
}
|
||||
else if($(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
$(settings.prevButton).fadeIn('fast'); |
||||
} |
||||
} else { |
||||
if( $(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.nextButton).fadeIn('fast'); |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
}
|
||||
else if( $(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.prevButton).fadeIn('fast'); |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
} |
||||
else { |
||||
$(settings.nextButton+','+settings.prevButton).fadeIn('slow'); |
||||
}
|
||||
} |
||||
// now moving the dates
|
||||
$(settings.datesDiv+' a').removeClass(settings.datesSelectedClass); |
||||
$(this).addClass(settings.datesSelectedClass); |
||||
if(settings.orientation == 'horizontal') { |
||||
$(settings.datesDiv).animate({'marginLeft':defaultPositionDates-(widthDate*currentIndex)},{queue:false, duration:'settings.datesSpeed'}); |
||||
} else if(settings.orientation == 'vertical') { |
||||
$(settings.datesDiv).animate({'marginTop':defaultPositionDates-(heightDate*currentIndex)},{queue:false, duration:'settings.datesSpeed'}); |
||||
} |
||||
}); |
||||
|
||||
$(settings.nextButton).bind('click', function(event){ |
||||
event.preventDefault(); |
||||
// bugixed from 0.9.54: now the dates gets centered when there's too much dates.
|
||||
var currentIndex = $(settings.issuesDiv).find('li.'+settings.issuesSelectedClass).index(); |
||||
if(settings.orientation == 'horizontal') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginLeft').substring(0,$(settings.issuesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/widthIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates-widthDate; |
||||
if(currentPositionIssues <= -(widthIssue*howManyIssues-(widthIssue))) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:last-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
// bugixed from 0.9.52: now the dates gets centered when there's too much dates.
|
||||
$(settings.datesDiv+' li').eq(currentIndex+1).find('a').trigger('click'); |
||||
} |
||||
} |
||||
} else if(settings.orientation == 'vertical') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginTop').substring(0,$(settings.issuesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/heightIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates-heightDate; |
||||
if(currentPositionIssues <= -(heightIssue*howManyIssues-(heightIssue))) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:last-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
// bugixed from 0.9.54: now the dates gets centered when there's too much dates.
|
||||
$(settings.datesDiv+' li').eq(currentIndex+1).find('a').trigger('click'); |
||||
} |
||||
} |
||||
} |
||||
// prev/next buttons now disappears on first/last issue | bugfix from 0.9.51: lower than 1 issue hide the arrows
|
||||
if(howManyDates == 1) { |
||||
$(settings.prevButton+','+settings.nextButton).fadeOut('fast'); |
||||
} else if(howManyDates == 2) { |
||||
if($(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
$(settings.nextButton).fadeIn('fast'); |
||||
}
|
||||
else if($(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
$(settings.prevButton).fadeIn('fast'); |
||||
} |
||||
} else { |
||||
if( $(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
}
|
||||
else if( $(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
} |
||||
else { |
||||
$(settings.nextButton+','+settings.prevButton).fadeIn('slow'); |
||||
}
|
||||
} |
||||
}); |
||||
|
||||
$(settings.prevButton).click(function(event){ |
||||
event.preventDefault(); |
||||
// bugixed from 0.9.54: now the dates gets centered when there's too much dates.
|
||||
var currentIndex = $(settings.issuesDiv).find('li.'+settings.issuesSelectedClass).index(); |
||||
if(settings.orientation == 'horizontal') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginLeft').substring(0,$(settings.issuesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/widthIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginLeft').substring(0,$(settings.datesDiv).css('marginLeft').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates+widthDate; |
||||
if(currentPositionIssues >= 0) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:first-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
// bugixed from 0.9.54: now the dates gets centered when there's too much dates.
|
||||
$(settings.datesDiv+' li').eq(currentIndex-1).find('a').trigger('click'); |
||||
} |
||||
} |
||||
} else if(settings.orientation == 'vertical') { |
||||
var currentPositionIssues = parseInt($(settings.issuesDiv).css('marginTop').substring(0,$(settings.issuesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueIndex = currentPositionIssues/heightIssue; |
||||
var currentPositionDates = parseInt($(settings.datesDiv).css('marginTop').substring(0,$(settings.datesDiv).css('marginTop').indexOf('px'))); |
||||
var currentIssueDate = currentPositionDates+heightDate; |
||||
if(currentPositionIssues >= 0) { |
||||
$(settings.issuesDiv).stop(); |
||||
$(settings.datesDiv+' li:first-child a').click(); |
||||
} else { |
||||
if (!$(settings.issuesDiv).is(':animated')) { |
||||
// bugixed from 0.9.54: now the dates gets centered when there's too much dates.
|
||||
$(settings.datesDiv+' li').eq(currentIndex-1).find('a').trigger('click'); |
||||
} |
||||
} |
||||
} |
||||
// prev/next buttons now disappears on first/last issue | bugfix from 0.9.51: lower than 1 issue hide the arrows
|
||||
if(howManyDates == 1) { |
||||
$(settings.prevButton+','+settings.nextButton).fadeOut('fast'); |
||||
} else if(howManyDates == 2) { |
||||
if($(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
$(settings.nextButton).fadeIn('fast'); |
||||
}
|
||||
else if($(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass)) { |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
$(settings.prevButton).fadeIn('fast'); |
||||
} |
||||
} else { |
||||
if( $(settings.issuesDiv+' li:first-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.prevButton).fadeOut('fast'); |
||||
}
|
||||
else if( $(settings.issuesDiv+' li:last-child').hasClass(settings.issuesSelectedClass) ) { |
||||
$(settings.nextButton).fadeOut('fast'); |
||||
} |
||||
else { |
||||
$(settings.nextButton+','+settings.prevButton).fadeIn('slow'); |
||||
}
|
||||
} |
||||
}); |
||||
// keyboard navigation, added since 0.9.1
|
||||
if(settings.arrowKeys=='true') { |
||||
if(settings.orientation=='horizontal') { |
||||
$(document).keydown(function(event){ |
||||
if (event.keyCode == 39) {
|
||||
$(settings.nextButton).click(); |
||||
} |
||||
if (event.keyCode == 37) {
|
||||
$(settings.prevButton).click(); |
||||
} |
||||
}); |
||||
} else if(settings.orientation=='vertical') { |
||||
$(document).keydown(function(event){ |
||||
if (event.keyCode == 40) {
|
||||
$(settings.nextButton).click(); |
||||
} |
||||
if (event.keyCode == 38) {
|
||||
$(settings.prevButton).click(); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
// default position startAt, added since 0.9.3
|
||||
$(settings.datesDiv+' li').eq(settings.startAt-1).find('a').trigger('click'); |
||||
// autoPlay, added since 0.9.4
|
||||
if(settings.autoPlay == 'true') {
|
||||
setInterval("autoPlay()", settings.autoPlayPause); |
||||
} |
||||
}); |
||||
}; |
||||
|
||||
// autoPlay, added since 0.9.4
|
||||
function autoPlay(){ |
||||
var currentDate = $(settings.datesDiv).find('a.'+settings.datesSelectedClass); |
||||
if(settings.autoPlayDirection == 'forward') { |
||||
if(currentDate.parent().is('li:last-child')) { |
||||
$(settings.datesDiv+' li:first-child').find('a').trigger('click'); |
||||
} else { |
||||
currentDate.parent().next().find('a').trigger('click'); |
||||
} |
||||
} else if(settings.autoPlayDirection == 'backward') { |
||||
if(currentDate.parent().is('li:first-child')) { |
||||
$(settings.datesDiv+' li:last-child').find('a').trigger('click'); |
||||
} else { |
||||
currentDate.parent().prev().find('a').trigger('click'); |
||||
} |
||||
} |
||||
} |
@ -1,243 +0,0 @@ |
||||
;(function (factory) |
||||
{ |
||||
if (typeof define === 'function' && define.amd) |
||||
{ |
||||
define(['jquery'], factory); |
||||
} |
||||
else if (typeof exports === 'object') |
||||
{ |
||||
factory(require('jquery')); |
||||
} |
||||
else |
||||
{ |
||||
factory(jQuery); |
||||
} |
||||
} |
||||
(function ($) |
||||
{ |
||||
"use strict"; |
||||
|
||||
var pluginName = "tinyscrollbar" |
||||
, defaults = |
||||
{ |
||||
axis : 'y' // Vertical or horizontal scrollbar? ( x || y ).
|
||||
, wheel : true // Enable or disable the mousewheel;
|
||||
, wheelSpeed : 40 // How many pixels must the mouswheel scroll at a time.
|
||||
, wheelLock : true // Lock default scrolling window when there is no more content.
|
||||
, scrollInvert : false // Enable invert style scrolling
|
||||
, trackSize : false // Set the size of the scrollbar to auto or a fixed number.
|
||||
, thumbSize : false // Set the size of the thumb to auto or a fixed number.
|
||||
} |
||||
; |
||||
|
||||
function Plugin($container, options) |
||||
{ |
||||
this.options = $.extend({}, defaults, options); |
||||
this._defaults = defaults; |
||||
this._name = pluginName; |
||||
|
||||
var self = this |
||||
, $viewport = $container.find(".viewport") |
||||
, $overview = $container.find(".overview") |
||||
, $scrollbar = $container.find(".scrollbar") |
||||
, $track = $scrollbar.find(".track") |
||||
, $thumb = $scrollbar.find(".thumb") |
||||
|
||||
, mousePosition = 0 |
||||
|
||||
, isHorizontal = this.options.axis === 'x' |
||||
, hasTouchEvents = ("ontouchstart" in document.documentElement) |
||||
, wheelEvent = ("onwheel" in document || document.documentMode >= 9) ? "wheel" : |
||||
(document.onmousewheel !== undefined ? "mousewheel" : "DOMMouseScroll") |
||||
|
||||
, sizeLabel = isHorizontal ? "width" : "height" |
||||
, posiLabel = isHorizontal ? "left" : "top" |
||||
; |
||||
|
||||
this.contentPosition = 0; |
||||
this.viewportSize = 0; |
||||
this.contentSize = 0; |
||||
this.contentRatio = 0; |
||||
this.trackSize = 0; |
||||
this.trackRatio = 0; |
||||
this.thumbSize = 0; |
||||
this.thumbPosition = 0; |
||||
|
||||
function initialize() |
||||
{ |
||||
self.update(); |
||||
setEvents(); |
||||
|
||||
return self; |
||||
} |
||||
|
||||
this.update = function(scrollTo) |
||||
{ |
||||
var sizeLabelCap = sizeLabel.charAt(0).toUpperCase() + sizeLabel.slice(1).toLowerCase(); |
||||
this.viewportSize = $viewport[0]['offset'+ sizeLabelCap]; |
||||
this.contentSize = $overview[0]['scroll'+ sizeLabelCap]; |
||||
this.contentRatio = this.viewportSize / this.contentSize; |
||||
this.trackSize = this.options.trackSize || this.viewportSize; |
||||
this.thumbSize = Math.min(this.trackSize, Math.max(0, (this.options.thumbSize || (this.trackSize * this.contentRatio)))); |
||||
this.trackRatio = this.options.thumbSize ? (this.contentSize - this.viewportSize) / (this.trackSize - this.thumbSize) : (this.contentSize / this.trackSize); |
||||
|
||||
$scrollbar.toggleClass("disable", this.contentRatio >= 1); |
||||
|
||||
switch (scrollTo) |
||||
{ |
||||
case "bottom": |
||||
this.contentPosition = this.contentSize - this.viewportSize; |
||||
break; |
||||
|
||||
case "relative": |
||||
this.contentPosition = Math.min(this.contentSize - this.viewportSize, Math.max(0, this.contentPosition)); |
||||
break; |
||||
|
||||
default: |
||||
this.contentPosition = parseInt(scrollTo, 10) || 0; |
||||
} |
||||
|
||||
setSize(); |
||||
|
||||
return self; |
||||
}; |
||||
|
||||
function setSize() |
||||
{ |
||||
$thumb.css(posiLabel, self.contentPosition / self.trackRatio); |
||||
$overview.css(posiLabel, -self.contentPosition); |
||||
$scrollbar.css(sizeLabel, self.trackSize); |
||||
$track.css(sizeLabel, self.trackSize); |
||||
$thumb.css(sizeLabel, self.thumbSize); |
||||
} |
||||
|
||||
function setEvents() |
||||
{ |
||||
if(hasTouchEvents) |
||||
{ |
||||
$viewport[0].ontouchstart = function(event) |
||||
{ |
||||
if(1 === event.touches.length) |
||||
{ |
||||
event.stopPropagation(); |
||||
|
||||
start(event.touches[0]); |
||||
} |
||||
}; |
||||
} |
||||
else |
||||
{ |
||||
$thumb.bind("mousedown", start); |
||||
$track.bind("mousedown", drag); |
||||
} |
||||
|
||||
$(window).resize(function() |
||||
{ |
||||
self.update("relative"); |
||||
}); |
||||
|
||||
if(self.options.wheel && window.addEventListener) |
||||
{ |
||||
$container[0].addEventListener(wheelEvent, wheel, false ); |
||||
} |
||||
else if(self.options.wheel) |
||||
{ |
||||
$container[0].onmousewheel = wheel; |
||||
} |
||||
} |
||||
|
||||
function start(event) |
||||
{ |
||||
$("body").addClass("noSelect"); |
||||
|
||||
mousePosition = isHorizontal ? event.pageX : event.pageY; |
||||
self.thumbPosition = parseInt($thumb.css(posiLabel), 10) || 0; |
||||
|
||||
if(hasTouchEvents) |
||||
{ |
||||
document.ontouchmove = function(event) |
||||
{ |
||||
event.preventDefault(); |
||||
drag(event.touches[0]); |
||||
}; |
||||
document.ontouchend = end; |
||||
} |
||||
else |
||||
{ |
||||
$(document).bind("mousemove", drag); |
||||
$(document).bind("mouseup", end); |
||||
$thumb.bind("mouseup", end); |
||||
} |
||||
} |
||||
|
||||
function wheel(event) |
||||
{ |
||||
if(self.contentRatio < 1) |
||||
{ |
||||
var evntObj = event || window.event |
||||
, deltaDir = "delta" + self.options.axis.toUpperCase() |
||||
, wheelSpeedDelta = -(evntObj[deltaDir] || evntObj.detail || (-1 / 3 * evntObj.wheelDelta)) / 40 |
||||
; |
||||
|
||||
self.contentPosition -= wheelSpeedDelta * self.options.wheelSpeed; |
||||
self.contentPosition = Math.min((self.contentSize - self.viewportSize), Math.max(0, self.contentPosition)); |
||||
|
||||
$container.trigger("move"); |
||||
|
||||
$thumb.css(posiLabel, self.contentPosition / self.trackRatio); |
||||
$overview.css(posiLabel, -self.contentPosition); |
||||
|
||||
if(self.options.wheelLock || (self.contentPosition !== (self.contentSize - self.viewportSize) && self.contentPosition !== 0)) |
||||
{ |
||||
evntObj = $.event.fix(evntObj); |
||||
evntObj.preventDefault(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
function drag(event) |
||||
{ |
||||
if(self.contentRatio < 1) |
||||
{ |
||||
var mousePositionNew = isHorizontal ? event.pageX : event.pageY |
||||
, thumbPositionDelta = mousePositionNew - mousePosition |
||||
; |
||||
|
||||
if(self.options.scrollInvert && hasTouchEvents) |
||||
{ |
||||
thumbPositionDelta = mousePosition - mousePositionNew; |
||||
} |
||||
|
||||
var thumbPositionNew = Math.min((self.trackSize - self.thumbSize), Math.max(0, self.thumbPosition + thumbPositionDelta)); |
||||
self.contentPosition = thumbPositionNew * self.trackRatio; |
||||
|
||||
$container.trigger("move"); |
||||
|
||||
$thumb.css(posiLabel, thumbPositionNew); |
||||
$overview.css(posiLabel, -self.contentPosition); |
||||
} |
||||
} |
||||
|
||||
function end() |
||||
{ |
||||
$("body").removeClass("noSelect"); |
||||
$(document).unbind("mousemove", drag); |
||||
$(document).unbind("mouseup", end); |
||||
$thumb.unbind("mouseup", end); |
||||
document.ontouchmove = document.ontouchend = null; |
||||
} |
||||
|
||||
return initialize(); |
||||
} |
||||
|
||||
$.fn[pluginName] = function(options) |
||||
{ |
||||
return this.each(function() |
||||
{ |
||||
if(!$.data(this, "plugin_" + pluginName)) |
||||
{ |
||||
$.data(this, "plugin_" + pluginName, new Plugin($(this), options)); |
||||
} |
||||
}); |
||||
}; |
||||
})); |
@ -1,57 +0,0 @@ |
||||
/* |
||||
* jQuery Toggle |
||||
*/ |
||||
|
||||
$(document).ready(function(){ |
||||
//hide the all of the element with class session_course_item
|
||||
$(".session_box").show(); |
||||
$(".session_course_item").show(); |
||||
|
||||
//toggle the componenet
|
||||
$("div.session_category_title_box").click(function(){ |
||||
|
||||
category_image = $(this).attr("id").split("_"); |
||||
category_real_image_id = category_image[category_image.length-1]; |
||||
|
||||
image_clicked = $("#category_img_"+category_real_image_id).attr("src"); |
||||
image_clicked_info = image_clicked.split("/"); |
||||
image_real_clicked = image_clicked_info[image_clicked_info.length-1]; |
||||
image_path = image_clicked.split("img"); |
||||
current_path = image_path[0]+"img/"; |
||||
|
||||
if (image_real_clicked == 'div_show.gif') { |
||||
current_path = current_path+'div_hide.gif'; |
||||
$("#category_img_"+category_real_image_id).attr("src", current_path); |
||||
} else { |
||||
current_path = current_path+'div_show.gif'; |
||||
$("#category_img_"+category_real_image_id).attr("src", current_path) |
||||
} |
||||
|
||||
$(this).nextAll().slideToggle("fast"); |
||||
|
||||
}); |
||||
|
||||
$("li.session_box_title").click(function(){ |
||||
|
||||
session_image = $(this).attr("id").split("_"); |
||||
session_real_image_id = session_image[session_image.length-1]; |
||||
|
||||
image_clicked = $("#session_img_"+session_real_image_id).attr("src"); |
||||
image_clicked_info = image_clicked.split("/"); |
||||
image_real_clicked = image_clicked_info[image_clicked_info.length-1]; |
||||
image_path = image_clicked.split("img"); |
||||
current_path = image_path[0]+"img/"; |
||||
|
||||
if (image_real_clicked == 'div_show.gif') { |
||||
current_path = current_path+'div_hide.gif'; |
||||
$("#session_img_"+session_real_image_id).attr("src", current_path) |
||||
} else { |
||||
current_path = current_path+'div_show.gif'; |
||||
$("#session_img_"+session_real_image_id).attr("src", current_path) |
||||
} |
||||
|
||||
$(this).nextAll().slideToggle("fast"); |
||||
|
||||
}); |
||||
|
||||
}); |
File diff suppressed because it is too large
Load Diff
@ -1,163 +0,0 @@ |
||||
/* |
||||
* jQuery Textarea Characters Counter Plugin v 2.0 |
||||
* Examples and documentation at: http://roy-jin.appspot.com/jsp/textareaCounter.jsp
|
||||
* Copyright (c) 2010 Roy Jin |
||||
* Version: 2.0 (11-JUN-2010) |
||||
* Dual licensed under the MIT and GPL licenses: |
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
* Requires: jQuery v1.4.2 or later |
||||
*/ |
||||
(function($){
|
||||
$.fn.textareaCount = function(options, fn) {
|
||||
var defaults = {
|
||||
maxCharacterSize: -1,
|
||||
originalStyle: 'originalTextareaInfo', |
||||
warningStyle: 'warningTextareaInfo',
|
||||
warningNumber: 20, |
||||
displayFormat: '#input characters | #words words' |
||||
};
|
||||
var options = $.extend(defaults, options); |
||||
|
||||
var container = $(this); |
||||
|
||||
$("<div class='charleft'> </div>").insertAfter(container); |
||||
|
||||
//create charleft css
|
||||
var charLeftCss = { |
||||
'width' : container.width() |
||||
}; |
||||
|
||||
var charLeftInfo = getNextCharLeftInformation(container); |
||||
charLeftInfo.addClass(options.originalStyle); |
||||
charLeftInfo.css(charLeftCss); |
||||
|
||||
var numInput = 0; |
||||
var maxCharacters = options.maxCharacterSize; |
||||
var numLeft = 0; |
||||
var numWords = 0; |
||||
|
||||
container.bind('keyup', function(event){limitTextAreaByCharacterCount();}) |
||||
.bind('mouseover', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);}) |
||||
.bind('paste', function(event){setTimeout(function(){limitTextAreaByCharacterCount();}, 10);}); |
||||
|
||||
|
||||
function limitTextAreaByCharacterCount(){ |
||||
charLeftInfo.html(countByCharacters()); |
||||
//function call back
|
||||
if(typeof fn != 'undefined'){ |
||||
fn.call(this, getInfo()); |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
function countByCharacters(){ |
||||
var content = container.val(); |
||||
var contentLength = content.length; |
||||
|
||||
//Start Cut
|
||||
if(options.maxCharacterSize > 0){ |
||||
//If copied content is already more than maxCharacterSize, chop it to maxCharacterSize.
|
||||
if(contentLength >= options.maxCharacterSize) { |
||||
content = content.substring(0, options.maxCharacterSize);
|
||||
} |
||||
|
||||
var newlineCount = getNewlineCount(content); |
||||
|
||||
// newlineCount new line character. For windows, it occupies 2 characters
|
||||
var systemmaxCharacterSize = options.maxCharacterSize - newlineCount; |
||||
if (!isWin()){ |
||||
systemmaxCharacterSize = options.maxCharacterSize |
||||
} |
||||
if(contentLength > systemmaxCharacterSize){ |
||||
//avoid scroll bar moving
|
||||
var originalScrollTopPosition = this.scrollTop; |
||||
container.val(content.substring(0, systemmaxCharacterSize)); |
||||
this.scrollTop = originalScrollTopPosition; |
||||
} |
||||
charLeftInfo.removeClass(options.warningStyle); |
||||
if(systemmaxCharacterSize - contentLength <= options.warningNumber){ |
||||
charLeftInfo.addClass(options.warningStyle); |
||||
} |
||||
|
||||
numInput = container.val().length + newlineCount; |
||||
if(!isWin()){ |
||||
numInput = container.val().length; |
||||
} |
||||
|
||||
numWords = countWord(getCleanedWordString(container.val())); |
||||
|
||||
numLeft = maxCharacters - numInput; |
||||
} else { |
||||
//normal count, no cut
|
||||
var newlineCount = getNewlineCount(content); |
||||
numInput = container.val().length + newlineCount; |
||||
if(!isWin()){ |
||||
numInput = container.val().length; |
||||
} |
||||
numWords = countWord(getCleanedWordString(container.val())); |
||||
} |
||||
|
||||
return formatDisplayInfo(); |
||||
} |
||||
|
||||
function formatDisplayInfo(){ |
||||
var format = options.displayFormat; |
||||
format = format.replace('#input', numInput); |
||||
format = format.replace('#words', numWords); |
||||
//When maxCharacters <= 0, #max, #left cannot be substituted.
|
||||
if(maxCharacters > 0){ |
||||
format = format.replace('#max', maxCharacters); |
||||
format = format.replace('#left', numLeft); |
||||
} |
||||
return format; |
||||
} |
||||
|
||||
function getInfo(){ |
||||
var info = { |
||||
input: numInput, |
||||
max: maxCharacters, |
||||
left: numLeft, |
||||
words: numWords |
||||
}; |
||||
return info; |
||||
} |
||||
|
||||
function getNextCharLeftInformation(container){ |
||||
return container.next('.charleft'); |
||||
} |
||||
|
||||
function isWin(){ |
||||
var strOS = navigator.appVersion; |
||||
if (strOS.toLowerCase().indexOf('win') != -1){ |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
function getNewlineCount(content){ |
||||
var newlineCount = 0; |
||||
for(var i=0; i<content.length;i++){ |
||||
if(content.charAt(i) == '\n'){ |
||||
newlineCount++; |
||||
} |
||||
} |
||||
return newlineCount; |
||||
} |
||||
|
||||
function getCleanedWordString(content){ |
||||
var fullStr = content + " "; |
||||
var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi; |
||||
var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, ""); |
||||
var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi; |
||||
var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " "); |
||||
var splitString = cleanedStr.split(" "); |
||||
return splitString; |
||||
} |
||||
|
||||
function countWord(cleanedWordString){ |
||||
var word_count = cleanedWordString.length-1; |
||||
return word_count; |
||||
} |
||||
};
|
||||
})(jQuery);
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 42 KiB |
@ -1,135 +0,0 @@ |
||||
#timeline h1,#timeline h2,#timeline h3,#timeline h4,#timeline h5,#timeline h6,#timeline p,#timeline blockquote,#timeline pre,#timeline a,#timeline abbr,#timeline acronym,#timeline address,#timeline cite,#timeline code,#timeline del,#timeline dfn,#timeline em,#timeline img,#timeline q,#timeline s,#timeline samp,#timeline small,#timeline strike,#timeline strong,#timeline sub,#timeline sup,#timeline tt,#timeline var,#timeline dd,#timeline dl,#timeline dt,#timeline li,#timeline ol,#timeline ul,#timeline fieldset,#timeline form,#timeline label,#timeline legend,#timeline button,#timeline table,#timeline caption,#timeline tbody,#timeline tfoot,#timeline thead,#timeline tr,#timeline th,#timeline td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;} |
||||
#timeline table{border-collapse:collapse;border-spacing:0;} |
||||
#timeline ol,#timeline ul{list-style:none;} |
||||
#timeline q:before,#timeline q:after,#timeline blockquote:before,#timeline blockquote:after{content:"";} |
||||
#timeline a:focus{outline:thin dotted;} |
||||
#timeline a:hover,#timeline a:active{outline:0;} |
||||
#timeline article,#timeline aside,#timeline details,#timeline figcaption,#timeline figure,#timeline footer,#timeline header,#timeline hgroup,#timeline nav,#timeline section{display:block;} |
||||
#timeline audio,#timeline canvas,#timeline video{display:inline-block;*display:inline;*zoom:1;} |
||||
#timeline audio:not([controls]){display:none;} |
||||
#timeline sub,#timeline sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;} |
||||
#timeline sup{top:-0.5em;} |
||||
#timeline sub{bottom:-0.25em;} |
||||
#timeline img{border:0;-ms-interpolation-mode:bicubic;} |
||||
#timeline button,#timeline input,#timeline select,#timeline textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;} |
||||
#timeline button,#timeline input{line-height:normal;*overflow:visible;} |
||||
#timeline button::-moz-focus-inner,#timeline input::-moz-focus-inner{border:0;padding:0;} |
||||
#timeline button,#timeline input[type="button"],#timeline input[type="reset"],#timeline input[type="submit"]{cursor:pointer;-webkit-appearance:button;} |
||||
#timeline input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;} |
||||
#timeline input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;} |
||||
#timeline textarea{overflow:auto;vertical-align:top;} |
||||
html,body{height:100%;padding:0px;margin:0px;} |
||||
#timeline{width:100%;height:100%;padding:0px;margin:0px;background-color:#ffffff;position:absolute;overflow:hidden;}#timeline .feedback{position:absolute;display:table;overflow:hidden;top:0px;left:0px;z-index:2000;width:100%;height:100%;background-color:#e9e9e9;border:1px solid #cccccc;}#timeline .feedback .messege{display:table-cell;vertical-align:middle;font-size:28px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;text-transform:uppercase;line-height:36px;width:75%;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;text-align:center;} |
||||
#timeline .container.main{position:absolute;top:0px: left:0px;padding-bottom:3px;width:auto;height:auto;margin:0px;clear:both;} |
||||
#timeline img,#timeline embed,#timeline object,#timeline video,#timeline iframe{max-width:100%;} |
||||
#timeline img{max-height:100%;border:1px solid #999999;} |
||||
#timeline a{color:#0088cc;text-decoration:none;} |
||||
#timeline a:hover{color:#005580;text-decoration:underline;} |
||||
#timeline .twitter{text-align:left;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:#ffffff;margin-left:auto;margin-right:auto;margin-bottom:15px;clear:both;}#timeline .twitter blockquote{font-size:15px;line-height:20px;color:#666666;}#timeline .twitter blockquote p{font-size:28px;line-height:36px;margin-bottom:6px;padding-top:10px;background-color:#ffffff;font-family:"Georgia",Times New Roman,Times,serif;color:#000000;} |
||||
#timeline .twitter blockquote .quote-mark{color:#666666;} |
||||
#timeline .twitter .created-at{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -889px;width:24px;height:24px;width:24px;height:24px;overflow:hidden;margin-left:15px;display:inline-block;float:right;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;} |
||||
#timeline .twitter .created-at:hover{filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} |
||||
#timeline .twitter .vcard{float:right;margin-bottom:15px;}#timeline .twitter .vcard a{color:#333333;} |
||||
#timeline .twitter .vcard a:hover{text-decoration:none;}#timeline .twitter .vcard a:hover .fn{text-decoration:underline;} |
||||
#timeline .twitter .vcard .fn,#timeline .twitter .vcard .nickname{padding-left:42px;} |
||||
#timeline .twitter .vcard .fn{display:block;font-weight:bold;} |
||||
#timeline .twitter .vcard .nickname{margin-top:3px;display:block;color:#666666;} |
||||
#timeline .twitter .vcard .avatar{float:left;display:block;width:32px;height:32px;}#timeline .twitter .vcard .avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;} |
||||
#timeline .layout-media .twitter{max-width:70%;} |
||||
#timeline .thumbnail{width:24px;height:24px;overflow:hidden;float:left;margin-right:5px;border:1px solid #cccccc;} |
||||
#timeline .thumbnail.twitter{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -889px;width:24px;height:24px;} |
||||
#timeline .thumbnail.vimeo{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -963px;width:24px;height:24px;} |
||||
#timeline .thumbnail.youtube{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1111px;width:24px;height:24px;} |
||||
#timeline .thumbnail.soundcloud{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -659px;width:24px;height:24px;} |
||||
#timeline .thumbnail.map{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -514px;width:26px;height:21px;} |
||||
#timeline .thumbnail.website{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1037px;width:24px;height:24px;} |
||||
#timeline .zFront{z-index:500;} |
||||
#timeline{}#timeline .feature{width:100%;}#timeline .feature .slider{width:100%;float:left;position:relative;z-index:10;padding-top:15px;-webkit-box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);}#timeline .feature .slider h2.date{line-height:24px;} |
||||
#timeline .feature .slider .date a,#timeline .feature .slider .title a{color:#999999;} |
||||
#timeline .feature .slider blockquote{font-size:28px;text-align:left;line-height:36px;margin-bottom:6px;padding-top:10px;background-color:#ffffff;font-family:"Georgia",Times New Roman,Times,serif;color:#000000;} |
||||
.slider{width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask{text-align:center;width:100%;height:100%;overflow:hidden;}.slider .slider-container-mask .slider-container{position:absolute;top:0px;left:-2160px;width:100%;height:100%;text-align:center;display:block;background-color:#ffffff;}.slider .slider-container-mask .slider-container .slider-item-container{display:table-cell;vertical-align:middle;} |
||||
.slider img,.slider embed,.slider object,.slider video,.slider iframe{max-width:100%;} |
||||
.slider .nav-previous,.slider .nav-next{position:absolute;top:0px;width:100px;color:#DBDBDB;font-size:11px;}.slider .nav-previous .nav-container,.slider .nav-next .nav-container{height:100px;position:absolute;} |
||||
.slider .nav-previous .icon,.slider .nav-next .icon{margin-bottom:15px;} |
||||
.slider .nav-previous .date,.slider .nav-next .date{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:bold;line-height:#e9e9e9;text-transform:uppercase;margin-bottom:5px;} |
||||
.slider .nav-previous .date,.slider .nav-next .date,.slider .nav-previous .title,.slider .nav-next .title{line-height:14px;}.slider .nav-previous .date a,.slider .nav-next .date a,.slider .nav-previous .title a,.slider .nav-next .title a{color:#999999;} |
||||
.slider .nav-previous .date small,.slider .nav-next .date small,.slider .nav-previous .title small,.slider .nav-next .title small{display:none;} |
||||
.slider .nav-previous:hover,.slider .nav-next:hover{color:#333333;cursor:pointer;} |
||||
.slider .nav-previous{float:left;text-align:left;}.slider .nav-previous .icon{margin-left:10px;padding-left:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAAB1SURBVHjafNFXDsAgDAPQAKWDUd//tq2EnS6p+eNJECcYWLmzklFq2Ud1iAKlVNFG2c/zoCiJIJlkA6lOlFBFXU+vIM26lkHypxvzmCnjgg91J6TPRaDJktMVwvATFc+ur7Gb02MCrfA2py/6amGe2b/jEGAA5cYUouw7P64AAAAASUVORK5CYII=) no-repeat scroll 0% 50%;} |
||||
.slider .nav-previous .date,.slider .nav-previous .title{text-align:left;padding-left:10px;} |
||||
.slider .nav-previous:hover .icon{margin-left:5px;padding-left:20px;} |
||||
.slider .nav-next{float:right;text-align:right;}.slider .nav-next .icon{margin-right:10px;padding-right:20px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAWCAMAAAD6gTxzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRF2dnZWVlZsrKyv7+/TU1NzMzMjY2Nc3Nz5eXlgICAQEBA8vLymZmZZmZmMzMz////CXz3iwAAABB0Uk5T////////////////////AOAjXRkAAABySURBVHjabNFLEoAgDAPQAiJ/ev/buqCJONjlm5GkVcKwEbWR5uaaq4E0V7NB0mg0b5J2mCdpMqpC+kasaNkjrE3Ac530RgSSDkaQ0kFbN6N9g0X5KPFTteAzLuSPtQVScJyGpx1PyNo8NH9HxB6PAAMAzkAUorcBvvAAAAAASUVORK5CYII=) no-repeat scroll 100% 50%;} |
||||
.slider .nav-next .date,.slider .nav-next .title{text-align:right;padding-right:10px;} |
||||
.slider .nav-next:hover .icon{margin-right:5px;padding-right:20px;} |
||||
.slider .slider-item{position:absolute;width:700px;height:100%;padding:0px;margin:0px;overflow:hidden;display:table;}.slider .slider-item .content{display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container{display:table;vertical-align:middle;}.slider .slider-item .content .content-container .text{width:40%;max-width:50%;min-width:120px;display:table-cell;vertical-align:middle;}.slider .slider-item .content .content-container .text .container{display:table-cell;vertical-align:middle;text-align:left;padding-right:15px;} |
||||
.slider .slider-item .content .content-container .media{width:100%;min-width:50%;float:left;}.slider .slider-item .content .content-container .media .media-wrapper{margin-left:auto;margin-right:auto;}.slider .slider-item .content .content-container .media .media-wrapper .media-container{display:inline-block;overflow:hidden;line-height:0px;padding:0px;}.slider .slider-item .content .content-container .media .media-wrapper .media-container img,.slider .slider-item .content .content-container .media .media-wrapper .media-container iframe{border:1px solid #cccccc;} |
||||
.slider .slider-item .content .content-container .media .media-wrapper .media-container .credit,.slider .slider-item .content .content-container .media .media-wrapper .media-container .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} |
||||
.slider .slider-item .content .content-container .media .media-wrapper .media-container .credit{color:#999999;text-align:right;font-size:10px;line-height:10px;display:block;margin:0 auto;margin-top:4px;} |
||||
.slider .slider-item .content .content-container .media .media-wrapper .media-container .caption{text-align:left;margin-top:10px;color:#666666;font-size:11px;line-height:14px;} |
||||
.slider .slider-item .content .content-container .media.text-media .media-wrapper .media-container{border:none;background-color:#ffffff;} |
||||
.slider .slider-item .content .content-container.layout-text{width:100%;}.slider .slider-item .content .content-container.layout-text .text{width:100%;max-width:100%;}.slider .slider-item .content .content-container.layout-text .text .container{display:block;vertical-align:middle;text-align:left;padding:0px;width:60%;text-align:left;margin-left:auto;margin-right:auto;} |
||||
.slider .slider-item .content .content-container.layout-media{width:100%;}.slider .slider-item .content .content-container.layout-media .text{width:100%;height:100%;max-width:100%;display:block;text-align:center;}.slider .slider-item .content .content-container.layout-media .text .container{display:block;text-align:center;width:100%;margin-left:none;margin-right:none;} |
||||
.slider .slider-item .content .content-container.layout-media .media{width:100%;min-width:50%;float:none;}.slider .slider-item .content .content-container.layout-media .media .media-wrapper{display:block;}.slider .slider-item .content .content-container.layout-media .media .media-wrapper .media-container{margin-left:auto;margin-right:auto;overflow:hidden;line-height:0px;padding:0px;} |
||||
#timeline .navigation{clear:both;cursor:move;width:100%;height:200px;border-top:1px solid #cccccc;position:relative;}#timeline .navigation .toolbar{position:absolute;top:45px;left:0px;z-index:1000;background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);box-shadow:1px 1px 0px rgba(0, 0, 0, 0.2);}#timeline .navigation .toolbar .zoom-in,#timeline .navigation .toolbar .zoom-out,#timeline .navigation .toolbar .back-home{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px;font-weight:normal;line-height:20px;top:0px;z-index:1000;width:18px;height:18px;color:#333333;text-align:center;font-weight:bold;border:1px solid #ffffff;padding:5px;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;} |
||||
#timeline .navigation .toolbar .zoom-in:hover,#timeline .navigation .toolbar .zoom-out:hover,#timeline .navigation .toolbar .back-home:hover{color:#0088cc;cursor:pointer;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;} |
||||
#timeline .navigation .toolbar .zoom-in .icon{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1507px;width:16px;height:16px;} |
||||
#timeline .navigation .toolbar .zoom-out .icon{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1647px;width:16px;height:16px;} |
||||
#timeline .navigation .toolbar .back-home .icon{background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -1303px;width:16px;height:12px;} |
||||
#timeline .navigation .timenav-background{position:absolute;cursor:move;top:0px;left:0px;height:150px;width:100%;background-color:#e9e9e9;}#timeline .navigation .timenav-background .timenav-interval-background{position:absolute;top:151px;left:0px;background:#ffffff;width:100%;height:49px;}#timeline .navigation .timenav-background .timenav-interval-background .top-highlight{position:absolute;top:-1px;left:0px;z-index:30;width:100%;height:1px;background:#ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;-webkit-box-shadow:1px 1px 5px rgba(0, 0, 0, 0.2);-moz-box-shadow:1px 1px 5px rgba(0, 0, 0, 0.2);box-shadow:1px 1px 5px rgba(0, 0, 0, 0.2);} |
||||
#timeline .navigation .timenav-background .timenav-line{position:absolute;top:0px;left:50%;width:3px;height:150px;background:#0088cc;z-index:500;-webkit-box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);box-shadow:1px 1px 7px rgba(0, 0, 0, 0.3);} |
||||
#timeline .navigation .timenav{position:absolute;top:0px;left:-250px;z-index:1;}#timeline .navigation .timenav .content{position:relative;}#timeline .navigation .timenav .content .marker.start{display:none;} |
||||
#timeline .navigation .timenav .content .marker.active .dot{background:#0088cc;z-index:200;} |
||||
#timeline .navigation .timenav .content .marker.active .line{z-index:199;background:#0088cc;width:1px;}#timeline .navigation .timenav .content .marker.active .line .event-line{background:#0088cc;filter:alpha(opacity=75);-khtml-opacity:0.75;-moz-opacity:0.75;opacity:0.75;} |
||||
#timeline .navigation .timenav .content .marker.active .flag{z-index:200;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -110px;width:153px;height:60px;}#timeline .navigation .timenav .content .marker.active .flag .flag-content h3{color:#0088cc;} |
||||
#timeline .navigation .timenav .content .marker.active .flag.row1,#timeline .navigation .timenav .content .marker.active .flag.row2,#timeline .navigation .timenav .content .marker.active .flag.row3{z-index:200;} |
||||
#timeline .navigation .timenav .content .marker.active:hover{cursor:default;}#timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h3{color:#0088cc;} |
||||
#timeline .navigation .timenav .content .marker.active:hover .flag .flag-content h4{color:#999999;} |
||||
#timeline .navigation .timenav .content .marker:hover .line{z-index:500;background:#999999;} |
||||
#timeline .navigation .timenav .content .marker{position:absolute;top:0px;left:150px;display:block;}#timeline .navigation .timenav .content .marker .dot{position:absolute;top:150px;left:0px;display:block;width:6px;height:6px;background:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;z-index:21;} |
||||
#timeline .navigation .timenav .content .marker .line{position:absolute;top:0px;left:3px;width:1px;height:150px;background:#cccccc;z-index:22;}#timeline .navigation .timenav .content .marker .line .event-line{position:absolute;z-index:22;left:0px;height:1px;width:1px;background:#0088cc;filter:alpha(opacity=15);-khtml-opacity:0.15;-moz-opacity:0.15;opacity:0.15;} |
||||
#timeline .navigation .timenav .content .marker .flag{position:absolute;top:15px;left:3px;padding:0px;display:block;z-index:23;width:153px;height:56px;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 0;width:153px;height:60px;}#timeline .navigation .timenav .content .marker .flag .flag-content{padding:5px 7px 2px 5px;overflow:hidden;height:33px;}#timeline .navigation .timenav .content .marker .flag .flag-content h3{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:bold;line-height:20px;font-size:11px;line-height:11px;color:#999999;margin-bottom:2px;}#timeline .navigation .timenav .content .marker .flag .flag-content h3 small{display:none;} |
||||
#timeline .navigation .timenav .content .marker .flag .flag-content h4{display:none;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:normal;line-height:20px;font-size:10px;line-height:10px;color:#aaaaaa;}#timeline .navigation .timenav .content .marker .flag .flag-content h4 small{display:none;} |
||||
#timeline .navigation .timenav .content .marker .flag .flag-content .thumbnail{margin-bottom:15px;} |
||||
#timeline .navigation .timenav .content .marker .flag:hover{cursor:pointer;background-image:url(timeline.png);background-repeat:no-repeat;background-position:0 -110px;width:153px;height:60px;}#timeline .navigation .timenav .content .marker .flag:hover .flag-content h3{color:#333333;} |
||||
#timeline .navigation .timenav .content .marker .flag:hover .flag-content h4{color:#aaaaaa;} |
||||
#timeline .navigation .timenav .content .marker .flag.row1{z-index:25;top:48px;} |
||||
#timeline .navigation .timenav .content .marker .flag.row2{z-index:24;top:96px;} |
||||
#timeline .navigation .timenav .content .marker .flag.row3{z-index:23;top:1px;} |
||||
#timeline .navigation .timenav .content .marker .flag.zFront{z-index:100;} |
||||
#timeline .navigation .timenav .content .era{position:absolute;top:138px;left:150px;height:12px;display:block;background:#0088cc;overflow:hidden;border-left:1px solid #cccccc;border-right:1px solid #cccccc;border-top:1px solid #cccccc;filter:alpha(opacity=75);-khtml-opacity:0.75;-moz-opacity:0.75;opacity:0.75;-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;border-top-right-radius:7px;z-index:-10;}#timeline .navigation .timenav .content .era h3{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px;font-weight:bold;line-height:10px;color:#ffffff;position:absolute;top:-1px;left:9px;} |
||||
#timeline .navigation .timenav .time{position:absolute;left:0px;top:150px;height:50px;background-color:#ffffff;}#timeline .navigation .timenav .time .time-interval-minor{height:6px;white-space:nowrap;position:absolute;top:-9px;left:8px;z-index:10;}#timeline .navigation .timenav .time .time-interval-minor .minor{position:relative;top:0px;display:inline-block;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);width:100px;height:6px;background-position:center top;white-space:nowrap;color:#666666;margin-top:0px;padding-top:0px;} |
||||
#timeline .navigation .timenav .time .time-interval{white-space:nowrap;position:absolute;top:5px;left:0px;}#timeline .navigation .timenav .time .time-interval div{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);background-position:left top;background-repeat:no-repeat;padding-top:3px;position:absolute;height:3px;left:0px;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px;font-weight:normal;line-height:20px;text-transform:uppercase;text-align:left;text-indent:0px;white-space:nowrap;color:#666666;margin-left:0px;margin-right:0px;margin-top:1px;z-index:2;}#timeline .navigation .timenav .time .time-interval div strong{font-weight:bold;color:#000000;} |
||||
#timeline .navigation .timenav .time .time-interval-major{white-space:nowrap;position:absolute;top:5px;left:0px;}#timeline .navigation .timenav .time .time-interval-major div{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAMCAMAAACdvocfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFzMzM////040VdgAAAAJ0Uk5T/wDltzBKAAAAEklEQVR42mJgYAQCBopJgAADAAbwADHy2qHzAAAAAElFTkSuQmCC);background-position:left top;background-repeat:no-repeat;padding-top:15px;position:absolute;height:15px;left:0px;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:bold;line-height:20px;text-transform:uppercase;text-align:left;text-indent:0px;white-space:nowrap;color:#333333;margin-left:0px;margin-right:0px;margin-top:1px;z-index:5;}#timeline .navigation .timenav .time .time-interval-major div strong{font-weight:bold;color:#000000;} |
||||
#timeline{font-family:"Georgia",Times New Roman,Times,serif;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;font-size:15px;font-weight:normal;line-height:20px;}#timeline p{font-size:15px;font-weight:normal;line-height:20px;margin-bottom:20px;color:#666666;}#timeline p small{font-size:13px;} |
||||
#timeline p:first-child{margin-top:20px;} |
||||
#timeline .navigation p{color:#999999;} |
||||
#timeline .feature h3,#timeline .feature h4,#timeline .feature h5,#timeline .feature h6{margin-bottom:15px;} |
||||
#timeline .feature p{color:#666666;} |
||||
#timeline h1,#timeline h2,#timeline h3,#timeline h4,#timeline h5,#timeline h6{font-weight:normal;color:#000000;text-transform:none;}#timeline h1 a,#timeline h2 a,#timeline h3 a,#timeline h4 a,#timeline h5 a,#timeline h6 a{color:#999999;} |
||||
#timeline h1 small,#timeline h2 small,#timeline h3 small,#timeline h4 small,#timeline h5 small,#timeline h6 small{color:#999999;} |
||||
#timeline h1.date,#timeline h2.date,#timeline h3.date,#timeline h4.date,#timeline h5.date,#timeline h6.date{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:bold;} |
||||
#timeline h2.start{font-size:42px;line-height:44px;} |
||||
#timeline h1{margin-bottom:15px;font-size:32px;line-height:34px;}#timeline h1 small{font-size:18px;} |
||||
#timeline h2{margin-bottom:15px;font-size:28px;line-height:30px;}#timeline h2 small{font-size:14px;line-height:16px;} |
||||
#timeline h3,#timeline h4,#timeline h5,#timeline h6{line-height:40px;}#timeline h3 .active,#timeline h4 .active,#timeline h5 .active,#timeline h6 .active{color:#0088cc;} |
||||
#timeline h3{font-size:24px;line-height:26px;}#timeline h3 small{font-size:14px;} |
||||
#timeline h4{font-size:16px;line-height:18px;}#timeline h4 small{font-size:12px;} |
||||
#timeline h5{font-size:14px;line-height:16px;} |
||||
#timeline h6{font-size:13px;line-height:14px;text-transform:uppercase;} |
||||
#timeline strong{font-weight:bold;} |
||||
#timeline Q{quotes:'„' '“';font-style:italic;} |
||||
#timeline .credit,#timeline .caption{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} |
||||
#timeline .credit{color:#999999;text-align:right;font-size:10px;line-height:10px;display:block;margin:0 auto;clear:both;} |
||||
#timeline .caption{text-align:left;margin-top:5px;color:#666666;font-size:11px;line-height:14px;clear:both;} |
||||
.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;opacity:0;filter:alpha(opacity=0);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-weight:bold;line-height:20px;font-size:12px;line-height:12px;} |
||||
.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} |
||||
.tooltip.top{margin-top:-2px;} |
||||
.tooltip.right{margin-left:2px;} |
||||
.tooltip.bottom{margin-top:2px;} |
||||
.tooltip.left{margin-left:-2px;} |
||||
.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} |
||||
.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} |
||||
.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} |
||||
.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} |
||||
.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} |
||||
.tooltip-arrow{position:absolute;width:0;height:0;} |
Before Width: | Height: | Size: 10 KiB |
Loading…
Reference in new issue