' + data.content + '' + data.visibleUrl + '
';
-
+
canvas.appendChild( element );
properties.push([Math.random() * (window.innerWidth / 2),-200,600,element.offsetHeight]);
-
+
var i = properties.length - 1;
element.style['position'] = 'absolute';
@@ -223,7 +223,7 @@ function addResult(data)
elements[i] = element;
resultBodies.push( bodies[i] = createBox(world, properties[i][0] + (properties[i][2] >> 1), properties[i][1] + (properties[i][3] >> 1), properties[i][2] / 2, properties[i][3] / 2, false, element) );
-
+
}
//
@@ -235,23 +235,23 @@ function loop()
delta[0] += (0 - delta[0]) * .5;
delta[1] += (0 - delta[1]) * .5;
-
+
world.m_gravity.x = 0 + delta[0];
world.m_gravity.y = 0 + delta[1];
mouseDrag();
- world.Step(timeStep, iterations);
-
+ world.Step(timeStep, iterations);
+
for (i = 0; i < elements.length; i++)
{
var element = elements[i];
-
+
element.style['left'] = (bodies[i].m_position0.x - (properties[i][2] >> 1)) + 'px';
element.style['top'] = (bodies[i].m_position0.y - (properties[i][3] >> 1)) + 'px';
-
+
// webkit
element.style['-webkit-transform'] = 'rotate(' + (bodies[i].m_rotation0 * 57.2957795) + 'deg)';
-
+
// gecko
element.style['MozTransform'] = 'rotate(' + (bodies[i].m_rotation0 * 57.2957795) + 'deg)';
@@ -282,7 +282,7 @@ function mouseDrag()
if (isMouseDown && !mouseJoint)
{
var body = getBodyAtMouse();
-
+
if (body)
{
var md = new b2MouseJointDef();
@@ -295,7 +295,7 @@ function mouseDrag()
body.WakeUp();
}
}
-
+
// mouse release
if (!isMouseDown)
{
@@ -305,7 +305,7 @@ function mouseDrag()
mouseJoint = null;
}
}
-
+
// mouse move
if (mouseJoint)
{
@@ -319,7 +319,7 @@ function getBodyAtMouse()
// Make a small box.
var mousePVec = new b2Vec2();
mousePVec.Set(mouseX, mouseY);
-
+
var aabb = new b2AABB();
aabb.minVertex.Set(mouseX - 1, mouseY - 1);
aabb.maxVertex.Set(mouseX + 1, mouseY + 1);
@@ -329,7 +329,7 @@ function getBodyAtMouse()
var shapes = new Array();
var count = world.Query(aabb, shapes, k_maxCount);
var body = null;
-
+
for (var i = 0; i < count; ++i)
{
if (shapes[i].m_body.IsStatic() == false)
@@ -352,18 +352,18 @@ function setWalls()
world.DestroyBody(walls[1]);
world.DestroyBody(walls[2]);
world.DestroyBody(walls[3]);
-
- walls[0] = null;
+
+ walls[0] = null;
walls[1] = null;
walls[2] = null;
walls[3] = null;
}
-
+
walls[0] = createBox(world, stage[2] / 2, - wall_thickness, stage[2], wall_thickness);
walls[1] = createBox(world, stage[2] / 2, stage[3] + wall_thickness, stage[2], wall_thickness);
walls[2] = createBox(world, - wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
- walls[3] = createBox(world, stage[2] + wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
-
+ walls[3] = createBox(world, stage[2] + wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
+
wallsSetted = true;
}
@@ -402,32 +402,32 @@ function findPos(obj)
function getBrowserDimensions()
{
var changed = false;
-
+
if (stage[0] != window.screenX)
{
delta[0] = (window.screenX - stage[0]) * 50;
stage[0] = window.screenX;
changed = true;
}
-
+
if (stage[1] != window.screenY)
{
delta[1] = (window.screenY - stage[1]) * 50;
stage[1] = window.screenY;
changed = true;
}
-
+
if (stage[2] != window.innerWidth)
{
stage[2] = window.innerWidth;
changed = true;
}
-
+
if (stage[3] != window.innerHeight)
{
stage[3] = window.innerHeight;
changed = true;
}
-
+
return changed;
-}
+}
diff --git a/public/static/ben/visual/grav/Main_new.js b/public/static/ben/visual/grav/Main_new.js
index 39c69dc..730f5cc 100644
--- a/public/static/ben/visual/grav/Main_new.js
+++ b/public/static/ben/visual/grav/Main_new.js
@@ -33,27 +33,27 @@ function init()
{
canvas = document.getElementById('canvas');
-
+
document.onmousedown = onDocumentMouseDown;
document.onmouseup = onDocumentMouseUp;
document.onmousemove = onDocumentMouseMove;
document.ondblclick = onDocumentDoubleClick;
-
+
document.onkeypress = onDocumentKeyPress;
// init box2d
-
+
worldAABB = new b2AABB();
worldAABB.minVertex.Set(-200, -200);
worldAABB.maxVertex.Set( screen.width + 200, screen.height + 200);
world = new b2World(worldAABB, new b2Vec2(0, 0), true);
-
- // walls
+
+ // walls
setWalls();
elements = getElementsByClass("box2d");
-
+
for (i = 0; i < elements.length; i++)
{
var element = elements[i];
@@ -61,7 +61,7 @@ function init()
properties[i][2] = element.offsetWidth;
properties[i][3] = element.offsetHeight;
}
-
+
for (i = 0; i < elements.length; i++)
{
var element = elements[i];
@@ -72,14 +72,14 @@ function init()
element.onmousedown = onElementMouseDown;
element.onmouseup = onElementMouseUp;
element.onclick = onElementClick;
-
- bodies[i] = createBox(world, properties[i][0] + (properties[i][2] >> 1), properties[i][1] + (properties[i][3] >> 1), properties[i][2] / 2, properties[i][3] / 2, false);
+
+ bodies[i] = createBox(world, properties[i][0] + (properties[i][2] >> 1), properties[i][1] + (properties[i][3] >> 1), properties[i][2] / 2, properties[i][3] / 2, false);
}
}
function play()
{
- setInterval(loop, 25);
+ setInterval(loop, 25);
}
// .. ACTIONS
@@ -103,7 +103,7 @@ function onDocumentMouseMove()
isPlaying = true;
play();
}
-
+
mouseX = window.event.clientX;
mouseY = window.event.clientY;
}
@@ -117,7 +117,7 @@ function onDocumentDoubleClick()
world.DestroyBody(body);
body = null;
}
-
+
resultBodies = new Array();
}
@@ -130,7 +130,7 @@ function onDocumentKeyPress(e)
function onElementMouseDown()
{
mouseOnClick[0] = window.event.clientX;
- mouseOnClick[1] = window.event.clientY;
+ mouseOnClick[1] = window.event.clientY;
return false;
}
@@ -142,10 +142,10 @@ function onElementMouseUp()
function onElementClick()
{
var range = 5;
-
+
if (mouseOnClick[0] > window.event.clientX + range || mouseOnClick[0] < window.event.clientX - range && mouseOnClick[1] > window.event.clientY + range || mouseOnClick[1] < window.event.clientY - range)
return false;
-
+
if (this == document.getElementById('btnG')) search();
if (this == document.getElementById('btnI')) imFeelingLucky();
if (this == document.getElementById('q')) document.f.q.focus();
@@ -160,23 +160,23 @@ function loop()
delta[0] += (0 - delta[0]) * .5;
delta[1] += (0 - delta[1]) * .5;
-
+
world.m_gravity.x = delta[0] + gforce[0];
world.m_gravity.y = delta[1] + gforce[1];
mouseDrag();
- world.Step(timeStep, iterations);
-
+ world.Step(timeStep, iterations);
+
for (i = 0; i < elements.length; i++)
{
var element = elements[i];
-
+
element.style['left'] = (bodies[i].m_position0.x - (properties[i][2] >> 1)) + 'px';
element.style['top'] = (bodies[i].m_position0.y - (properties[i][3] >> 1)) + 'px';
-
+
// webkit
element.style['-webkit-transform'] = 'rotate(' + (bodies[i].m_rotation0 * 57.2957795) + 'deg)';
-
+
// gecko
element.style['MozTransform'] = 'rotate(' + (bodies[i].m_rotation0 * 57.2957795) + 'deg)';
@@ -207,7 +207,7 @@ function mouseDrag()
if (isMouseDown && !mouseJoint)
{
var body = getBodyAtMouse();
-
+
if (body)
{
var md = new b2MouseJointDef();
@@ -220,7 +220,7 @@ function mouseDrag()
body.WakeUp();
}
}
-
+
// mouse release
if (!isMouseDown)
{
@@ -230,7 +230,7 @@ function mouseDrag()
mouseJoint = null;
}
}
-
+
// mouse move
if (mouseJoint)
{
@@ -244,7 +244,7 @@ function getBodyAtMouse()
// Make a small box.
var mousePVec = new b2Vec2();
mousePVec.Set(mouseX, mouseY);
-
+
var aabb = new b2AABB();
aabb.minVertex.Set(mouseX - 1, mouseY - 1);
aabb.maxVertex.Set(mouseX + 1, mouseY + 1);
@@ -254,7 +254,7 @@ function getBodyAtMouse()
var shapes = new Array();
var count = world.Query(aabb, shapes, k_maxCount);
var body = null;
-
+
for (var i = 0; i < count; ++i)
{
if (shapes[i].m_body.IsStatic() == false)
@@ -277,18 +277,18 @@ function setWalls()
world.DestroyBody(walls[1]);
world.DestroyBody(walls[2]);
world.DestroyBody(walls[3]);
-
- walls[0] = null;
+
+ walls[0] = null;
walls[1] = null;
walls[2] = null;
walls[3] = null;
}
-
+
walls[0] = createBox(world, stage[2] / 2, - wall_thickness, stage[2], wall_thickness);
walls[1] = createBox(world, stage[2] / 2, stage[3] + wall_thickness, stage[2], wall_thickness);
walls[2] = createBox(world, - wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
- walls[3] = createBox(world, stage[2] + wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
-
+ walls[3] = createBox(world, stage[2] + wall_thickness, stage[3] / 2, wall_thickness, stage[3]);
+
wallsSetted = true;
}
@@ -327,32 +327,32 @@ function findPos(obj)
function getBrowserDimensions()
{
var changed = false;
-
+
if (stage[0] != window.screenX)
{
delta[0] = (window.screenX - stage[0]) * 50;
stage[0] = window.screenX;
changed = true;
}
-
+
if (stage[1] != window.screenY)
{
delta[1] = (window.screenY - stage[1]) * 50;
stage[1] = window.screenY;
changed = true;
}
-
+
if (stage[2] != window.innerWidth)
{
stage[2] = window.innerWidth;
changed = true;
}
-
+
if (stage[3] != window.innerHeight)
{
stage[3] = window.innerHeight;
changed = true;
}
-
+
return changed;
-}
+}
diff --git a/public/static/ben/visual/grav/box2d.js b/public/static/ben/visual/grav/box2d.js
index 8b84f83..083209e 100644
--- a/public/static/ben/visual/grav/box2d.js
+++ b/public/static/ben/visual/grav/box2d.js
@@ -1,4 +1,4 @@
-/*
+/*
* Box2Djs (port of Box2DFlash 1.4.3.1) - http://box2d-js.sourceforge.net/
* Single-filed and jsmined ( http://code.google.com/p/jsmin-php/ ) by Mr.doob
*/
diff --git a/public/static/fancybox/jquery.easing-1.3.pack.js b/public/static/fancybox/jquery.easing-1.3.pack.js
index 9028179..6ec1769 100644
--- a/public/static/fancybox/jquery.easing-1.3.pack.js
+++ b/public/static/fancybox/jquery.easing-1.3.pack.js
@@ -5,33 +5,33 @@
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
- *
- * Open source under the BSD License.
- *
+ *
+ * Open source under the BSD License.
+ *
* Copyright © 2008 George McGinley Smith
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
@@ -41,32 +41,32 @@ eval(function(p,a,c,k,e,r){e=function(c){return(c
0 || this.x < this.maxScrollX) {
+ if (this.x > 0 || this.x < this.maxScrollX) {
leftDelta = Math.round(leftDelta / 4); // Slow down if outside of the boundaries
}
- if (this.y > 0 || this.y < this.maxScrollY) {
+ if (this.y > 0 || this.y < this.maxScrollY) {
topDelta = Math.round(topDelta / 4); // Slow down if outside of the boundaries
}
@@ -175,7 +175,7 @@ iScroll.prototype = {
this.scrollStartTime = e.timeStamp;
}
},
-
+
onTouchEnd: function(e) {
if (e.targetTouches.length > 0) {
return false;
@@ -184,10 +184,10 @@ iScroll.prototype = {
if (!this.moved) {
var theEvent = document.createEvent('MouseEvents');
theEvent.initMouseEvent("click", true, true, document.defaultView, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null);
- e.changedTouches[0].target.dispatchEvent(theEvent);
+ e.changedTouches[0].target.dispatchEvent(theEvent);
return false;
}
-
+
var time = e.timeStamp - this.scrollStartTime;
var momentumX = this.scrollX === true
@@ -219,13 +219,13 @@ iScroll.prototype = {
// Move the scrollbars
if (this.scrollBarX) {
- this.scrollBarX.scrollTo(this.scrollBarX.maxScroll / this.maxScrollX * newPositionX, newDuration + 'ms');
- }
+ this.scrollBarX.scrollTo(this.scrollBarX.maxScroll / this.maxScrollX * newPositionX, newDuration + 'ms');
+ }
if (this.scrollBarY) {
this.scrollBarY.scrollTo(this.scrollBarY.maxScroll / this.maxScrollY * newPositionY, newDuration + 'ms');
}
},
-
+
onTransitionEnd: function () {
this.element.removeEventListener('webkitTransitionEnd', this);
this.resetPosition();
@@ -254,7 +254,7 @@ iScroll.prototype = {
if (this.scrollBarX) {
this.scrollBarX.scrollTo(this.scrollBarX.maxScroll / this.maxScrollX * (resetX || this.x), '500ms');
- }
+ }
if (this.scrollBarY) {
this.scrollBarY.scrollTo(this.scrollBarY.maxScroll / this.maxScrollY * (resetY || this.y), '500ms');
}
@@ -273,7 +273,7 @@ iScroll.prototype = {
var speed = Math.abs(dist) / time * 1000;
var newDist = speed * speed / (20 * friction) / 1000;
- // Proportinally reduce speed if we are outside of the boundaries
+ // Proportinally reduce speed if we are outside of the boundaries
if (dist > 0 && maxDist1 !== undefined && newDist > maxDist1) {
speed = speed * maxDist1 / newDist;
newDist = maxDist1;
@@ -282,9 +282,9 @@ iScroll.prototype = {
speed = speed * maxDist2 / newDist;
newDist = maxDist2;
}
-
+
newDist = newDist * (dist < 0 ? -1 : 1);
-
+
var newTime = -speed / -deceleration;
if (newTime < 1) { // We can't go back in time
newTime = 1;
@@ -313,7 +313,7 @@ scrollbar.prototype = {
maxSize: 0,
maxScroll: 0,
visible: false,
-
+
init: function (scroll, size) {
var offset = this.dir == 'horizontal' ? this.bar.offsetWidth - this.bar.clientWidth : this.bar.offsetHeight - this.bar.clientHeight;
this.maxSize = scroll - 8; // 8 = distance from top + distance from bottom
@@ -321,7 +321,7 @@ scrollbar.prototype = {
this.maxScroll = this.maxSize - this.size;
this.bar.style[this.dir == 'horizontal' ? 'width' : 'height'] = (this.size - offset) + 'px';
},
-
+
setPosition: function (pos) {
if (pos < 0) {
pos = 0;
@@ -332,12 +332,12 @@ scrollbar.prototype = {
pos = this.dir == 'horizontal' ? 'translate3d(' + Math.round(pos) + 'px,0,0)' : 'translate3d(0,' + Math.round(pos) + 'px,0)';
this.bar.style.webkitTransform = pos;
},
-
+
scrollTo: function (pos, runtime) {
this.bar.style.webkitTransitionDuration = (runtime || '400ms') + ',250ms';
this.setPosition(pos);
},
-
+
show: function () {
this.visible = true;
this.bar.style.opacity = '1';
@@ -347,7 +347,7 @@ scrollbar.prototype = {
this.visible = false;
this.bar.style.opacity = '0';
},
-
+
remove: function () {
this.bar.parentNode.removeChild(this.bar);
return null;
diff --git a/public/static/jqplugs/jqModal.js b/public/static/jqplugs/jqModal.js
index 3aac816..cb760fb 100644
--- a/public/static/jqplugs/jqModal.js
+++ b/public/static/jqplugs/jqModal.js
@@ -6,7 +6,7 @@
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
- *
+ *
* $Version: 03/01/2009 +r14
*/
(function($) {
@@ -49,7 +49,7 @@ open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-i
r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));
- if(c.toTop&&h.o)h.w.before(' ').insertAfter(h.o);
+ if(c.toTop&&h.o)h.w.before(' ').insertAfter(h.o);
(c.onShow)?c.onShow(h):h.w.show();e(h);return F;
},
close:function(s){var h=H[s];if(!h.a)return F;h.a=F;
diff --git a/public/static/jquery-1.4.2.js b/public/static/jquery-1.4.2.js
index fff6776..244bda4 100644
--- a/public/static/jquery-1.4.2.js
+++ b/public/static/jquery-1.4.2.js
@@ -54,10 +54,10 @@ var jQuery = function( selector, context ) {
// For matching the engine and version of the browser
browserMatch,
-
+
// Has the ready events already been bound?
readyBound = false,
-
+
// The functions to execute on DOM ready
readyList = [],
@@ -86,7 +86,7 @@ jQuery.fn = jQuery.prototype = {
this.length = 1;
return this;
}
-
+
// The body element only exists once, optimize finding it
if ( selector === "body" && !context ) {
this.context = document;
@@ -125,9 +125,9 @@ jQuery.fn = jQuery.prototype = {
ret = buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
}
-
+
return jQuery.merge( this, selector );
-
+
// HANDLE: $("#id")
} else {
elem = document.getElementById( match[2] );
@@ -218,7 +218,7 @@ jQuery.fn = jQuery.prototype = {
if ( jQuery.isArray( elems ) ) {
push.apply( ret, elems );
-
+
} else {
jQuery.merge( ret, elems );
}
@@ -244,7 +244,7 @@ jQuery.fn = jQuery.prototype = {
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
-
+
ready: function( fn ) {
// Attach the listeners
jQuery.bindReady();
@@ -262,7 +262,7 @@ jQuery.fn = jQuery.prototype = {
return this;
},
-
+
eq: function( i ) {
return i === -1 ?
this.slice( i ) :
@@ -287,7 +287,7 @@ jQuery.fn = jQuery.prototype = {
return callback.call( elem, i, elem );
}));
},
-
+
end: function() {
return this.prevObject || jQuery(null);
},
@@ -368,10 +368,10 @@ jQuery.extend({
return jQuery;
},
-
+
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
-
+
// Handle when the DOM is ready
ready: function() {
// Make sure that the DOM is not already loaded
@@ -402,7 +402,7 @@ jQuery.extend({
}
}
},
-
+
bindReady: function() {
if ( readyBound ) {
return;
@@ -420,7 +420,7 @@ jQuery.extend({
if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
+
// A fallback to window.onload, that will always work
window.addEventListener( "load", jQuery.ready, false );
@@ -429,7 +429,7 @@ jQuery.extend({
// ensure firing before onload,
// maybe late but safe also for iframes
document.attachEvent("onreadystatechange", DOMContentLoaded);
-
+
// A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready );
@@ -465,20 +465,20 @@ jQuery.extend({
if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
return false;
}
-
+
// Not own constructor property must be Object
if ( obj.constructor
&& !hasOwnProperty.call(obj, "constructor")
&& !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
-
+
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
-
+
var key;
for ( key in obj ) {}
-
+
return key === undefined || hasOwnProperty.call( obj, key );
},
@@ -488,11 +488,11 @@ jQuery.extend({
}
return true;
},
-
+
error: function( msg ) {
throw msg;
},
-
+
parseJSON: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
@@ -500,7 +500,7 @@ jQuery.extend({
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );
-
+
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
@@ -627,7 +627,7 @@ jQuery.extend({
for ( var l = second.length; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
-
+
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
@@ -794,7 +794,7 @@ function evalScript( i, elem ) {
// The value/s can be optionally by executed if its a function
function access( elems, key, value, exec, fn, pass ) {
var length = elems.length;
-
+
// Setting many attributes
if ( typeof key === "object" ) {
for ( var k in key ) {
@@ -802,19 +802,19 @@ function access( elems, key, value, exec, fn, pass ) {
}
return elems;
}
-
+
// Setting one attribute
if ( value !== undefined ) {
// Optionally, function values get executed if exec is true
exec = !pass && exec && jQuery.isFunction(value);
-
+
for ( var i = 0; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
}
-
+
return elems;
}
-
+
// Getting an attribute
return length ? fn( elems[0], key ) : undefined;
}
@@ -909,7 +909,7 @@ function now() {
// Fails in Internet Explorer
try {
delete script.test;
-
+
} catch(e) {
jQuery.support.deleteExpando = false;
}
@@ -950,20 +950,20 @@ function now() {
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
- var eventSupported = function( eventName ) {
- var el = document.createElement("div");
- eventName = "on" + eventName;
-
- var isSupported = (eventName in el);
- if ( !isSupported ) {
- el.setAttribute(eventName, "return;");
- isSupported = typeof el[eventName] === "function";
- }
- el = null;
-
- return isSupported;
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
};
-
+
jQuery.support.submitBubbles = eventSupported("submit");
jQuery.support.changeBubbles = eventSupported("change");
@@ -987,7 +987,7 @@ var expando = "jQuery" + now(), uuid = 0, windowData = {};
jQuery.extend({
cache: {},
-
+
expando:expando,
// The following elements throw uncatchable exceptions if you
@@ -1014,7 +1014,7 @@ jQuery.extend({
}
// Compute a unique ID for the element
- if ( !id ) {
+ if ( !id ) {
id = ++uuid;
}
@@ -1384,7 +1384,7 @@ jQuery.fn.extend({
if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
return elem.getAttribute("value") === null ? "on" : elem.value;
}
-
+
// Everything else, we just grab the value
return (elem.value || "").replace(rreturn, "");
@@ -1445,7 +1445,7 @@ jQuery.extend({
height: true,
offset: true
},
-
+
attr: function( elem, name, value, pass ) {
// don't set attributes on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
@@ -1474,7 +1474,7 @@ jQuery.extend({
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;
-
+
// Make sure that it also works with optgroups, see #5701
if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
@@ -1651,9 +1651,9 @@ jQuery.event = {
}
}
}
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
@@ -1720,7 +1720,7 @@ jQuery.event = {
namespaces = type.split(".");
type = namespaces.shift();
- namespace = new RegExp("(^|\\.)" +
+ namespace = new RegExp("(^|\\.)" +
jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)")
}
@@ -1873,7 +1873,7 @@ jQuery.event = {
isClick = jQuery.nodeName(target, "a") && type === "click",
special = jQuery.event.special[ type ] || {};
- if ( (!special._default || special._default.call( elem, event ) === false) &&
+ if ( (!special._default || special._default.call( elem, event ) === false) &&
!isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
try {
@@ -1932,7 +1932,7 @@ jQuery.event = {
event.handler = handleObj.handler;
event.data = handleObj.data;
event.handleObj = handleObj;
-
+
var ret = handleObj.handler.apply( this, arguments );
if ( ret !== undefined ) {
@@ -2026,13 +2026,13 @@ jQuery.event = {
live: {
add: function( handleObj ) {
- jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) );
+ jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) );
},
remove: function( handleObj ) {
var remove = true,
type = handleObj.origType.replace(rnamespaces, "");
-
+
jQuery.each( jQuery.data(this, "events").live || [], function() {
if ( type === this.origType.replace(rnamespaces, "") ) {
remove = false;
@@ -2068,7 +2068,7 @@ jQuery.event = {
var removeEvent = document.removeEventListener ?
function( elem, type, handle ) {
elem.removeEventListener( type, handle, false );
- } :
+ } :
function( elem, type, handle ) {
elem.detachEvent( "on" + type, handle );
};
@@ -2113,7 +2113,7 @@ jQuery.Event.prototype = {
if ( !e ) {
return;
}
-
+
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
@@ -2205,7 +2205,7 @@ if ( !jQuery.support.submitBubbles ) {
return trigger( "submit", this, arguments );
}
});
-
+
jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
var elem = e.target, type = elem.type;
@@ -2267,7 +2267,7 @@ if ( !jQuery.support.changeBubbles ) {
if ( e.type !== "focusout" || elem.type !== "radio" ) {
jQuery.data( elem, "_change_data", val );
}
-
+
if ( data === undefined || val === data ) {
return;
}
@@ -2280,7 +2280,7 @@ if ( !jQuery.support.changeBubbles ) {
jQuery.event.special.change = {
filters: {
- focusout: testChange,
+ focusout: testChange,
click: function( e ) {
var elem = e.target, type = elem.type;
@@ -2344,13 +2344,13 @@ if ( document.addEventListener ) {
jQuery.event.special[ fix ] = {
setup: function() {
this.addEventListener( orig, handler, true );
- },
- teardown: function() {
+ },
+ teardown: function() {
this.removeEventListener( orig, handler, true );
}
};
- function handler( e ) {
+ function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
return jQuery.event.handle.call( this, e );
@@ -2367,7 +2367,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
}
return this;
}
-
+
if ( jQuery.isFunction( data ) ) {
fn = data;
data = undefined;
@@ -2407,20 +2407,20 @@ jQuery.fn.extend({
return this;
},
-
+
delegate: function( selector, types, data, fn ) {
return this.live( types, data, fn, selector );
},
-
+
undelegate: function( selector, types, fn ) {
if ( arguments.length === 0 ) {
return this.unbind( "live" );
-
+
} else {
return this.die( types, null, fn, selector );
}
},
-
+
trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
@@ -2520,7 +2520,7 @@ jQuery.each(["live", "die"], function( i, name ) {
context.unbind( liveConvert( type, selector ), fn );
}
}
-
+
return this;
}
});
@@ -2651,20 +2651,20 @@ var Sizzle = function(selector, context, results, seed) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
-
+
if ( !selector || typeof selector !== "string" ) {
return results;
}
var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
soFar = selector;
-
+
// Reset the position of the chunker regexp (start from head)
while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
soFar = m[3];
-
+
parts.push( m[1] );
-
+
if ( m[2] ) {
extra = m[3];
break;
@@ -2685,7 +2685,7 @@ var Sizzle = function(selector, context, results, seed) {
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
-
+
set = posProcess( selector, set );
}
}
@@ -2796,7 +2796,7 @@ Sizzle.find = function(expr, context, isXML){
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
var type = Expr.order[i], match;
-
+
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
match.splice(1,1);
@@ -3070,7 +3070,7 @@ var Expr = Sizzle.selectors = {
},
ATTR: function(match, curLoop, inplace, result, not, isXML){
var name = match[1].replace(/\\/g, "");
-
+
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
@@ -3096,7 +3096,7 @@ var Expr = Sizzle.selectors = {
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
-
+
return match;
},
POS: function(match){
@@ -3217,18 +3217,18 @@ var Expr = Sizzle.selectors = {
case 'only':
case 'first':
while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
- if ( type === "first" ) {
- return true;
+ if ( type === "first" ) {
+ return true;
}
node = elem;
case 'last':
while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
return true;
@@ -3238,20 +3238,20 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) {
return true;
}
-
+
var doneName = match[0],
parent = elem.parentNode;
-
+
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
- }
+ }
parent.sizcache = doneName;
}
-
+
var diff = elem.nodeIndex - last;
if ( first === 0 ) {
return diff === 0;
@@ -3327,7 +3327,7 @@ var makeArray = function(array, results) {
results.push.apply( results, array );
return results;
}
-
+
return array;
};
@@ -3519,7 +3519,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
-
+
Sizzle = function(query, context, extra, seed){
context = context || document;
@@ -3530,7 +3530,7 @@ if ( document.querySelectorAll ) {
return makeArray( context.querySelectorAll(query), extra );
} catch(e){}
}
-
+
return oldSizzle(query, context, extra, seed);
};
@@ -3559,7 +3559,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
-
+
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function(match, context, isXML) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@@ -3647,7 +3647,7 @@ var contains = document.compareDocumentPosition ? function(a, b){
var isXML = function(elem){
// documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
+ // (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
@@ -3763,7 +3763,7 @@ jQuery.fn.extend({
filter: function( selector ) {
return this.pushStack( winnow(this, selector, true), "filter", selector );
},
-
+
is: function( selector ) {
return !!selector && jQuery.filter( selector, this ).length > 0;
},
@@ -3777,7 +3777,7 @@ jQuery.fn.extend({
selector = selectors[i];
if ( !matches[selector] ) {
- matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
jQuery( selector, context || this.context ) :
selector;
}
@@ -3799,7 +3799,7 @@ jQuery.fn.extend({
return ret;
}
- var pos = jQuery.expr.match.POS.test( selectors ) ?
+ var pos = jQuery.expr.match.POS.test( selectors ) ?
jQuery( selectors, context || this.context ) : null;
return this.map(function( i, cur ) {
@@ -3812,7 +3812,7 @@ jQuery.fn.extend({
return null;
});
},
-
+
// Determine the position of an element within
// the matched set of elements
index: function( elem ) {
@@ -3893,7 +3893,7 @@ jQuery.each({
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
-
+
if ( !runtil.test( name ) ) {
selector = until;
}
@@ -3920,7 +3920,7 @@ jQuery.extend({
return jQuery.find.matches(expr, elems);
},
-
+
dir: function( elem, dir, until ) {
var matched = [], cur = elem[dir];
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
@@ -4108,7 +4108,7 @@ jQuery.fn.extend({
return set;
}
},
-
+
// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
@@ -4123,7 +4123,7 @@ jQuery.fn.extend({
}
}
}
-
+
return this;
},
@@ -4139,7 +4139,7 @@ jQuery.fn.extend({
elem.removeChild( elem.firstChild );
}
}
-
+
return this;
},
@@ -4286,9 +4286,9 @@ jQuery.fn.extend({
} else {
results = buildFragment( args, this, scripts );
}
-
+
fragment = results.fragment;
-
+
if ( fragment.childNodes.length === 1 ) {
first = fragment = fragment.firstChild;
} else {
@@ -4393,18 +4393,18 @@ jQuery.each({
jQuery.fn[ name ] = function( selector ) {
var ret = [], insert = jQuery( selector ),
parent = this.length === 1 && this[0].parentNode;
-
+
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
-
+
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = (i > 0 ? this.clone(true) : this).get();
jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
ret = ret.concat( elems );
}
-
+
return this.pushStack( ret, name, insert.selector );
}
};
@@ -4492,7 +4492,7 @@ jQuery.extend({
for ( var i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
-
+
} else {
if ( ret[i].nodeType === 1 ) {
ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
@@ -4504,18 +4504,18 @@ jQuery.extend({
return ret;
},
-
+
cleanData: function( elems ) {
var data, id, cache = jQuery.cache,
special = jQuery.event.special,
deleteExpando = jQuery.support.deleteExpando;
-
+
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
id = elem[ jQuery.expando ];
-
+
if ( id ) {
data = cache[ id ];
-
+
if ( data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
@@ -4526,14 +4526,14 @@ jQuery.extend({
}
}
}
-
+
if ( deleteExpando ) {
delete elem[ jQuery.expando ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( jQuery.expando );
}
-
+
delete cache[ id ];
}
}
@@ -4566,7 +4566,7 @@ jQuery.fn.css = function( name, value ) {
if ( value === undefined ) {
return jQuery.curCSS( elem, name );
}
-
+
if ( typeof value === "number" && !rexclude.test(name) ) {
value += "px";
}
@@ -4974,7 +4974,7 @@ jQuery.extend({
ajax: function( origSettings ) {
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
-
+
var jsonp, status, data,
callbackContext = origSettings && origSettings.context || s,
type = s.type.toUpperCase();
@@ -5289,7 +5289,7 @@ jQuery.extend({
jQuery.event.trigger( "ajaxStop" );
}
}
-
+
function trigger(type, args) {
(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
}
@@ -5377,19 +5377,19 @@ jQuery.extend({
// key/values into a query string
param: function( a, traditional ) {
var s = [];
-
+
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings.traditional;
}
-
+
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray(a) || a.jquery ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
});
-
+
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
@@ -5419,13 +5419,13 @@ jQuery.extend({
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
}
});
-
+
} else if ( !traditional && obj != null && typeof obj === "object" ) {
// Serialize object item.
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v );
});
-
+
} else {
// Serialize scalar item.
add( prefix, obj );
@@ -5876,12 +5876,12 @@ jQuery.extend( jQuery.fx, {
jQuery.fx.stop();
}
},
-
+
stop: function() {
clearInterval( timerId );
timerId = null;
},
-
+
speeds: {
slow: 600,
fast: 200,
@@ -5925,7 +5925,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -5951,7 +5951,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -6059,7 +6059,7 @@ jQuery.offset = {
return { top: top, left: left };
},
-
+
setOffset: function( elem, options, i ) {
// set position first, in-case top/left are set even on static elem
if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
@@ -6078,7 +6078,7 @@ jQuery.offset = {
top: (options.top - curOffset.top) + curTop,
left: (options.left - curOffset.left) + curLeft
};
-
+
if ( "using" in options ) {
options.using.call( elem, props );
} else {
@@ -6138,7 +6138,7 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
jQuery.fn[ method ] = function(val) {
var elem = this[0], win;
-
+
if ( !elem ) {
return null;
}
@@ -6202,7 +6202,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
if ( !elem ) {
return size == null ? null : this;
}
-
+
if ( jQuery.isFunction( size ) ) {
return this.each(function( i ) {
var self = jQuery( this );
diff --git a/public/static/jquery-ui-1.8rc3.custom.css b/public/static/jquery-ui-1.8rc3.custom.css
index 7c709d6..583d06d 100644
--- a/public/static/jquery-ui-1.8rc3.custom.css
+++ b/public/static/jquery-ui-1.8rc3.custom.css
@@ -306,7 +306,7 @@
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
----------------------------------*/
-.ui-autocomplete { position: absolute; cursor: default; }
+.ui-autocomplete { position: absolute; cursor: default; }
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
/* workarounds */
@@ -344,8 +344,8 @@
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3em; }
-button.ui-button-icons-only { width: 3.2em; }
+.ui-button-icons-only { width: 3em; }
+button.ui-button-icons-only { width: 3.2em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
@@ -377,7 +377,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
----------------------------------*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
@@ -427,7 +427,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
diff --git a/public/static/jquery.hotkeys.js b/public/static/jquery.hotkeys.js
index fbd71c7..ae34d82 100644
--- a/public/static/jquery.hotkeys.js
+++ b/public/static/jquery.hotkeys.js
@@ -11,23 +11,23 @@
*/
(function(jQuery){
-
+
jQuery.hotkeys = {
version: "0.8",
specialKeys: {
8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
+ 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
+ 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
+ 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
},
-
+
shiftNums: {
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
+ "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
+ "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
".": ">", "/": "?", "\\": "|"
}
};
@@ -37,17 +37,17 @@
if ( typeof handleObj.data !== "string" ) {
return;
}
-
+
var origHandler = handleObj.handler,
keys = handleObj.data.toLowerCase().split(" ");
-
+
handleObj.handler = function( event ) {
// Don't fire in text-accepting inputs that we didn't directly bind to
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
event.target.type === "text") ) {
return;
}
-
+
// Keypress represents characters, not special keys
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
character = String.fromCharCode( event.which ).toLowerCase(),
@@ -61,7 +61,7 @@
if ( event.ctrlKey && special !== "ctrl" ) {
modif += "ctrl+";
}
-
+
// TODO: Need to make sure this works consistently across platforms
if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
modif += "meta+";
diff --git a/public/static/jquery.jplayer.js b/public/static/jquery.jplayer.js
index c0998eb..1dc773e 100644
--- a/public/static/jquery.jplayer.js
+++ b/public/static/jquery.jplayer.js
@@ -27,11 +27,11 @@
// Adapted from ui.core.js (1.7.2) $.widget() "create plugin method"
// $.data() info at http://docs.jquery.com/Internals/jQuery.data
$.fn.jPlayer = function(options) {
-
+
var name = "jPlayer";
var isMethodCall = (typeof options == 'string');
var args = Array.prototype.slice.call(arguments, 1);
-
+
// prevent calls to internal methods
if (isMethodCall && options.substring(0, 1) == '_') {
return this;
@@ -57,14 +57,14 @@
instance[options].apply(instance, args));
});
};
-
+
$.jPlayer = function(element, options) {
this.options = $.extend({}, options);
this.element = $(element);
};
-
+
$.jPlayer.getter = "jPlayerOnProgressChange jPlayerOnSoundComplete jPlayerVolume jPlayerReady getData jPlayerController";
-
+
$.jPlayer.defaults = {
cssPrefix: "jqjp",
swfPath: "js",
@@ -115,7 +115,7 @@
volumeBar: "jplayer_volume_bar",
volumeBarValue: "jplayer_volume_bar_value"
};
-
+
$.jPlayer.count = 0;
$.jPlayer.timeFormat = {
@@ -129,7 +129,7 @@
sepMin: ":",
sepSec: ""
};
-
+
$.jPlayer.convertTime = function(mSec) {
var myTime = new Date(mSec);
var hour = myTime.getUTCHours();
@@ -140,19 +140,19 @@
var strSec = ($.jPlayer.timeFormat.padSec && sec < 10) ? "0" + sec : sec;
return (($.jPlayer.timeFormat.showHour) ? strHour + $.jPlayer.timeFormat.sepHour : "") + (($.jPlayer.timeFormat.showMin) ? strMin + $.jPlayer.timeFormat.sepMin : "") + (($.jPlayer.timeFormat.showSec) ? strSec + $.jPlayer.timeFormat.sepSec : "");
};
-
+
$.jPlayer.prototype = {
_init: function() {
var self = this;
var element = this.element;
-
+
this.config = $.extend({}, $.jPlayer.defaults, this.options, $.jPlayer._config);
this.config.diag = $.extend({}, $.jPlayer._diag);
this.config.cssId = {};
this.config.cssSelector = {};
this.config.cssDisplay = {};
this.config.clickHandler = {};
-
+
this.element.data("jPlayer.config", this.config);
$.extend(this.config, {
@@ -174,7 +174,7 @@
this._warning("Constructor's ready option is not a function.");
}
}
-
+
try {
this.config.audio = new Audio();
this.config.audio.id = this.config.aid;
@@ -182,7 +182,7 @@
} catch(err) {
this.config.audio = {};
}
-
+
$.extend(this.config, {
canPlayMP3: !!((this.config.audio.canPlayType) ? (("" != this.config.audio.canPlayType("audio/mpeg")) && ("no" != this.config.audio.canPlayType("audio/mpeg"))) : false),
canPlayOGG: !!((this.config.audio.canPlayType) ? (("" != this.config.audio.canPlayType("audio/ogg")) && ("no" != this.config.audio.canPlayType("audio/ogg"))) : false),
@@ -213,7 +213,7 @@
if(playing) {
self.config.isWaitingForPlay = false;
}
-
+
}
};
@@ -284,7 +284,7 @@
self.config.aSel = $("#"+self.config.aid);
if(self.config.usingMP3) {
self.config.diag.src = mp3;
- } else {
+ } else {
self.config.diag.src = ogg;
}
self.config.isWaitingForPlay = true;
@@ -382,7 +382,7 @@
} else {
$.extend(events, eventsForHtmlAudio);
}
-
+
for(var event in events) {
var e = "jPlayer." + event;
this.element.unbind(e);
@@ -398,14 +398,14 @@
html_obj += ' type="application/x-shockwave-flash"';
html_obj += ' width="' + this.config.width + '" height="' + this.config.height + '">';
html_obj += '';
-
+
var obj_param = new Array();
obj_param[0] = ' ';
obj_param[1] = ' ';
obj_param[2] = ' ';
obj_param[3] = ' ';
obj_param[4] = ' ';
-
+
var ie_dom = document.createElement(html_obj);
for(var i=0; i < obj_param.length; i++) {
ie_dom.appendChild(document.createElement(obj_param[i]));
@@ -419,18 +419,18 @@
html_embed += ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
this.element.html(html_embed);
}
-
+
} else {
this.element.html("Flash 8 or above is not installed. Get Flash!
");
}
}
this.element.css({'position':this.config.position, 'top':this.config.top, 'left':this.config.left});
-
+
if(this.config.graphicsFix) {
var html_hidden = '
';
this.element.append(html_hidden);
-
+
$.extend(this.config, {
hSel: $("#"+this.config.hid)
});
@@ -576,7 +576,7 @@
} else if(!this.config.diag.isPlaying && lp >= 100) {
clearInterval(this.config.jPlayerControllerId);
}
-
+
if(override) {
this.jPlayerOnProgressChange(lp, 0, 0, 0, tt);
} else {
@@ -648,7 +648,7 @@
flashIsInstalled = true;
}
catch(e){
- // Throws an error if the version isn't available
+ // Throws an error if the version isn't available
}
}
else if(navigator.plugins && navigator.mimeTypes.length > 0){
diff --git a/public/static/jquery.livequery.js b/public/static/jquery.livequery.js
index dde8ad8..ea5899c 100644
--- a/public/static/jquery.livequery.js
+++ b/public/static/jquery.livequery.js
@@ -1,5 +1,5 @@
/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.0.3
@@ -8,15 +8,15 @@
*/
(function($) {
-
+
$.extend($.fn, {
livequery: function(type, fn, fn2) {
var self = this, q;
-
+
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
-
+
// See if Live Query already exists
$.each( $.livequery.queries, function(i, query) {
if ( self.selector == query.selector && self.context == query.context &&
@@ -24,34 +24,34 @@ $.extend($.fn, {
// Found the query, exit the each loop
return (q = query) && false;
});
-
+
// Create new Live Query if it wasn't found
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
-
+
// Make sure it is running
q.stopped = false;
-
+
// Run it immediately for the first time
q.run();
-
+
// Contnue the chain
return this;
},
-
+
expire: function(type, fn, fn2) {
var self = this;
-
+
// Handle different call patterns
if ($.isFunction(type))
fn2 = fn, fn = type, type = undefined;
-
+
// Find the Live Query based on arguments and stop it
$.each( $.livequery.queries, function(i, query) {
- if ( self.selector == query.selector && self.context == query.context &&
+ if ( self.selector == query.selector && self.context == query.context &&
(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
$.livequery.stop(query.id);
});
-
+
// Continue the chain
return this;
}
@@ -65,14 +65,14 @@ $.livequery = function(selector, context, type, fn, fn2) {
this.fn2 = fn2;
this.elements = [];
this.stopped = false;
-
+
// The id is the index of the Live Query in $.livequery.queries
this.id = $.livequery.queries.push(this)-1;
-
+
// Mark the functions for matching later on
fn.$lqguid = fn.$lqguid || $.livequery.guid++;
if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
-
+
// Return the Live Query
return this;
};
@@ -80,7 +80,7 @@ $.livequery = function(selector, context, type, fn, fn2) {
$.livequery.prototype = {
stop: function() {
var query = this;
-
+
if ( this.type )
// Unbind all bound events
this.elements.unbind(this.type, this.fn);
@@ -89,30 +89,30 @@ $.livequery.prototype = {
this.elements.each(function(i, el) {
query.fn2.apply(el);
});
-
+
// Clear out matched elements
this.elements = [];
-
+
// Stop the Live Query from running until restarted
this.stopped = true;
},
-
+
run: function() {
// Short-circuit if stopped
if ( this.stopped ) return;
var query = this;
-
+
var oEls = this.elements,
els = $(this.selector, this.context),
nEls = els.not(oEls);
-
+
// Set elements to the latest set of matched elements
this.elements = els;
-
+
if (this.type) {
// Bind events to newly matched elements
nEls.bind(this.type, this.fn);
-
+
// Unbind events to elements no longer matched
if (oEls.length > 0)
$.each(oEls, function(i, el) {
@@ -125,7 +125,7 @@ $.livequery.prototype = {
nEls.each(function() {
query.fn.apply(this);
});
-
+
// Call the second function for elements no longer matched
if ( this.fn2 && oEls.length > 0 )
$.each(oEls, function(i, el) {
@@ -142,7 +142,7 @@ $.extend($.livequery, {
queue: [],
running: false,
timeout: null,
-
+
checkQueue: function() {
if ( $.livequery.running && $.livequery.queue.length ) {
var length = $.livequery.queue.length;
@@ -151,41 +151,41 @@ $.extend($.livequery, {
$.livequery.queries[ $.livequery.queue.shift() ].run();
}
},
-
+
pause: function() {
// Don't run anymore Live Queries until restarted
$.livequery.running = false;
},
-
+
play: function() {
// Restart Live Queries
$.livequery.running = true;
// Request a run of the Live Queries
$.livequery.run();
},
-
+
registerPlugin: function() {
$.each( arguments, function(i,n) {
// Short-circuit if the method doesn't exist
if (!$.fn[n]) return;
-
+
// Save a reference to the original method
var old = $.fn[n];
-
+
// Create a new method
$.fn[n] = function() {
// Call the original method
var r = old.apply(this, arguments);
-
+
// Request a run of the Live Queries
$.livequery.run();
-
+
// Return the original methods result
return r;
}
});
},
-
+
run: function(id) {
if (id != undefined) {
// Put the particular Live Query in the queue if it doesn't already exist
@@ -198,13 +198,13 @@ $.extend($.livequery, {
if ( $.inArray(id, $.livequery.queue) < 0 )
$.livequery.queue.push( id );
});
-
+
// Clear timeout if it already exists
if ($.livequery.timeout) clearTimeout($.livequery.timeout);
// Create a timeout to check the queue and actually run the Live Queries
$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
},
-
+
stop: function(id) {
if (id != undefined)
// Stop are particular Live Query
@@ -231,20 +231,20 @@ var init = $.prototype.init;
$.prototype.init = function(a,c) {
// Call the original init and save the result
var r = init.apply(this, arguments);
-
+
// Copy over properties if they exist already
if (a && a.selector)
r.context = a.context, r.selector = a.selector;
-
+
// Set properties
if ( typeof a == 'string' )
r.context = c || document, r.selector = a;
-
+
// Return the result
return r;
};
// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091)
$.prototype.init.prototype = $.prototype;
-
+
})(jQuery);
\ No newline at end of file
diff --git a/public/static/jquery.tablesorter.js b/public/static/jquery.tablesorter.js
index f781334..df11803 100644
--- a/public/static/jquery.tablesorter.js
+++ b/public/static/jquery.tablesorter.js
@@ -1,71 +1,71 @@
/*
- *
+ *
* TableSorter 2.0 - Client-side table sorting with ease!
* Version 2.0.3
* @requires jQuery v1.2.3
- *
+ *
* Copyright (c) 2007 Christian Bach
* Examples and docs at: http://tablesorter.com
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
- *
+ *
*/
/**
*
* @description Create a sortable table with multi-column sorting capabilitys
- *
+ *
* @example $('table').tablesorter();
* @desc Create a simple tablesorter interface.
*
* @example $('table').tablesorter({ sortList:[[0,0],[1,0]] });
* @desc Create a tablesorter interface and sort on the first and secound column in ascending order.
- *
+ *
* @example $('table').tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
* @desc Create a tablesorter interface and disableing the first and secound column headers.
- *
+ *
* @example $('table').tablesorter({ 0: {sorter:"integer"}, 1: {sorter:"currency"} });
* @desc Create a tablesorter interface and set a column parser for the first and secound column.
- *
- *
+ *
+ *
* @param Object settings An object literal containing key/value pairs to provide optional settings.
- *
- * @option String cssHeader (optional) A string of the class name to be appended to sortable tr elements in the thead of the table.
+ *
+ * @option String cssHeader (optional) A string of the class name to be appended to sortable tr elements in the thead of the table.
* Default value: "header"
- *
- * @option String cssAsc (optional) A string of the class name to be appended to sortable tr elements in the thead on a ascending sort.
+ *
+ * @option String cssAsc (optional) A string of the class name to be appended to sortable tr elements in the thead on a ascending sort.
* Default value: "headerSortUp"
- *
- * @option String cssDesc (optional) A string of the class name to be appended to sortable tr elements in the thead on a descending sort.
+ *
+ * @option String cssDesc (optional) A string of the class name to be appended to sortable tr elements in the thead on a descending sort.
* Default value: "headerSortDown"
- *
- * @option String sortInitialOrder (optional) A string of the inital sorting order can be asc or desc.
+ *
+ * @option String sortInitialOrder (optional) A string of the inital sorting order can be asc or desc.
* Default value: "asc"
- *
- * @option String sortMultisortKey (optional) A string of the multi-column sort key.
+ *
+ * @option String sortMultisortKey (optional) A string of the multi-column sort key.
* Default value: "shiftKey"
- *
- * @option String textExtraction (optional) A string of the text-extraction method to use.
- * For complex html structures inside td cell set this option to "complex",
- * on large tables the complex option can be slow.
+ *
+ * @option String textExtraction (optional) A string of the text-extraction method to use.
+ * For complex html structures inside td cell set this option to "complex",
+ * on large tables the complex option can be slow.
* Default value: "simple"
- *
- * @option Object headers (optional) An array containing the forces sorting rules.
- * This option let's you specify a default sorting rule.
+ *
+ * @option Object headers (optional) An array containing the forces sorting rules.
+ * This option let's you specify a default sorting rule.
* Default value: null
- *
- * @option Array sortList (optional) An array containing the forces sorting rules.
- * This option let's you specify a default sorting rule.
+ *
+ * @option Array sortList (optional) An array containing the forces sorting rules.
+ * This option let's you specify a default sorting rule.
* Default value: null
- *
- * @option Array sortForce (optional) An array containing forced sorting rules.
+ *
+ * @option Array sortForce (optional) An array containing forced sorting rules.
* This option let's you specify a default sorting rule, which is prepended to user-selected rules.
* Default value: null
- *
- * @option Array sortAppend (optional) An array containing forced sorting rules.
+ *
+ * @option Array sortAppend (optional) An array containing forced sorting rules.
* This option let's you specify a default sorting rule, which is appended to user-selected rules.
* Default value: null
- *
+ *
* @option Boolean widthFixed (optional) Boolean flag indicating if tablesorter should apply fixed widths to the table columns.
* This is usefull when using the pager companion plugin.
* This options requires the dimension jquery plugin.
@@ -79,18 +79,18 @@
* @type jQuery
*
* @name tablesorter
- *
+ *
* @cat Plugins/Tablesorter
- *
+ *
* @author Christian Bach/christian.bach@polyester.se
*/
(function($) {
$.extend({
tablesorter: new function() {
-
+
var parsers = [], widgets = [];
-
+
this.defaults = {
cssHeader: "header",
cssAsc: "headerSortUp",
@@ -100,8 +100,8 @@
sortForce: null,
sortAppend: null,
textExtraction: "simple",
- parsers: {},
- widgets: [],
+ parsers: {},
+ widgets: [],
widgetZebra: {css: ["even","odd"]},
headers: {},
widthFixed: false,
@@ -112,14 +112,14 @@
decimal: '.',
debug: false
};
-
+
/* debuging utils */
function benchmark(s,d) {
log(s + "," + (new Date().getTime() - d.getTime()) + "ms");
}
-
+
this.benchmark = benchmark;
-
+
function log(s) {
if (typeof console != "undefined" && typeof console.debug != "undefined") {
console.log(s);
@@ -127,44 +127,44 @@
alert(s);
}
}
-
+
/* parsers utils */
function buildParserCache(table,$headers) {
-
+
if(table.config.debug) { var parsersDebug = ""; }
-
+
var rows = table.tBodies[0].rows;
-
+
if(table.tBodies[0].rows[0]) {
var list = [], cells = rows[0].cells, l = cells.length;
-
+
for (var i=0;i < l; i++) {
var p = false;
-
+
if($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter) ) {
-
- p = getParserById($($headers[i]).metadata().sorter);
-
+
+ p = getParserById($($headers[i]).metadata().sorter);
+
} else if((table.config.headers[i] && table.config.headers[i].sorter)) {
-
+
p = getParserById(table.config.headers[i].sorter);
}
if(!p) {
p = detectParserForColumn(table,cells[i]);
}
-
+
if(table.config.debug) { parsersDebug += "column:" + i + " parser:" +p.id + "\n"; }
-
+
list.push(p);
}
}
-
+
if(table.config.debug) { log(parsersDebug); }
return list;
};
-
+
function detectParserForColumn(table,node) {
var l = parsers.length;
for(var i=1; i < l; i++) {
@@ -175,55 +175,55 @@
// 0 is always the generic parser (text)
return parsers[0];
}
-
+
function getParserById(name) {
var l = parsers.length;
for(var i=0; i < l; i++) {
- if(parsers[i].id.toLowerCase() == name.toLowerCase()) {
+ if(parsers[i].id.toLowerCase() == name.toLowerCase()) {
return parsers[i];
}
}
return false;
}
-
+
/* utils */
function buildCache(table) {
-
+
if(table.config.debug) { var cacheTime = new Date(); }
-
-
+
+
var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0,
- parsers = table.config.parsers,
+ parsers = table.config.parsers,
cache = {row: [], normalized: []};
-
+
for (var i=0;i < totalRows; ++i) {
-
+
/** Add the table data to main data array */
var c = table.tBodies[0].rows[i], cols = [];
-
+
cache.row.push($(c));
-
+
for(var j=0; j < totalCells; ++j) {
- cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));
+ cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));
}
-
+
cols.push(i); // add position for rowCache
cache.normalized.push(cols);
cols = null;
};
-
+
if(table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); }
-
+
return cache;
};
-
+
function getElementText(config,node) {
-
+
if(!node) return "";
-
+
var t = "";
-
+
if(config.textExtraction == "simple") {
if(node.childNodes[0] && node.childNodes[0].hasChildNodes()) {
t = node.childNodes[0].innerHTML;
@@ -233,99 +233,99 @@
} else {
if(typeof(config.textExtraction) == "function") {
t = config.textExtraction(node);
- } else {
+ } else {
t = $(node).text();
- }
+ }
}
return t;
}
-
+
function appendToTable(table,cache) {
-
+
if(table.config.debug) {var appendTime = new Date()}
-
- var c = cache,
- r = c.row,
- n= c.normalized,
- totalRows = n.length,
- checkCell = (n[0].length-1),
+
+ var c = cache,
+ r = c.row,
+ n= c.normalized,
+ totalRows = n.length,
+ checkCell = (n[0].length-1),
tableBody = $(table.tBodies[0]),
rows = [];
-
+
for (var i=0;i < totalRows; i++) {
- rows.push(r[n[i][checkCell]]);
+ rows.push(r[n[i][checkCell]]);
if(!table.config.appender) {
-
+
var o = r[n[i][checkCell]];
var l = o.length;
for(var j=0; j < l; j++) {
-
+
tableBody[0].appendChild(o[j]);
-
+
}
-
+
//tableBody.append(r[n[i][checkCell]]);
}
- }
-
+ }
+
if(table.config.appender) {
-
- table.config.appender(table,rows);
+
+ table.config.appender(table,rows);
}
-
+
rows = null;
-
+
if(table.config.debug) { benchmark("Rebuilt table:", appendTime); }
-
+
//apply table widgets
applyWidget(table);
-
+
// trigger sortend
setTimeout(function() {
- $(table).trigger("sortEnd");
+ $(table).trigger("sortEnd");
},0);
-
+
};
-
+
function buildHeaders(table) {
-
+
if(table.config.debug) { var time = new Date(); }
-
+
var meta = ($.metadata) ? true : false, tableHeadersRows = [];
-
+
for(var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i]=0; };
-
+
$tableHeaders = $("thead th",table);
-
+
$tableHeaders.each(function(index) {
-
+
this.count = 0;
this.column = index;
this.order = formatSortingOrder(table.config.sortInitialOrder);
-
+
if(checkHeaderMetadata(this) || checkHeaderOptions(table,index)) this.sortDisabled = true;
-
+
if(!this.sortDisabled) {
$(this).addClass(table.config.cssHeader);
}
-
+
// add cell to headerList
table.config.headerList[index]= this;
});
-
+
if(table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); }
-
+
return $tableHeaders;
-
+
};
-
+
function checkCellColSpan(table, rows, row) {
var arr = [], r = table.tHead.rows, c = r[row].cells;
-
+
for(var i=0; i < c.length; i++) {
var cell = c[i];
-
- if ( cell.colSpan > 1) {
+
+ if ( cell.colSpan > 1) {
arr = arr.concat(checkCellColSpan(table, headerArr,row++));
} else {
if(table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row+1])) {
@@ -336,38 +336,38 @@
}
return arr;
};
-
+
function checkHeaderMetadata(cell) {
if(($.metadata) && ($(cell).metadata().sorter === false)) { return true; };
return false;
}
-
- function checkHeaderOptions(table,i) {
+
+ function checkHeaderOptions(table,i) {
if((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; };
return false;
}
-
+
function applyWidget(table) {
var c = table.config.widgets;
var l = c.length;
for(var i=0; i < l; i++) {
-
+
getWidgetById(c[i]).format(table);
}
-
+
}
-
+
function getWidgetById(name) {
var l = widgets.length;
for(var i=0; i < l; i++) {
if(widgets[i].id.toLowerCase() == name.toLowerCase() ) {
- return widgets[i];
+ return widgets[i];
}
}
};
-
+
function formatSortingOrder(v) {
-
+
if(typeof(v) != "Number") {
i = (v.toLowerCase() == "desc") ? 1 : 0;
} else {
@@ -375,34 +375,34 @@
}
return i;
}
-
+
function isValueInArray(v, a) {
var l = a.length;
for(var i=0; i < l; i++) {
if(a[i][0] == v) {
- return true;
+ return true;
}
}
return false;
}
-
+
function setHeadersCss(table,$headers, list, css) {
// remove all header information
$headers.removeClass(css[0]).removeClass(css[1]);
-
+
var h = [];
$headers.each(function(offset) {
if(!this.sortDisabled) {
- h[this.column] = $(this);
+ h[this.column] = $(this);
}
});
-
- var l = list.length;
+
+ var l = list.length;
for(var i=0; i < l; i++) {
h[list[i][0]].addClass(css[list[i][1]]);
}
}
-
+
function fixColumnWidth(table,$headers) {
var c = table.config;
if(c.widthFixed) {
@@ -413,7 +413,7 @@
$(table).prepend(colgroup);
};
}
-
+
function updateHeaderSortCount(table,sortList) {
var c = table.config, l = sortList.length;
for(var i=0; i < l; i++) {
@@ -422,142 +422,142 @@
o.count++;
}
}
-
+
/* sorting methods */
function multisort(table,sortList,cache) {
-
+
if(table.config.debug) { var sortTime = new Date(); }
-
+
var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length;
-
+
for(var i=0; i < l; i++) {
-
+
var c = sortList[i][0];
var order = sortList[i][1];
var s = (getCachedSortType(table.config.parsers,c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc");
-
+
var e = "e" + i;
-
+
dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); ";
dynamicExp += "if(" + e + ") { return " + e + "; } ";
dynamicExp += "else { ";
}
-
- // if value is the same keep orignal order
+
+ // if value is the same keep orignal order
var orgOrderCol = cache.normalized[0].length - 1;
dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];";
-
+
for(var i=0; i < l; i++) {
dynamicExp += "}; ";
}
-
- dynamicExp += "return 0; ";
- dynamicExp += "}; ";
-
+
+ dynamicExp += "return 0; ";
+ dynamicExp += "}; ";
+
eval(dynamicExp);
-
+
cache.normalized.sort(sortWrapper);
-
+
if(table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order+ " time:", sortTime); }
-
+
return cache;
};
-
+
function sortText(a,b) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
};
-
+
function sortTextDesc(a,b) {
return ((b < a) ? -1 : ((b > a) ? 1 : 0));
- };
-
+ };
+
function sortNumeric(a,b) {
return a-b;
};
-
+
function sortNumericDesc(a,b) {
return b-a;
};
-
+
function getCachedSortType(parsers,i) {
return parsers[i].type;
};
-
+
/* public methods */
this.construct = function(settings) {
return this.each(function() {
-
+
if(!this.tHead || !this.tBodies) return;
-
+
var $this, $document,$headers, cache, config, shiftDown = 0, sortOrder;
-
+
this.config = {};
-
+
config = $.extend(this.config, $.tablesorter.defaults, settings);
-
- // store common expression for speed
+
+ // store common expression for speed
$this = $(this);
-
+
// build headers
$headers = buildHeaders(this);
-
+
// try to auto detect column type, and store in tables config
this.config.parsers = buildParserCache(this,$headers);
-
-
+
+
// build the cache for the tbody cells
cache = buildCache(this);
-
+
// get the css class names, could be done else where.
var sortCSS = [config.cssDesc,config.cssAsc];
-
+
// fixate columns if the users supplies the fixedWidth option
fixColumnWidth(this);
-
+
// apply event handling to headers
// this is to big, perhaps break it out?
$headers.click(function(e) {
-
+
$this.trigger("sortStart");
-
+
var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0;
-
+
if(!this.sortDisabled && totalRows > 0) {
-
-
+
+
// store exp, for speed
var $cell = $(this);
-
+
// get current column index
var i = this.column;
-
+
// get current column sort order
this.order = this.count++ % 2;
-
+
// user only whants to sort on one column
if(!e[config.sortMultiSortKey]) {
-
+
// flush the sort list
config.sortList = [];
-
+
if(config.sortForce != null) {
- var a = config.sortForce;
+ var a = config.sortForce;
for(var j=0; j < a.length; j++) {
if(a[j][0] != i) {
config.sortList.push(a[j]);
}
}
}
-
+
// add column to sort list
config.sortList.push([i,this.order]);
-
+
// multi column sorting
} else {
// the user has clicked on an all ready sortet column.
- if(isValueInArray(i,config.sortList)) {
-
+ if(isValueInArray(i,config.sortList)) {
+
// revers the sorting direction for all tables.
for(var j=0; j < config.sortList.length; j++) {
var s = config.sortList[j], o = config.headerList[s[0]];
@@ -566,7 +566,7 @@
o.count++;
s[1] = o.count % 2;
}
- }
+ }
} else {
// add column to sort list array
config.sortList.push([i,this.order]);
@@ -580,68 +580,68 @@
// stop normal event by returning false
return false;
}
- // cancel selection
+ // cancel selection
}).mousedown(function() {
if(config.cancelSelection) {
this.onselectstart = function() {return false};
return false;
}
});
-
+
// apply easy methods that trigger binded events
$this.bind("update",function() {
-
+
// rebuild parsers.
this.config.parsers = buildParserCache(this,$headers);
-
+
// rebuild the cache map
cache = buildCache(this);
-
+
}).bind("sorton",function(e,list) {
-
+
$(this).trigger("sortStart");
-
+
config.sortList = list;
-
+
// update and store the sortlist
var sortList = config.sortList;
-
+
// update header count index
updateHeaderSortCount(this,sortList);
-
+
//set css for headers
setHeadersCss(this,$headers,sortList,sortCSS);
-
-
+
+
// sort the table and append it to the dom
appendToTable(this,multisort(this,sortList,cache));
}).bind("appendCache",function() {
-
+
appendToTable(this,cache);
-
+
}).bind("applyWidgetId",function(e,id) {
-
+
getWidgetById(id).format(this);
-
+
}).bind("applyWidgets",function() {
// apply widgets
applyWidget(this);
});
-
+
if($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) {
config.sortList = $(this).metadata().sortlist;
}
// if user has supplied a sort list to constructor.
if(config.sortList.length > 0) {
- $this.trigger("sorton",[config.sortList]);
+ $this.trigger("sorton",[config.sortList]);
}
-
+
// apply widgets
applyWidget(this);
});
};
-
+
this.addParser = function(parser) {
var l = parsers.length, a = true;
for(var i=0; i < l; i++) {
@@ -651,11 +651,11 @@
}
if(a) { parsers.push(parser); };
};
-
+
this.addWidget = function(widget) {
widgets.push(widget);
};
-
+
this.formatFloat = function(s) {
var i = parseFloat(s);
return (isNaN(i)) ? 0 : i;
@@ -664,13 +664,13 @@
var i = parseInt(s);
return (isNaN(i)) ? 0 : i;
};
-
+
this.isDigit = function(s,config) {
var DECIMAL = '\\' + config.decimal;
var exp = '/(^[+]?0(' + DECIMAL +'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL +'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL +'0+$)/';
return RegExp(exp).test($.trim(s));
};
-
+
this.clearTableBody = function(table) {
if($.browser.msie) {
function empty() {
@@ -683,14 +683,14 @@
};
}
});
-
+
// extend plugin scope
$.fn.extend({
tablesorter: $.tablesorter.construct
});
-
+
var ts = $.tablesorter;
-
+
// add default parsers
ts.addParser({
id: "text",
@@ -702,7 +702,7 @@
},
type: "text"
});
-
+
ts.addParser({
id: "digit",
is: function(s,table) {
@@ -714,7 +714,7 @@
},
type: "numeric"
});
-
+
ts.addParser({
id: "currency",
is: function(s) {
@@ -725,7 +725,7 @@
},
type: "numeric"
});
-
+
ts.addParser({
id: "ipAddress",
is: function(s) {
@@ -745,7 +745,7 @@
},
type: "numeric"
});
-
+
ts.addParser({
id: "url",
is: function(s) {
@@ -756,7 +756,7 @@
},
type: "text"
});
-
+
ts.addParser({
id: "isoDate",
is: function(s) {
@@ -767,10 +767,10 @@
},
type: "numeric"
});
-
+
ts.addParser({
id: "percent",
- is: function(s) {
+ is: function(s) {
return /\%$/.test($.trim(s));
},
format: function(s) {
@@ -805,7 +805,7 @@
//reformat the string in ISO format
s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
} else if(c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
- s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
+ s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
}
return $.tablesorter.formatFloat(new Date(s).getTime());
},
@@ -822,8 +822,8 @@
},
type: "numeric"
});
-
-
+
+
ts.addParser({
id: "metadata",
is: function(s) {
@@ -835,7 +835,7 @@
},
type: "numeric"
});
-
+
// add default widgets
ts.addWidget({
id: "zebra",
@@ -848,5 +848,5 @@
.removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);
if(table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); }
}
- });
+ });
})(jQuery);
\ No newline at end of file
diff --git a/public/static/jquery.tree.js b/public/static/jquery.tree.js
index c9cecb1..3d70ead 100644
--- a/public/static/jquery.tree.js
+++ b/public/static/jquery.tree.js
@@ -73,10 +73,10 @@
beforechange: function(NODE,TREE_OBJ) { return true },
beforeopen : function(NODE,TREE_OBJ) { return true },
beforeclose : function(NODE,TREE_OBJ) { return true },
- beforemove : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
- beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
- beforerename: function(NODE,LANG,TREE_OBJ) { return true },
- beforedelete: function(NODE,TREE_OBJ) { return true },
+ beforemove : function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
+ beforecreate: function(NODE,REF_NODE,TYPE,TREE_OBJ) { return true },
+ beforerename: function(NODE,LANG,TREE_OBJ) { return true },
+ beforedelete: function(NODE,TREE_OBJ) { return true },
beforedata : function(NODE,TREE_OBJ) { return { id : $(NODE).attr("id") || 0 } }, // PARAMETERS PASSED TO SERVER
ondata : function(DATA,TREE_OBJ) { return DATA; }, // modify data before parsing it
onparse : function(STR,TREE_OBJ) { return STR; }, // modify string before visualizing it
@@ -110,12 +110,12 @@
create : function () { return new tree_component(); },
focused : function () { return tree_component.inst[tree_component.focused]; },
- reference : function (obj) {
- var o = $(obj);
+ reference : function (obj) {
+ var o = $(obj);
if(!o.size()) o = $("#" + obj);
- if(!o.size()) return null;
- o = (o.is(".tree")) ? o.attr("id") : o.parents(".tree:eq(0)").attr("id");
- return tree_component.inst[o] || null;
+ if(!o.size()) return null;
+ o = (o.is(".tree")) ? o.attr("id") : o.parents(".tree:eq(0)").attr("id");
+ return tree_component.inst[o] || null;
},
rollback : function (data) {
for(var i in data) {
@@ -187,7 +187,7 @@
this.container = $(elem);
if(this.container.size == 0) return false;
tree_component.inst[this.cntr] = this;
- if(!this.container.attr("id")) this.container.attr("id","jstree_" + this.cntr);
+ if(!this.container.attr("id")) this.container.attr("id","jstree_" + this.cntr);
tree_component.inst[this.container.attr("id")] = tree_component.inst[this.cntr];
tree_component.focused = this.cntr;
this.settings = $.extend(true, {}, this.settings, conf);
@@ -207,7 +207,7 @@
this.container.addClass("tree");
if(this.settings.ui.theme_name !== false) {
if(this.settings.ui.theme_path === false) {
- $("script").each(function () {
+ $("script").each(function () {
if(this.src.toString().match(/jquery\.tree.*?js$/)) { _this.settings.ui.theme_path = this.src.toString().replace(/jquery\.tree.*?js$/, "") + "themes/" + _this.settings.ui.theme_name + "/style.css"; return false; }
});
}
@@ -343,7 +343,7 @@
if(this.settings.data.async && opn) return;
if(this.cl_count > 0) return;
delete this.opened;
- }
+ }
if(this.cl_count > 0) return;
// DOTS and RIGHT TO LEFT
@@ -388,7 +388,7 @@
.bind("mouseup.jstree", function (event) {
setTimeout( function() { _this.focus.apply(_this); }, 5);
})
- .bind("click.jstree", function (event) {
+ .bind("click.jstree", function (event) {
//event.stopPropagation();
$(this).focus();
return true;
@@ -406,25 +406,25 @@
.live("click", function (event) { // WHEN CLICK IS ON THE TEXT OR ICON
if(event.which && event.which == 3) return true;
if(_this.locked) {
- event.preventDefault();
+ event.preventDefault();
event.target.blur();
return _this.error("LOCKED");
}
_this.select_branch.apply(_this, [event.target, event.ctrlKey || _this.settings.rules.multiple == "on"]);
if(_this.inp) { _this.inp.blur(); }
- event.preventDefault();
+ event.preventDefault();
event.target.blur();
return false;
})
.live("dblclick", function (event) { // WHEN DOUBLECLICK ON TEXT OR ICON
if(_this.locked) {
- event.preventDefault();
+ event.preventDefault();
event.stopPropagation();
event.target.blur();
return _this.error("LOCKED");
}
_this.callback("ondblclk", [_this.get_node(event.target).get(0), _this]);
- // event.preventDefault();
+ // event.preventDefault();
// event.stopPropagation();
event.target.blur();
})
@@ -497,7 +497,7 @@
tree_component.drag_drop.init_x = event.pageX;
tree_component.drag_drop.init_y = event.pageY;
obj.blur();
- event.preventDefault();
+ event.preventDefault();
event.stopPropagation();
return false;
});
@@ -528,7 +528,7 @@
if(!this.li_height) this.li_height = 18;
}
},
- scroll_check : function (x,y) {
+ scroll_check : function (x,y) {
var _this = this;
var cnt = _this.container;
var off = _this.container.offset();
@@ -628,7 +628,7 @@
};
var nod_type = (typeof nod == "string") ? nod : this.get_type(nod);
if(typeof r.valid_children != "undefined" && (r.valid_children == "none" || (typeof r.valid_children == "object" && $.inArray(nod_type, $.makeArray(r.valid_children)) == -1))) return false;
-
+
if(this.settings.rules.use_max_children) {
if(typeof r.max_children != "undefined" && r.max_children != -1) {
if(r.max_children == 0) return false;
@@ -657,7 +657,7 @@
if(mx !== false && mx <= 0) return this.error("MOVE: MAX-DEPTH REACHED");
}
if(mx !== false && mx <= 0) return this.error("MOVE: MAX-DEPTH REACHED");
- if(mx !== false) {
+ if(mx !== false) {
var incr = 1;
if(typeof nod != "string") {
var t = nod;
@@ -764,7 +764,7 @@
if(this.locked) return this.error("LOCKED");
var obj = this.get_node(obj);
if(obj.hasClass("closed")) return this.open_branch(obj);
- if(obj.hasClass("open")) return this.close_branch(obj);
+ if(obj.hasClass("open")) return this.close_branch(obj);
},
open_branch : function (obj, disable_animation, callback) {
var _this = this;
@@ -774,7 +774,7 @@
if(!obj.size()) return this.error("OPEN: NO SUCH NODE");
if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE");
if(this.settings.data.async && obj.find("li").size() == 0) {
-
+
if(this.callback("beforeopen",[obj.get(0),this]) === false) return this.error("OPEN: STOPPED BY USER");
obj.children("ul:eq(0)").remove().end().append("");
@@ -790,7 +790,7 @@
}
_datastore.parse(data,_this,_this.settings.data.opts,function(str){
str = _this.callback("onparse", [str, _this]);
- // if(obj.children('ul:eq(0)').children('li').size() > 1) obj.children("ul").find('.loaading').parent().replaceWith(str); else
+ // if(obj.children('ul:eq(0)').children('li').size() > 1) obj.children("ul").find('.loaading').parent().replaceWith(str); else
obj.children("ul:eq(0)").replaceWith($("").html(str));
obj.find("li:last-child").addClass("last").end().find("li:has(ul)").not(".open").addClass("closed");
obj.find("li").not(".open").not(".closed").addClass("leaf");
@@ -830,7 +830,7 @@
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
$(this).css("display","");
});
- }
+ }
else {
if(obj.hasClass("open")) obj.removeClass("open").addClass("closed");
}
@@ -866,7 +866,7 @@
this.callback("onclose_all",[this]);
},
- set_lang : function (i) {
+ set_lang : function (i) {
if(!$.isArray(this.settings.languages) || this.settings.languages.length == 0) return false;
if(this.locked) return this.error("LOCKED");
if(!$.inArray(i,this.settings.languages) && typeof this.settings.languages[i] != "undefined") i = this.settings.languages[i];
@@ -886,9 +886,9 @@
return this.current_lang;
},
- create : function (obj, ref_node, position) {
+ create : function (obj, ref_node, position) {
if(this.locked) return this.error("LOCKED");
-
+
var root = false;
if(ref_node == -1) { root = true; ref_node = this.container; }
else ref_node = ref_node ? this.get_node(ref_node) : this.selected;
@@ -920,7 +920,7 @@
}
// creating new object to pass to parseJSON
- var torename = false;
+ var torename = false;
if(!obj) obj = {};
else obj = $.extend(true, {}, obj);
if(!obj.attributes) obj.attributes = {};
@@ -976,7 +976,7 @@
if(mx !== false && mx <= 0) return this.error("CREATE: MAX-DEPTH REACHED");
}
if(mx !== false && mx <= 0) return this.error("CREATE: MAX-DEPTH REACHED");
- if(mx !== false) {
+ if(mx !== false) {
var incr = 1;
var t = $li;
while(t.size() > 0) {
@@ -987,7 +987,7 @@
}
}
- if((typeof position).toLowerCase() == "undefined" || position == "inside")
+ if((typeof position).toLowerCase() == "undefined" || position == "inside")
position = (this.settings.rules.createat == "top") ? 0 : ref_node.children("ul:eq(0)").children("li").size();
if(ref_node.children("ul").size() == 0 || (root == true && ref_node.children("ul").children("li").size() == 0) ) {
if(!root) var a = this.moved($li,ref_node.children("a:eq(0)"),"inside", true);
@@ -1023,7 +1023,7 @@
else obj = obj.find("a:first");
// Rollback
- var rb = {};
+ var rb = {};
rb[this.container.attr("id")] = this.get_rollback();
var icn = obj.children("ins").clone();
@@ -1042,16 +1042,16 @@
.bind("mousedown", function (event) { event.stopPropagation(); })
.bind("mouseup", function (event) { event.stopPropagation(); })
.bind("click", function (event) { event.stopPropagation(); })
- .bind("keyup", function (event) {
+ .bind("keyup", function (event) {
var key = event.keyCode || event.which;
if(key == 27) { this.value = last_value; this.blur(); return }
if(key == 13) { this.blur(); return; }
});
_this.inp.blur(function(event) {
- if(this.value == "") this.value = last_value;
+ if(this.value == "") this.value = last_value;
obj.text(this.value).prepend(icn);
- obj.get(0).style.display = "";
- obj.prevAll("span").remove();
+ obj.get(0).style.display = "";
+ obj.prevAll("span").remove();
_this.inp = false;
_this.callback("onrename", [_this.get_node(obj).get(0), _this, rb]);
});
@@ -1068,7 +1068,7 @@
var _this = this;
// Rollback
- var rb = {};
+ var rb = {};
rb[this.container.attr("id")] = this.get_rollback();
if(obj && (!this.selected || this.get_node(obj).get(0) != this.selected.get(0) )) {
@@ -1122,7 +1122,7 @@
this.remove();
}
}
- if(stop && tmp) this.select_branch(tmp);
+ if(stop && tmp) this.select_branch(tmp);
this.callback("ondelete", [obj.get(0), this, rb]);
}
else return this.error("DELETE: NO NODE SELECTED");
@@ -1202,7 +1202,7 @@
// Rollback
if(!rb) {
- var rb = {};
+ var rb = {};
rb[this.container.attr("id")] = this.get_rollback();
if(!is_new) {
var tmp = what.size() > 1 ? what.eq(0).parents(".tree:eq(0)") : what.parents(".tree:eq(0)");
@@ -1459,13 +1459,13 @@
var dd = $.extend( { "search" : str } , this.callback("beforedata", [false, this] ) );
$.ajax({
type : this.settings.data.opts.method,
- url : this.settings.data.opts.url,
- data : dd,
+ url : this.settings.data.opts.url,
+ data : dd,
dataType : "text",
success : function (data) {
_this.srch_opn = $.unique(data.split(","));
_this.search.apply(_this,[str, func]);
- }
+ }
});
}
else if(this.srch_opn.length) {
@@ -1601,7 +1601,7 @@
tmp.origin_tree = false;
if(tmp.isdown) {
tmp.isdown = false;
- event.preventDefault();
+ event.preventDefault();
event.stopPropagation();
return false;
}
@@ -1671,7 +1671,7 @@
}
var et_off = et.offset();
- var goTo = {
+ var goTo = {
x : (et_off.left - 1),
y : (event.pageY - et_off.top)
};
@@ -1705,7 +1705,7 @@
case "inside":
goTo.x -= 2;
goTo.y = et_off.top - 2 + tree2.li_height/2;
- tree_component.drag_drop.marker.attr("class","marker_plus");
+ tree_component.drag_drop.marker.attr("class","marker_plus");
break;
}
tmp.move_type = mov;
@@ -1735,13 +1735,13 @@
}
return true;
};
- $(function () {
- $(document).bind("mousemove.jstree", tree_component.mousemove);
- $(document).bind("mouseup.jstree", tree_component.mouseup);
+ $(function () {
+ $(document).bind("mousemove.jstree", tree_component.mousemove);
+ $(document).bind("mouseup.jstree", tree_component.mouseup);
});
// cut, copy, paste stuff
- tree_component.cut_copy = {
+ tree_component.cut_copy = {
copy_nodes : false,
cut_nodes : false
};
@@ -1771,8 +1771,8 @@
(tree_component.css.insertRule) ? tree_component.css.insertRule(rule_name + ' { }', 0) : tree_component.css.addRule(rule_name, null, 0);
return tree_component.get_css(rule_name);
};
- tree_component.remove_css = function(rule_name) {
- return tree_component.get_css(rule_name, true);
+ tree_component.remove_css = function(rule_name) {
+ return tree_component.get_css(rule_name, true);
};
tree_component.add_sheet = function(opts) {
if(opts.str) {
@@ -1810,7 +1810,7 @@
var v = (u.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1];
var css = '/* TREE LAYOUT */ .tree ul { margin:0 0 0 5px; padding:0 0 0 0; list-style-type:none; overflow: hidden; } .tree li { display:block; min-height:18px; line-height:18px; padding:0 0 0 15px; margin:0 0 0 0; /* Background fix */ clear:both; } .tree li ul { display:none; } .tree li a, .tree li span { display:inline-block;line-height:16px;height:16px;color:black;white-space:nowrap;text-decoration:none;padding:1px 4px 1px 4px;margin:0; } .tree li a:focus { outline: none; } .tree li a input, .tree li span input { margin:0;padding:0 0;display:inline-block;height:12px !important;border:1px solid white;background:white;font-size:10px;font-family:Verdana; } .tree li a input:not([class="xxx"]), .tree li span input:not([class="xxx"]) { padding:1px 0; } /* FOR DOTS */ .tree .ltr li.last { float:left; } .tree > ul li.last { overflow:visible; } /* OPEN OR CLOSE */ .tree li.open ul { display:block; } .tree li.closed ul { display:none !important; } /* FOR DRAGGING */ #jstree-dragged { position:absolute; top:-10px; left:-10px; margin:0; padding:0; } #jstree-dragged ul ul ul { display:none; } #jstree-marker { padding:0; margin:0; line-height:5px; font-size:1px; overflow:hidden; height:5px; position:absolute; left:-45px; top:-30px; z-index:1000; background-color:transparent; background-repeat:no-repeat; display:none; } #jstree-marker.marker { width:45px; background-position:-32px top; } #jstree-marker.marker_plus { width:5px; background-position:right top; } /* BACKGROUND DOTS */ .tree li li { overflow:hidden; } .tree > .ltr > li { display:table; } /* ICONS */ .tree ul ins { display:inline-block; text-decoration:none; width:16px; height:16px; } .tree .ltr ins { margin:0 4px 0 0px; } ';
- if($.browser.msie) {
+ if($.browser.msie) {
if($.browser.version == 6) css += '.tree li { height:18px; zoom:1; } .tree li li { overflow:visible; } .tree .ltr li.last { margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); } .marker { width:45px; background-position:-32px top; } .marker_plus { width:5px; background-position:right top; }';
if($.browser.version == 7) css += '.tree li li { overflow:visible; } .tree .ltr li.last { margin-top: expression( (this.previousSibling && /open/.test(this.previousSibling.className) ) ? "-2px" : "0"); }';
}
@@ -1837,15 +1837,15 @@
if(opts.url) {
$.ajax({
'type' : opts.method,
- 'url' : opts.url,
- 'data' : data,
+ 'url' : opts.url,
+ 'data' : data,
'dataType' : "html",
'success' : function (d, textStatus) {
callback.call(null, d);
},
- 'error' : function (xhttp, textStatus, errorThrown) {
+ 'error' : function (xhttp, textStatus, errorThrown) {
callback.call(null, false);
- tree.error(errorThrown + " " + textStatus);
+ tree.error(errorThrown + " " + textStatus);
}
});
}
@@ -1857,7 +1857,7 @@
},
"json" : function () {
return {
- get : function(obj, tree, opts) {
+ get : function(obj, tree, opts) {
var _this = this;
if(!obj || $(obj).size() == 0) obj = tree.container.children("ul").children("li");
else obj = $(obj);
@@ -1885,7 +1885,7 @@
if(typeof val != "undefined" && val.toString().replace(" ","").length > 0) json.attributes[opts.outer_attrib[i]] = val;
delete val;
}
-
+
if(tree.settings.languages.length) {
for(var i in tree.settings.languages) {
if(!tree.settings.languages.hasOwnProperty(i)) continue;
@@ -1944,7 +1944,7 @@
}
return json;
},
- parse : function(data, tree, opts, callback) {
+ parse : function(data, tree, opts, callback) {
if(Object.prototype.toString.apply(data) === "[object Array]") {
var str = '';
for(var i = 0; i < data.length; i ++) {
@@ -2042,19 +2042,19 @@
load : function(data, tree, opts, callback) {
if(opts.static) {
callback.call(null, opts.static);
- }
+ }
else {
$.ajax({
'type' : opts.method,
- 'url' : opts.url,
- 'data' : data,
+ 'url' : opts.url,
+ 'data' : data,
'dataType' : "json",
'success' : function (d, textStatus) {
callback.call(null, d);
},
- 'error' : function (xhttp, textStatus, errorThrown) {
+ 'error' : function (xhttp, textStatus, errorThrown) {
callback.call(null, false);
- tree.error(errorThrown + " " + textStatus);
+ tree.error(errorThrown + " " + textStatus);
}
});
}
diff --git a/public/static/lib/jquery.js b/public/static/lib/jquery.js
index 1097010..37fe473 100644
--- a/public/static/lib/jquery.js
+++ b/public/static/lib/jquery.js
@@ -54,10 +54,10 @@ var jQuery = function( selector, context ) {
// For matching the engine and version of the browser
browserMatch,
-
+
// Has the ready events already been bound?
readyBound = false,
-
+
// The functions to execute on DOM ready
readyList = [],
@@ -239,7 +239,7 @@ jQuery.fn = jQuery.prototype = {
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
-
+
ready: function( fn ) {
// Attach the listeners
jQuery.bindReady();
@@ -257,7 +257,7 @@ jQuery.fn = jQuery.prototype = {
return this;
},
-
+
eq: function( i ) {
return i === -1 ?
this.slice( i ) :
@@ -282,7 +282,7 @@ jQuery.fn = jQuery.prototype = {
return callback.call( elem, i, elem );
}));
},
-
+
end: function() {
return this.prevObject || jQuery(null);
},
@@ -363,10 +363,10 @@ jQuery.extend({
return jQuery;
},
-
+
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
-
+
// Handle when the DOM is ready
ready: function() {
// Make sure that the DOM is not already loaded
@@ -397,7 +397,7 @@ jQuery.extend({
}
}
},
-
+
bindReady: function() {
if ( readyBound ) {
return;
@@ -415,7 +415,7 @@ jQuery.extend({
if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
+
// A fallback to window.onload, that will always work
window.addEventListener( "load", jQuery.ready, false );
@@ -424,7 +424,7 @@ jQuery.extend({
// ensure firing before onload,
// maybe late but safe also for iframes
document.attachEvent("onreadystatechange", DOMContentLoaded);
-
+
// A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready );
@@ -460,20 +460,20 @@ jQuery.extend({
if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
return false;
}
-
+
// Not own constructor property must be Object
if ( obj.constructor
&& !hasOwnProperty.call(obj, "constructor")
&& !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
-
+
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
-
+
var key;
for ( key in obj ) {}
-
+
return key === undefined || hasOwnProperty.call( obj, key );
},
@@ -483,16 +483,16 @@ jQuery.extend({
}
return true;
},
-
+
error: function( msg ) {
throw msg;
},
-
+
parseJSON: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
-
+
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
@@ -785,7 +785,7 @@ function evalScript( i, elem ) {
// The value/s can be optionally by executed if its a function
function access( elems, key, value, exec, fn, pass ) {
var length = elems.length;
-
+
// Setting many attributes
if ( typeof key === "object" ) {
for ( var k in key ) {
@@ -793,19 +793,19 @@ function access( elems, key, value, exec, fn, pass ) {
}
return elems;
}
-
+
// Setting one attribute
if ( value !== undefined ) {
// Optionally, function values get executed if exec is true
exec = !pass && exec && jQuery.isFunction(value);
-
+
for ( var i = 0; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
}
-
+
return elems;
}
-
+
// Getting an attribute
return length ? fn( elems[0], key ) : null;
}
@@ -928,20 +928,20 @@ function now() {
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
- var eventSupported = function( eventName ) {
- var el = document.createElement("div");
- eventName = "on" + eventName;
-
- var isSupported = (eventName in el);
- if ( !isSupported ) {
- el.setAttribute(eventName, "return;");
- isSupported = typeof el[eventName] === "function";
- }
- el = null;
-
- return isSupported;
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
};
-
+
jQuery.support.submitBubbles = eventSupported("submit");
jQuery.support.changeBubbles = eventSupported("change");
@@ -966,7 +966,7 @@ var emptyObject = {};
jQuery.extend({
cache: {},
-
+
expando:expando,
// The following elements throw uncatchable exceptions if you
@@ -994,7 +994,7 @@ jQuery.extend({
}
// Compute a unique ID for the element
- if ( !id ) {
+ if ( !id ) {
id = ++uuid;
}
@@ -1368,7 +1368,7 @@ jQuery.fn.extend({
if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
return elem.getAttribute("value") === null ? "on" : elem.value;
}
-
+
// Everything else, we just grab the value
return (elem.value || "").replace(rreturn, "");
@@ -1429,7 +1429,7 @@ jQuery.extend({
height: true,
offset: true
},
-
+
attr: function( elem, name, value, pass ) {
// don't set attributes on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
@@ -1458,7 +1458,7 @@ jQuery.extend({
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;
-
+
// Make sure that it also works with optgroups, see #5701
if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
@@ -1635,17 +1635,17 @@ jQuery.event = {
}
}
}
-
- if ( special.add ) {
- var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers );
- if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
- modifiedHandler.guid = modifiedHandler.guid || handler.guid;
- modifiedHandler.data = modifiedHandler.data || handler.data;
- modifiedHandler.type = modifiedHandler.type || handler.type;
- handler = modifiedHandler;
- }
- }
-
+
+ if ( special.add ) {
+ var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers );
+ if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) {
+ modifiedHandler.guid = modifiedHandler.guid || handler.guid;
+ modifiedHandler.data = modifiedHandler.data || handler.data;
+ modifiedHandler.type = modifiedHandler.type || handler.type;
+ handler = modifiedHandler;
+ }
+ }
+
// Add the function to the element's handler list
handlers[ handler.guid ] = handler;
@@ -1976,11 +1976,11 @@ jQuery.event = {
add: function( proxy, data, namespaces, live ) {
jQuery.extend( proxy, data || {} );
- proxy.guid += data.selector + data.live;
+ proxy.guid += data.selector + data.live;
data.liveProxy = proxy;
- jQuery.event.add( this, data.live, liveHandler, data );
-
+ jQuery.event.add( this, data.live, liveHandler, data );
+
},
remove: function( namespaces ) {
@@ -2058,7 +2058,7 @@ jQuery.Event.prototype = {
if ( !e ) {
return;
}
-
+
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
@@ -2153,7 +2153,7 @@ jQuery.event.special.submit = {
return trigger( "submit", this, arguments );
}
});
-
+
jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function( e ) {
var elem = e.target, type = elem.type;
@@ -2214,7 +2214,7 @@ function testChange( e ) {
if ( e.type !== "focusout" || elem.type !== "radio" ) {
jQuery.data( elem, "_change_data", val );
}
-
+
if ( data === undefined || val === data ) {
return;
}
@@ -2227,7 +2227,7 @@ function testChange( e ) {
jQuery.event.special.change = {
filters: {
- focusout: testChange,
+ focusout: testChange,
click: function( e ) {
var elem = e.target, type = elem.type;
@@ -2291,13 +2291,13 @@ if ( document.addEventListener ) {
jQuery.event.special[ fix ] = {
setup: function() {
this.addEventListener( orig, handler, true );
- },
- teardown: function() {
+ },
+ teardown: function() {
this.removeEventListener( orig, handler, true );
}
};
- function handler( e ) {
+ function handler( e ) {
e = jQuery.event.fix( e );
e.type = fix;
return jQuery.event.handle.call( this, e );
@@ -2314,7 +2314,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
}
return this;
}
-
+
if ( jQuery.isFunction( data ) ) {
fn = data;
data = undefined;
@@ -2406,7 +2406,7 @@ jQuery.each(["live", "die"], function( i, name ) {
type === "blur" ? "focusout" : // blur --> focusout
type === "hover" ? types.push("mouseleave") && "mouseenter" : // hover support
type;
-
+
if ( name === "live" ) {
// bind live handler
jQuery( this.context ).bind( liveConvert( type, this.selector ), {
@@ -2418,7 +2418,7 @@ jQuery.each(["live", "die"], function( i, name ) {
jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );
}
}
-
+
return this;
}
});
@@ -2439,7 +2439,7 @@ function liveHandler( event ) {
fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {
data = fn.data;
- if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
+ if ( !(data.beforeFilter && data.beforeFilter[event.type] &&
!data.beforeFilter[event.type](event)) ) {
selectors.push( fn.selector );
}
@@ -2546,20 +2546,20 @@ var Sizzle = function(selector, context, results, seed) {
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
-
+
if ( !selector || typeof selector !== "string" ) {
return results;
}
var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
soFar = selector;
-
+
// Reset the position of the chunker regexp (start from head)
while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
soFar = m[3];
-
+
parts.push( m[1] );
-
+
if ( m[2] ) {
extra = m[3];
break;
@@ -2580,7 +2580,7 @@ var Sizzle = function(selector, context, results, seed) {
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
-
+
set = posProcess( selector, set );
}
}
@@ -2691,7 +2691,7 @@ Sizzle.find = function(expr, context, isXML){
for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
var type = Expr.order[i], match;
-
+
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
var left = match[1];
match.splice(1,1);
@@ -2965,7 +2965,7 @@ var Expr = Sizzle.selectors = {
},
ATTR: function(match, curLoop, inplace, result, not, isXML){
var name = match[1].replace(/\\/g, "");
-
+
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
@@ -2991,7 +2991,7 @@ var Expr = Sizzle.selectors = {
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
-
+
return match;
},
POS: function(match){
@@ -3112,18 +3112,18 @@ var Expr = Sizzle.selectors = {
case 'only':
case 'first':
while ( (node = node.previousSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
- if ( type === "first" ) {
- return true;
+ if ( type === "first" ) {
+ return true;
}
node = elem;
case 'last':
while ( (node = node.nextSibling) ) {
- if ( node.nodeType === 1 ) {
- return false;
+ if ( node.nodeType === 1 ) {
+ return false;
}
}
return true;
@@ -3133,20 +3133,20 @@ var Expr = Sizzle.selectors = {
if ( first === 1 && last === 0 ) {
return true;
}
-
+
var doneName = match[0],
parent = elem.parentNode;
-
+
if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
var count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
- }
+ }
parent.sizcache = doneName;
}
-
+
var diff = elem.nodeIndex - last;
if ( first === 0 ) {
return diff === 0;
@@ -3222,7 +3222,7 @@ var makeArray = function(array, results) {
results.push.apply( results, array );
return results;
}
-
+
return array;
};
@@ -3412,7 +3412,7 @@ if ( document.querySelectorAll ) {
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
-
+
Sizzle = function(query, context, extra, seed){
context = context || document;
@@ -3423,7 +3423,7 @@ if ( document.querySelectorAll ) {
return makeArray( context.querySelectorAll(query), extra );
} catch(e){}
}
-
+
return oldSizzle(query, context, extra, seed);
};
@@ -3452,7 +3452,7 @@ if ( document.querySelectorAll ) {
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
-
+
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function(match, context, isXML) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
@@ -3540,7 +3540,7 @@ var contains = document.compareDocumentPosition ? function(a, b){
var isXML = function(elem){
// documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
+ // (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
@@ -3656,7 +3656,7 @@ jQuery.fn.extend({
filter: function( selector ) {
return this.pushStack( winnow(this, selector, true), "filter", selector );
},
-
+
is: function( selector ) {
return !!selector && jQuery.filter( selector, this ).length > 0;
},
@@ -3670,7 +3670,7 @@ jQuery.fn.extend({
selector = selectors[i];
if ( !matches[selector] ) {
- matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
jQuery( selector, context || this.context ) :
selector;
}
@@ -3692,7 +3692,7 @@ jQuery.fn.extend({
return ret;
}
- var pos = jQuery.expr.match.POS.test( selectors ) ?
+ var pos = jQuery.expr.match.POS.test( selectors ) ?
jQuery( selectors, context || this.context ) : null;
return this.map(function( i, cur ) {
@@ -3705,7 +3705,7 @@ jQuery.fn.extend({
return null;
});
},
-
+
// Determine the position of an element within
// the matched set of elements
index: function( elem ) {
@@ -3786,7 +3786,7 @@ jQuery.each({
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
-
+
if ( !runtil.test( name ) ) {
selector = until;
}
@@ -3813,7 +3813,7 @@ jQuery.extend({
return jQuery.find.matches(expr, elems);
},
-
+
dir: function( elem, dir, until ) {
var matched = [], cur = elem[dir];
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
@@ -4369,7 +4369,7 @@ jQuery.extend({
return ret;
},
-
+
cleanData: function( elems ) {
for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {
jQuery.event.remove( elem );
@@ -4404,7 +4404,7 @@ jQuery.fn.css = function( name, value ) {
if ( value === undefined ) {
return jQuery.curCSS( elem, name );
}
-
+
if ( typeof value === "number" && !rexclude.test(name) ) {
value += "px";
}
@@ -4812,7 +4812,7 @@ jQuery.extend({
ajax: function( origSettings ) {
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
-
+
var jsonp, status, data,
callbackContext = origSettings && origSettings.context || s,
type = s.type.toUpperCase();
@@ -5127,7 +5127,7 @@ jQuery.extend({
jQuery.event.trigger( "ajaxStop" );
}
}
-
+
function trigger(type, args) {
(s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
}
@@ -5215,19 +5215,19 @@ jQuery.extend({
// key/values into a query string
param: function( a, traditional ) {
var s = [];
-
+
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings.traditional;
}
-
+
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray(a) || a.jquery ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
});
-
+
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
@@ -5257,13 +5257,13 @@ jQuery.extend({
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
}
});
-
+
} else if ( !traditional && obj != null && typeof obj === "object" ) {
// Serialize object item.
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v );
});
-
+
} else {
// Serialize scalar item.
add( prefix, obj );
@@ -5714,12 +5714,12 @@ jQuery.extend( jQuery.fx, {
jQuery.fx.stop();
}
},
-
+
stop: function() {
clearInterval( timerId );
timerId = null;
},
-
+
speeds: {
slow: 600,
fast: 200,
@@ -5763,7 +5763,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -5789,7 +5789,7 @@ if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0];
- if ( options ) {
+ if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
@@ -5897,7 +5897,7 @@ jQuery.offset = {
return { top: top, left: left };
},
-
+
setOffset: function( elem, options, i ) {
// set position first, in-case top/left are set even on static elem
if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
@@ -5916,7 +5916,7 @@ jQuery.offset = {
top: (options.top - curOffset.top) + curTop,
left: (options.left - curOffset.left) + curLeft
};
-
+
if ( "using" in options ) {
options.using.call( elem, props );
} else {
@@ -5976,7 +5976,7 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
jQuery.fn[ method ] = function(val) {
var elem = this[0], win;
-
+
if ( !elem ) {
return null;
}
@@ -6040,7 +6040,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
if ( !elem ) {
return size == null ? null : this;
}
-
+
if ( jQuery.isFunction( size ) ) {
return this.each(function( i ) {
var self = jQuery( this );
diff --git a/public/static/lib/jquery.metadata.js b/public/static/lib/jquery.metadata.js
index ad8bfba..8410463 100644
--- a/public/static/lib/jquery.metadata.js
+++ b/public/static/lib/jquery.metadata.js
@@ -18,34 +18,34 @@
* There are three supported types of metadata storage:
*
* attr: Inside an attribute. The name parameter indicates *which* attribute.
- *
+ *
* class: Inside the class attribute, wrapped in curly braces: { }
- *
+ *
* elem: Inside a child element (e.g. a script tag). The
* name parameter indicates *which* element.
- *
+ *
* The metadata for an element is loaded the first time the element is accessed via jQuery.
*
* As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
* matched by expr, then redefine the metadata type and run another $(expr) for other elements.
- *
+ *
* @name $.metadata.setType
*
* @example This is a p
* @before $.metadata.setType("class")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from the class attribute
- *
+ *
* @example This is a p
* @before $.metadata.setType("attr", "data")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from a "data" attribute
- *
+ *
* @example This is a p
* @before $.metadata.setType("elem", "script")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from a nested script element
- *
+ *
* @param String type The encoding type
* @param String name The name of the attribute to be used to get metadata (optional)
* @cat Plugins/Metadata
@@ -72,13 +72,13 @@ $.extend({
var settings = $.extend({},this.defaults,opts);
// check for empty string in single property
if ( !settings.single.length ) settings.single = 'metadata';
-
+
var data = $.data(elem, settings.single);
// returned cached data if it already exists
if ( data ) return data;
-
+
data = "{}";
-
+
if ( settings.type == "class" ) {
var m = settings.cre.exec( elem.className );
if ( m )
@@ -94,12 +94,12 @@ $.extend({
if ( attr )
data = attr;
}
-
+
if ( data.indexOf( '{' ) <0 )
data = "{" + data + "}";
-
+
data = eval("(" + data + ")");
-
+
$.data( elem, settings.single, data );
return data;
}
diff --git a/public/static/lib/sarissa.js b/public/static/lib/sarissa.js
index ae4952a..59cbc63 100644
--- a/public/static/lib/sarissa.js
+++ b/public/static/lib/sarissa.js
@@ -1,24 +1,24 @@
/* * ====================================================================
- * About: This a a compressed JS file from the Sarissa library.
+ * About: This a a compressed JS file from the Sarissa library.
* see http://dev.abiss.gr/sarissa
- *
+ *
* Copyright: Manos Batsis, http://dev.abiss.gr
- *
+ *
* Licence:
- * Sarissa is free software distributed under the GNU GPL version 2
- * or higher, GNU LGPL version 2.1 or higher and Apache Software
- * License 2.0 or higher. The licenses are available online see:
- * http://www.gnu.org
+ * Sarissa is free software distributed under the GNU GPL version 2
+ * or higher, GNU LGPL version 2.1 or higher and Apache Software
+ * License 2.0 or higher. The licenses are available online see:
+ * http://www.gnu.org
* http://www.apache.org
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
- * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE
- * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE
+ * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================*/
diff --git a/public/static/scatterbrainz.css b/public/static/scatterbrainz.css
index 79bac10..b8de069 100644
--- a/public/static/scatterbrainz.css
+++ b/public/static/scatterbrainz.css
@@ -290,12 +290,12 @@ div#dashboard {
/**
* jplayer shit
*/
-
+
#player_container {
position:relative;
padding:5px;
}
-
+
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}
@@ -303,7 +303,7 @@ ul#icons span.ui-icon {float: left; margin: 0 4px;}
ul#icons #volume-min {
margin:2px 140px 2px 364px;
}*/
-
+
#sliderVolume {
width: 150px;
height: .4em;
@@ -315,17 +315,17 @@ ul#icons #volume-min {
height:.8em;
width:.8em;
}
-
+
#bars_holder {
width: 150px;
margin-left: 10px;
margin-top: 4px;
}
-
+
#sliderPlayback .ui-slider-handle {
height:1.2em;
}
-
+
#loaderBar.ui-progressbar {
height:.2em;
border:0;
@@ -343,7 +343,7 @@ ul#icons #volume-min {
#abrepeat {
zoom: 0.8;
}
-
+
#abrepeat .ui-button-text {
padding: 0.4em 0.7em;
}
@@ -672,7 +672,7 @@ span.albumButtons span.ui-icon-search {
left: 45%;
}
-div#artistBrowserAlbumList {
+div#artistBrowserAlbumList {
overflow-y: auto;
}
diff --git a/public/static/scatterbrainz.js b/public/static/scatterbrainz.js
index 45ade6e..81f4cb0 100644
--- a/public/static/scatterbrainz.js
+++ b/public/static/scatterbrainz.js
@@ -27,19 +27,19 @@ $(document).ready(function(){
}
}
});
-
+
$('li[rel=Playlist]').livequery(onTreeNodeCreate);
$('li[rel=Album]').livequery(onTreeNodeCreate);
-
+
$('#browser').tree({
- data : {
+ data : {
async : true,
type : 'json',
opts : {
url : '/hello/treeBrowseAJAX'
}
},
- callback : {
+ callback : {
beforedata : function (n, t) {
return { id : $(n).attr("id") || 'init' };
}
@@ -101,7 +101,7 @@ $(document).ready(function(){
});
}
});
-
+
$('li.browsenode[rel=Track]').live('dblclick', function () {
var self = $(this);
addToPlaylist(self.attr('id'));
@@ -128,7 +128,7 @@ $(document).ready(function(){
$('#sliderPlayback').slider('option', 'value', ppaInt);
});
-
+
audio = $('#jquery_jplayer').data('jPlayer.config').audio;
$("#prev").click(playListPrev);
@@ -282,7 +282,7 @@ $(document).ready(function(){
$('#playlistHeadTable th.bitrate').click(function() {
$('#playlist th.bitrate').click();
});
-
+
/**
* Playlist functions
*/
@@ -333,16 +333,16 @@ $(document).ready(function(){
$('#playMode').click(function() {
$('#playModeMenu').toggle();
});
-
+
$('#playModeMenu input').click(function() {
$("#playMode .ui-button-text").text($(this).next().text());
$('#playModeMenu').hide();
});
-
+
$('#playModeContainer').mouseleave(function() {
$('#playModeMenu').hide();
});
-
+
$('#arepeat').button();
$('#brepeat').button();
$('#cancelrepeat').button();
@@ -370,7 +370,7 @@ $(document).ready(function(){
$(this).hide();
$('#arepeat').show();
});
-
+
setTimeout(function() {
$("body").splitter({
'sizeLeft' : true,
@@ -378,7 +378,7 @@ $(document).ready(function(){
});
$(window).resize();
}, 100);
-
+
var idsearch = window.location.href.match(/id=.*\/\d+/);
if (idsearch != null) {
var id = idsearch[0].split('=')[1];
@@ -390,10 +390,10 @@ $(document).ready(function(){
}
);
}
-
+
/** Shop **/
$('form#shopSearchForm').submit(shopSearchSubmit);
-
+
screenMappings = {
'playlistNav' : {'selector' : $('.browsePane, #browsePaneSplitter')},
'nowPlayingNav' : {'selector' : $('#nowPlayingContainer')},
@@ -402,30 +402,30 @@ $(document).ready(function(){
'shopNav' : {'selector' : $('#shopContainer')
, 'callback' : refreshShopStatus}
};
-
+
$('div#navigation button.screen').click(function() {
switchWindow($(this), true);
});
-
+
$('button#logout').click(function() {
window.location = '/logout_handler';
});
-
+
$('a.artistLink').live('click', clickArtistLink);
-
+
$('.albumToggle').change(toggleAlbumVisibility);
$('#albumCheckbox').data('type', 'Album');
$('#epCheckbox').data('type', 'EP');
$('#liveCheckbox').data('type', 'Live');
$('#compilationCheckbox').data('type', 'Compilation');
$('#otherCheckbox').data('type', 'Other');
-
+
$('.playAlbumButton').live('click', playAlbumHandler);
$('.queueAlbumButton').live('click', queueAlbumHandler);
$('.searchAlbumButton').live('click', searchAlbumHandler);
-
+
$('span.shopAlbumSearchLink').live('click', searchForShopAlbum);
-
+
/* Initialize playlists */
$('div#switchBrowseMode').children('div').click(switchBrowseModeHandler);
initializePlaylistTree();
@@ -571,10 +571,10 @@ function searchCallback(results) {
url : '/hello/treeBrowseAJAX'
}
},
- callback : {
+ callback : {
// Make sure static is not used once the tree has loaded for the first time
- onload : function (t) {
- t.settings.data.opts.static = false;
+ onload : function (t) {
+ t.settings.data.opts.static = false;
},
// Take care of refresh calls - n will be false only when the whole tree is refreshed or loaded of the first time
beforedata : function (n, t) {
@@ -920,7 +920,7 @@ function populateArtistNavCallback(data) {
populateArtistNav(data['mbid']);
}
}
-
+
function populateArtistNav(artistMbid) {
$.getJSON(
'/hello/getArtistImagesAJAX',
@@ -1104,11 +1104,11 @@ function populateArtistBrowserAlbumsRelationships(data) {
otherCount++;
checkbox = $('#otherCheckbox');
}
-
+
if (!checkbox.is(':checked')) {
e.hide();
}
-
+
var buttons = $('').addClass('albumButtons');
if (album['local']) {
e.addClass('bold');
@@ -1117,7 +1117,7 @@ function populateArtistBrowserAlbumsRelationships(data) {
} else {
buttons.append($('').addClass('ui-icon ui-icon-search searchAlbumButton'));
}
-
+
e.append(buttons);
$('#artistBrowserAlbumList').append(e);
}
@@ -1246,7 +1246,7 @@ function refreshShopStatus() {
function showShopStatuses(data) {
var downloads = data['downloads'];
-
+
$('div#shopDownloading').empty();
for (var i=0; i ')
.insertAfter(A).css("z-index", "100").append(focuser)
@@ -157,7 +157,7 @@
this._init = opts["size"+this._pane]===true ?
parseInt($.curCSS(this[0],opts.split)) : opts["size"+this._pane];
});
-
+
// Determine initial position, get from cookie if specified
var initPos = A._init;
if ( !isNaN(B._init) ) // recalc initial B size as an offset from the top or left side
@@ -170,7 +170,7 @@
initPos = ckpos;
$(window).bind("unload", function(){
var state = String(bar.css(opts.origin)); // current location of splitbar
- $.cookie(opts.cookie, state, {expires: opts.cookieExpires || 365,
+ $.cookie(opts.cookie, state, {expires: opts.cookieExpires || 365,
path: opts.cookiePath || document.location.pathname});
});
}
@@ -191,7 +191,7 @@
}
else if ( opts.resizeToWidth && !$.browser.msie )
$(window).bind("resize", function(){
- splitter.trigger("resize");
+ splitter.trigger("resize");
});
// Resize event handler; triggered immediately to set initial position
diff --git a/templates/h2grav.html b/templates/h2grav.html
index ef36604..87b8e49 100644
--- a/templates/h2grav.html
+++ b/templates/h2grav.html
@@ -14,7 +14,7 @@
-
+