first commit
292
_rejestracja/Static/script/AC_RunActiveContent.js
Normal file
@@ -0,0 +1,292 @@
|
||||
//v1.7
|
||||
// Flash Player Version Detection
|
||||
// Detect Client Browser type
|
||||
// Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved.
|
||||
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
|
||||
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
|
||||
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
|
||||
|
||||
function ControlVersion()
|
||||
{
|
||||
var version;
|
||||
var axo;
|
||||
var e;
|
||||
|
||||
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
|
||||
|
||||
try {
|
||||
// version will be set for 7.X or greater players
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
|
||||
version = axo.GetVariable("$version");
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 6.X players only
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
||||
|
||||
// installed player is some revision of 6.0
|
||||
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
|
||||
// so we have to be careful.
|
||||
|
||||
// default to the first public version
|
||||
version = "WIN 6,0,21,0";
|
||||
|
||||
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
|
||||
axo.AllowScriptAccess = "always";
|
||||
|
||||
// safe to call for 6.0r47 or greater
|
||||
version = axo.GetVariable("$version");
|
||||
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 4.X or 5.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
||||
version = axo.GetVariable("$version");
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 3.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
||||
version = "WIN 3,0,18,0";
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 2.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
|
||||
version = "WIN 2,0,0,11";
|
||||
} catch (e) {
|
||||
version = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
// JavaScript helper required to detect Flash Player PlugIn version information
|
||||
function GetSwfVer(){
|
||||
// NS/Opera version >= 3 check for Flash plugin in plugin array
|
||||
var flashVer = -1;
|
||||
|
||||
if (navigator.plugins != null && navigator.plugins.length > 0) {
|
||||
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
|
||||
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
|
||||
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
|
||||
var descArray = flashDescription.split(" ");
|
||||
var tempArrayMajor = descArray[2].split(".");
|
||||
var versionMajor = tempArrayMajor[0];
|
||||
var versionMinor = tempArrayMajor[1];
|
||||
var versionRevision = descArray[3];
|
||||
if (versionRevision == "") {
|
||||
versionRevision = descArray[4];
|
||||
}
|
||||
if (versionRevision[0] == "d") {
|
||||
versionRevision = versionRevision.substring(1);
|
||||
} else if (versionRevision[0] == "r") {
|
||||
versionRevision = versionRevision.substring(1);
|
||||
if (versionRevision.indexOf("d") > 0) {
|
||||
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
|
||||
}
|
||||
}
|
||||
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
|
||||
}
|
||||
}
|
||||
// MSN/WebTV 2.6 supports Flash 4
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
|
||||
// WebTV 2.5 supports Flash 3
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
|
||||
// older WebTV supports Flash 2
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
|
||||
else if ( isIE && isWin && !isOpera ) {
|
||||
flashVer = ControlVersion();
|
||||
}
|
||||
return flashVer;
|
||||
}
|
||||
|
||||
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
|
||||
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
|
||||
{
|
||||
versionStr = GetSwfVer();
|
||||
if (versionStr == -1 ) {
|
||||
return false;
|
||||
} else if (versionStr != 0) {
|
||||
if(isIE && isWin && !isOpera) {
|
||||
// Given "WIN 2,0,0,11"
|
||||
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
|
||||
tempString = tempArray[1]; // "2,0,0,11"
|
||||
versionArray = tempString.split(","); // ['2', '0', '0', '11']
|
||||
} else {
|
||||
versionArray = versionStr.split(".");
|
||||
}
|
||||
var versionMajor = versionArray[0];
|
||||
var versionMinor = versionArray[1];
|
||||
var versionRevision = versionArray[2];
|
||||
|
||||
// is the major.revision >= requested major.revision AND the minor version >= requested minor
|
||||
if (versionMajor > parseFloat(reqMajorVer)) {
|
||||
return true;
|
||||
} else if (versionMajor == parseFloat(reqMajorVer)) {
|
||||
if (versionMinor > parseFloat(reqMinorVer))
|
||||
return true;
|
||||
else if (versionMinor == parseFloat(reqMinorVer)) {
|
||||
if (versionRevision >= parseFloat(reqRevision))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function AC_AddExtension(src, ext)
|
||||
{
|
||||
if (src.indexOf('?') != -1)
|
||||
return src.replace(/\?/, ext+'?');
|
||||
else
|
||||
return src + ext;
|
||||
}
|
||||
|
||||
function AC_Generateobj(objAttrs, params, embedAttrs)
|
||||
{
|
||||
var str = '';
|
||||
if (isIE && isWin && !isOpera)
|
||||
{
|
||||
str += '<object ';
|
||||
for (var i in objAttrs)
|
||||
{
|
||||
str += i + '="' + objAttrs[i] + '" ';
|
||||
}
|
||||
str += '>';
|
||||
for (var i in params)
|
||||
{
|
||||
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
|
||||
}
|
||||
str += '</object>';
|
||||
}
|
||||
else
|
||||
{
|
||||
str += '<embed ';
|
||||
for (var i in embedAttrs)
|
||||
{
|
||||
str += i + '="' + embedAttrs[i] + '" ';
|
||||
}
|
||||
str += '> </embed>';
|
||||
}
|
||||
|
||||
document.write(str);
|
||||
}
|
||||
|
||||
function AC_FL_RunContent(){
|
||||
var ret =
|
||||
AC_GetArgs
|
||||
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
||||
, "application/x-shockwave-flash"
|
||||
);
|
||||
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
||||
}
|
||||
|
||||
function AC_SW_RunContent(){
|
||||
var ret =
|
||||
AC_GetArgs
|
||||
( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
|
||||
, null
|
||||
);
|
||||
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
||||
}
|
||||
|
||||
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
|
||||
var ret = new Object();
|
||||
ret.embedAttrs = new Object();
|
||||
ret.params = new Object();
|
||||
ret.objAttrs = new Object();
|
||||
for (var i=0; i < args.length; i=i+2){
|
||||
var currArg = args[i].toLowerCase();
|
||||
|
||||
switch (currArg){
|
||||
case "classid":
|
||||
break;
|
||||
case "pluginspage":
|
||||
ret.embedAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "src":
|
||||
case "movie":
|
||||
args[i+1] = AC_AddExtension(args[i+1], ext);
|
||||
ret.embedAttrs["src"] = args[i+1];
|
||||
ret.params[srcParamName] = args[i+1];
|
||||
break;
|
||||
case "onafterupdate":
|
||||
case "onbeforeupdate":
|
||||
case "onblur":
|
||||
case "oncellchange":
|
||||
case "onclick":
|
||||
case "ondblclick":
|
||||
case "ondrag":
|
||||
case "ondragend":
|
||||
case "ondragenter":
|
||||
case "ondragleave":
|
||||
case "ondragover":
|
||||
case "ondrop":
|
||||
case "onfinish":
|
||||
case "onfocus":
|
||||
case "onhelp":
|
||||
case "onmousedown":
|
||||
case "onmouseup":
|
||||
case "onmouseover":
|
||||
case "onmousemove":
|
||||
case "onmouseout":
|
||||
case "onkeypress":
|
||||
case "onkeydown":
|
||||
case "onkeyup":
|
||||
case "onload":
|
||||
case "onlosecapture":
|
||||
case "onpropertychange":
|
||||
case "onreadystatechange":
|
||||
case "onrowsdelete":
|
||||
case "onrowenter":
|
||||
case "onrowexit":
|
||||
case "onrowsinserted":
|
||||
case "onstart":
|
||||
case "onscroll":
|
||||
case "onbeforeeditfocus":
|
||||
case "onactivate":
|
||||
case "onbeforedeactivate":
|
||||
case "ondeactivate":
|
||||
case "type":
|
||||
case "codebase":
|
||||
case "id":
|
||||
ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "width":
|
||||
case "height":
|
||||
case "align":
|
||||
case "vspace":
|
||||
case "hspace":
|
||||
case "class":
|
||||
case "title":
|
||||
case "accesskey":
|
||||
case "name":
|
||||
case "tabindex":
|
||||
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
default:
|
||||
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
|
||||
}
|
||||
}
|
||||
ret.objAttrs["classid"] = classid;
|
||||
if (mimeType) ret.embedAttrs["type"] = mimeType;
|
||||
return ret;
|
||||
}
|
||||
53
_rejestracja/Static/script/UploadFile.js
Normal file
@@ -0,0 +1,53 @@
|
||||
//function CheckExt(value) {
|
||||
//
|
||||
// if (value)
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
|
||||
function CheckExt(file, url) {
|
||||
new Ajax.Request(url,
|
||||
{
|
||||
method:'post',
|
||||
parameters: {file: file},
|
||||
onSuccess: function(transport){
|
||||
var response = transport.responseText;
|
||||
eval(response);
|
||||
|
||||
},
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
});
|
||||
|
||||
}
|
||||
//
|
||||
//function DeletePhoto(url, photo) {
|
||||
// new Ajax.Request(url,
|
||||
// {
|
||||
// method:'post',
|
||||
// parameters: {photo: photo},
|
||||
// onSuccess: function(transport){
|
||||
// var response = transport.responseText;
|
||||
// eval(response);
|
||||
//
|
||||
// },
|
||||
// onFailure: function(){ alert('Something went wrong...') }
|
||||
// });
|
||||
//
|
||||
//}
|
||||
|
||||
function DeletePhoto(url, photo) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({photo: photo}),
|
||||
success: function(html){
|
||||
//$("#longer").show();
|
||||
//$("#categoryOptions").html(html);
|
||||
$('#image_'+photo).hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
26
_rejestracja/Static/script/UploadImage.js
Normal file
@@ -0,0 +1,26 @@
|
||||
$(function(){
|
||||
var btnUpload=$('#upload');
|
||||
var status=$('#status');
|
||||
new AjaxUpload(btnUpload, {
|
||||
action: urlActionUpload,
|
||||
name: 'uploadfile',
|
||||
onSubmit: function(file, ext){
|
||||
if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){
|
||||
// extension is not allowed
|
||||
status.text('tylko JPG, PNG oraz GIF');
|
||||
return false;
|
||||
}
|
||||
//alert(urlActionUpload);
|
||||
status.text('Wgrywam...');
|
||||
},
|
||||
onComplete: function(file, response){
|
||||
//On completion clear the status
|
||||
status.text('');
|
||||
//Add uploaded file to list
|
||||
//alert(response);
|
||||
|
||||
$('#PhotoDisplay', window.parent.document).html(response);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
546
_rejestracja/Static/script/ajaxupload.3.5.js
Normal file
@@ -0,0 +1,546 @@
|
||||
/**
|
||||
* Ajax upload
|
||||
* Project page - http://valums.com/ajax-upload/
|
||||
* Copyright (c) 2008 Andris Valums, http://valums.com
|
||||
* Licensed under the MIT license (http://valums.com/mit-license/)
|
||||
* Version 3.5 (23.06.2009)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Changes from the previous version:
|
||||
* 1. Added better JSON handling that allows to use 'application/javascript' as a response
|
||||
* 2. Added demo for usage with jQuery UI dialog
|
||||
* 3. Fixed IE "mixed content" issue when used with secure connections
|
||||
*
|
||||
* For the full changelog please visit:
|
||||
* http://valums.com/ajax-upload-changelog/
|
||||
*/
|
||||
|
||||
(function(){
|
||||
|
||||
var d = document, w = window;
|
||||
|
||||
/**
|
||||
* Get element by id
|
||||
*/
|
||||
function get(element){
|
||||
if (typeof element == "string")
|
||||
element = d.getElementById(element);
|
||||
return element;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches event to a dom element
|
||||
*/
|
||||
function addEvent(el, type, fn){
|
||||
if (w.addEventListener){
|
||||
el.addEventListener(type, fn, false);
|
||||
} else if (w.attachEvent){
|
||||
var f = function(){
|
||||
fn.call(el, w.event);
|
||||
};
|
||||
el.attachEvent('on' + type, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates and returns element from html chunk
|
||||
*/
|
||||
var toElement = function(){
|
||||
var div = d.createElement('div');
|
||||
return function(html){
|
||||
div.innerHTML = html;
|
||||
var el = div.childNodes[0];
|
||||
div.removeChild(el);
|
||||
return el;
|
||||
}
|
||||
}();
|
||||
|
||||
function hasClass(ele,cls){
|
||||
return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
|
||||
}
|
||||
function addClass(ele,cls) {
|
||||
if (!hasClass(ele,cls)) ele.className += " "+cls;
|
||||
}
|
||||
function removeClass(ele,cls) {
|
||||
var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
|
||||
ele.className=ele.className.replace(reg,' ');
|
||||
}
|
||||
|
||||
// getOffset function copied from jQuery lib (http://jquery.com/)
|
||||
if (document.documentElement["getBoundingClientRect"]){
|
||||
// Get Offset using getBoundingClientRect
|
||||
// http://ejohn.org/blog/getboundingclientrect-is-awesome/
|
||||
var getOffset = function(el){
|
||||
var box = el.getBoundingClientRect(),
|
||||
doc = el.ownerDocument,
|
||||
body = doc.body,
|
||||
docElem = doc.documentElement,
|
||||
|
||||
// for ie
|
||||
clientTop = docElem.clientTop || body.clientTop || 0,
|
||||
clientLeft = docElem.clientLeft || body.clientLeft || 0,
|
||||
|
||||
// In Internet Explorer 7 getBoundingClientRect property is treated as physical,
|
||||
// while others are logical. Make all logical, like in IE8.
|
||||
|
||||
|
||||
zoom = 1;
|
||||
if (body.getBoundingClientRect) {
|
||||
var bound = body.getBoundingClientRect();
|
||||
zoom = (bound.right - bound.left)/body.clientWidth;
|
||||
}
|
||||
if (zoom > 1){
|
||||
clientTop = 0;
|
||||
clientLeft = 0;
|
||||
}
|
||||
var top = box.top/zoom + (window.pageYOffset || docElem && docElem.scrollTop/zoom || body.scrollTop/zoom) - clientTop,
|
||||
left = box.left/zoom + (window.pageXOffset|| docElem && docElem.scrollLeft/zoom || body.scrollLeft/zoom) - clientLeft;
|
||||
|
||||
return {
|
||||
top: top,
|
||||
left: left
|
||||
};
|
||||
}
|
||||
|
||||
} else {
|
||||
// Get offset adding all offsets
|
||||
var getOffset = function(el){
|
||||
if (w.jQuery){
|
||||
return jQuery(el).offset();
|
||||
}
|
||||
|
||||
var top = 0, left = 0;
|
||||
do {
|
||||
top += el.offsetTop || 0;
|
||||
left += el.offsetLeft || 0;
|
||||
}
|
||||
while (el = el.offsetParent);
|
||||
|
||||
return {
|
||||
left: left,
|
||||
top: top
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function getBox(el){
|
||||
var left, right, top, bottom;
|
||||
var offset = getOffset(el);
|
||||
left = offset.left;
|
||||
top = offset.top;
|
||||
|
||||
right = left + el.offsetWidth;
|
||||
bottom = top + el.offsetHeight;
|
||||
|
||||
return {
|
||||
left: left,
|
||||
right: right,
|
||||
top: top,
|
||||
bottom: bottom
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Crossbrowser mouse coordinates
|
||||
*/
|
||||
function getMouseCoords(e){
|
||||
// pageX/Y is not supported in IE
|
||||
// http://www.quirksmode.org/dom/w3c_cssom.html
|
||||
if (!e.pageX && e.clientX){
|
||||
// In Internet Explorer 7 some properties (mouse coordinates) are treated as physical,
|
||||
// while others are logical (offset).
|
||||
var zoom = 1;
|
||||
var body = document.body;
|
||||
|
||||
if (body.getBoundingClientRect) {
|
||||
var bound = body.getBoundingClientRect();
|
||||
zoom = (bound.right - bound.left)/body.clientWidth;
|
||||
}
|
||||
|
||||
return {
|
||||
x: e.clientX / zoom + d.body.scrollLeft + d.documentElement.scrollLeft,
|
||||
y: e.clientY / zoom + d.body.scrollTop + d.documentElement.scrollTop
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
x: e.pageX,
|
||||
y: e.pageY
|
||||
};
|
||||
|
||||
}
|
||||
/**
|
||||
* Function generates unique id
|
||||
*/
|
||||
var getUID = function(){
|
||||
var id = 0;
|
||||
return function(){
|
||||
return 'ValumsAjaxUpload' + id++;
|
||||
}
|
||||
}();
|
||||
|
||||
function fileFromPath(file){
|
||||
return file.replace(/.*(\/|\\)/, "");
|
||||
}
|
||||
|
||||
function getExt(file){
|
||||
return (/[.]/.exec(file)) ? /[^.]+$/.exec(file.toLowerCase()) : '';
|
||||
}
|
||||
|
||||
// Please use AjaxUpload , Ajax_upload will be removed in the next version
|
||||
Ajax_upload = AjaxUpload = function(button, options){
|
||||
if (button.jquery){
|
||||
// jquery object was passed
|
||||
button = button[0];
|
||||
} else if (typeof button == "string" && /^#.*/.test(button)){
|
||||
button = button.slice(1);
|
||||
}
|
||||
button = get(button);
|
||||
|
||||
this._input = null;
|
||||
this._button = button;
|
||||
this._disabled = false;
|
||||
this._submitting = false;
|
||||
// Variable changes to true if the button was clicked
|
||||
// 3 seconds ago (requred to fix Safari on Mac error)
|
||||
this._justClicked = false;
|
||||
this._parentDialog = d.body;
|
||||
|
||||
if (window.jQuery && jQuery.ui && jQuery.ui.dialog){
|
||||
var parentDialog = jQuery(this._button).parents('.ui-dialog');
|
||||
if (parentDialog.length){
|
||||
this._parentDialog = parentDialog[0];
|
||||
}
|
||||
}
|
||||
|
||||
this._settings = {
|
||||
// Location of the server-side upload script
|
||||
action: 'upload.php',
|
||||
// File upload name
|
||||
name: 'userfile',
|
||||
// Additional data to send
|
||||
data: {},
|
||||
// Submit file as soon as it's selected
|
||||
autoSubmit: true,
|
||||
// The type of data that you're expecting back from the server.
|
||||
// Html and xml are detected automatically.
|
||||
// Only useful when you are using json data as a response.
|
||||
// Set to "json" in that case.
|
||||
responseType: false,
|
||||
// When user selects a file, useful with autoSubmit disabled
|
||||
onChange: function(file, extension){},
|
||||
// Callback to fire before file is uploaded
|
||||
// You can return false to cancel upload
|
||||
onSubmit: function(file, extension){},
|
||||
// Fired when file upload is completed
|
||||
// WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE!
|
||||
onComplete: function(file, response) {}
|
||||
};
|
||||
|
||||
// Merge the users options with our defaults
|
||||
for (var i in options) {
|
||||
this._settings[i] = options[i];
|
||||
}
|
||||
|
||||
this._createInput();
|
||||
this._rerouteClicks();
|
||||
}
|
||||
|
||||
// assigning methods to our class
|
||||
AjaxUpload.prototype = {
|
||||
setData : function(data){
|
||||
this._settings.data = data;
|
||||
},
|
||||
disable : function(){
|
||||
this._disabled = true;
|
||||
},
|
||||
enable : function(){
|
||||
this._disabled = false;
|
||||
},
|
||||
// removes ajaxupload
|
||||
destroy : function(){
|
||||
if(this._input){
|
||||
if(this._input.parentNode){
|
||||
this._input.parentNode.removeChild(this._input);
|
||||
}
|
||||
this._input = null;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Creates invisible file input above the button
|
||||
*/
|
||||
_createInput : function(){
|
||||
var self = this;
|
||||
var input = d.createElement("input");
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('name', this._settings.name);
|
||||
var styles = {
|
||||
'position' : 'absolute'
|
||||
,'margin': '-5px 0 0 -175px'
|
||||
,'padding': 0
|
||||
,'width': '220px'
|
||||
,'height': '30px'
|
||||
,'fontSize': '14px'
|
||||
,'opacity': 0
|
||||
,'cursor': 'pointer'
|
||||
,'display' : 'none'
|
||||
,'zIndex' : 2147483583 //Max zIndex supported by Opera 9.0-9.2x
|
||||
// Strange, I expected 2147483647
|
||||
};
|
||||
for (var i in styles){
|
||||
input.style[i] = styles[i];
|
||||
}
|
||||
|
||||
// Make sure that element opacity exists
|
||||
// (IE uses filter instead)
|
||||
if ( ! (input.style.opacity === "0")){
|
||||
input.style.filter = "alpha(opacity=0)";
|
||||
}
|
||||
|
||||
this._parentDialog.appendChild(input);
|
||||
|
||||
addEvent(input, 'change', function(){
|
||||
// get filename from input
|
||||
var file = fileFromPath(this.value);
|
||||
if(self._settings.onChange.call(self, file, getExt(file)) == false ){
|
||||
return;
|
||||
}
|
||||
// Submit form when value is changed
|
||||
if (self._settings.autoSubmit){
|
||||
self.submit();
|
||||
}
|
||||
});
|
||||
|
||||
// Fixing problem with Safari
|
||||
// The problem is that if you leave input before the file select dialog opens
|
||||
// it does not upload the file.
|
||||
// As dialog opens slowly (it is a sheet dialog which takes some time to open)
|
||||
// there is some time while you can leave the button.
|
||||
// So we should not change display to none immediately
|
||||
addEvent(input, 'click', function(){
|
||||
self.justClicked = true;
|
||||
setTimeout(function(){
|
||||
// we will wait 3 seconds for dialog to open
|
||||
self.justClicked = false;
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
this._input = input;
|
||||
},
|
||||
_rerouteClicks : function (){
|
||||
var self = this;
|
||||
|
||||
// IE displays 'access denied' error when using this method
|
||||
// other browsers just ignore click()
|
||||
// addEvent(this._button, 'click', function(e){
|
||||
// self._input.click();
|
||||
// });
|
||||
|
||||
var box, dialogOffset = {top:0, left:0}, over = false;
|
||||
addEvent(self._button, 'mouseover', function(e){
|
||||
if (!self._input || over) return;
|
||||
over = true;
|
||||
box = getBox(self._button);
|
||||
|
||||
if (self._parentDialog != d.body){
|
||||
dialogOffset = getOffset(self._parentDialog);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// we can't use mouseout on the button,
|
||||
// because invisible input is over it
|
||||
addEvent(document, 'mousemove', function(e){
|
||||
var input = self._input;
|
||||
if (!input || !over) return;
|
||||
|
||||
if (self._disabled){
|
||||
removeClass(self._button, 'hover');
|
||||
input.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
var c = getMouseCoords(e);
|
||||
|
||||
if ((c.x >= box.left) && (c.x <= box.right) &&
|
||||
(c.y >= box.top) && (c.y <= box.bottom)){
|
||||
input.style.top = c.y - dialogOffset.top + 'px';
|
||||
input.style.left = c.x - dialogOffset.left + 'px';
|
||||
input.style.display = 'block';
|
||||
addClass(self._button, 'hover');
|
||||
} else {
|
||||
// mouse left the button
|
||||
over = false;
|
||||
if (!self.justClicked){
|
||||
input.style.display = 'none';
|
||||
}
|
||||
removeClass(self._button, 'hover');
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
/**
|
||||
* Creates iframe with unique name
|
||||
*/
|
||||
_createIframe : function(){
|
||||
// unique name
|
||||
// We cannot use getTime, because it sometimes return
|
||||
// same value in safari :(
|
||||
var id = getUID();
|
||||
|
||||
// Remove ie6 "This page contains both secure and nonsecure items" prompt
|
||||
// http://tinyurl.com/77w9wh
|
||||
var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />');
|
||||
iframe.id = id;
|
||||
iframe.style.display = 'none';
|
||||
d.body.appendChild(iframe);
|
||||
return iframe;
|
||||
},
|
||||
/**
|
||||
* Upload file without refreshing the page
|
||||
*/
|
||||
submit : function(){
|
||||
var self = this, settings = this._settings;
|
||||
|
||||
if (this._input.value === ''){
|
||||
// there is no file
|
||||
return;
|
||||
}
|
||||
|
||||
// get filename from input
|
||||
var file = fileFromPath(this._input.value);
|
||||
|
||||
// execute user event
|
||||
if (! (settings.onSubmit.call(this, file, getExt(file)) == false)) {
|
||||
// Create new iframe for this submission
|
||||
var iframe = this._createIframe();
|
||||
|
||||
// Do not submit if user function returns false
|
||||
var form = this._createForm(iframe);
|
||||
form.appendChild(this._input);
|
||||
|
||||
form.submit();
|
||||
|
||||
d.body.removeChild(form);
|
||||
form = null;
|
||||
this._input = null;
|
||||
|
||||
// create new input
|
||||
this._createInput();
|
||||
|
||||
var toDeleteFlag = false;
|
||||
|
||||
addEvent(iframe, 'load', function(e){
|
||||
|
||||
if (// For Safari
|
||||
iframe.src == "javascript:'%3Chtml%3E%3C/html%3E';" ||
|
||||
// For FF, IE
|
||||
iframe.src == "javascript:'<html></html>';"){
|
||||
|
||||
// First time around, do not delete.
|
||||
if( toDeleteFlag ){
|
||||
// Fix busy state in FF3
|
||||
setTimeout( function() {
|
||||
d.body.removeChild(iframe);
|
||||
}, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var doc = iframe.contentDocument ? iframe.contentDocument : frames[iframe.id].document;
|
||||
|
||||
// fixing Opera 9.26
|
||||
if (doc.readyState && doc.readyState != 'complete'){
|
||||
// Opera fires load event multiple times
|
||||
// Even when the DOM is not ready yet
|
||||
// this fix should not affect other browsers
|
||||
return;
|
||||
}
|
||||
|
||||
// fixing Opera 9.64
|
||||
if (doc.body && doc.body.innerHTML == "false"){
|
||||
// In Opera 9.64 event was fired second time
|
||||
// when body.innerHTML changed from false
|
||||
// to server response approx. after 1 sec
|
||||
return;
|
||||
}
|
||||
|
||||
var response;
|
||||
|
||||
if (doc.XMLDocument){
|
||||
// response is a xml document IE property
|
||||
response = doc.XMLDocument;
|
||||
} else if (doc.body){
|
||||
// response is html document or plain text
|
||||
response = doc.body.innerHTML;
|
||||
if (settings.responseType && settings.responseType.toLowerCase() == 'json'){
|
||||
// If the document was sent as 'application/javascript' or
|
||||
// 'text/javascript', then the browser wraps the text in a <pre>
|
||||
// tag and performs html encoding on the contents. In this case,
|
||||
// we need to pull the original text content from the text node's
|
||||
// nodeValue property to retrieve the unmangled content.
|
||||
// Note that IE6 only understands text/html
|
||||
if (doc.body.firstChild && doc.body.firstChild.nodeName.toUpperCase() == 'PRE'){
|
||||
response = doc.body.firstChild.firstChild.nodeValue;
|
||||
}
|
||||
if (response) {
|
||||
response = window["eval"]("(" + response + ")");
|
||||
} else {
|
||||
response = {};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// response is a xml document
|
||||
var response = doc;
|
||||
}
|
||||
|
||||
settings.onComplete.call(self, file, response);
|
||||
|
||||
// Reload blank page, so that reloading main page
|
||||
// does not re-submit the post. Also, remember to
|
||||
// delete the frame
|
||||
toDeleteFlag = true;
|
||||
|
||||
// Fix IE mixed content issue
|
||||
iframe.src = "javascript:'<html></html>';";
|
||||
});
|
||||
|
||||
} else {
|
||||
// clear input to allow user to select same file
|
||||
// Doesn't work in IE6
|
||||
// this._input.value = '';
|
||||
d.body.removeChild(this._input);
|
||||
this._input = null;
|
||||
|
||||
// create new input
|
||||
this._createInput();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Creates form, that will be submitted to iframe
|
||||
*/
|
||||
_createForm : function(iframe){
|
||||
var settings = this._settings;
|
||||
|
||||
// method, enctype must be specified here
|
||||
// because changing this attr on the fly is not allowed in IE 6/7
|
||||
var form = toElement('<form method="post" enctype="multipart/form-data"></form>');
|
||||
form.style.display = 'none';
|
||||
form.action = settings.action;
|
||||
form.target = iframe.name;
|
||||
d.body.appendChild(form);
|
||||
|
||||
// Create hidden input element for each data key
|
||||
for (var prop in settings.data){
|
||||
var el = d.createElement("input");
|
||||
el.type = 'hidden';
|
||||
el.name = prop;
|
||||
el.value = settings.data[prop];
|
||||
form.appendChild(el);
|
||||
}
|
||||
return form;
|
||||
}
|
||||
};
|
||||
})();
|
||||
197
_rejestracja/Static/script/calendar.js
Normal file
@@ -0,0 +1,197 @@
|
||||
document.onmousemove = mysz;
|
||||
|
||||
var ie, ns4, ns6;
|
||||
ie = document.all;
|
||||
ns4 = document.layers;
|
||||
ns6 = document.getElementById && !document.all;
|
||||
|
||||
var data = new Date();
|
||||
var amies = data.getMonth();
|
||||
var arok = data.getFullYear();
|
||||
var adzien = data.getDate();
|
||||
var adzientyg = data.getDay();
|
||||
var frmpole;
|
||||
|
||||
// ilo?? dni w roku
|
||||
var dni = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
|
||||
// nazwy miesi?cy
|
||||
var miesiac = new Array('Styczeń','Luty','Marzec','Kwiecień', 'Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień');
|
||||
|
||||
// dane kolor<6F>w
|
||||
var kol = new Array(5)
|
||||
kol[0] = '#F5F5F5'; // kolor t?a kalendarza, kolor tekstu wybranego dnia, nazw dni tyg...
|
||||
kol[1] = '#E1E2E4'; // kolor p<>l kalendarza - dni zwyk?e
|
||||
kol[2] = '#F0D998'; // kolor p<>l kalendarza - niedziele
|
||||
kol[3] = '#6E6E6E'; // kolor pola oznaczaj?cego aktualny dzie?, kolor ramki, przycisku zamykajacego, tekstu
|
||||
kol[4] = '#A883B3'; // kolor p<>l okreslajacych dni tygodnia (pn,wt...)
|
||||
|
||||
// ile lat pokazywane w kalendarzu od aktualnej daty
|
||||
var wstecz = 80;
|
||||
var wprzod = 4;
|
||||
|
||||
// ilo?? dni w Lutym - przeliczane po zmianie miesi?ca lub roku
|
||||
function dniMies()
|
||||
{
|
||||
dni[1] = (rok % 4 == 0) ? 29 : 28;
|
||||
}
|
||||
|
||||
// pobieranie pozycji myszy
|
||||
function mysz(e)
|
||||
{
|
||||
if(ns4 || ns6)
|
||||
{
|
||||
x = e.pageX;
|
||||
y = e.pageY;
|
||||
}
|
||||
if(ie)
|
||||
{
|
||||
x = document.body.scrollLeft+event.clientX;
|
||||
y = document.body.scrollTop+event.clientY;
|
||||
}
|
||||
}
|
||||
|
||||
// funkcja pokazujaca kalendarz pod kursorem myszy
|
||||
function showKal(fp)
|
||||
{
|
||||
if(fp.value != "" && fp.value != "0000-00-00")
|
||||
{
|
||||
str = new String(fp.value);
|
||||
dataArray = str.split("-", 3);
|
||||
mies = dataArray[1] -1;
|
||||
rok = dataArray[0];
|
||||
dzien = dataArray[2];
|
||||
|
||||
data = new Date(rok, mies, 1);
|
||||
|
||||
//dzientyg = data.getDay();
|
||||
}
|
||||
else
|
||||
{
|
||||
data = new Date(arok, amies, 1);
|
||||
}
|
||||
|
||||
mies = data.getMonth();
|
||||
rok = data.getFullYear();
|
||||
dzien = data.getDate();
|
||||
dzientyg = data.getDay();
|
||||
dniMies();
|
||||
|
||||
frmpole = fp;
|
||||
pozx = x;
|
||||
pozy = y;
|
||||
|
||||
rysujKal();
|
||||
|
||||
if(ns6 || ie)
|
||||
{
|
||||
document.getElementById('kalendarz').style.left = pozx+'px';
|
||||
document.getElementById('kalendarz').style.top = (pozy-140)+'px';
|
||||
document.getElementById('kalendarz').style.visibility = 'visible';
|
||||
}
|
||||
}
|
||||
|
||||
// funkcja ukrywajaca kalendarz i wstawiajaca wybran? dat? do pola formularza
|
||||
function hideKal()
|
||||
{
|
||||
if(ns6 || ie)
|
||||
document.getElementById('kalendarz').style.visibility = 'hidden';
|
||||
|
||||
// tutaj ustawia si? format daty
|
||||
// np:
|
||||
// format = selectday + ' ' + miesiac[mies] + ' ' + rok;
|
||||
|
||||
// inny format daty - z zerami poprzedzaj?cymi
|
||||
mies++;
|
||||
if(mies < 10)
|
||||
mies = '0' + mies;
|
||||
if(selectday < 10)
|
||||
selectday = '0' + selectday;
|
||||
|
||||
format = rok+'-'+mies+'-'+selectday
|
||||
|
||||
frmpole.value = format;
|
||||
}
|
||||
|
||||
// ukrywanie kalendarza bez wstawiania daty
|
||||
function exitKal()
|
||||
{
|
||||
if(ns6 || ie)
|
||||
document.getElementById('kalendarz').style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
// ustawianie nowej daty po zmianie miesiaca lub roku
|
||||
function setData()
|
||||
{
|
||||
mies = document.forms['sdata'].elements['month'].value;
|
||||
rok = document.forms['sdata'].elements['year'].value;
|
||||
|
||||
data = new Date(rok, mies, 1);
|
||||
mies = data.getMonth();
|
||||
rok = data.getFullYear();
|
||||
dzien = data.getDate();
|
||||
dzientyg = data.getDay();
|
||||
dniMies();
|
||||
rysujKal();
|
||||
}
|
||||
|
||||
// rysowanie kalendarza
|
||||
function rysujKal()
|
||||
{
|
||||
kaltxt = '<form name="sdata" onSubmit="return false;">';
|
||||
kaltxt += '<table border=0 cellpadding=0 cellspacing=2 style="border:#CECECE 2px solid;background-color:'+kol[0]+';">';
|
||||
kaltxt += '<tr class=dzien><td colspan=6 height=25><select name="month" class="lista" onChange="setData()">';
|
||||
for(i=0;i<12;i++)
|
||||
{
|
||||
if(i==mies)
|
||||
kaltxt += '<option value="'+i+'" selected>'+miesiac[i]+'</option>';
|
||||
else
|
||||
kaltxt += '<option value="'+i+'">'+miesiac[i]+'</option>';
|
||||
}
|
||||
kaltxt += '</select> <select name="year" class="lista" onChange="setData()">';
|
||||
for(i=(rok-wstecz);i<=(rok+wprzod);i++)
|
||||
{
|
||||
if(i==rok)
|
||||
kaltxt += '<option value="'+i+'" selected>'+i+'</option>';
|
||||
else
|
||||
kaltxt += '<option value="'+i+'">'+i+'</option>';
|
||||
}
|
||||
kaltxt += '</select>';
|
||||
kaltxt += '</td><td><a href="javascript:exitKal()"><span class="aktday"> X </span></a></td></tr>';
|
||||
kaltxt += '<tr class=dnityg><td width=30>Nd</td><td width=30>Pn</td><td width=30>Wt</td><td width=30>Śr</td>';
|
||||
kaltxt += '<td width=30>Czw</td><td width=30>Pt</td><td width=30>So</td></tr><tr class=dzien>';
|
||||
|
||||
j = 1;
|
||||
|
||||
for(i=0;i<dzientyg+dni[mies];i++)
|
||||
{
|
||||
if(i>=dzientyg)
|
||||
{
|
||||
if(j==adzien && rok==arok && mies==amies)
|
||||
kaltxt += '<td><a style=color:black href="javascript:selectday='+j+';hideKal();" >'+j+'</a></td>';
|
||||
else if(i%7==0)
|
||||
kaltxt += '<td class=niedz><a class=niedz style=color:black href="javascript:selectday='+j+';hideKal();" >'+j+'</a></td>';
|
||||
else
|
||||
kaltxt += '<td><a class=dzien style=color:black href="javascript:selectday='+j+';hideKal();" >'+j+'</a></td>';
|
||||
j++;
|
||||
if(i%7==6)
|
||||
kaltxt += '</tr><tr class=dzien>';
|
||||
}
|
||||
else
|
||||
kaltxt += '<td></td>';
|
||||
}
|
||||
|
||||
kaltxt += '</tr></table></form>';
|
||||
|
||||
document.getElementById("kalendarz").innerHTML = kaltxt;
|
||||
}
|
||||
|
||||
// style kalendarza i warstwa, na kt<6B>rej si? znajduje
|
||||
document.write('<div id="kalendarz" style="visibility:hidden;position:absolute;z-index:100;"></div>');
|
||||
document.write('<style type="text/css">');
|
||||
document.write('.dzien{font-family:Verdana;font-size:11px;color:'+kol[3]+';text-align:center;background-color:'+kol[1]+';text-decoration:none}');
|
||||
document.write('.niedz{font-family:Verdana;font-size:11px;color:'+kol[3]+';text-align:center;background-color:'+kol[2]+';text-decoration:none}');
|
||||
document.write('.aktday{color:'+kol[0]+';font-weight:bold;text-align:center;background-color:silver;text-decoration:none}');
|
||||
document.write('.dnityg{font-family:Verdana;font-size:11px;color:'+kol[0]+';text-align:center;background-color:'+kol[4]+';}');
|
||||
document.write('.lista{font-family:Verdana;font-size:11px;color:'+kol[3]+';}</style>');
|
||||
|
||||
//-->
|
||||
7
_rejestracja/Static/script/captcha.js
Normal file
@@ -0,0 +1,7 @@
|
||||
function recaptcha(obj) {
|
||||
var arr = $(obj).attr('src').split(",");
|
||||
var rand = Math.random();
|
||||
rand = rand + ".html";
|
||||
arr[1] = rand;
|
||||
$(obj).attr('src',arr.join(","));
|
||||
}
|
||||
45
_rejestracja/Static/script/doubletaptogo.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
By Osvaldas Valutis, www.osvaldas.info
|
||||
Available for use under the MIT License
|
||||
*/
|
||||
|
||||
|
||||
|
||||
;(function( $, window, document, undefined )
|
||||
{
|
||||
$.fn.doubleTapToGo = function( params )
|
||||
{
|
||||
if( !( 'ontouchstart' in window ) &&
|
||||
!navigator.msMaxTouchPoints &&
|
||||
!navigator.userAgent.toLowerCase().match( /windows phone os 7/i ) ) return false;
|
||||
|
||||
this.each( function()
|
||||
{
|
||||
var curItem = false;
|
||||
|
||||
$( this ).on( 'click', function( e )
|
||||
{
|
||||
var item = $( this );
|
||||
if( item[ 0 ] != curItem[ 0 ] )
|
||||
{
|
||||
e.preventDefault();
|
||||
curItem = item;
|
||||
}
|
||||
});
|
||||
|
||||
$( document ).on( 'click touchstart MSPointerDown', function( e )
|
||||
{
|
||||
var resetItem = true,
|
||||
parents = $( e.target ).parents();
|
||||
|
||||
for( var i = 0; i < parents.length; i++ )
|
||||
if( parents[ i ] == curItem[ 0 ] )
|
||||
resetItem = false;
|
||||
|
||||
if( resetItem )
|
||||
curItem = false;
|
||||
});
|
||||
});
|
||||
return this;
|
||||
};
|
||||
})( jQuery, window, document );
|
||||
879
_rejestracja/Static/script/drag-drop-folder-tree.js
Normal file
@@ -0,0 +1,879 @@
|
||||
/************************************************************************************************************
|
||||
Drag and drop folder tree
|
||||
Copyright (C) 2006 DTHMLGoodies.com, Alf Magne Kalleland
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
|
||||
written by Alf Magne Kalleland.
|
||||
|
||||
Alf Magne Kalleland, 2006
|
||||
Owner of DHTMLgoodies.com
|
||||
|
||||
|
||||
************************************************************************************************************/
|
||||
|
||||
var JSTreeObj;
|
||||
var treeUlCounter = 0;
|
||||
var nodeId = 1;
|
||||
|
||||
/* Constructor */
|
||||
function JSDragDropTree()
|
||||
{
|
||||
var idOfTree;
|
||||
var imageFolder;
|
||||
var folderImage;
|
||||
var plusImage;
|
||||
var minusImage;
|
||||
var maximumDepth;
|
||||
var dragNode_source;
|
||||
var dragNode_parent;
|
||||
var dragNode_sourceNextSib;
|
||||
var dragNode_noSiblings;
|
||||
var ajaxObjects;
|
||||
|
||||
var dragNode_destination;
|
||||
var floatingContainer;
|
||||
var dragDropTimer;
|
||||
var dropTargetIndicator;
|
||||
var insertAsSub;
|
||||
var indicator_offsetX;
|
||||
var indicator_offsetX_sub;
|
||||
var indicator_offsetY;
|
||||
|
||||
this.imageFolder = 'images/';
|
||||
this.folderImage = 'dhtmlgoodies_folder.gif';
|
||||
this.plusImage = 'dhtmlgoodies_plus.gif';
|
||||
this.minusImage = 'dhtmlgoodies_minus.gif';
|
||||
this.maximumDepth = 7;
|
||||
var messageMaximumDepthReached;
|
||||
var filePathRenameItem;
|
||||
var filePathDeleteItem;
|
||||
var additionalRenameRequestParameters = {};
|
||||
var additionalDeleteRequestParameters = {};
|
||||
|
||||
var renameAllowed;
|
||||
var deleteAllowed;
|
||||
var currentlyActiveItem;
|
||||
var contextMenu;
|
||||
var currentItemToEdit; // Reference to item currently being edited(example: renamed)
|
||||
var helpObj;
|
||||
|
||||
this.contextMenu = false;
|
||||
this.floatingContainer = document.createElement('UL');
|
||||
this.floatingContainer.style.position = 'absolute';
|
||||
this.floatingContainer.style.display='none';
|
||||
this.floatingContainer.id = 'floatingContainer';
|
||||
this.insertAsSub = false;
|
||||
document.body.appendChild(this.floatingContainer);
|
||||
this.dragDropTimer = -1;
|
||||
this.dragNode_noSiblings = false;
|
||||
this.currentItemToEdit = false;
|
||||
|
||||
if(document.all){
|
||||
this.indicator_offsetX = 0; // Offset position of small black lines indicating where nodes would be dropped.
|
||||
this.indicator_offsetX_sub = 8;
|
||||
this.indicator_offsetY = 5;
|
||||
}else{
|
||||
this.indicator_offsetX = 0; // Offset position of small black lines indicating where nodes would be dropped.
|
||||
this.indicator_offsetX_sub = 8;
|
||||
this.indicator_offsetY = 5;
|
||||
}
|
||||
if(navigator.userAgent.indexOf('Opera')>=0){
|
||||
this.indicator_offsetX = 0; // Offset position of small black lines indicating where nodes would be dropped.
|
||||
this.indicator_offsetX_sub = 8;
|
||||
this.indicator_offsetY = 5;
|
||||
}
|
||||
|
||||
this.messageMaximumDepthReached = ''; // Use '' if you don't want to display a message
|
||||
|
||||
this.renameAllowed = true;
|
||||
this.deleteAllowed = true;
|
||||
this.currentlyActiveItem = true;
|
||||
this.filePathRenameItem = 'folderTree_updateItem.php';
|
||||
this.filePathDeleteItem = 'folderTree_updateItem.php';
|
||||
this.ajaxObjects = new Array();
|
||||
this.helpObj = false;
|
||||
|
||||
this.RENAME_STATE_BEGIN = 1;
|
||||
this.RENAME_STATE_CANCELED = 2;
|
||||
this.RENAME_STATE_REQUEST_SENDED = 3;
|
||||
this.renameState = null;
|
||||
}
|
||||
|
||||
|
||||
/* JSDragDropTree class */
|
||||
JSDragDropTree.prototype = {
|
||||
// {{{ addEvent()
|
||||
/**
|
||||
*
|
||||
* This function adds an event listener to an element on the page.
|
||||
*
|
||||
* @param Object whichObject = Reference to HTML element(Which object to assigne the event)
|
||||
* @param String eventType = Which type of event, example "mousemove" or "mouseup"
|
||||
* @param functionName = Name of function to execute.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
addEvent : function(whichObject,eventType,functionName)
|
||||
{
|
||||
if(whichObject.attachEvent){
|
||||
whichObject['e'+eventType+functionName] = functionName;
|
||||
whichObject[eventType+functionName] = function(){whichObject['e'+eventType+functionName]( window.event );}
|
||||
whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName] );
|
||||
} else
|
||||
whichObject.addEventListener(eventType,functionName,false);
|
||||
}
|
||||
// }}}
|
||||
,
|
||||
// {{{ removeEvent()
|
||||
/**
|
||||
*
|
||||
* This function removes an event listener from an element on the page.
|
||||
*
|
||||
* @param Object whichObject = Reference to HTML element(Which object to assigne the event)
|
||||
* @param String eventType = Which type of event, example "mousemove" or "mouseup"
|
||||
* @param functionName = Name of function to execute.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
removeEvent : function(whichObject,eventType,functionName)
|
||||
{
|
||||
if(whichObject.detachEvent){
|
||||
whichObject.detachEvent('on'+eventType, whichObject[eventType+functionName]);
|
||||
whichObject[eventType+functionName] = null;
|
||||
} else
|
||||
whichObject.removeEventListener(eventType,functionName,false);
|
||||
}
|
||||
,
|
||||
Get_Cookie : function(name) {
|
||||
var start = document.cookie.indexOf(name+"=");
|
||||
var len = start+name.length+1;
|
||||
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
|
||||
if (start == -1) return null;
|
||||
var end = document.cookie.indexOf(";",len);
|
||||
if (end == -1) end = document.cookie.length;
|
||||
return unescape(document.cookie.substring(len,end));
|
||||
}
|
||||
,
|
||||
// This function has been slightly modified
|
||||
Set_Cookie : function(name,value,expires,path,domain,secure) {
|
||||
expires = expires * 60*60*24*1000;
|
||||
var today = new Date();
|
||||
var expires_date = new Date( today.getTime() + (expires) );
|
||||
var cookieString = name + "=" +escape(value) +
|
||||
( (expires) ? ";expires=" + expires_date.toGMTString() : "") +
|
||||
( (path) ? ";path=" + path : "") +
|
||||
( (domain) ? ";domain=" + domain : "") +
|
||||
( (secure) ? ";secure" : "");
|
||||
document.cookie = cookieString;
|
||||
}
|
||||
,
|
||||
setFileNameRename : function(newFileName)
|
||||
{
|
||||
this.filePathRenameItem = newFileName;
|
||||
}
|
||||
,
|
||||
setFileNameDelete : function(newFileName)
|
||||
{
|
||||
this.filePathDeleteItem = newFileName;
|
||||
}
|
||||
,
|
||||
setAdditionalRenameRequestParameters : function(requestParameters)
|
||||
{
|
||||
this.additionalRenameRequestParameters = requestParameters;
|
||||
}
|
||||
,
|
||||
setAdditionalDeleteRequestParameters : function(requestParameters)
|
||||
{
|
||||
this.additionalDeleteRequestParameters = requestParameters;
|
||||
}
|
||||
,setRenameAllowed : function(renameAllowed)
|
||||
{
|
||||
this.renameAllowed = renameAllowed;
|
||||
}
|
||||
,
|
||||
setDeleteAllowed : function(deleteAllowed)
|
||||
{
|
||||
this.deleteAllowed = deleteAllowed;
|
||||
}
|
||||
,setMaximumDepth : function(maxDepth)
|
||||
{
|
||||
this.maximumDepth = maxDepth;
|
||||
}
|
||||
,setMessageMaximumDepthReached : function(newMessage)
|
||||
{
|
||||
this.messageMaximumDepthReached = newMessage;
|
||||
}
|
||||
,
|
||||
setImageFolder : function(path)
|
||||
{
|
||||
this.imageFolder = path;
|
||||
}
|
||||
,
|
||||
setFolderImage : function(imagePath)
|
||||
{
|
||||
this.folderImage = imagePath;
|
||||
}
|
||||
,
|
||||
setPlusImage : function(imagePath)
|
||||
{
|
||||
this.plusImage = imagePath;
|
||||
}
|
||||
,
|
||||
setMinusImage : function(imagePath)
|
||||
{
|
||||
this.minusImage = imagePath;
|
||||
}
|
||||
,
|
||||
setTreeId : function(idOfTree)
|
||||
{
|
||||
this.idOfTree = idOfTree;
|
||||
}
|
||||
,
|
||||
expandAll : function()
|
||||
{
|
||||
var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
|
||||
for(var no=0;no<menuItems.length;no++){
|
||||
var subItems = menuItems[no].getElementsByTagName('UL');
|
||||
if(subItems.length>0 && subItems[0].style.display!='block'){
|
||||
JSTreeObj.showHideNode(false,menuItems[no].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
,
|
||||
collapseAll : function()
|
||||
{
|
||||
var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
|
||||
for(var no=0;no<menuItems.length;no++){
|
||||
var subItems = menuItems[no].getElementsByTagName('UL');
|
||||
if(subItems.length>0 && subItems[0].style.display=='block'){
|
||||
JSTreeObj.showHideNode(false,menuItems[no].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
,
|
||||
/*
|
||||
Find top pos of a tree node
|
||||
*/
|
||||
getTopPos : function(obj){
|
||||
var top = obj.offsetTop/1;
|
||||
while((obj = obj.offsetParent) != null){
|
||||
if(obj.tagName!='HTML')top += obj.offsetTop;
|
||||
}
|
||||
if(document.all)top = top/1 + 13; else top = top/1 + 4;
|
||||
return top;
|
||||
}
|
||||
,
|
||||
/*
|
||||
Find left pos of a tree node
|
||||
*/
|
||||
getLeftPos : function(obj){
|
||||
var left = obj.offsetLeft/1 + 1;
|
||||
while((obj = obj.offsetParent) != null){
|
||||
if(obj.tagName!='HTML')left += obj.offsetLeft;
|
||||
}
|
||||
|
||||
if(document.all)left = left/1 - 2;
|
||||
return left;
|
||||
}
|
||||
|
||||
,
|
||||
showHideNode : function(e,inputId)
|
||||
{
|
||||
if(inputId){
|
||||
if(!document.getElementById(inputId))return;
|
||||
thisNode = document.getElementById(inputId).getElementsByTagName('IMG')[0];
|
||||
}else {
|
||||
thisNode = this;
|
||||
if(this.tagName=='A')thisNode = this.parentNode.getElementsByTagName('IMG')[0];
|
||||
|
||||
}
|
||||
if(thisNode == undefined || thisNode.style.visibility=='hidden')return;
|
||||
var parentNode = thisNode.parentNode;
|
||||
inputId = parentNode.id.replace(/[^0-9]/g,'');
|
||||
if(thisNode.src.indexOf(JSTreeObj.plusImage)>=0){
|
||||
thisNode.src = thisNode.src.replace(JSTreeObj.plusImage,JSTreeObj.minusImage);
|
||||
var ul = parentNode.getElementsByTagName('UL')[0];
|
||||
ul.style.display='block';
|
||||
if(!initExpandedNodes)initExpandedNodes = ',';
|
||||
if(initExpandedNodes.indexOf(',' + inputId + ',')<0) initExpandedNodes = initExpandedNodes + inputId + ',';
|
||||
}else{
|
||||
thisNode.src = thisNode.src.replace(JSTreeObj.minusImage,JSTreeObj.plusImage);
|
||||
parentNode.getElementsByTagName('UL')[0].style.display='none';
|
||||
initExpandedNodes = initExpandedNodes.replace(',' + inputId,'');
|
||||
}
|
||||
JSTreeObj.Set_Cookie('dhtmlgoodies_expandedNodes',initExpandedNodes,500);
|
||||
return false;
|
||||
}
|
||||
,
|
||||
/* Initialize drag */
|
||||
initDrag : function(e)
|
||||
{
|
||||
if(document.all)e = event;
|
||||
|
||||
var subs = JSTreeObj.floatingContainer.getElementsByTagName('LI');
|
||||
if(subs.length>0){
|
||||
if(JSTreeObj.dragNode_sourceNextSib){
|
||||
JSTreeObj.dragNode_parent.insertBefore(JSTreeObj.dragNode_source,JSTreeObj.dragNode_sourceNextSib);
|
||||
}else{
|
||||
JSTreeObj.dragNode_parent.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
}
|
||||
|
||||
JSTreeObj.dragNode_source = this.parentNode;
|
||||
JSTreeObj.dragNode_parent = this.parentNode.parentNode;
|
||||
JSTreeObj.dragNode_sourceNextSib = false;
|
||||
|
||||
|
||||
if(JSTreeObj.dragNode_source.nextSibling)JSTreeObj.dragNode_sourceNextSib = JSTreeObj.dragNode_source.nextSibling;
|
||||
JSTreeObj.dragNode_destination = false;
|
||||
JSTreeObj.dragDropTimer = 0;
|
||||
JSTreeObj.timerDrag();
|
||||
return false;
|
||||
}
|
||||
,
|
||||
timerDrag : function()
|
||||
{
|
||||
if(this.dragDropTimer>=0 && this.dragDropTimer<10){
|
||||
this.dragDropTimer = this.dragDropTimer + 1;
|
||||
setTimeout('JSTreeObj.timerDrag()',20);
|
||||
return;
|
||||
}
|
||||
if(this.dragDropTimer==10)
|
||||
{
|
||||
JSTreeObj.floatingContainer.style.display='block';
|
||||
JSTreeObj.floatingContainer.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
}
|
||||
,
|
||||
moveDragableNodes : function(e)
|
||||
{
|
||||
if(JSTreeObj.dragDropTimer<10)return;
|
||||
if(document.all)e = event;
|
||||
dragDrop_x = e.clientX/1 + 5 + document.body.scrollLeft;
|
||||
dragDrop_y = e.clientY/1 + 5 + document.documentElement.scrollTop;
|
||||
|
||||
JSTreeObj.floatingContainer.style.left = dragDrop_x + 'px';
|
||||
JSTreeObj.floatingContainer.style.top = dragDrop_y + 'px';
|
||||
|
||||
var thisObj = this;
|
||||
if(thisObj.tagName=='A' || thisObj.tagName=='IMG')thisObj = thisObj.parentNode;
|
||||
|
||||
JSTreeObj.dragNode_noSiblings = false;
|
||||
var tmpVar = thisObj.getAttribute('noSiblings');
|
||||
if(!tmpVar)tmpVar = thisObj.noSiblings;
|
||||
if(tmpVar=='true')JSTreeObj.dragNode_noSiblings=true;
|
||||
|
||||
if(thisObj && thisObj.id)
|
||||
{
|
||||
JSTreeObj.dragNode_destination = thisObj;
|
||||
var img = thisObj.getElementsByTagName('IMG')[1];
|
||||
var tmpObj= JSTreeObj.dropTargetIndicator;
|
||||
tmpObj.style.display='block';
|
||||
|
||||
var eventSourceObj = this;
|
||||
if(JSTreeObj.dragNode_noSiblings && eventSourceObj.tagName=='IMG')eventSourceObj = eventSourceObj.nextSibling;
|
||||
|
||||
var tmpImg = tmpObj.getElementsByTagName('IMG')[0];
|
||||
if(this.tagName=='A' || JSTreeObj.dragNode_noSiblings){
|
||||
tmpImg.src = tmpImg.src.replace('ind1','ind2');
|
||||
tmpImg.style.cssFloat = 'left';
|
||||
JSTreeObj.insertAsSub = true;
|
||||
tmpObj.style.left = (JSTreeObj.getLeftPos(eventSourceObj) + JSTreeObj.indicator_offsetX_sub) + 'px';
|
||||
}else{
|
||||
tmpImg.src = tmpImg.src.replace('ind2','ind1');
|
||||
tmpImg.style.cssFloat = 'left';
|
||||
JSTreeObj.insertAsSub = false;
|
||||
tmpObj.style.left = (JSTreeObj.getLeftPos(eventSourceObj) + JSTreeObj.indicator_offsetX) + 'px';
|
||||
}
|
||||
|
||||
|
||||
tmpObj.style.top = (JSTreeObj.getTopPos(thisObj) + JSTreeObj.indicator_offsetY) + 'px';
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
,
|
||||
dropDragableNodes:function()
|
||||
{
|
||||
if(JSTreeObj.dragDropTimer<10){
|
||||
JSTreeObj.dragDropTimer = -1;
|
||||
return;
|
||||
}
|
||||
var showMessage = false;
|
||||
if(JSTreeObj.dragNode_destination){ // Check depth
|
||||
var countUp = JSTreeObj.dragDropCountLevels(JSTreeObj.dragNode_destination,'up');
|
||||
var countDown = JSTreeObj.dragDropCountLevels(JSTreeObj.dragNode_source,'down');
|
||||
var countLevels = countUp/1 + countDown/1 + (JSTreeObj.insertAsSub?1:0);
|
||||
|
||||
if(countLevels>JSTreeObj.maximumDepth){
|
||||
//alert(JSTreeObj.maximumDepth);
|
||||
JSTreeObj.dragNode_destination = false;
|
||||
showMessage = true; // Used later down in this function
|
||||
}
|
||||
if (confirm('Czy napewno przeniść ten element?')) {
|
||||
} else {
|
||||
JSTreeObj.dragNode_destination = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(JSTreeObj.dragNode_destination){
|
||||
if(JSTreeObj.insertAsSub){
|
||||
var uls = JSTreeObj.dragNode_destination.getElementsByTagName('UL');
|
||||
if(uls.length>0){
|
||||
ul = uls[0];
|
||||
ul.style.display='block';
|
||||
|
||||
var lis = ul.getElementsByTagName('LI');
|
||||
|
||||
if(lis.length>0){ // Sub elements exists - drop dragable node before the first one
|
||||
ul.insertBefore(JSTreeObj.dragNode_source,lis[0]);
|
||||
}else { // No sub exists - use the appendChild method - This line should not be executed unless there's something wrong in the HTML, i.e empty <ul>
|
||||
ul.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
}else{
|
||||
var ul = document.createElement('UL');
|
||||
ul.style.display='block';
|
||||
JSTreeObj.dragNode_destination.appendChild(ul);
|
||||
ul.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
var img = JSTreeObj.dragNode_destination.getElementsByTagName('IMG')[0];
|
||||
img.style.visibility='visible';
|
||||
img.style.cssFloat = 'left';
|
||||
img.src = img.src.replace(JSTreeObj.plusImage,JSTreeObj.minusImage);
|
||||
|
||||
|
||||
}else{
|
||||
if(JSTreeObj.dragNode_destination.nextSibling){
|
||||
var nextSib = JSTreeObj.dragNode_destination.nextSibling;
|
||||
nextSib.parentNode.insertBefore(JSTreeObj.dragNode_source,nextSib);
|
||||
}else{
|
||||
JSTreeObj.dragNode_destination.parentNode.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
}
|
||||
/* Clear parent object */
|
||||
var tmpObj = JSTreeObj.dragNode_parent;
|
||||
var lis = tmpObj.getElementsByTagName('LI');
|
||||
if(lis.length==0){
|
||||
var img = tmpObj.parentNode.getElementsByTagName('IMG')[0];
|
||||
img.style.visibility='hidden'; // Hide [+],[-] icon
|
||||
tmpObj.parentNode.removeChild(tmpObj);
|
||||
}
|
||||
|
||||
}else{
|
||||
// Putting the item back to it's original location
|
||||
|
||||
if(JSTreeObj.dragNode_sourceNextSib){
|
||||
JSTreeObj.dragNode_parent.insertBefore(JSTreeObj.dragNode_source,JSTreeObj.dragNode_sourceNextSib);
|
||||
}else{
|
||||
JSTreeObj.dragNode_parent.appendChild(JSTreeObj.dragNode_source);
|
||||
}
|
||||
|
||||
}
|
||||
JSTreeObj.dropTargetIndicator.style.display='none';
|
||||
JSTreeObj.dragDropTimer = -1;
|
||||
if(showMessage && JSTreeObj.messageMaximumDepthReached) {
|
||||
alert(JSTreeObj.messageMaximumDepthReached);
|
||||
} else {
|
||||
//zmianić na jquery i bedzie ok :)
|
||||
PostRequest(updateTreeUrl, treeObj.getNodeOrders());
|
||||
}
|
||||
}
|
||||
,
|
||||
createDropIndicator : function()
|
||||
{
|
||||
this.dropTargetIndicator = document.createElement('DIV');
|
||||
this.dropTargetIndicator.style.position = 'absolute';
|
||||
this.dropTargetIndicator.style.display='none';
|
||||
var img = document.createElement('IMG');
|
||||
img.src = this.imageFolder + 'dragDrop_ind1.gif';
|
||||
img.id = 'dragDropIndicatorImage';
|
||||
this.dropTargetIndicator.appendChild(img);
|
||||
document.body.appendChild(this.dropTargetIndicator);
|
||||
|
||||
}
|
||||
,
|
||||
dragDropCountLevels : function(obj,direction,stopAtObject){
|
||||
var countLevels = 0;
|
||||
if(direction=='up'){
|
||||
while(obj.parentNode && obj.parentNode!=stopAtObject){
|
||||
obj = obj.parentNode;
|
||||
if(obj.tagName=='UL')countLevels = countLevels/1 +1;
|
||||
}
|
||||
return countLevels;
|
||||
}
|
||||
|
||||
if(direction=='down'){
|
||||
var subObjects = obj.getElementsByTagName('LI');
|
||||
for(var no=0;no<subObjects.length;no++){
|
||||
countLevels = Math.max(countLevels,JSTreeObj.dragDropCountLevels(subObjects[no],"up",obj));
|
||||
}
|
||||
return countLevels;
|
||||
}
|
||||
}
|
||||
,
|
||||
cancelEvent : function()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
,
|
||||
cancelSelectionEvent : function()
|
||||
{
|
||||
|
||||
if(JSTreeObj.dragDropTimer<10)return true;
|
||||
return false;
|
||||
}
|
||||
,getNodeOrders : function(initObj,saveString)
|
||||
{
|
||||
|
||||
if(!saveString)var saveString = '';
|
||||
if(!initObj){
|
||||
initObj = document.getElementById(this.idOfTree);
|
||||
|
||||
}
|
||||
var lis = initObj.getElementsByTagName('LI');
|
||||
|
||||
if(lis.length>0){
|
||||
var li = lis[0];
|
||||
while(li){
|
||||
if(li.id){
|
||||
if(saveString.length>0)saveString = saveString + ',';
|
||||
var numericID = li.id.replace(/[^0-9]/gi,'');
|
||||
if(numericID.length==0)numericID='A';
|
||||
var numericParentID = li.parentNode.parentNode.id.replace(/[^0-9]/gi,'');
|
||||
if(numericID!='0'){
|
||||
saveString = saveString + numericID;
|
||||
saveString = saveString + '-';
|
||||
|
||||
|
||||
if(li.parentNode.id!=this.idOfTree)saveString = saveString + numericParentID; else saveString = saveString + '0';
|
||||
}
|
||||
var ul = li.getElementsByTagName('UL');
|
||||
if(ul.length>0){
|
||||
saveString = this.getNodeOrders(ul[0],saveString);
|
||||
}
|
||||
}
|
||||
li = li.nextSibling;
|
||||
}
|
||||
}
|
||||
|
||||
if(initObj.id == this.idOfTree){
|
||||
return saveString;
|
||||
|
||||
}
|
||||
return saveString;
|
||||
}
|
||||
,highlightItem : function(inputObj,e)
|
||||
{
|
||||
if(JSTreeObj.currentlyActiveItem)JSTreeObj.currentlyActiveItem.className = '';
|
||||
this.className = 'highlightedNodeItem';
|
||||
JSTreeObj.currentlyActiveItem = this;
|
||||
}
|
||||
,
|
||||
removeHighlight : function()
|
||||
{
|
||||
if(JSTreeObj.currentlyActiveItem)JSTreeObj.currentlyActiveItem.className = '';
|
||||
JSTreeObj.currentlyActiveItem = false;
|
||||
}
|
||||
,
|
||||
hasSubNodes : function(obj)
|
||||
{
|
||||
var subs = obj.getElementsByTagName('LI');
|
||||
if(subs.length>0)return true;
|
||||
return false;
|
||||
}
|
||||
,
|
||||
deleteItem : function(obj1,obj2)
|
||||
{
|
||||
var message = 'Click OK to delete item ' + obj2.innerHTML;
|
||||
if(this.hasSubNodes(obj2.parentNode)) message = message + ' and it\'s sub nodes';
|
||||
if(confirm(message)){
|
||||
this.__deleteItem_step2(obj2.parentNode); // Sending <LI> tag to the __deleteItem_step2 method
|
||||
}
|
||||
|
||||
}
|
||||
,
|
||||
__refreshDisplay : function(obj)
|
||||
{
|
||||
if(this.hasSubNodes(obj))return;
|
||||
|
||||
var img = obj.getElementsByTagName('IMG')[0];
|
||||
img.style.visibility = 'hidden';
|
||||
}
|
||||
,
|
||||
__deleteItem_step2 : function(obj)
|
||||
{
|
||||
|
||||
var saveString = obj.id.replace(/[^0-9]/gi,'');
|
||||
|
||||
var lis = obj.getElementsByTagName('LI');
|
||||
for(var no=0;no<lis.length;no++){
|
||||
saveString = saveString + ',' + lis[no].id.replace(/[^0-9]/gi,'');
|
||||
}
|
||||
|
||||
// Creating ajax object and send items
|
||||
var ajaxIndex = JSTreeObj.ajaxObjects.length;
|
||||
JSTreeObj.ajaxObjects[ajaxIndex] = new sack();
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].method = "GET";
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].setVar("deleteIds", saveString);
|
||||
JSTreeObj.__addAdditionalRequestParameters(JSTreeObj.ajaxObjects[ajaxIndex], JSTreeObj.additionalDeleteRequestParameters);
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].requestFile = JSTreeObj.filePathDeleteItem; // Specifying which file to get
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].onCompletion = function() { JSTreeObj.__deleteComplete(ajaxIndex,obj); } ; // Specify function that will be executed after file has been found
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
|
||||
|
||||
|
||||
}
|
||||
,
|
||||
__deleteComplete : function(ajaxIndex,obj)
|
||||
{
|
||||
if(this.ajaxObjects[ajaxIndex].response!='OK'){
|
||||
alert('ERROR WHEN TRYING TO DELETE NODE: ' + this.ajaxObjects[ajaxIndex].response); // Rename failed
|
||||
}else{
|
||||
var parentRef = obj.parentNode.parentNode;
|
||||
obj.parentNode.removeChild(obj);
|
||||
this.__refreshDisplay(parentRef);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
,
|
||||
__renameComplete : function(ajaxIndex)
|
||||
{
|
||||
if(this.ajaxObjects[ajaxIndex].response!='OK'){
|
||||
alert('ERROR WHEN TRYING TO RENAME NODE: ' + this.ajaxObjects[ajaxIndex].response); // Rename failed
|
||||
}
|
||||
}
|
||||
,
|
||||
__saveTextBoxChanges : function(e,inputObj)
|
||||
{
|
||||
if(!inputObj && this)inputObj = this;
|
||||
if(document.all)e = event;
|
||||
if(e.keyCode && e.keyCode==27){
|
||||
JSTreeObj.__cancelRename(e,inputObj);
|
||||
return;
|
||||
}
|
||||
inputObj.style.display='none';
|
||||
inputObj.nextSibling.style.visibility='visible';
|
||||
if(inputObj.value.length>0){
|
||||
inputObj.nextSibling.innerHTML = inputObj.value;
|
||||
// Send changes to the server.
|
||||
if (JSTreeObj.renameState != JSTreeObj.RENAME_STATE_BEGIN) {
|
||||
return;
|
||||
}
|
||||
JSTreeObj.renameState = JSTreeObj.RENAME_STATE_REQUEST_SENDED;
|
||||
|
||||
var ajaxIndex = JSTreeObj.ajaxObjects.length;
|
||||
JSTreeObj.ajaxObjects[ajaxIndex] = new sack();
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].method = "GET";
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].setVar("renameId", inputObj.parentNode.id.replace(/[^0-9]/gi,''));
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].setVar("newName", inputObj.value);
|
||||
JSTreeObj.__addAdditionalRequestParameters(JSTreeObj.ajaxObjects[ajaxIndex], JSTreeObj.additionalRenameRequestParameters);
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].requestFile = JSTreeObj.filePathRenameItem; // Specifying which file to get
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].onCompletion = function() { JSTreeObj.__renameComplete(ajaxIndex); } ; // Specify function that will be executed after file has been found
|
||||
JSTreeObj.ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
,
|
||||
__cancelRename : function(e,inputObj)
|
||||
{
|
||||
JSTreeObj.renameState = JSTreeObj.RENAME_STATE_CANCELD;
|
||||
if(!inputObj && this)inputObj = this;
|
||||
inputObj.value = JSTreeObj.helpObj.innerHTML;
|
||||
inputObj.nextSibling.innerHTML = JSTreeObj.helpObj.innerHTML;
|
||||
inputObj.style.display = 'none';
|
||||
inputObj.nextSibling.style.visibility = 'visible';
|
||||
}
|
||||
,
|
||||
__renameCheckKeyCode : function(e)
|
||||
{
|
||||
if(document.all)e = event;
|
||||
if(e.keyCode==13){ // Enter pressed
|
||||
JSTreeObj.__saveTextBoxChanges(false,this);
|
||||
}
|
||||
if(e.keyCode==27){ // ESC pressed
|
||||
JSTreeObj.__cancelRename(false,this);
|
||||
}
|
||||
}
|
||||
,
|
||||
__createTextBox : function(obj)
|
||||
{
|
||||
var textBox = document.createElement('INPUT');
|
||||
textBox.className = 'folderTreeTextBox';
|
||||
textBox.value = obj.innerHTML;
|
||||
obj.parentNode.insertBefore(textBox,obj);
|
||||
textBox.id = 'textBox' + obj.parentNode.id.replace(/[^0-9]/gi,'');
|
||||
textBox.onblur = this.__saveTextBoxChanges;
|
||||
textBox.onkeydown = this.__renameCheckKeyCode;
|
||||
this.__renameEnableTextBox(obj);
|
||||
}
|
||||
,
|
||||
__renameEnableTextBox : function(obj)
|
||||
{
|
||||
JSTreeObj.renameState = JSTreeObj.RENAME_STATE_BEGIN;
|
||||
obj.style.visibility = 'hidden';
|
||||
obj.previousSibling.value = obj.innerHTML;
|
||||
obj.previousSibling.style.display = 'inline';
|
||||
obj.previousSibling.select();
|
||||
}
|
||||
,
|
||||
renameItem : function(obj1,obj2)
|
||||
{
|
||||
currentItemToEdit = obj2.parentNode; // Reference to the <li> tag.
|
||||
if(!obj2.previousSibling || obj2.previousSibling.tagName.toLowerCase()!='input'){
|
||||
this.__createTextBox(obj2);
|
||||
}else{
|
||||
this.__renameEnableTextBox(obj2);
|
||||
}
|
||||
this.helpObj.innerHTML = obj2.innerHTML;
|
||||
|
||||
}
|
||||
,
|
||||
initTree : function()
|
||||
{
|
||||
JSTreeObj = this;
|
||||
JSTreeObj.createDropIndicator();
|
||||
document.documentElement.onselectstart = JSTreeObj.cancelSelectionEvent;
|
||||
document.documentElement.ondragstart = JSTreeObj.cancelEvent;
|
||||
document.documentElement.onmousedown = JSTreeObj.removeHighlight;
|
||||
|
||||
/* Creating help object for storage of values */
|
||||
this.helpObj = document.createElement('DIV');
|
||||
this.helpObj.style.display = 'none';
|
||||
document.body.appendChild(this.helpObj);
|
||||
|
||||
/* Create context menu */
|
||||
if(this.deleteAllowed || this.renameAllowed){
|
||||
try{
|
||||
/* Creating menu model for the context menu, i.e. the datasource */
|
||||
var menuModel = new DHTMLGoodies_menuModel();
|
||||
if(this.deleteAllowed)menuModel.addItem(1,'Delete','','',false,'JSTreeObj.deleteItem');
|
||||
if(this.renameAllowed)menuModel.addItem(2,'Rename','','',false,'JSTreeObj.renameItem');
|
||||
menuModel.init();
|
||||
|
||||
var menuModelRenameOnly = new DHTMLGoodies_menuModel();
|
||||
if(this.renameAllowed)menuModelRenameOnly.addItem(3,'Rename','','',false,'JSTreeObj.renameItem');
|
||||
menuModelRenameOnly.init();
|
||||
|
||||
var menuModelDeleteOnly = new DHTMLGoodies_menuModel();
|
||||
if(this.deleteAllowed)menuModelDeleteOnly.addItem(4,'Delete','','',false,'JSTreeObj.deleteItem');
|
||||
menuModelDeleteOnly.init();
|
||||
|
||||
window.refToDragDropTree = this;
|
||||
|
||||
this.contextMenu = new DHTMLGoodies_contextMenu();
|
||||
this.contextMenu.setWidth(120);
|
||||
referenceToDHTMLSuiteContextMenu = this.contextMenu;
|
||||
}catch(e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var nodeId = 0;
|
||||
var dhtmlgoodies_tree = document.getElementById(this.idOfTree);
|
||||
var menuItems = dhtmlgoodies_tree.getElementsByTagName('LI'); // Get an array of all menu items
|
||||
for(var no=0;no<menuItems.length;no++){
|
||||
// No children var set ?
|
||||
var noChildren = false;
|
||||
var tmpVar = menuItems[no].getAttribute('noChildren');
|
||||
if(!tmpVar)tmpVar = menuItems[no].noChildren;
|
||||
if(tmpVar=='true')noChildren=true;
|
||||
// No drag var set ?
|
||||
var noDrag = false;
|
||||
var tmpVar = menuItems[no].getAttribute('noDrag');
|
||||
if(!tmpVar)tmpVar = menuItems[no].noDrag;
|
||||
if(tmpVar=='true')noDrag=true;
|
||||
|
||||
nodeId++;
|
||||
var subItems = menuItems[no].getElementsByTagName('UL');
|
||||
var img = document.createElement('IMG');
|
||||
img.src = this.imageFolder + this.plusImage;
|
||||
img.style.cssFloat = 'left';
|
||||
img.style.marginTop = '5px';
|
||||
img.onclick = JSTreeObj.showHideNode;
|
||||
|
||||
if(subItems.length==0)img.style.visibility='hidden';else{
|
||||
subItems[0].id = 'tree_ul_' + treeUlCounter;
|
||||
treeUlCounter++;
|
||||
}
|
||||
var aTag = menuItems[no].getElementsByTagName('A')[0];
|
||||
aTag.id = 'nodeATag' + menuItems[no].id.replace(/[^0-9]/gi,'');
|
||||
//aTag.onclick = JSTreeObj.showHideNode;
|
||||
if(!noDrag)aTag.onmousedown = JSTreeObj.initDrag;
|
||||
if(!noChildren)aTag.onmousemove = JSTreeObj.moveDragableNodes;
|
||||
menuItems[no].insertBefore(img,aTag);
|
||||
//menuItems[no].id = 'dhtmlgoodies_treeNode' + nodeId;
|
||||
var folderImg = document.createElement('IMG');
|
||||
if(!noDrag)folderImg.onmousedown = JSTreeObj.initDrag;
|
||||
folderImg.onmousemove = JSTreeObj.moveDragableNodes;
|
||||
if(menuItems[no].className){
|
||||
folderImg.src = this.imageFolder + menuItems[no].className;
|
||||
folderImg.style.cssFloat = 'left';
|
||||
folderImg.style.marginTop = '5px';
|
||||
}else{
|
||||
folderImg.src = this.imageFolder + this.folderImage;
|
||||
folderImg.style.cssFloat = 'left'
|
||||
folderImg.style.marginTop = '5px';
|
||||
}
|
||||
menuItems[no].insertBefore(folderImg,aTag);
|
||||
|
||||
if(this.contextMenu){
|
||||
var noDelete = menuItems[no].getAttribute('noDelete');
|
||||
if(!noDelete)noDelete = menuItems[no].noDelete;
|
||||
var noRename = menuItems[no].getAttribute('noRename');
|
||||
if(!noRename)noRename = menuItems[no].noRename;
|
||||
|
||||
if(noRename=='true' && noDelete=='true'){}else{
|
||||
if(noDelete == 'true')this.contextMenu.attachToElement(aTag,false,menuModelRenameOnly);
|
||||
else if(noRename == 'true')this.contextMenu.attachToElement(aTag,false,menuModelDeleteOnly);
|
||||
else this.contextMenu.attachToElement(aTag,false,menuModel);
|
||||
|
||||
}
|
||||
}
|
||||
this.addEvent(aTag,'contextmenu',this.highlightItem);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
initExpandedNodes = this.Get_Cookie('dhtmlgoodies_expandedNodes');
|
||||
if(initExpandedNodes){
|
||||
var nodes = initExpandedNodes.split(',');
|
||||
for(var no=0;no<nodes.length;no++){
|
||||
if(nodes[no])this.showHideNode(false,nodes[no]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
document.documentElement.onmousemove = JSTreeObj.moveDragableNodes;
|
||||
document.documentElement.onmouseup = JSTreeObj.dropDragableNodes;
|
||||
}
|
||||
,
|
||||
__addAdditionalRequestParameters : function(ajax, parameters)
|
||||
{
|
||||
for (var parameter in parameters) {
|
||||
ajax.setVar(parameter, parameters[parameter]);
|
||||
}
|
||||
}
|
||||
}
|
||||
975
_rejestracja/Static/script/dragdrop.js
vendored
Normal file
@@ -0,0 +1,975 @@
|
||||
// script.aculo.us dragdrop.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
|
||||
|
||||
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||
// (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
|
||||
//
|
||||
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
||||
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
||||
|
||||
if(Object.isUndefined(Effect))
|
||||
throw("dragdrop.js requires including script.aculo.us' effects.js library");
|
||||
|
||||
var Droppables = {
|
||||
drops: [],
|
||||
|
||||
remove: function(element) {
|
||||
this.drops = this.drops.reject(function(d) { return d.element==$(element) });
|
||||
},
|
||||
|
||||
add: function(element) {
|
||||
element = $(element);
|
||||
var options = Object.extend({
|
||||
greedy: true,
|
||||
hoverclass: null,
|
||||
tree: false
|
||||
}, arguments[1] || { });
|
||||
|
||||
// cache containers
|
||||
if(options.containment) {
|
||||
options._containers = [];
|
||||
var containment = options.containment;
|
||||
if(Object.isArray(containment)) {
|
||||
containment.each( function(c) { options._containers.push($(c)) });
|
||||
} else {
|
||||
options._containers.push($(containment));
|
||||
}
|
||||
}
|
||||
|
||||
if(options.accept) options.accept = [options.accept].flatten();
|
||||
|
||||
Element.makePositioned(element); // fix IE
|
||||
options.element = element;
|
||||
|
||||
this.drops.push(options);
|
||||
},
|
||||
|
||||
findDeepestChild: function(drops) {
|
||||
deepest = drops[0];
|
||||
|
||||
for (i = 1; i < drops.length; ++i)
|
||||
if (Element.isParent(drops[i].element, deepest.element))
|
||||
deepest = drops[i];
|
||||
|
||||
return deepest;
|
||||
},
|
||||
|
||||
isContained: function(element, drop) {
|
||||
var containmentNode;
|
||||
if(drop.tree) {
|
||||
containmentNode = element.treeNode;
|
||||
} else {
|
||||
containmentNode = element.parentNode;
|
||||
}
|
||||
return drop._containers.detect(function(c) { return containmentNode == c });
|
||||
},
|
||||
|
||||
isAffected: function(point, element, drop) {
|
||||
return (
|
||||
(drop.element!=element) &&
|
||||
((!drop._containers) ||
|
||||
this.isContained(element, drop)) &&
|
||||
((!drop.accept) ||
|
||||
(Element.classNames(element).detect(
|
||||
function(v) { return drop.accept.include(v) } ) )) &&
|
||||
Position.within(drop.element, point[0], point[1]) );
|
||||
},
|
||||
|
||||
deactivate: function(drop) {
|
||||
if(drop.hoverclass)
|
||||
Element.removeClassName(drop.element, drop.hoverclass);
|
||||
this.last_active = null;
|
||||
},
|
||||
|
||||
activate: function(drop) {
|
||||
if(drop.hoverclass)
|
||||
Element.addClassName(drop.element, drop.hoverclass);
|
||||
this.last_active = drop;
|
||||
},
|
||||
|
||||
show: function(point, element) {
|
||||
if(!this.drops.length) return;
|
||||
var drop, affected = [];
|
||||
|
||||
this.drops.each( function(drop) {
|
||||
if(Droppables.isAffected(point, element, drop))
|
||||
affected.push(drop);
|
||||
});
|
||||
|
||||
if(affected.length>0)
|
||||
drop = Droppables.findDeepestChild(affected);
|
||||
|
||||
if(this.last_active && this.last_active != drop) this.deactivate(this.last_active);
|
||||
if (drop) {
|
||||
Position.within(drop.element, point[0], point[1]);
|
||||
if(drop.onHover)
|
||||
drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
|
||||
|
||||
if (drop != this.last_active) Droppables.activate(drop);
|
||||
}
|
||||
},
|
||||
|
||||
fire: function(event, element) {
|
||||
if(!this.last_active) return;
|
||||
Position.prepare();
|
||||
|
||||
if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
|
||||
if (this.last_active.onDrop) {
|
||||
this.last_active.onDrop(element, this.last_active.element, event);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
if(this.last_active)
|
||||
this.deactivate(this.last_active);
|
||||
}
|
||||
};
|
||||
|
||||
var Draggables = {
|
||||
drags: [],
|
||||
observers: [],
|
||||
|
||||
register: function(draggable) {
|
||||
if(this.drags.length == 0) {
|
||||
this.eventMouseUp = this.endDrag.bindAsEventListener(this);
|
||||
this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
|
||||
this.eventKeypress = this.keyPress.bindAsEventListener(this);
|
||||
|
||||
Event.observe(document, "mouseup", this.eventMouseUp);
|
||||
Event.observe(document, "mousemove", this.eventMouseMove);
|
||||
Event.observe(document, "keypress", this.eventKeypress);
|
||||
}
|
||||
this.drags.push(draggable);
|
||||
},
|
||||
|
||||
unregister: function(draggable) {
|
||||
this.drags = this.drags.reject(function(d) { return d==draggable });
|
||||
if(this.drags.length == 0) {
|
||||
Event.stopObserving(document, "mouseup", this.eventMouseUp);
|
||||
Event.stopObserving(document, "mousemove", this.eventMouseMove);
|
||||
Event.stopObserving(document, "keypress", this.eventKeypress);
|
||||
}
|
||||
},
|
||||
|
||||
activate: function(draggable) {
|
||||
if(draggable.options.delay) {
|
||||
this._timeout = setTimeout(function() {
|
||||
Draggables._timeout = null;
|
||||
window.focus();
|
||||
Draggables.activeDraggable = draggable;
|
||||
}.bind(this), draggable.options.delay);
|
||||
} else {
|
||||
window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
|
||||
this.activeDraggable = draggable;
|
||||
}
|
||||
},
|
||||
|
||||
deactivate: function() {
|
||||
this.activeDraggable = null;
|
||||
},
|
||||
|
||||
updateDrag: function(event) {
|
||||
if(!this.activeDraggable) return;
|
||||
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
||||
// Mozilla-based browsers fire successive mousemove events with
|
||||
// the same coordinates, prevent needless redrawing (moz bug?)
|
||||
if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
|
||||
this._lastPointer = pointer;
|
||||
|
||||
this.activeDraggable.updateDrag(event, pointer);
|
||||
},
|
||||
|
||||
endDrag: function(event) {
|
||||
if(this._timeout) {
|
||||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
}
|
||||
if(!this.activeDraggable) return;
|
||||
this._lastPointer = null;
|
||||
this.activeDraggable.endDrag(event);
|
||||
this.activeDraggable = null;
|
||||
},
|
||||
|
||||
keyPress: function(event) {
|
||||
if(this.activeDraggable)
|
||||
this.activeDraggable.keyPress(event);
|
||||
},
|
||||
|
||||
addObserver: function(observer) {
|
||||
this.observers.push(observer);
|
||||
this._cacheObserverCallbacks();
|
||||
},
|
||||
|
||||
removeObserver: function(element) { // element instead of observer fixes mem leaks
|
||||
this.observers = this.observers.reject( function(o) { return o.element==element });
|
||||
this._cacheObserverCallbacks();
|
||||
},
|
||||
|
||||
notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
|
||||
if(this[eventName+'Count'] > 0)
|
||||
this.observers.each( function(o) {
|
||||
if(o[eventName]) o[eventName](eventName, draggable, event);
|
||||
});
|
||||
if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
|
||||
},
|
||||
|
||||
_cacheObserverCallbacks: function() {
|
||||
['onStart','onEnd','onDrag'].each( function(eventName) {
|
||||
Draggables[eventName+'Count'] = Draggables.observers.select(
|
||||
function(o) { return o[eventName]; }
|
||||
).length;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
var Draggable = Class.create({
|
||||
initialize: function(element) {
|
||||
var defaults = {
|
||||
handle: false,
|
||||
reverteffect: function(element, top_offset, left_offset) {
|
||||
var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
|
||||
new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
|
||||
queue: {scope:'_draggable', position:'end'}
|
||||
});
|
||||
},
|
||||
endeffect: function(element) {
|
||||
var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0;
|
||||
new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
|
||||
queue: {scope:'_draggable', position:'end'},
|
||||
afterFinish: function(){
|
||||
Draggable._dragging[element] = false
|
||||
}
|
||||
});
|
||||
},
|
||||
zindex: 1000,
|
||||
revert: false,
|
||||
quiet: false,
|
||||
scroll: false,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 15,
|
||||
snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
|
||||
delay: 0
|
||||
};
|
||||
|
||||
if(!arguments[1] || Object.isUndefined(arguments[1].endeffect))
|
||||
Object.extend(defaults, {
|
||||
starteffect: function(element) {
|
||||
element._opacity = Element.getOpacity(element);
|
||||
Draggable._dragging[element] = true;
|
||||
new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
|
||||
}
|
||||
});
|
||||
|
||||
var options = Object.extend(defaults, arguments[1] || { });
|
||||
|
||||
this.element = $(element);
|
||||
|
||||
if(options.handle && Object.isString(options.handle))
|
||||
this.handle = this.element.down('.'+options.handle, 0);
|
||||
|
||||
if(!this.handle) this.handle = $(options.handle);
|
||||
if(!this.handle) this.handle = this.element;
|
||||
|
||||
if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
|
||||
options.scroll = $(options.scroll);
|
||||
this._isScrollChild = Element.childOf(this.element, options.scroll);
|
||||
}
|
||||
|
||||
Element.makePositioned(this.element); // fix IE
|
||||
|
||||
this.options = options;
|
||||
this.dragging = false;
|
||||
|
||||
this.eventMouseDown = this.initDrag.bindAsEventListener(this);
|
||||
Event.observe(this.handle, "mousedown", this.eventMouseDown);
|
||||
|
||||
Draggables.register(this);
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
|
||||
Draggables.unregister(this);
|
||||
},
|
||||
|
||||
currentDelta: function() {
|
||||
return([
|
||||
parseInt(Element.getStyle(this.element,'left') || '0'),
|
||||
parseInt(Element.getStyle(this.element,'top') || '0')]);
|
||||
},
|
||||
|
||||
initDrag: function(event) {
|
||||
if(!Object.isUndefined(Draggable._dragging[this.element]) &&
|
||||
Draggable._dragging[this.element]) return;
|
||||
if(Event.isLeftClick(event)) {
|
||||
// abort on form elements, fixes a Firefox issue
|
||||
var src = Event.element(event);
|
||||
if((tag_name = src.tagName.toUpperCase()) && (
|
||||
tag_name=='INPUT' ||
|
||||
tag_name=='SELECT' ||
|
||||
tag_name=='OPTION' ||
|
||||
tag_name=='BUTTON' ||
|
||||
tag_name=='TEXTAREA')) return;
|
||||
|
||||
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
||||
var pos = Position.cumulativeOffset(this.element);
|
||||
this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
|
||||
|
||||
Draggables.activate(this);
|
||||
Event.stop(event);
|
||||
}
|
||||
},
|
||||
|
||||
startDrag: function(event) {
|
||||
this.dragging = true;
|
||||
if(!this.delta)
|
||||
this.delta = this.currentDelta();
|
||||
|
||||
if(this.options.zindex) {
|
||||
this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
|
||||
this.element.style.zIndex = this.options.zindex;
|
||||
}
|
||||
|
||||
if(this.options.ghosting) {
|
||||
this._clone = this.element.cloneNode(true);
|
||||
this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
|
||||
if (!this._originallyAbsolute)
|
||||
Position.absolutize(this.element);
|
||||
this.element.parentNode.insertBefore(this._clone, this.element);
|
||||
}
|
||||
|
||||
if(this.options.scroll) {
|
||||
if (this.options.scroll == window) {
|
||||
var where = this._getWindowScroll(this.options.scroll);
|
||||
this.originalScrollLeft = where.left;
|
||||
this.originalScrollTop = where.top;
|
||||
} else {
|
||||
this.originalScrollLeft = this.options.scroll.scrollLeft;
|
||||
this.originalScrollTop = this.options.scroll.scrollTop;
|
||||
}
|
||||
}
|
||||
|
||||
Draggables.notify('onStart', this, event);
|
||||
|
||||
if(this.options.starteffect) this.options.starteffect(this.element);
|
||||
},
|
||||
|
||||
updateDrag: function(event, pointer) {
|
||||
if(!this.dragging) this.startDrag(event);
|
||||
|
||||
if(!this.options.quiet){
|
||||
Position.prepare();
|
||||
Droppables.show(pointer, this.element);
|
||||
}
|
||||
|
||||
Draggables.notify('onDrag', this, event);
|
||||
|
||||
this.draw(pointer);
|
||||
if(this.options.change) this.options.change(this);
|
||||
|
||||
if(this.options.scroll) {
|
||||
this.stopScrolling();
|
||||
|
||||
var p;
|
||||
if (this.options.scroll == window) {
|
||||
with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
|
||||
} else {
|
||||
p = Position.page(this.options.scroll);
|
||||
p[0] += this.options.scroll.scrollLeft + Position.deltaX;
|
||||
p[1] += this.options.scroll.scrollTop + Position.deltaY;
|
||||
p.push(p[0]+this.options.scroll.offsetWidth);
|
||||
p.push(p[1]+this.options.scroll.offsetHeight);
|
||||
}
|
||||
var speed = [0,0];
|
||||
if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
|
||||
if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
|
||||
if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
|
||||
if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
|
||||
this.startScrolling(speed);
|
||||
}
|
||||
|
||||
// fix AppleWebKit rendering
|
||||
if(Prototype.Browser.WebKit) window.scrollBy(0,0);
|
||||
|
||||
Event.stop(event);
|
||||
},
|
||||
|
||||
finishDrag: function(event, success) {
|
||||
this.dragging = false;
|
||||
|
||||
if(this.options.quiet){
|
||||
Position.prepare();
|
||||
var pointer = [Event.pointerX(event), Event.pointerY(event)];
|
||||
Droppables.show(pointer, this.element);
|
||||
}
|
||||
|
||||
if(this.options.ghosting) {
|
||||
if (!this._originallyAbsolute)
|
||||
Position.relativize(this.element);
|
||||
delete this._originallyAbsolute;
|
||||
Element.remove(this._clone);
|
||||
this._clone = null;
|
||||
}
|
||||
|
||||
var dropped = false;
|
||||
if(success) {
|
||||
dropped = Droppables.fire(event, this.element);
|
||||
if (!dropped) dropped = false;
|
||||
}
|
||||
if(dropped && this.options.onDropped) this.options.onDropped(this.element);
|
||||
Draggables.notify('onEnd', this, event);
|
||||
|
||||
var revert = this.options.revert;
|
||||
if(revert && Object.isFunction(revert)) revert = revert(this.element);
|
||||
|
||||
var d = this.currentDelta();
|
||||
if(revert && this.options.reverteffect) {
|
||||
if (dropped == 0 || revert != 'failure')
|
||||
this.options.reverteffect(this.element,
|
||||
d[1]-this.delta[1], d[0]-this.delta[0]);
|
||||
} else {
|
||||
this.delta = d;
|
||||
}
|
||||
|
||||
if(this.options.zindex)
|
||||
this.element.style.zIndex = this.originalZ;
|
||||
|
||||
if(this.options.endeffect)
|
||||
this.options.endeffect(this.element);
|
||||
|
||||
Draggables.deactivate(this);
|
||||
Droppables.reset();
|
||||
},
|
||||
|
||||
keyPress: function(event) {
|
||||
if(event.keyCode!=Event.KEY_ESC) return;
|
||||
this.finishDrag(event, false);
|
||||
Event.stop(event);
|
||||
},
|
||||
|
||||
endDrag: function(event) {
|
||||
if(!this.dragging) return;
|
||||
this.stopScrolling();
|
||||
this.finishDrag(event, true);
|
||||
Event.stop(event);
|
||||
},
|
||||
|
||||
draw: function(point) {
|
||||
var pos = Position.cumulativeOffset(this.element);
|
||||
if(this.options.ghosting) {
|
||||
var r = Position.realOffset(this.element);
|
||||
pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
|
||||
}
|
||||
|
||||
var d = this.currentDelta();
|
||||
pos[0] -= d[0]; pos[1] -= d[1];
|
||||
|
||||
if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
|
||||
pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
|
||||
pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
|
||||
}
|
||||
|
||||
var p = [0,1].map(function(i){
|
||||
return (point[i]-pos[i]-this.offset[i])
|
||||
}.bind(this));
|
||||
|
||||
if(this.options.snap) {
|
||||
if(Object.isFunction(this.options.snap)) {
|
||||
p = this.options.snap(p[0],p[1],this);
|
||||
} else {
|
||||
if(Object.isArray(this.options.snap)) {
|
||||
p = p.map( function(v, i) {
|
||||
return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this));
|
||||
} else {
|
||||
p = p.map( function(v) {
|
||||
return (v/this.options.snap).round()*this.options.snap }.bind(this));
|
||||
}
|
||||
}}
|
||||
|
||||
var style = this.element.style;
|
||||
if((!this.options.constraint) || (this.options.constraint=='horizontal'))
|
||||
style.left = p[0] + "px";
|
||||
if((!this.options.constraint) || (this.options.constraint=='vertical'))
|
||||
style.top = p[1] + "px";
|
||||
|
||||
if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
|
||||
},
|
||||
|
||||
stopScrolling: function() {
|
||||
if(this.scrollInterval) {
|
||||
clearInterval(this.scrollInterval);
|
||||
this.scrollInterval = null;
|
||||
Draggables._lastScrollPointer = null;
|
||||
}
|
||||
},
|
||||
|
||||
startScrolling: function(speed) {
|
||||
if(!(speed[0] || speed[1])) return;
|
||||
this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
|
||||
this.lastScrolled = new Date();
|
||||
this.scrollInterval = setInterval(this.scroll.bind(this), 10);
|
||||
},
|
||||
|
||||
scroll: function() {
|
||||
var current = new Date();
|
||||
var delta = current - this.lastScrolled;
|
||||
this.lastScrolled = current;
|
||||
if(this.options.scroll == window) {
|
||||
with (this._getWindowScroll(this.options.scroll)) {
|
||||
if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
|
||||
var d = delta / 1000;
|
||||
this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
|
||||
this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
|
||||
}
|
||||
|
||||
Position.prepare();
|
||||
Droppables.show(Draggables._lastPointer, this.element);
|
||||
Draggables.notify('onDrag', this);
|
||||
if (this._isScrollChild) {
|
||||
Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
|
||||
Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
|
||||
Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
|
||||
if (Draggables._lastScrollPointer[0] < 0)
|
||||
Draggables._lastScrollPointer[0] = 0;
|
||||
if (Draggables._lastScrollPointer[1] < 0)
|
||||
Draggables._lastScrollPointer[1] = 0;
|
||||
this.draw(Draggables._lastScrollPointer);
|
||||
}
|
||||
|
||||
if(this.options.change) this.options.change(this);
|
||||
},
|
||||
|
||||
_getWindowScroll: function(w) {
|
||||
var T, L, W, H;
|
||||
with (w.document) {
|
||||
if (w.document.documentElement && documentElement.scrollTop) {
|
||||
T = documentElement.scrollTop;
|
||||
L = documentElement.scrollLeft;
|
||||
} else if (w.document.body) {
|
||||
T = body.scrollTop;
|
||||
L = body.scrollLeft;
|
||||
}
|
||||
if (w.innerWidth) {
|
||||
W = w.innerWidth;
|
||||
H = w.innerHeight;
|
||||
} else if (w.document.documentElement && documentElement.clientWidth) {
|
||||
W = documentElement.clientWidth;
|
||||
H = documentElement.clientHeight;
|
||||
} else {
|
||||
W = body.offsetWidth;
|
||||
H = body.offsetHeight;
|
||||
}
|
||||
}
|
||||
return { top: T, left: L, width: W, height: H };
|
||||
}
|
||||
});
|
||||
|
||||
Draggable._dragging = { };
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
var SortableObserver = Class.create({
|
||||
initialize: function(element, observer) {
|
||||
this.element = $(element);
|
||||
this.observer = observer;
|
||||
this.lastValue = Sortable.serialize(this.element);
|
||||
},
|
||||
|
||||
onStart: function() {
|
||||
this.lastValue = Sortable.serialize(this.element);
|
||||
},
|
||||
|
||||
onEnd: function() {
|
||||
Sortable.unmark();
|
||||
if(this.lastValue != Sortable.serialize(this.element))
|
||||
this.observer(this.element)
|
||||
}
|
||||
});
|
||||
|
||||
var Sortable = {
|
||||
SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
|
||||
|
||||
sortables: { },
|
||||
|
||||
_findRootElement: function(element) {
|
||||
while (element.tagName.toUpperCase() != "BODY") {
|
||||
if(element.id && Sortable.sortables[element.id]) return element;
|
||||
element = element.parentNode;
|
||||
}
|
||||
},
|
||||
|
||||
options: function(element) {
|
||||
element = Sortable._findRootElement($(element));
|
||||
if(!element) return;
|
||||
return Sortable.sortables[element.id];
|
||||
},
|
||||
|
||||
destroy: function(element){
|
||||
element = $(element);
|
||||
var s = Sortable.sortables[element.id];
|
||||
|
||||
if(s) {
|
||||
Draggables.removeObserver(s.element);
|
||||
s.droppables.each(function(d){ Droppables.remove(d) });
|
||||
s.draggables.invoke('destroy');
|
||||
|
||||
delete Sortable.sortables[s.element.id];
|
||||
}
|
||||
},
|
||||
|
||||
create: function(element) {
|
||||
element = $(element);
|
||||
var options = Object.extend({
|
||||
element: element,
|
||||
tag: 'li', // assumes li children, override with tag: 'tagname'
|
||||
dropOnEmpty: false,
|
||||
tree: false,
|
||||
treeTag: 'ul',
|
||||
overlap: 'vertical', // one of 'vertical', 'horizontal'
|
||||
constraint: 'vertical', // one of 'vertical', 'horizontal', false
|
||||
containment: element, // also takes array of elements (or id's); or false
|
||||
handle: false, // or a CSS class
|
||||
only: false,
|
||||
delay: 0,
|
||||
hoverclass: null,
|
||||
ghosting: false,
|
||||
quiet: false,
|
||||
scroll: false,
|
||||
scrollSensitivity: 20,
|
||||
scrollSpeed: 15,
|
||||
format: this.SERIALIZE_RULE,
|
||||
|
||||
// these take arrays of elements or ids and can be
|
||||
// used for better initialization performance
|
||||
elements: false,
|
||||
handles: false,
|
||||
|
||||
onChange: Prototype.emptyFunction,
|
||||
onUpdate: Prototype.emptyFunction
|
||||
}, arguments[1] || { });
|
||||
|
||||
// clear any old sortable with same element
|
||||
this.destroy(element);
|
||||
|
||||
// build options for the draggables
|
||||
var options_for_draggable = {
|
||||
revert: true,
|
||||
quiet: options.quiet,
|
||||
scroll: options.scroll,
|
||||
scrollSpeed: options.scrollSpeed,
|
||||
scrollSensitivity: options.scrollSensitivity,
|
||||
delay: options.delay,
|
||||
ghosting: options.ghosting,
|
||||
constraint: options.constraint,
|
||||
handle: options.handle };
|
||||
|
||||
if(options.starteffect)
|
||||
options_for_draggable.starteffect = options.starteffect;
|
||||
|
||||
if(options.reverteffect)
|
||||
options_for_draggable.reverteffect = options.reverteffect;
|
||||
else
|
||||
if(options.ghosting) options_for_draggable.reverteffect = function(element) {
|
||||
element.style.top = 0;
|
||||
element.style.left = 0;
|
||||
};
|
||||
|
||||
if(options.endeffect)
|
||||
options_for_draggable.endeffect = options.endeffect;
|
||||
|
||||
if(options.zindex)
|
||||
options_for_draggable.zindex = options.zindex;
|
||||
|
||||
// build options for the droppables
|
||||
var options_for_droppable = {
|
||||
overlap: options.overlap,
|
||||
containment: options.containment,
|
||||
tree: options.tree,
|
||||
hoverclass: options.hoverclass,
|
||||
onHover: Sortable.onHover
|
||||
};
|
||||
|
||||
var options_for_tree = {
|
||||
onHover: Sortable.onEmptyHover,
|
||||
overlap: options.overlap,
|
||||
containment: options.containment,
|
||||
hoverclass: options.hoverclass
|
||||
};
|
||||
|
||||
// fix for gecko engine
|
||||
Element.cleanWhitespace(element);
|
||||
|
||||
options.draggables = [];
|
||||
options.droppables = [];
|
||||
|
||||
// drop on empty handling
|
||||
if(options.dropOnEmpty || options.tree) {
|
||||
Droppables.add(element, options_for_tree);
|
||||
options.droppables.push(element);
|
||||
}
|
||||
|
||||
(options.elements || this.findElements(element, options) || []).each( function(e,i) {
|
||||
var handle = options.handles ? $(options.handles[i]) :
|
||||
(options.handle ? $(e).select('.' + options.handle)[0] : e);
|
||||
options.draggables.push(
|
||||
new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
|
||||
Droppables.add(e, options_for_droppable);
|
||||
if(options.tree) e.treeNode = element;
|
||||
options.droppables.push(e);
|
||||
});
|
||||
|
||||
if(options.tree) {
|
||||
(Sortable.findTreeElements(element, options) || []).each( function(e) {
|
||||
Droppables.add(e, options_for_tree);
|
||||
e.treeNode = element;
|
||||
options.droppables.push(e);
|
||||
});
|
||||
}
|
||||
|
||||
// keep reference
|
||||
this.sortables[element.id] = options;
|
||||
|
||||
// for onupdate
|
||||
Draggables.addObserver(new SortableObserver(element, options.onUpdate));
|
||||
|
||||
},
|
||||
|
||||
// return all suitable-for-sortable elements in a guaranteed order
|
||||
findElements: function(element, options) {
|
||||
return Element.findChildren(
|
||||
element, options.only, options.tree ? true : false, options.tag);
|
||||
},
|
||||
|
||||
findTreeElements: function(element, options) {
|
||||
return Element.findChildren(
|
||||
element, options.only, options.tree ? true : false, options.treeTag);
|
||||
},
|
||||
|
||||
onHover: function(element, dropon, overlap) {
|
||||
if(Element.isParent(dropon, element)) return;
|
||||
|
||||
if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
|
||||
return;
|
||||
} else if(overlap>0.5) {
|
||||
Sortable.mark(dropon, 'before');
|
||||
if(dropon.previousSibling != element) {
|
||||
var oldParentNode = element.parentNode;
|
||||
element.style.visibility = "hidden"; // fix gecko rendering
|
||||
dropon.parentNode.insertBefore(element, dropon);
|
||||
if(dropon.parentNode!=oldParentNode)
|
||||
Sortable.options(oldParentNode).onChange(element);
|
||||
Sortable.options(dropon.parentNode).onChange(element);
|
||||
}
|
||||
} else {
|
||||
Sortable.mark(dropon, 'after');
|
||||
var nextElement = dropon.nextSibling || null;
|
||||
if(nextElement != element) {
|
||||
var oldParentNode = element.parentNode;
|
||||
element.style.visibility = "hidden"; // fix gecko rendering
|
||||
dropon.parentNode.insertBefore(element, nextElement);
|
||||
if(dropon.parentNode!=oldParentNode)
|
||||
Sortable.options(oldParentNode).onChange(element);
|
||||
Sortable.options(dropon.parentNode).onChange(element);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onEmptyHover: function(element, dropon, overlap) {
|
||||
var oldParentNode = element.parentNode;
|
||||
var droponOptions = Sortable.options(dropon);
|
||||
|
||||
if(!Element.isParent(dropon, element)) {
|
||||
var index;
|
||||
|
||||
var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
|
||||
var child = null;
|
||||
|
||||
if(children) {
|
||||
var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
|
||||
|
||||
for (index = 0; index < children.length; index += 1) {
|
||||
if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
|
||||
offset -= Element.offsetSize (children[index], droponOptions.overlap);
|
||||
} else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
|
||||
child = index + 1 < children.length ? children[index + 1] : null;
|
||||
break;
|
||||
} else {
|
||||
child = children[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dropon.insertBefore(element, child);
|
||||
|
||||
Sortable.options(oldParentNode).onChange(element);
|
||||
droponOptions.onChange(element);
|
||||
}
|
||||
},
|
||||
|
||||
unmark: function() {
|
||||
if(Sortable._marker) Sortable._marker.hide();
|
||||
},
|
||||
|
||||
mark: function(dropon, position) {
|
||||
// mark on ghosting only
|
||||
var sortable = Sortable.options(dropon.parentNode);
|
||||
if(sortable && !sortable.ghosting) return;
|
||||
|
||||
if(!Sortable._marker) {
|
||||
Sortable._marker =
|
||||
($('dropmarker') || Element.extend(document.createElement('DIV'))).
|
||||
hide().addClassName('dropmarker').setStyle({position:'absolute'});
|
||||
document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
|
||||
}
|
||||
var offsets = Position.cumulativeOffset(dropon);
|
||||
Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
|
||||
|
||||
if(position=='after')
|
||||
if(sortable.overlap == 'horizontal')
|
||||
Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
|
||||
else
|
||||
Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
|
||||
|
||||
Sortable._marker.show();
|
||||
},
|
||||
|
||||
_tree: function(element, options, parent) {
|
||||
var children = Sortable.findElements(element, options) || [];
|
||||
|
||||
for (var i = 0; i < children.length; ++i) {
|
||||
var match = children[i].id.match(options.format);
|
||||
|
||||
if (!match) continue;
|
||||
|
||||
var child = {
|
||||
id: encodeURIComponent(match ? match[1] : null),
|
||||
element: element,
|
||||
parent: parent,
|
||||
children: [],
|
||||
position: parent.children.length,
|
||||
container: $(children[i]).down(options.treeTag)
|
||||
};
|
||||
|
||||
/* Get the element containing the children and recurse over it */
|
||||
if (child.container)
|
||||
this._tree(child.container, options, child);
|
||||
|
||||
parent.children.push (child);
|
||||
}
|
||||
|
||||
return parent;
|
||||
},
|
||||
|
||||
tree: function(element) {
|
||||
element = $(element);
|
||||
var sortableOptions = this.options(element);
|
||||
var options = Object.extend({
|
||||
tag: sortableOptions.tag,
|
||||
treeTag: sortableOptions.treeTag,
|
||||
only: sortableOptions.only,
|
||||
name: element.id,
|
||||
format: sortableOptions.format
|
||||
}, arguments[1] || { });
|
||||
|
||||
var root = {
|
||||
id: null,
|
||||
parent: null,
|
||||
children: [],
|
||||
container: element,
|
||||
position: 0
|
||||
};
|
||||
|
||||
return Sortable._tree(element, options, root);
|
||||
},
|
||||
|
||||
/* Construct a [i] index for a particular node */
|
||||
_constructIndex: function(node) {
|
||||
var index = '';
|
||||
do {
|
||||
if (node.id) index = '[' + node.position + ']' + index;
|
||||
} while ((node = node.parent) != null);
|
||||
return index;
|
||||
},
|
||||
|
||||
sequence: function(element) {
|
||||
element = $(element);
|
||||
var options = Object.extend(this.options(element), arguments[1] || { });
|
||||
|
||||
return $(this.findElements(element, options) || []).map( function(item) {
|
||||
return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
|
||||
});
|
||||
},
|
||||
|
||||
setSequence: function(element, new_sequence) {
|
||||
element = $(element);
|
||||
var options = Object.extend(this.options(element), arguments[2] || { });
|
||||
|
||||
var nodeMap = { };
|
||||
this.findElements(element, options).each( function(n) {
|
||||
if (n.id.match(options.format))
|
||||
nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
|
||||
n.parentNode.removeChild(n);
|
||||
});
|
||||
|
||||
new_sequence.each(function(ident) {
|
||||
var n = nodeMap[ident];
|
||||
if (n) {
|
||||
n[1].appendChild(n[0]);
|
||||
delete nodeMap[ident];
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
serialize: function(element) {
|
||||
element = $(element);
|
||||
var options = Object.extend(Sortable.options(element), arguments[1] || { });
|
||||
var name = encodeURIComponent(
|
||||
(arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
|
||||
|
||||
if (options.tree) {
|
||||
return Sortable.tree(element, arguments[1]).children.map( function (item) {
|
||||
return [name + Sortable._constructIndex(item) + "[id]=" +
|
||||
encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
|
||||
}).flatten().join('&');
|
||||
} else {
|
||||
return Sortable.sequence(element, arguments[1]).map( function(item) {
|
||||
return name + "[]=" + encodeURIComponent(item);
|
||||
}).join('&');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Returns true if child is contained within element
|
||||
Element.isParent = function(child, element) {
|
||||
if (!child.parentNode || child == element) return false;
|
||||
if (child.parentNode == element) return true;
|
||||
return Element.isParent(child.parentNode, element);
|
||||
};
|
||||
|
||||
Element.findChildren = function(element, only, recursive, tagName) {
|
||||
if(!element.hasChildNodes()) return null;
|
||||
tagName = tagName.toUpperCase();
|
||||
if(only) only = [only].flatten();
|
||||
var elements = [];
|
||||
$A(element.childNodes).each( function(e) {
|
||||
if(e.tagName && e.tagName.toUpperCase()==tagName &&
|
||||
(!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
|
||||
elements.push(e);
|
||||
if(recursive) {
|
||||
var grandchildren = Element.findChildren(e, only, recursive, tagName);
|
||||
if(grandchildren) elements.push(grandchildren);
|
||||
}
|
||||
});
|
||||
|
||||
return (elements.length>0 ? elements.flatten() : []);
|
||||
};
|
||||
|
||||
Element.offsetSize = function (element, type) {
|
||||
return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
|
||||
};
|
||||
12
_rejestracja/Static/script/dropDown.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function dropDownChange(el, id) {
|
||||
var div = $(id);
|
||||
if ($(id).is(":visible") == true) {
|
||||
$(id).hide();
|
||||
$(el).addClass('');
|
||||
} else {
|
||||
$(id).show();
|
||||
$(el).addClass('long');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1130
_rejestracja/Static/script/effects.js
vendored
Normal file
47
_rejestracja/Static/script/gray.js
Normal file
@@ -0,0 +1,47 @@
|
||||
$(window).load(function() {
|
||||
$('.imglist img').each(function() {
|
||||
$(this).wrap('<div style="display:inline-block;width:' + this.width + 'px;height:' + this.height + 'px;">').clone().addClass('gotcolors').css({'position': 'absolute', 'opacity' : 0 }).insertBefore(this);
|
||||
this.src = grayscale(this.src);
|
||||
}).animate({opacity: 1}, 500);
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".imglist a").hover(
|
||||
function() {
|
||||
$(this).find('.gotcolors').stop().animate({opacity: 1}, 200);
|
||||
},
|
||||
function() {
|
||||
$(this).find('.gotcolors').stop().animate({opacity: 0}, 500);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
function grayscale(src) {
|
||||
var supportsCanvas = !!document.createElement('canvas').getContext;
|
||||
if (supportsCanvas) {
|
||||
var canvas = document.createElement('canvas'),
|
||||
context = canvas.getContext('2d'),
|
||||
imageData, px, length, i = 0, gray,
|
||||
img = new Image();
|
||||
|
||||
img.src = src;
|
||||
canvas.width = img.width;
|
||||
canvas.height = img.height;
|
||||
context.drawImage(img, 0, 0);
|
||||
|
||||
imageData = context.getImageData(0, 0, canvas.width, canvas.height);
|
||||
px = imageData.data;
|
||||
length = px.length;
|
||||
|
||||
for (; i < length; i += 4) {
|
||||
gray = px[i] * .3 + px[i + 1] * .59 + px[i + 2] * .11;
|
||||
px[i] = px[i + 1] = px[i + 2] = gray;
|
||||
}
|
||||
|
||||
context.putImageData(imageData, 0, 0);
|
||||
return canvas.toDataURL();
|
||||
} else {
|
||||
return src;
|
||||
}
|
||||
}
|
||||
96
_rejestracja/Static/script/ie/PIE.htc
Normal file
@@ -0,0 +1,96 @@
|
||||
<!--
|
||||
PIE: CSS3 rendering for IE
|
||||
Version 1.0.0
|
||||
http://css3pie.com
|
||||
Dual-licensed for use under the Apache License Version 2.0 or the General Public License (GPL) Version 2.
|
||||
-->
|
||||
<PUBLIC:COMPONENT lightWeight="true">
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<PUBLIC:ATTACH EVENT="oncontentready" FOR="element" ONEVENT="init()" />
|
||||
<PUBLIC:ATTACH EVENT="ondocumentready" FOR="element" ONEVENT="init()" />
|
||||
<PUBLIC:ATTACH EVENT="ondetach" FOR="element" ONEVENT="cleanup()" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var doc = element.document;var f=window.PIE;
|
||||
if(!f){f=window.PIE={F:"-pie-",nb:"Pie",La:"pie_",Ac:{TD:1,TH:1},cc:{TABLE:1,THEAD:1,TBODY:1,TFOOT:1,TR:1,INPUT:1,TEXTAREA:1,SELECT:1,OPTION:1,IMG:1,HR:1},fc:{A:1,INPUT:1,TEXTAREA:1,SELECT:1,BUTTON:1},Gd:{submit:1,button:1,reset:1},aa:function(){}};try{doc.execCommand("BackgroundImageCache",false,true)}catch(aa){}for(var ba=4,Z=doc.createElement("div"),ca=Z.getElementsByTagName("i"),ga;Z.innerHTML="<!--[if gt IE "+ ++ba+"]><i></i><![endif]--\>",ca[0];);f.O=ba;if(ba===6)f.F=f.F.replace(/^-/,"");f.ja=
|
||||
doc.documentMode||f.O;Z.innerHTML='<v:shape adj="1"/>';ga=Z.firstChild;ga.style.behavior="url(#default#VML)";f.zc=typeof ga.adj==="object";(function(){var a,b=0,c={};f.p={Za:function(d){if(!a){a=doc.createDocumentFragment();a.namespaces.add("css3vml","urn:schemas-microsoft-com:vml")}return a.createElement("css3vml:"+d)},Ba:function(d){return d&&d._pieId||(d._pieId="_"+ ++b)},Eb:function(d){var e,g,j,i,h=arguments;e=1;for(g=h.length;e<g;e++){i=h[e];for(j in i)if(i.hasOwnProperty(j))d[j]=i[j]}return d},
|
||||
Rb:function(d,e,g){var j=c[d],i,h;if(j)Object.prototype.toString.call(j)==="[object Array]"?j.push([e,g]):e.call(g,j);else{h=c[d]=[[e,g]];i=new Image;i.onload=function(){j=c[d]={h:i.width,f:i.height};for(var k=0,n=h.length;k<n;k++)h[k][0].call(h[k][1],j);i.onload=null};i.src=d}}}})();f.Na={gc:function(a,b,c,d){function e(){k=j>=90&&j<270?b:0;n=j<180?c:0;m=b-k;p=c-n}function g(){for(;j<0;)j+=360;j%=360}var j=d.sa;d=d.zb;var i,h,k,n,m,p,r,t;if(d){d=d.coords(a,b,c);i=d.x;h=d.y}if(j){j=j.jd();g();e();
|
||||
if(!d){i=k;h=n}d=f.Na.tc(i,h,j,m,p);a=d[0];d=d[1]}else if(d){a=b-i;d=c-h}else{i=h=a=0;d=c}r=a-i;t=d-h;if(j===void 0){j=!r?t<0?90:270:!t?r<0?180:0:-Math.atan2(t,r)/Math.PI*180;g();e()}return{sa:j,xc:i,yc:h,td:a,ud:d,Wd:k,Xd:n,rd:m,sd:p,kd:r,ld:t,rc:f.Na.dc(i,h,a,d)}},tc:function(a,b,c,d,e){if(c===0||c===180)return[d,b];else if(c===90||c===270)return[a,e];else{c=Math.tan(-c*Math.PI/180);a=c*a-b;b=-1/c;d=b*d-e;e=b-c;return[(d-a)/e,(c*d-b*a)/e]}},dc:function(a,b,c,d){a=c-a;b=d-b;return Math.abs(a===0?
|
||||
b:b===0?a:Math.sqrt(a*a+b*b))}};f.ea=function(){this.Gb=[];this.oc={}};f.ea.prototype={ba:function(a){var b=f.p.Ba(a),c=this.oc,d=this.Gb;if(!(b in c)){c[b]=d.length;d.push(a)}},Ha:function(a){a=f.p.Ba(a);var b=this.oc;if(a&&a in b){delete this.Gb[b[a]];delete b[a]}},xa:function(){for(var a=this.Gb,b=a.length;b--;)a[b]&&a[b]()}};f.Oa=new f.ea;f.Oa.Rd=function(){var a=this,b;if(!a.Sd){b=doc.documentElement.currentStyle.getAttribute(f.F+"poll-interval")||250;(function c(){a.xa();setTimeout(c,b)})();
|
||||
a.Sd=1}};(function(){function a(){f.L.xa();window.detachEvent("onunload",a);window.PIE=null}f.L=new f.ea;window.attachEvent("onunload",a);f.L.ta=function(b,c,d){b.attachEvent(c,d);this.ba(function(){b.detachEvent(c,d)})}})();f.Qa=new f.ea;f.L.ta(window,"onresize",function(){f.Qa.xa()});(function(){function a(){f.mb.xa()}f.mb=new f.ea;f.L.ta(window,"onscroll",a);f.Qa.ba(a)})();(function(){function a(){c=f.kb.md()}function b(){if(c){for(var d=0,e=c.length;d<e;d++)f.attach(c[d]);c=0}}var c;if(f.ja<9){f.L.ta(window,
|
||||
"onbeforeprint",a);f.L.ta(window,"onafterprint",b)}})();f.lb=new f.ea;f.L.ta(doc,"onmouseup",function(){f.lb.xa()});f.he=function(){function a(h){this.Y=h}var b=doc.createElement("length-calc"),c=doc.body||doc.documentElement,d=b.style,e={},g=["mm","cm","in","pt","pc"],j=g.length,i={};d.position="absolute";d.top=d.left="-9999px";for(c.appendChild(b);j--;){d.width="100"+g[j];e[g[j]]=b.offsetWidth/100}c.removeChild(b);d.width="1em";a.prototype={Kb:/(px|em|ex|mm|cm|in|pt|pc|%)$/,ic:function(){var h=
|
||||
this.Jd;if(h===void 0)h=this.Jd=parseFloat(this.Y);return h},yb:function(){var h=this.ae;if(!h)h=this.ae=(h=this.Y.match(this.Kb))&&h[0]||"px";return h},a:function(h,k){var n=this.ic(),m=this.yb();switch(m){case "px":return n;case "%":return n*(typeof k==="function"?k():k)/100;case "em":return n*this.xb(h);case "ex":return n*this.xb(h)/2;default:return n*e[m]}},xb:function(h){var k=h.currentStyle.fontSize,n,m;if(k.indexOf("px")>0)return parseFloat(k);else if(h.tagName in f.cc){m=this;n=h.parentNode;
|
||||
return f.n(k).a(n,function(){return m.xb(n)})}else{h.appendChild(b);k=b.offsetWidth;b.parentNode===h&&h.removeChild(b);return k}}};f.n=function(h){return i[h]||(i[h]=new a(h))};return a}();f.Ja=function(){function a(e){this.X=e}var b=f.n("50%"),c={top:1,center:1,bottom:1},d={left:1,center:1,right:1};a.prototype={zd:function(){if(!this.ac){var e=this.X,g=e.length,j=f.v,i=j.qa,h=f.n("0");i=i.na;h=["left",h,"top",h];if(g===1){e.push(new j.ob(i,"center"));g++}if(g===2){i&(e[0].k|e[1].k)&&e[0].d in c&&
|
||||
e[1].d in d&&e.push(e.shift());if(e[0].k&i)if(e[0].d==="center")h[1]=b;else h[0]=e[0].d;else if(e[0].W())h[1]=f.n(e[0].d);if(e[1].k&i)if(e[1].d==="center")h[3]=b;else h[2]=e[1].d;else if(e[1].W())h[3]=f.n(e[1].d)}this.ac=h}return this.ac},coords:function(e,g,j){var i=this.zd(),h=i[1].a(e,g);e=i[3].a(e,j);return{x:i[0]==="right"?g-h:h,y:i[2]==="bottom"?j-e:e}}};return a}();f.Ka=function(){function a(b,c){this.h=b;this.f=c}a.prototype={a:function(b,c,d,e,g){var j=this.h,i=this.f,h=c/d;e=e/g;if(j===
|
||||
"contain"){j=e>h?c:d*e;i=e>h?c/e:d}else if(j==="cover"){j=e<h?c:d*e;i=e<h?c/e:d}else if(j==="auto"){i=i==="auto"?g:i.a(b,d);j=i*e}else{j=j.a(b,c);i=i==="auto"?j/e:i.a(b,d)}return{h:j,f:i}}};a.Kc=new a("auto","auto");return a}();f.Ec=function(){function a(b){this.Y=b}a.prototype={Kb:/[a-z]+$/i,yb:function(){return this.ad||(this.ad=this.Y.match(this.Kb)[0].toLowerCase())},jd:function(){var b=this.Vc,c;if(b===undefined){b=this.yb();c=parseFloat(this.Y,10);b=this.Vc=b==="deg"?c:b==="rad"?c/Math.PI*180:
|
||||
b==="grad"?c/400*360:b==="turn"?c*360:0}return b}};return a}();f.Jc=function(){function a(c){this.Y=c}var b={};a.Qd=/\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d+|\d*\.\d+)\s*\)\s*/;a.Fb={aliceblue:"F0F8FF",antiquewhite:"FAEBD7",aqua:"0FF",aquamarine:"7FFFD4",azure:"F0FFFF",beige:"F5F5DC",bisque:"FFE4C4",black:"000",blanchedalmond:"FFEBCD",blue:"00F",blueviolet:"8A2BE2",brown:"A52A2A",burlywood:"DEB887",cadetblue:"5F9EA0",chartreuse:"7FFF00",chocolate:"D2691E",coral:"FF7F50",cornflowerblue:"6495ED",
|
||||
cornsilk:"FFF8DC",crimson:"DC143C",cyan:"0FF",darkblue:"00008B",darkcyan:"008B8B",darkgoldenrod:"B8860B",darkgray:"A9A9A9",darkgreen:"006400",darkkhaki:"BDB76B",darkmagenta:"8B008B",darkolivegreen:"556B2F",darkorange:"FF8C00",darkorchid:"9932CC",darkred:"8B0000",darksalmon:"E9967A",darkseagreen:"8FBC8F",darkslateblue:"483D8B",darkslategray:"2F4F4F",darkturquoise:"00CED1",darkviolet:"9400D3",deeppink:"FF1493",deepskyblue:"00BFFF",dimgray:"696969",dodgerblue:"1E90FF",firebrick:"B22222",floralwhite:"FFFAF0",
|
||||
forestgreen:"228B22",fuchsia:"F0F",gainsboro:"DCDCDC",ghostwhite:"F8F8FF",gold:"FFD700",goldenrod:"DAA520",gray:"808080",green:"008000",greenyellow:"ADFF2F",honeydew:"F0FFF0",hotpink:"FF69B4",indianred:"CD5C5C",indigo:"4B0082",ivory:"FFFFF0",khaki:"F0E68C",lavender:"E6E6FA",lavenderblush:"FFF0F5",lawngreen:"7CFC00",lemonchiffon:"FFFACD",lightblue:"ADD8E6",lightcoral:"F08080",lightcyan:"E0FFFF",lightgoldenrodyellow:"FAFAD2",lightgreen:"90EE90",lightgrey:"D3D3D3",lightpink:"FFB6C1",lightsalmon:"FFA07A",
|
||||
lightseagreen:"20B2AA",lightskyblue:"87CEFA",lightslategray:"789",lightsteelblue:"B0C4DE",lightyellow:"FFFFE0",lime:"0F0",limegreen:"32CD32",linen:"FAF0E6",magenta:"F0F",maroon:"800000",mediumauqamarine:"66CDAA",mediumblue:"0000CD",mediumorchid:"BA55D3",mediumpurple:"9370D8",mediumseagreen:"3CB371",mediumslateblue:"7B68EE",mediumspringgreen:"00FA9A",mediumturquoise:"48D1CC",mediumvioletred:"C71585",midnightblue:"191970",mintcream:"F5FFFA",mistyrose:"FFE4E1",moccasin:"FFE4B5",navajowhite:"FFDEAD",
|
||||
navy:"000080",oldlace:"FDF5E6",olive:"808000",olivedrab:"688E23",orange:"FFA500",orangered:"FF4500",orchid:"DA70D6",palegoldenrod:"EEE8AA",palegreen:"98FB98",paleturquoise:"AFEEEE",palevioletred:"D87093",papayawhip:"FFEFD5",peachpuff:"FFDAB9",peru:"CD853F",pink:"FFC0CB",plum:"DDA0DD",powderblue:"B0E0E6",purple:"800080",red:"F00",rosybrown:"BC8F8F",royalblue:"4169E1",saddlebrown:"8B4513",salmon:"FA8072",sandybrown:"F4A460",seagreen:"2E8B57",seashell:"FFF5EE",sienna:"A0522D",silver:"C0C0C0",skyblue:"87CEEB",
|
||||
slateblue:"6A5ACD",slategray:"708090",snow:"FFFAFA",springgreen:"00FF7F",steelblue:"4682B4",tan:"D2B48C",teal:"008080",thistle:"D8BFD8",tomato:"FF6347",turquoise:"40E0D0",violet:"EE82EE",wheat:"F5DEB3",white:"FFF",whitesmoke:"F5F5F5",yellow:"FF0",yellowgreen:"9ACD32"};a.prototype={parse:function(){if(!this.Ua){var c=this.Y,d;if(d=c.match(a.Qd)){this.Ua="rgb("+d[1]+","+d[2]+","+d[3]+")";this.Yb=parseFloat(d[4])}else{if((d=c.toLowerCase())in a.Fb)c="#"+a.Fb[d];this.Ua=c;this.Yb=c==="transparent"?0:
|
||||
1}}},U:function(c){this.parse();return this.Ua==="currentColor"?c.currentStyle.color:this.Ua},fa:function(){this.parse();return this.Yb}};f.ha=function(c){return b[c]||(b[c]=new a(c))};return a}();f.v=function(){function a(c){this.$a=c;this.ch=0;this.X=[];this.Ga=0}var b=a.qa={Ia:1,Wb:2,z:4,Lc:8,Xb:16,na:32,K:64,oa:128,pa:256,Ra:512,Tc:1024,URL:2048};a.ob=function(c,d){this.k=c;this.d=d};a.ob.prototype={Ca:function(){return this.k&b.K||this.k&b.oa&&this.d==="0"},W:function(){return this.Ca()||this.k&
|
||||
b.Ra}};a.prototype={de:/\s/,Kd:/^[\+\-]?(\d*\.)?\d+/,url:/^url\(\s*("([^"]*)"|'([^']*)'|([!#$%&*-~]*))\s*\)/i,nc:/^\-?[_a-z][\w-]*/i,Yd:/^("([^"]*)"|'([^']*)')/,Bd:/^#([\da-f]{6}|[\da-f]{3})/i,be:{px:b.K,em:b.K,ex:b.K,mm:b.K,cm:b.K,"in":b.K,pt:b.K,pc:b.K,deg:b.Ia,rad:b.Ia,grad:b.Ia},fd:{rgb:1,rgba:1,hsl:1,hsla:1},next:function(c){function d(p,r){p=new a.ob(p,r);if(!c){k.X.push(p);k.Ga++}return p}function e(){k.Ga++;return null}var g,j,i,h,k=this;if(this.Ga<this.X.length)return this.X[this.Ga++];for(;this.de.test(this.$a.charAt(this.ch));)this.ch++;
|
||||
if(this.ch>=this.$a.length)return e();j=this.ch;g=this.$a.substring(this.ch);i=g.charAt(0);switch(i){case "#":if(h=g.match(this.Bd)){this.ch+=h[0].length;return d(b.z,h[0])}break;case '"':case "'":if(h=g.match(this.Yd)){this.ch+=h[0].length;return d(b.Tc,h[2]||h[3]||"")}break;case "/":case ",":this.ch++;return d(b.pa,i);case "u":if(h=g.match(this.url)){this.ch+=h[0].length;return d(b.URL,h[2]||h[3]||h[4]||"")}}if(h=g.match(this.Kd)){i=h[0];this.ch+=i.length;if(g.charAt(i.length)==="%"){this.ch++;
|
||||
return d(b.Ra,i+"%")}if(h=g.substring(i.length).match(this.nc)){i+=h[0];this.ch+=h[0].length;return d(this.be[h[0].toLowerCase()]||b.Lc,i)}return d(b.oa,i)}if(h=g.match(this.nc)){i=h[0];this.ch+=i.length;if(i.toLowerCase()in f.Jc.Fb||i==="currentColor"||i==="transparent")return d(b.z,i);if(g.charAt(i.length)==="("){this.ch++;if(i.toLowerCase()in this.fd){g=function(p){return p&&p.k&b.oa};h=function(p){return p&&p.k&(b.oa|b.Ra)};var n=function(p,r){return p&&p.d===r},m=function(){return k.next(1)};
|
||||
if((i.charAt(0)==="r"?h(m()):g(m()))&&n(m(),",")&&h(m())&&n(m(),",")&&h(m())&&(i==="rgb"||i==="hsa"||n(m(),",")&&g(m()))&&n(m(),")"))return d(b.z,this.$a.substring(j,this.ch));return e()}return d(b.Xb,i)}return d(b.na,i)}this.ch++;return d(b.Wb,i)},D:function(){return this.X[this.Ga-- -2]},all:function(){for(;this.next(););return this.X},ma:function(c,d){for(var e=[],g,j;g=this.next();){if(c(g)){j=true;this.D();break}e.push(g)}return d&&!j?null:e}};return a}();var ha=function(a){this.e=a};ha.prototype=
|
||||
{Z:0,Od:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.x!==b.x||a.y!==b.y)},Td:function(){var a=this.qb,b;return!a||(b=this.o())&&(a.h!==b.h||a.f!==b.f)},hc:function(){var a=this.e,b=a.getBoundingClientRect(),c=f.ja===9,d=f.O===7,e=b.right-b.left;return{x:b.left,y:b.top,h:c||d?a.offsetWidth:e,f:c||d?a.offsetHeight:b.bottom-b.top,Hd:d&&e?a.offsetWidth/e:1}},o:function(){return this.Z?this.Va||(this.Va=this.hc()):this.hc()},Ad:function(){return!!this.qb},cb:function(){++this.Z},hb:function(){if(!--this.Z){if(this.Va)this.qb=
|
||||
this.Va;this.Va=null}}};(function(){function a(b){var c=f.p.Ba(b);return function(){if(this.Z){var d=this.$b||(this.$b={});return c in d?d[c]:(d[c]=b.call(this))}else return b.call(this)}}f.B={Z:0,ka:function(b){function c(d){this.e=d;this.Zb=this.ia()}f.p.Eb(c.prototype,f.B,b);c.$c={};return c},j:function(){var b=this.ia(),c=this.constructor.$c;return b?b in c?c[b]:(c[b]=this.la(b)):null},ia:a(function(){var b=this.e,c=this.constructor,d=b.style;b=b.currentStyle;var e=this.wa,g=this.Fa,j=c.Yc||(c.Yc=
|
||||
f.F+e);c=c.Zc||(c.Zc=f.nb+g.charAt(0).toUpperCase()+g.substring(1));return d[c]||b.getAttribute(j)||d[g]||b.getAttribute(e)}),i:a(function(){return!!this.j()}),H:a(function(){var b=this.ia(),c=b!==this.Zb;this.Zb=b;return c}),va:a,cb:function(){++this.Z},hb:function(){--this.Z||delete this.$b}}})();f.Sb=f.B.ka({wa:f.F+"background",Fa:f.nb+"Background",cd:{scroll:1,fixed:1,local:1},fb:{"repeat-x":1,"repeat-y":1,repeat:1,"no-repeat":1},sc:{"padding-box":1,"border-box":1,"content-box":1},Pd:{top:1,right:1,
|
||||
bottom:1,left:1,center:1},Ud:{contain:1,cover:1},eb:{Ma:"backgroundClip",z:"backgroundColor",da:"backgroundImage",Pa:"backgroundOrigin",S:"backgroundPosition",T:"backgroundRepeat",Sa:"backgroundSize"},la:function(a){function b(s){return s&&s.W()||s.k&k&&s.d in t}function c(s){return s&&(s.W()&&f.n(s.d)||s.d==="auto"&&"auto")}var d=this.e.currentStyle,e,g,j,i=f.v.qa,h=i.pa,k=i.na,n=i.z,m,p,r=0,t=this.Pd,v,l,q={M:[]};if(this.wb()){e=new f.v(a);for(j={};g=e.next();){m=g.k;p=g.d;if(!j.P&&m&i.Xb&&p===
|
||||
"linear-gradient"){v={ca:[],P:p};for(l={};g=e.next();){m=g.k;p=g.d;if(m&i.Wb&&p===")"){l.color&&v.ca.push(l);v.ca.length>1&&f.p.Eb(j,v);break}if(m&n){if(v.sa||v.zb){g=e.D();if(g.k!==h)break;e.next()}l={color:f.ha(p)};g=e.next();if(g.W())l.db=f.n(g.d);else e.D()}else if(m&i.Ia&&!v.sa&&!l.color&&!v.ca.length)v.sa=new f.Ec(g.d);else if(b(g)&&!v.zb&&!l.color&&!v.ca.length){e.D();v.zb=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&h&&p===","){if(l.color){v.ca.push(l);l={}}}else break}}else if(!j.P&&
|
||||
m&i.URL){j.Ab=p;j.P="image"}else if(b(g)&&!j.$){e.D();j.$=new f.Ja(e.ma(function(s){return!b(s)},false))}else if(m&k)if(p in this.fb&&!j.bb)j.bb=p;else if(p in this.sc&&!j.Wa){j.Wa=p;if((g=e.next())&&g.k&k&&g.d in this.sc)j.ub=g.d;else{j.ub=p;e.D()}}else if(p in this.cd&&!j.bc)j.bc=p;else return null;else if(m&n&&!q.color)q.color=f.ha(p);else if(m&h&&p==="/"&&!j.Xa&&j.$){g=e.next();if(g.k&k&&g.d in this.Ud)j.Xa=new f.Ka(g.d);else if(g=c(g)){m=c(e.next());if(!m){m=g;e.D()}j.Xa=new f.Ka(g,m)}else return null}else if(m&
|
||||
h&&p===","&&j.P){j.Hb=a.substring(r,e.ch-1);r=e.ch;q.M.push(j);j={}}else return null}if(j.P){j.Hb=a.substring(r);q.M.push(j)}}else this.Bc(f.ja<9?function(){var s=this.eb,o=d[s.S+"X"],u=d[s.S+"Y"],x=d[s.da],y=d[s.z];if(y!=="transparent")q.color=f.ha(y);if(x!=="none")q.M=[{P:"image",Ab:(new f.v(x)).next().d,bb:d[s.T],$:new f.Ja((new f.v(o+" "+u)).all())}]}:function(){var s=this.eb,o=/\s*,\s*/,u=d[s.da].split(o),x=d[s.z],y,z,B,E,D,C;if(x!=="transparent")q.color=f.ha(x);if((E=u.length)&&u[0]!=="none"){x=
|
||||
d[s.T].split(o);y=d[s.S].split(o);z=d[s.Pa].split(o);B=d[s.Ma].split(o);s=d[s.Sa].split(o);q.M=[];for(o=0;o<E;o++)if((D=u[o])&&D!=="none"){C=s[o].split(" ");q.M.push({Hb:D+" "+x[o]+" "+y[o]+" / "+s[o]+" "+z[o]+" "+B[o],P:"image",Ab:(new f.v(D)).next().d,bb:x[o],$:new f.Ja((new f.v(y[o])).all()),Wa:z[o],ub:B[o],Xa:new f.Ka(C[0],C[1])})}}});return q.color||q.M[0]?q:null},Bc:function(a){var b=f.ja>8,c=this.eb,d=this.e.runtimeStyle,e=d[c.da],g=d[c.z],j=d[c.T],i,h,k,n;if(e)d[c.da]="";if(g)d[c.z]="";if(j)d[c.T]=
|
||||
"";if(b){i=d[c.Ma];h=d[c.Pa];n=d[c.S];k=d[c.Sa];if(i)d[c.Ma]="";if(h)d[c.Pa]="";if(n)d[c.S]="";if(k)d[c.Sa]=""}a=a.call(this);if(e)d[c.da]=e;if(g)d[c.z]=g;if(j)d[c.T]=j;if(b){if(i)d[c.Ma]=i;if(h)d[c.Pa]=h;if(n)d[c.S]=n;if(k)d[c.Sa]=k}return a},ia:f.B.va(function(){return this.wb()||this.Bc(function(){var a=this.e.currentStyle,b=this.eb;return a[b.z]+" "+a[b.da]+" "+a[b.T]+" "+a[b.S+"X"]+" "+a[b.S+"Y"]})}),wb:f.B.va(function(){var a=this.e;return a.style[this.Fa]||a.currentStyle.getAttribute(this.wa)}),
|
||||
qc:function(){var a=0;if(f.O<7){a=this.e;a=""+(a.style[f.nb+"PngFix"]||a.currentStyle.getAttribute(f.F+"png-fix"))==="true"}return a},i:f.B.va(function(){return(this.wb()||this.qc())&&!!this.j()})});f.Vb=f.B.ka({wc:["Top","Right","Bottom","Left"],Id:{thin:"1px",medium:"3px",thick:"5px"},la:function(){var a={},b={},c={},d=false,e=true,g=true,j=true;this.Cc(function(){for(var i=this.e.currentStyle,h=0,k,n,m,p,r,t,v;h<4;h++){m=this.wc[h];v=m.charAt(0).toLowerCase();k=b[v]=i["border"+m+"Style"];n=i["border"+
|
||||
m+"Color"];m=i["border"+m+"Width"];if(h>0){if(k!==p)g=false;if(n!==r)e=false;if(m!==t)j=false}p=k;r=n;t=m;c[v]=f.ha(n);m=a[v]=f.n(b[v]==="none"?"0":this.Id[m]||m);if(m.a(this.e)>0)d=true}});return d?{J:a,Zd:b,gd:c,ee:j,hd:e,$d:g}:null},ia:f.B.va(function(){var a=this.e,b=a.currentStyle,c;a.tagName in f.Ac&&a.offsetParent.currentStyle.borderCollapse==="collapse"||this.Cc(function(){c=b.borderWidth+"|"+b.borderStyle+"|"+b.borderColor});return c}),Cc:function(a){var b=this.e.runtimeStyle,c=b.borderWidth,
|
||||
d=b.borderColor;if(c)b.borderWidth="";if(d)b.borderColor="";a=a.call(this);if(c)b.borderWidth=c;if(d)b.borderColor=d;return a}});(function(){f.jb=f.B.ka({wa:"border-radius",Fa:"borderRadius",la:function(b){var c=null,d,e,g,j,i=false;if(b){e=new f.v(b);var h=function(){for(var k=[],n;(g=e.next())&&g.W();){j=f.n(g.d);n=j.ic();if(n<0)return null;if(n>0)i=true;k.push(j)}return k.length>0&&k.length<5?{tl:k[0],tr:k[1]||k[0],br:k[2]||k[0],bl:k[3]||k[1]||k[0]}:null};if(b=h()){if(g){if(g.k&f.v.qa.pa&&g.d===
|
||||
"/")d=h()}else d=b;if(i&&b&&d)c={x:b,y:d}}}return c}});var a=f.n("0");a={tl:a,tr:a,br:a,bl:a};f.jb.Dc={x:a,y:a}})();f.Ub=f.B.ka({wa:"border-image",Fa:"borderImage",fb:{stretch:1,round:1,repeat:1,space:1},la:function(a){var b=null,c,d,e,g,j,i,h=0,k=f.v.qa,n=k.na,m=k.oa,p=k.Ra;if(a){c=new f.v(a);b={};for(var r=function(l){return l&&l.k&k.pa&&l.d==="/"},t=function(l){return l&&l.k&n&&l.d==="fill"},v=function(){g=c.ma(function(l){return!(l.k&(m|p))});if(t(c.next())&&!b.fill)b.fill=true;else c.D();if(r(c.next())){h++;
|
||||
j=c.ma(function(l){return!l.W()&&!(l.k&n&&l.d==="auto")});if(r(c.next())){h++;i=c.ma(function(l){return!l.Ca()})}}else c.D()};a=c.next();){d=a.k;e=a.d;if(d&(m|p)&&!g){c.D();v()}else if(t(a)&&!b.fill){b.fill=true;v()}else if(d&n&&this.fb[e]&&!b.repeat){b.repeat={f:e};if(a=c.next())if(a.k&n&&this.fb[a.d])b.repeat.Ob=a.d;else c.D()}else if(d&k.URL&&!b.src)b.src=e;else return null}if(!b.src||!g||g.length<1||g.length>4||j&&j.length>4||h===1&&j.length<1||i&&i.length>4||h===2&&i.length<1)return null;if(!b.repeat)b.repeat=
|
||||
{f:"stretch"};if(!b.repeat.Ob)b.repeat.Ob=b.repeat.f;a=function(l,q){return{t:q(l[0]),r:q(l[1]||l[0]),b:q(l[2]||l[0]),l:q(l[3]||l[1]||l[0])}};b.slice=a(g,function(l){return f.n(l.k&m?l.d+"px":l.d)});if(j&&j[0])b.J=a(j,function(l){return l.W()?f.n(l.d):l.d});if(i&&i[0])b.Da=a(i,function(l){return l.Ca()?f.n(l.d):l.d})}return b}});f.Ic=f.B.ka({wa:"box-shadow",Fa:"boxShadow",la:function(a){var b,c=f.n,d=f.v.qa,e;if(a){e=new f.v(a);b={Da:[],Bb:[]};for(a=function(){for(var g,j,i,h,k,n;g=e.next();){i=g.d;
|
||||
j=g.k;if(j&d.pa&&i===",")break;else if(g.Ca()&&!k){e.D();k=e.ma(function(m){return!m.Ca()})}else if(j&d.z&&!h)h=i;else if(j&d.na&&i==="inset"&&!n)n=true;else return false}g=k&&k.length;if(g>1&&g<5){(n?b.Bb:b.Da).push({fe:c(k[0].d),ge:c(k[1].d),blur:c(k[2]?k[2].d:"0"),Vd:c(k[3]?k[3].d:"0"),color:f.ha(h||"currentColor")});return true}return false};a(););}return b&&(b.Bb.length||b.Da.length)?b:null}});f.Uc=f.B.ka({ia:f.B.va(function(){var a=this.e.currentStyle;return a.visibility+"|"+a.display}),la:function(){var a=
|
||||
this.e,b=a.runtimeStyle;a=a.currentStyle;var c=b.visibility,d;b.visibility="";d=a.visibility;b.visibility=c;return{ce:d!=="hidden",nd:a.display!=="none"}},i:function(){return false}});f.u={R:function(a){function b(c,d,e,g){this.e=c;this.s=d;this.g=e;this.parent=g}f.p.Eb(b.prototype,f.u,a);return b},Cb:false,Q:function(){return false},Ea:f.aa,Lb:function(){this.m();this.i()&&this.V()},ib:function(){this.Cb=true},Mb:function(){this.i()?this.V():this.m()},sb:function(a,b){this.vc(a);for(var c=this.ra||
|
||||
(this.ra=[]),d=a+1,e=c.length,g;d<e;d++)if(g=c[d])break;c[a]=b;this.I().insertBefore(b,g||null)},za:function(a){var b=this.ra;return b&&b[a]||null},vc:function(a){var b=this.za(a),c=this.Ta;if(b&&c){c.removeChild(b);this.ra[a]=null}},Aa:function(a,b,c,d){var e=this.rb||(this.rb={}),g=e[a];if(!g){g=e[a]=f.p.Za("shape");if(b)g.appendChild(g[b]=f.p.Za(b));if(d){c=this.za(d);if(!c){this.sb(d,doc.createElement("group"+d));c=this.za(d)}}c.appendChild(g);a=g.style;a.position="absolute";a.left=a.top=0;a.behavior=
|
||||
"url(#default#VML)"}return g},vb:function(a){var b=this.rb,c=b&&b[a];if(c){c.parentNode.removeChild(c);delete b[a]}return!!c},kc:function(a){var b=this.e,c=this.s.o(),d=c.h,e=c.f,g,j,i,h,k,n;c=a.x.tl.a(b,d);g=a.y.tl.a(b,e);j=a.x.tr.a(b,d);i=a.y.tr.a(b,e);h=a.x.br.a(b,d);k=a.y.br.a(b,e);n=a.x.bl.a(b,d);a=a.y.bl.a(b,e);d=Math.min(d/(c+j),e/(i+k),d/(n+h),e/(g+a));if(d<1){c*=d;g*=d;j*=d;i*=d;h*=d;k*=d;n*=d;a*=d}return{x:{tl:c,tr:j,br:h,bl:n},y:{tl:g,tr:i,br:k,bl:a}}},ya:function(a,b,c){b=b||1;var d,e,
|
||||
g=this.s.o();e=g.h*b;g=g.f*b;var j=this.g.G,i=Math.floor,h=Math.ceil,k=a?a.Jb*b:0,n=a?a.Ib*b:0,m=a?a.tb*b:0;a=a?a.Db*b:0;var p,r,t,v,l;if(c||j.i()){d=this.kc(c||j.j());c=d.x.tl*b;j=d.y.tl*b;p=d.x.tr*b;r=d.y.tr*b;t=d.x.br*b;v=d.y.br*b;l=d.x.bl*b;b=d.y.bl*b;e="m"+i(a)+","+i(j)+"qy"+i(c)+","+i(k)+"l"+h(e-p)+","+i(k)+"qx"+h(e-n)+","+i(r)+"l"+h(e-n)+","+h(g-v)+"qy"+h(e-t)+","+h(g-m)+"l"+i(l)+","+h(g-m)+"qx"+i(a)+","+h(g-b)+" x e"}else e="m"+i(a)+","+i(k)+"l"+h(e-n)+","+i(k)+"l"+h(e-n)+","+h(g-m)+"l"+i(a)+
|
||||
","+h(g-m)+"xe";return e},I:function(){var a=this.parent.za(this.N),b;if(!a){a=doc.createElement(this.Ya);b=a.style;b.position="absolute";b.top=b.left=0;this.parent.sb(this.N,a)}return a},mc:function(){var a=this.e,b=a.currentStyle,c=a.runtimeStyle,d=a.tagName,e=f.O===6,g;if(e&&(d in f.cc||d==="FIELDSET")||d==="BUTTON"||d==="INPUT"&&a.type in f.Gd){c.borderWidth="";d=this.g.w.wc;for(g=d.length;g--;){e=d[g];c["padding"+e]="";c["padding"+e]=f.n(b["padding"+e]).a(a)+f.n(b["border"+e+"Width"]).a(a)+(f.O!==
|
||||
8&&g%2?1:0)}c.borderWidth=0}else if(e){if(a.childNodes.length!==1||a.firstChild.tagName!=="ie6-mask"){b=doc.createElement("ie6-mask");d=b.style;d.visibility="visible";for(d.zoom=1;d=a.firstChild;)b.appendChild(d);a.appendChild(b);c.visibility="hidden"}}else c.borderColor="transparent"},ie:function(){},m:function(){this.parent.vc(this.N);delete this.rb;delete this.ra}};f.Rc=f.u.R({i:function(){var a=this.ed;for(var b in a)if(a.hasOwnProperty(b)&&a[b].i())return true;return false},Q:function(){return this.g.Pb.H()},
|
||||
ib:function(){if(this.i()){var a=this.jc(),b=a,c;a=a.currentStyle;var d=a.position,e=this.I().style,g=0,j=0;j=this.s.o();var i=j.Hd;if(d==="fixed"&&f.O>6){g=j.x*i;j=j.y*i;b=d}else{do b=b.offsetParent;while(b&&b.currentStyle.position==="static");if(b){c=b.getBoundingClientRect();b=b.currentStyle;g=(j.x-c.left)*i-(parseFloat(b.borderLeftWidth)||0);j=(j.y-c.top)*i-(parseFloat(b.borderTopWidth)||0)}else{b=doc.documentElement;g=(j.x+b.scrollLeft-b.clientLeft)*i;j=(j.y+b.scrollTop-b.clientTop)*i}b="absolute"}e.position=
|
||||
b;e.left=g;e.top=j;e.zIndex=d==="static"?-1:a.zIndex;this.Cb=true}},Mb:f.aa,Nb:function(){var a=this.g.Pb.j();this.I().style.display=a.ce&&a.nd?"":"none"},Lb:function(){this.i()?this.Nb():this.m()},jc:function(){var a=this.e;return a.tagName in f.Ac?a.offsetParent:a},I:function(){var a=this.Ta,b;if(!a){b=this.jc();a=this.Ta=doc.createElement("css3-container");a.style.direction="ltr";this.Nb();b.parentNode.insertBefore(a,b)}return a},ab:f.aa,m:function(){var a=this.Ta,b;if(a&&(b=a.parentNode))b.removeChild(a);
|
||||
delete this.Ta;delete this.ra}});f.Fc=f.u.R({N:2,Ya:"background",Q:function(){var a=this.g;return a.C.H()||a.G.H()},i:function(){var a=this.g;return a.q.i()||a.G.i()||a.C.i()||a.ga.i()&&a.ga.j().Bb},V:function(){var a=this.s.o();if(a.h&&a.f){this.od();this.pd()}},od:function(){var a=this.g.C.j(),b=this.s.o(),c=this.e,d=a&&a.color,e,g;if(d&&d.fa()>0){this.lc();a=this.Aa("bgColor","fill",this.I(),1);e=b.h;b=b.f;a.stroked=false;a.coordsize=e*2+","+b*2;a.coordorigin="1,1";a.path=this.ya(null,2);g=a.style;
|
||||
g.width=e;g.height=b;a.fill.color=d.U(c);c=d.fa();if(c<1)a.fill.opacity=c}else this.vb("bgColor")},pd:function(){var a=this.g.C.j(),b=this.s.o();a=a&&a.M;var c,d,e,g,j;if(a){this.lc();d=b.h;e=b.f;for(j=a.length;j--;){b=a[j];c=this.Aa("bgImage"+j,"fill",this.I(),2);c.stroked=false;c.fill.type="tile";c.fillcolor="none";c.coordsize=d*2+","+e*2;c.coordorigin="1,1";c.path=this.ya(0,2);g=c.style;g.width=d;g.height=e;if(b.P==="linear-gradient")this.bd(c,b);else{c.fill.src=b.Ab;this.Nd(c,j)}}}for(j=a?a.length:
|
||||
0;this.vb("bgImage"+j++););},Nd:function(a,b){var c=this;f.p.Rb(a.fill.src,function(d){var e=c.e,g=c.s.o(),j=g.h;g=g.f;if(j&&g){var i=a.fill,h=c.g,k=h.w.j(),n=k&&k.J;k=n?n.t.a(e):0;var m=n?n.r.a(e):0,p=n?n.b.a(e):0;n=n?n.l.a(e):0;h=h.C.j().M[b];e=h.$?h.$.coords(e,j-d.h-n-m,g-d.f-k-p):{x:0,y:0};h=h.bb;p=m=0;var r=j+1,t=g+1,v=f.O===8?0:1;n=Math.round(e.x)+n+0.5;k=Math.round(e.y)+k+0.5;i.position=n/j+","+k/g;i.size.x=1;i.size=d.h+"px,"+d.f+"px";if(h&&h!=="repeat"){if(h==="repeat-x"||h==="no-repeat"){m=
|
||||
k+1;t=k+d.f+v}if(h==="repeat-y"||h==="no-repeat"){p=n+1;r=n+d.h+v}a.style.clip="rect("+m+"px,"+r+"px,"+t+"px,"+p+"px)"}}})},bd:function(a,b){var c=this.e,d=this.s.o(),e=d.h,g=d.f;a=a.fill;d=b.ca;var j=d.length,i=Math.PI,h=f.Na,k=h.tc,n=h.dc;b=h.gc(c,e,g,b);h=b.sa;var m=b.xc,p=b.yc,r=b.Wd,t=b.Xd,v=b.rd,l=b.sd,q=b.kd,s=b.ld;b=b.rc;e=h%90?Math.atan2(q*e/g,s)/i*180:h+90;e+=180;e%=360;v=k(r,t,h,v,l);g=n(r,t,v[0],v[1]);i=[];v=k(m,p,h,r,t);n=n(m,p,v[0],v[1])/g*100;k=[];for(h=0;h<j;h++)k.push(d[h].db?d[h].db.a(c,
|
||||
b):h===0?0:h===j-1?b:null);for(h=1;h<j;h++){if(k[h]===null){m=k[h-1];b=h;do p=k[++b];while(p===null);k[h]=m+(p-m)/(b-h+1)}k[h]=Math.max(k[h],k[h-1])}for(h=0;h<j;h++)i.push(n+k[h]/g*100+"% "+d[h].color.U(c));a.angle=e;a.type="gradient";a.method="sigma";a.color=d[0].color.U(c);a.color2=d[j-1].color.U(c);if(a.colors)a.colors.value=i.join(",");else a.colors=i.join(",")},lc:function(){var a=this.e.runtimeStyle;a.backgroundImage="url(about:blank)";a.backgroundColor="transparent"},m:function(){f.u.m.call(this);
|
||||
var a=this.e.runtimeStyle;a.backgroundImage=a.backgroundColor=""}});f.Gc=f.u.R({N:4,Ya:"border",Q:function(){var a=this.g;return a.w.H()||a.G.H()},i:function(){var a=this.g;return a.G.i()&&!a.q.i()&&a.w.i()},V:function(){var a=this.e,b=this.g.w.j(),c=this.s.o(),d=c.h;c=c.f;var e,g,j,i,h;if(b){this.mc();b=this.wd(2);i=0;for(h=b.length;i<h;i++){j=b[i];e=this.Aa("borderPiece"+i,j.stroke?"stroke":"fill",this.I());e.coordsize=d*2+","+c*2;e.coordorigin="1,1";e.path=j.path;g=e.style;g.width=d;g.height=c;
|
||||
e.filled=!!j.fill;e.stroked=!!j.stroke;if(j.stroke){e=e.stroke;e.weight=j.Qb+"px";e.color=j.color.U(a);e.dashstyle=j.stroke==="dashed"?"2 2":j.stroke==="dotted"?"1 1":"solid";e.linestyle=j.stroke==="double"&&j.Qb>2?"ThinThin":"Single"}else e.fill.color=j.fill.U(a)}for(;this.vb("borderPiece"+i++););}},wd:function(a){var b=this.e,c,d,e,g=this.g.w,j=[],i,h,k,n,m=Math.round,p,r,t;if(g.i()){c=g.j();g=c.J;r=c.Zd;t=c.gd;if(c.ee&&c.$d&&c.hd){if(t.t.fa()>0){c=g.t.a(b);k=c/2;j.push({path:this.ya({Jb:k,Ib:k,
|
||||
tb:k,Db:k},a),stroke:r.t,color:t.t,Qb:c})}}else{a=a||1;c=this.s.o();d=c.h;e=c.f;c=m(g.t.a(b));k=m(g.r.a(b));n=m(g.b.a(b));b=m(g.l.a(b));var v={t:c,r:k,b:n,l:b};b=this.g.G;if(b.i())p=this.kc(b.j());i=Math.floor;h=Math.ceil;var l=function(o,u){return p?p[o][u]:0},q=function(o,u,x,y,z,B){var E=l("x",o),D=l("y",o),C=o.charAt(1)==="r";o=o.charAt(0)==="b";return E>0&&D>0?(B?"al":"ae")+(C?h(d-E):i(E))*a+","+(o?h(e-D):i(D))*a+","+(i(E)-u)*a+","+(i(D)-x)*a+","+y*65535+","+2949075*(z?1:-1):(B?"m":"l")+(C?d-
|
||||
u:u)*a+","+(o?e-x:x)*a},s=function(o,u,x,y){var z=o==="t"?i(l("x","tl"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+i(l("y","tr"))*a:o==="b"?h(d-l("x","br"))*a+","+i(e-u)*a:i(u)*a+","+h(e-l("y","bl"))*a;o=o==="t"?h(d-l("x","tr"))*a+","+h(u)*a:o==="r"?h(d-u)*a+","+h(e-l("y","br"))*a:o==="b"?i(l("x","bl"))*a+","+i(e-u)*a:i(u)*a+","+i(l("y","tl"))*a;return x?(y?"m"+o:"")+"l"+z:(y?"m"+z:"")+"l"+o};b=function(o,u,x,y,z,B){var E=o==="l"||o==="r",D=v[o],C,F;if(D>0&&r[o]!=="none"&&t[o].fa()>0){C=v[E?o:u];u=v[E?u:
|
||||
o];F=v[E?o:x];x=v[E?x:o];if(r[o]==="dashed"||r[o]==="dotted"){j.push({path:q(y,C,u,B+45,0,1)+q(y,0,0,B,1,0),fill:t[o]});j.push({path:s(o,D/2,0,1),stroke:r[o],Qb:D,color:t[o]});j.push({path:q(z,F,x,B,0,1)+q(z,0,0,B-45,1,0),fill:t[o]})}else j.push({path:q(y,C,u,B+45,0,1)+s(o,D,0,0)+q(z,F,x,B,0,0)+(r[o]==="double"&&D>2?q(z,F-i(F/3),x-i(x/3),B-45,1,0)+s(o,h(D/3*2),1,0)+q(y,C-i(C/3),u-i(u/3),B,1,0)+"x "+q(y,i(C/3),i(u/3),B+45,0,1)+s(o,i(D/3),1,0)+q(z,i(F/3),i(x/3),B,0,0):"")+q(z,0,0,B-45,1,0)+s(o,0,1,
|
||||
0)+q(y,0,0,B,1,0),fill:t[o]})}};b("t","l","r","tl","tr",90);b("r","t","b","tr","br",0);b("b","r","l","br","bl",-90);b("l","b","t","bl","tl",-180)}}return j},m:function(){if(this.ec||!this.g.q.i())this.e.runtimeStyle.borderColor="";f.u.m.call(this)}});f.Tb=f.u.R({N:5,Md:["t","tr","r","br","b","bl","l","tl","c"],Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){this.I();var a=this.g.q.j(),b=this.g.w.j(),c=this.s.o(),d=this.e,e=this.uc;f.p.Rb(a.src,function(g){function j(s,
|
||||
o,u,x,y){s=e[s].style;var z=Math.max;s.width=z(o,0);s.height=z(u,0);s.left=x;s.top=y}function i(s,o,u){for(var x=0,y=s.length;x<y;x++)e[s[x]].imagedata[o]=u}var h=c.h,k=c.f,n=f.n("0"),m=a.J||(b?b.J:{t:n,r:n,b:n,l:n});n=m.t.a(d);var p=m.r.a(d),r=m.b.a(d);m=m.l.a(d);var t=a.slice,v=t.t.a(d),l=t.r.a(d),q=t.b.a(d);t=t.l.a(d);j("tl",m,n,0,0);j("t",h-m-p,n,m,0);j("tr",p,n,h-p,0);j("r",p,k-n-r,h-p,n);j("br",p,r,h-p,k-r);j("b",h-m-p,r,m,k-r);j("bl",m,r,0,k-r);j("l",m,k-n-r,0,n);j("c",h-m-p,k-n-r,m,n);i(["tl",
|
||||
"t","tr"],"cropBottom",(g.f-v)/g.f);i(["tl","l","bl"],"cropRight",(g.h-t)/g.h);i(["bl","b","br"],"cropTop",(g.f-q)/g.f);i(["tr","r","br"],"cropLeft",(g.h-l)/g.h);i(["l","r","c"],"cropTop",v/g.f);i(["l","r","c"],"cropBottom",q/g.f);i(["t","b","c"],"cropLeft",t/g.h);i(["t","b","c"],"cropRight",l/g.h);e.c.style.display=a.fill?"":"none"},this)},I:function(){var a=this.parent.za(this.N),b,c,d,e=this.Md,g=e.length;if(!a){a=doc.createElement("border-image");b=a.style;b.position="absolute";this.uc={};for(d=
|
||||
0;d<g;d++){c=this.uc[e[d]]=f.p.Za("rect");c.appendChild(f.p.Za("imagedata"));b=c.style;b.behavior="url(#default#VML)";b.position="absolute";b.top=b.left=0;c.imagedata.src=this.g.q.j().src;c.stroked=false;c.filled=false;a.appendChild(c)}this.parent.sb(this.N,a)}return a},Ea:function(){if(this.i()){var a=this.e,b=a.runtimeStyle,c=this.g.q.j().J;b.borderStyle="solid";if(c){b.borderTopWidth=c.t.a(a)+"px";b.borderRightWidth=c.r.a(a)+"px";b.borderBottomWidth=c.b.a(a)+"px";b.borderLeftWidth=c.l.a(a)+"px"}this.mc()}},
|
||||
m:function(){var a=this.e.runtimeStyle;a.borderStyle="";if(this.ec||!this.g.w.i())a.borderColor=a.borderWidth="";f.u.m.call(this)}});f.Hc=f.u.R({N:1,Ya:"outset-box-shadow",Q:function(){var a=this.g;return a.ga.H()||a.G.H()},i:function(){var a=this.g.ga;return a.i()&&a.j().Da[0]},V:function(){function a(C,F,O,H,M,P,I){C=b.Aa("shadow"+C+F,"fill",d,j-C);F=C.fill;C.coordsize=n*2+","+m*2;C.coordorigin="1,1";C.stroked=false;C.filled=true;F.color=M.U(c);if(P){F.type="gradienttitle";F.color2=F.color;F.opacity=
|
||||
0}C.path=I;l=C.style;l.left=O;l.top=H;l.width=n;l.height=m;return C}var b=this,c=this.e,d=this.I(),e=this.g,g=e.ga.j().Da;e=e.G.j();var j=g.length,i=j,h,k=this.s.o(),n=k.h,m=k.f;k=f.O===8?1:0;for(var p=["tl","tr","br","bl"],r,t,v,l,q,s,o,u,x,y,z,B,E,D;i--;){t=g[i];q=t.fe.a(c);s=t.ge.a(c);h=t.Vd.a(c);o=t.blur.a(c);t=t.color;u=-h-o;if(!e&&o)e=f.jb.Dc;u=this.ya({Jb:u,Ib:u,tb:u,Db:u},2,e);if(o){x=(h+o)*2+n;y=(h+o)*2+m;z=x?o*2/x:0;B=y?o*2/y:0;if(o-h>n/2||o-h>m/2)for(h=4;h--;){r=p[h];E=r.charAt(0)==="b";
|
||||
D=r.charAt(1)==="r";r=a(i,r,q,s,t,o,u);v=r.fill;v.focusposition=(D?1-z:z)+","+(E?1-B:B);v.focussize="0,0";r.style.clip="rect("+((E?y/2:0)+k)+"px,"+(D?x:x/2)+"px,"+(E?y:y/2)+"px,"+((D?x/2:0)+k)+"px)"}else{r=a(i,"",q,s,t,o,u);v=r.fill;v.focusposition=z+","+B;v.focussize=1-z*2+","+(1-B*2)}}else{r=a(i,"",q,s,t,o,u);q=t.fa();if(q<1)r.fill.opacity=q}}}});f.Pc=f.u.R({N:6,Ya:"imgEl",Q:function(){var a=this.g;return this.e.src!==this.Xc||a.G.H()},i:function(){var a=this.g;return a.G.i()||a.C.qc()},V:function(){this.Xc=
|
||||
j;this.Cd();var a=this.Aa("img","fill",this.I()),b=a.fill,c=this.s.o(),d=c.h;c=c.f;var e=this.g.w.j(),g=e&&e.J;e=this.e;var j=e.src,i=Math.round,h=e.currentStyle,k=f.n;if(!g||f.O<7){g=f.n("0");g={t:g,r:g,b:g,l:g}}a.stroked=false;b.type="frame";b.src=j;b.position=(d?0.5/d:0)+","+(c?0.5/c:0);a.coordsize=d*2+","+c*2;a.coordorigin="1,1";a.path=this.ya({Jb:i(g.t.a(e)+k(h.paddingTop).a(e)),Ib:i(g.r.a(e)+k(h.paddingRight).a(e)),tb:i(g.b.a(e)+k(h.paddingBottom).a(e)),Db:i(g.l.a(e)+k(h.paddingLeft).a(e))},
|
||||
2);a=a.style;a.width=d;a.height=c},Cd:function(){this.e.runtimeStyle.filter="alpha(opacity=0)"},m:function(){f.u.m.call(this);this.e.runtimeStyle.filter=""}});f.Oc=f.u.R({ib:f.aa,Mb:f.aa,Nb:f.aa,Lb:f.aa,Ld:/^,+|,+$/g,Fd:/,+/g,gb:function(a,b){(this.pb||(this.pb=[]))[a]=b||void 0},ab:function(){var a=this.pb,b;if(a&&(b=a.join(",").replace(this.Ld,"").replace(this.Fd,","))!==this.Wc)this.Wc=this.e.runtimeStyle.background=b},m:function(){this.e.runtimeStyle.background="";delete this.pb}});f.Mc=f.u.R({ua:1,
|
||||
Q:function(){return this.g.C.H()},i:function(){var a=this.g;return a.C.i()||a.q.i()},V:function(){var a=this.g.C.j(),b,c,d=0,e,g;if(a){b=[];if(c=a.M)for(;e=c[d++];)if(e.P==="linear-gradient"){g=this.vd(e.Wa);g=(e.Xa||f.Ka.Kc).a(this.e,g.h,g.f,g.h,g.f);b.push("url(data:image/svg+xml,"+escape(this.xd(e,g.h,g.f))+") "+this.dd(e.$)+" / "+g.h+"px "+g.f+"px "+(e.bc||"")+" "+(e.Wa||"")+" "+(e.ub||""))}else b.push(e.Hb);a.color&&b.push(a.color.Y);this.parent.gb(this.ua,b.join(","))}},dd:function(a){return a?
|
||||
a.X.map(function(b){return b.d}).join(" "):"0 0"},vd:function(a){var b=this.e,c=this.s.o(),d=c.h;c=c.f;var e;if(a!=="border-box")if((e=this.g.w.j())&&(e=e.J)){d-=e.l.a(b)+e.l.a(b);c-=e.t.a(b)+e.b.a(b)}if(a==="content-box"){a=f.n;e=b.currentStyle;d-=a(e.paddingLeft).a(b)+a(e.paddingRight).a(b);c-=a(e.paddingTop).a(b)+a(e.paddingBottom).a(b)}return{h:d,f:c}},xd:function(a,b,c){var d=this.e,e=a.ca,g=e.length,j=f.Na.gc(d,b,c,a);a=j.xc;var i=j.yc,h=j.td,k=j.ud;j=j.rc;var n,m,p,r,t;n=[];for(m=0;m<g;m++)n.push(e[m].db?
|
||||
e[m].db.a(d,j):m===0?0:m===g-1?j:null);for(m=1;m<g;m++)if(n[m]===null){r=n[m-1];p=m;do t=n[++p];while(t===null);n[m]=r+(t-r)/(p-m+1)}b=['<svg width="'+b+'" height="'+c+'" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" gradientUnits="userSpaceOnUse" x1="'+a/b*100+'%" y1="'+i/c*100+'%" x2="'+h/b*100+'%" y2="'+k/c*100+'%">'];for(m=0;m<g;m++)b.push('<stop offset="'+n[m]/j+'" stop-color="'+e[m].color.U(d)+'" stop-opacity="'+e[m].color.fa()+'"/>');b.push('</linearGradient></defs><rect width="100%" height="100%" fill="url(#g)"/></svg>');
|
||||
return b.join("")},m:function(){this.parent.gb(this.ua)}});f.Nc=f.u.R({T:"repeat",Sc:"stretch",Qc:"round",ua:0,Q:function(){return this.g.q.H()},i:function(){return this.g.q.i()},V:function(){var a=this,b=a.g.q.j(),c=a.g.w.j(),d=a.s.o(),e=b.repeat,g=e.f,j=e.Ob,i=a.e,h=0;f.p.Rb(b.src,function(k){function n(Q,R,U,V,W,Y,X,S,w,A){K.push('<pattern patternUnits="userSpaceOnUse" id="pattern'+G+'" x="'+(g===l?Q+U/2-w/2:Q)+'" y="'+(j===l?R+V/2-A/2:R)+'" width="'+w+'" height="'+A+'"><svg width="'+w+'" height="'+
|
||||
A+'" viewBox="'+W+" "+Y+" "+X+" "+S+'" preserveAspectRatio="none"><image xlink:href="'+v+'" x="0" y="0" width="'+r+'" height="'+t+'" /></svg></pattern>');J.push('<rect x="'+Q+'" y="'+R+'" width="'+U+'" height="'+V+'" fill="url(#pattern'+G+')" />');G++}var m=d.h,p=d.f,r=k.h,t=k.f,v=a.Dd(b.src,r,t),l=a.T,q=a.Sc;k=a.Qc;var s=Math.ceil,o=f.n("0"),u=b.J||(c?c.J:{t:o,r:o,b:o,l:o});o=u.t.a(i);var x=u.r.a(i),y=u.b.a(i);u=u.l.a(i);var z=b.slice,B=z.t.a(i),E=z.r.a(i),D=z.b.a(i);z=z.l.a(i);var C=m-u-x,F=p-o-
|
||||
y,O=r-z-E,H=t-B-D,M=g===q?C:O*o/B,P=j===q?F:H*x/E,I=g===q?C:O*y/D;q=j===q?F:H*u/z;var K=[],J=[],G=0;if(g===k){M-=(M-(C%M||M))/s(C/M);I-=(I-(C%I||I))/s(C/I)}if(j===k){P-=(P-(F%P||P))/s(F/P);q-=(q-(F%q||q))/s(F/q)}k=['<svg width="'+m+'" height="'+p+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'];n(0,0,u,o,0,0,z,B,u,o);n(u,0,C,o,z,0,O,B,M,o);n(m-x,0,x,o,r-E,0,E,B,x,o);n(0,o,u,F,0,B,z,H,u,q);if(b.fill)n(u,o,C,F,z,B,O,H,M||I||O,q||P||H);n(m-x,o,x,F,r-E,B,E,H,x,P);n(0,
|
||||
p-y,u,y,0,t-D,z,D,u,y);n(u,p-y,C,y,z,t-D,O,D,I,y);n(m-x,p-y,x,y,r-E,t-D,E,D,x,y);k.push("<defs>"+K.join("\n")+"</defs>"+J.join("\n")+"</svg>");a.parent.gb(a.ua,"url(data:image/svg+xml,"+escape(k.join(""))+") no-repeat border-box border-box");h&&a.parent.ab()},a);h=1},Dd:function(){var a={};return function(b,c,d){var e=a[b],g;if(!e){e=new Image;g=doc.createElement("canvas");e.src=b;g.width=c;g.height=d;g.getContext("2d").drawImage(e,0,0);e=a[b]=g.toDataURL()}return e}}(),Ea:f.Tb.prototype.Ea,m:function(){var a=
|
||||
this.e.runtimeStyle;this.parent.gb(this.ua);a.borderColor=a.borderStyle=a.borderWidth=""}});f.kb=function(){function a(l,q){l.className+=" "+q}function b(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;)a(l,q[s])},0)}function c(l){var q=v.slice.call(arguments,1),s=q.length;setTimeout(function(){if(l)for(;s--;){var o=q[s];o=t[o]||(t[o]=new RegExp("\\b"+o+"\\b","g"));l.className=l.className.replace(o,"")}},0)}function d(l){function q(){if(!U){var w,A,L=f.ja,T=l.currentStyle,
|
||||
N=T.getAttribute(g)==="true",da=T.getAttribute(i)!=="false",ea=T.getAttribute(h)!=="false";S=T.getAttribute(j);S=L>7?S!=="false":S==="true";if(!R){R=1;l.runtimeStyle.zoom=1;T=l;for(var fa=1;T=T.previousSibling;)if(T.nodeType===1){fa=0;break}fa&&a(l,p)}J.cb();if(N&&(A=J.o())&&(w=doc.documentElement||doc.body)&&(A.y>w.clientHeight||A.x>w.clientWidth||A.y+A.f<0||A.x+A.h<0)){if(!Y){Y=1;f.mb.ba(q)}}else{U=1;Y=R=0;f.mb.Ha(q);if(L===9){G={C:new f.Sb(l),q:new f.Ub(l),w:new f.Vb(l)};Q=[G.C,G.q];K=new f.Oc(l,
|
||||
J,G);w=[new f.Mc(l,J,G,K),new f.Nc(l,J,G,K)]}else{G={C:new f.Sb(l),w:new f.Vb(l),q:new f.Ub(l),G:new f.jb(l),ga:new f.Ic(l),Pb:new f.Uc(l)};Q=[G.C,G.w,G.q,G.G,G.ga,G.Pb];K=new f.Rc(l,J,G);w=[new f.Hc(l,J,G,K),new f.Fc(l,J,G,K),new f.Gc(l,J,G,K),new f.Tb(l,J,G,K)];l.tagName==="IMG"&&w.push(new f.Pc(l,J,G,K));K.ed=w}I=[K].concat(w);if(w=l.currentStyle.getAttribute(f.F+"watch-ancestors")){w=parseInt(w,10);A=0;for(N=l.parentNode;N&&(w==="NaN"||A++<w);){H(N,"onpropertychange",C);H(N,"onmouseenter",x);
|
||||
H(N,"onmouseleave",y);H(N,"onmousedown",z);if(N.tagName in f.fc){H(N,"onfocus",E);H(N,"onblur",D)}N=N.parentNode}}if(S){f.Oa.ba(o);f.Oa.Rd()}o(1)}if(!V){V=1;L<9&&H(l,"onmove",s);H(l,"onresize",s);H(l,"onpropertychange",u);ea&&H(l,"onmouseenter",x);if(ea||da)H(l,"onmouseleave",y);da&&H(l,"onmousedown",z);if(l.tagName in f.fc){H(l,"onfocus",E);H(l,"onblur",D)}f.Qa.ba(s);f.L.ba(M)}J.hb()}}function s(){J&&J.Ad()&&o()}function o(w){if(!X)if(U){var A,L=I.length;F();for(A=0;A<L;A++)I[A].Ea();if(w||J.Od())for(A=
|
||||
0;A<L;A++)I[A].ib();if(w||J.Td())for(A=0;A<L;A++)I[A].Mb();K.ab();O()}else R||q()}function u(){var w,A=I.length,L;w=event;if(!X&&!(w&&w.propertyName in r))if(U){F();for(w=0;w<A;w++)I[w].Ea();for(w=0;w<A;w++){L=I[w];L.Cb||L.ib();L.Q()&&L.Lb()}K.ab();O()}else R||q()}function x(){b(l,k)}function y(){c(l,k,n)}function z(){b(l,n);f.lb.ba(B)}function B(){c(l,n);f.lb.Ha(B)}function E(){b(l,m)}function D(){c(l,m)}function C(){var w=event.propertyName;if(w==="className"||w==="id")u()}function F(){J.cb();for(var w=
|
||||
Q.length;w--;)Q[w].cb()}function O(){for(var w=Q.length;w--;)Q[w].hb();J.hb()}function H(w,A,L){w.attachEvent(A,L);W.push([w,A,L])}function M(){if(V){for(var w=W.length,A;w--;){A=W[w];A[0].detachEvent(A[1],A[2])}f.L.Ha(M);V=0;W=[]}}function P(){if(!X){var w,A;M();X=1;if(I){w=0;for(A=I.length;w<A;w++){I[w].ec=1;I[w].m()}}S&&f.Oa.Ha(o);f.Qa.Ha(o);I=J=G=Q=l=null}}var I,K,J=new ha(l),G,Q,R,U,V,W=[],Y,X,S;this.Ed=q;this.update=o;this.m=P;this.qd=l}var e={},g=f.F+"lazy-init",j=f.F+"poll",i=f.F+"track-active",
|
||||
h=f.F+"track-hover",k=f.La+"hover",n=f.La+"active",m=f.La+"focus",p=f.La+"first-child",r={background:1,bgColor:1,display:1},t={},v=[];d.yd=function(l){var q=f.p.Ba(l);return e[q]||(e[q]=new d(l))};d.m=function(l){l=f.p.Ba(l);var q=e[l];if(q){q.m();delete e[l]}};d.md=function(){var l=[],q;if(e){for(var s in e)if(e.hasOwnProperty(s)){q=e[s];l.push(q.qd);q.m()}e={}}return l};return d}();f.supportsVML=f.zc;f.attach=function(a){f.ja<10&&f.zc&&f.kb.yd(a).Ed()};f.detach=function(a){f.kb.m(a)}};
|
||||
var $=element;function init(){if(doc.media!=="print"){var a=window.PIE;a&&a.attach($)}}function cleanup(){if(doc.media!=="print"){var a=window.PIE;if(a){a.detach($);$=0}}}$.readyState==="complete"&&init();
|
||||
</script>
|
||||
</PUBLIC:COMPONENT>
|
||||
7
_rejestracja/Static/script/ie/backgroundsize.min.htc
Normal file
@@ -0,0 +1,7 @@
|
||||
<component lightWeight="true">
|
||||
<attach event="onpropertychange" onevent="handlePropertychange()" />
|
||||
<attach event="ondetach" onevent="restore()" />
|
||||
<attach event="onresize" for="window" onevent="handleResize()" />
|
||||
<script type="text/javascript">
|
||||
var rsrc=/url\(["']?(.*?)["']?\)/,positions={top:0,left:0,bottom:1,right:1,center:0.5},doc=element.document;init(); function init(){var b=doc.createElement("div"),a=doc.createElement("img"),c,d;b.style.position="absolute";b.style.zIndex=-1;b.style.top=0;b.style.right=0;b.style.left=0;b.style.bottom=0;b.style.overflow="hidden";a.style.position="absolute";a.style.width=a.style.width="auto";b.appendChild(a);element.insertBefore(b,element.firstChild);d=[element.currentStyle.backgroundPositionX,element.currentStyle.backgroundPositionY];element.bgsExpando=c={wrapper:b,img:a,backgroundSize:element.currentStyle["background-size"], backgroundPositionX:positions[d[0]]||parseFloat(d[0])/100,backgroundPositionY:positions[d[1]]||parseFloat(d[1])/100};"auto"==element.currentStyle.zIndex&&(element.style.zIndex=0);"static"==element.currentStyle.position&&(element.style.position="relative");refreshDisplay(element,c)&&(refreshDimensions(element,c),refreshBackgroundImage(element,c,function(){updateBackground(element,c)}))} function refreshDisplay(b,a){var c=b.currentStyle.display;c!=a.display&&(a.display=c,a.somethingChanged=!0);return"none"!=c}function refreshDimensions(b,a){var c=b.offsetWidth-(parseFloat(b.currentStyle.borderLeftWidth)||0)-(parseFloat(b.currentStyle.borderRightWidth)||0),d=b.offsetHeight-(parseFloat(b.currentStyle.borderTopWidth)||0)-(parseFloat(b.currentStyle.borderBottomWidth)||0);if(c!=a.innerWidth||d!=a.innerHeight)a.innerWidth=c,a.innerHeight=d,a.somethingChanged=!0} function refreshBackgroundImage(b,a,c){var d=a.img,e=(rsrc.exec(b.currentStyle.backgroundImage)||[])[1];if(e&&e!=a.backgroundSrc){a.backgroundSrc=e;a.somethingChanged=!0;d.onload=function(){var b=d.width,e=d.height;1==b&&1==e||(a.imgWidth=b,a.imgHeight=e,a.constrain=!1,c(),d.style.visibility="visible",d.onload=null)};d.style.visibility="hidden";d.src=a.backgroundSrc;if(d.readyState||d.complete)d.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",d.src=a.backgroundSrc;a.ignoreNextPropertyChange= !0;b.style.backgroundImage="none"}else c()} function updateBackground(b,a){if(a.somethingChanged){var c=a.img,d=a.innerWidth/a.innerHeight,e=a.imgWidth/a.imgHeight,f=a.constrain;"contain"==a.backgroundSize?e>d?(a.constrain=d="width",e=Math.floor((a.innerHeight-a.innerWidth/e)*a.backgroundPositionY),c.style.top=e+"px",d!=f&&(c.style.width="100%",c.style.height="auto",c.style.left=0)):(a.constrain=d="height",e=Math.floor((a.innerWidth-a.innerHeight*e)*a.backgroundPositionX),c.style.left=e+"px",d!=f&&(c.style.width="auto",c.style.height="100%", c.style.top=0)):"cover"==a.backgroundSize&&(e>d?(a.constrain=d="height",e=Math.floor((a.innerHeight*e-a.innerWidth)*a.backgroundPositionX),c.style.left=-e+"px",d!=f&&(c.style.width="auto",c.style.height="100%",c.style.top=0)):(a.constrain=d="width",e=Math.floor((a.innerWidth/e-a.innerHeight)*a.backgroundPositionY),c.style.top=-e+"px",d!=f&&(c.style.width="100%",c.style.height="auto",c.style.left=0)));a.somethingChanged=!1}} function handlePropertychange(){var b=element.bgsExpando;b.ignoreNextPropertyChange?b.ignoreNextPropertyChange=!1:refreshDisplay(element,b)&&(refreshDimensions(element,b),refreshBackgroundImage(element,b,function(){updateBackground(element,b)}))}function handleResize(){var b=element.bgsExpando;"none"!=b.display&&(refreshDimensions(element,b),updateBackground(element,b))} function restore(){var b=element.bgsExpando;try{element.style.backgroundImage="url('"+b.backgroundSrc+"')",element.removeChild(b.wrapper),element.bgsExpando=null}catch(a){}};
|
||||
</script>
|
||||
8
_rejestracja/Static/script/ie/html5shiv.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag();
|
||||
a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}</style>";
|
||||
c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode||
|
||||
"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment();
|
||||
for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document);
|
||||
6
_rejestracja/Static/script/ie/respond.min.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill
|
||||
* Copyright 2014 Scott Jehl
|
||||
* Licensed under MIT
|
||||
* http://j.mp/respondjs */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b<t.length;b++){var c=t[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!p[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(w(c.styleSheet.rawCssText,e,f),p[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!s||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}x()};y(),c.update=y,c.getEmValue=u,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
||||
485
_rejestracja/Static/script/init.js
Normal file
@@ -0,0 +1,485 @@
|
||||
//Tu jest Cufon + obsługa frontSlide i karuzeli + drop down menu z topu
|
||||
|
||||
//M.Szwed
|
||||
|
||||
|
||||
|
||||
//Cufon.replace('h1', { fontFamily: 'MyriadPro'} );
|
||||
|
||||
//Cufon.replace('h2', { fontFamily: 'MyriadPro'
|
||||
|
||||
// } );
|
||||
|
||||
//Cufon.replace('h3', { fontFamily: 'MyriadPro'} );
|
||||
|
||||
//Cufon.replace('h4', { fontFamily: 'MyriadPro'} );
|
||||
|
||||
//Cufon.replace('a.myriad', { fontFamily: 'MyriadPro'} );
|
||||
|
||||
//Cufon.replace('strong', { fontFamily: 'Usa'} );
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
//$('a.media').media();
|
||||
|
||||
|
||||
|
||||
//swfobject.registerObject("myFlashContent", "9.0.0");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// $("a[rel^='prettyPhoto']").prettyPhoto();
|
||||
|
||||
|
||||
|
||||
// $.mobile.loadingMessageTextVisible = false;
|
||||
|
||||
|
||||
|
||||
// karuzela:
|
||||
|
||||
// $(".securityCarousel").jCarouselLite({
|
||||
|
||||
// auto: 3000,
|
||||
|
||||
// height: 200,
|
||||
|
||||
// vertical: true
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// var msg = "The WPF plug-in for Firefox is ";
|
||||
|
||||
// var wpfPlugin = navigator.plugins["Windows Presentation Foundation"];
|
||||
|
||||
// if( wpfPlugin != null ) {
|
||||
|
||||
// document.writeln(msg + " installed.");
|
||||
|
||||
// }
|
||||
|
||||
// else {
|
||||
|
||||
// document.writeln(msg + " not installed. Please install or reinstall the .NET Framework 3.5.");
|
||||
|
||||
// }
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//$(function() {
|
||||
//
|
||||
// $('.jcarousel').jcarousel({
|
||||
//
|
||||
// wrap: 'circular',
|
||||
//
|
||||
// animation: {
|
||||
//
|
||||
// duration: 12000,
|
||||
//
|
||||
// easing: 'linear',
|
||||
//
|
||||
// complete: function() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// })
|
||||
//
|
||||
// .jcarouselAutoscroll({
|
||||
//
|
||||
// interval: 4,
|
||||
//
|
||||
// target: '+=4',
|
||||
//
|
||||
// autostart: true
|
||||
//
|
||||
// });
|
||||
//
|
||||
//});
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//$('.jcarousel').jcarouselAutoscroll('reload');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function GetTableContent(url, search, period) {
|
||||
|
||||
// var loading = $("body").busyBox({
|
||||
|
||||
// spinner: 'Loading...'
|
||||
|
||||
// });
|
||||
|
||||
$.prettyLoader.show();
|
||||
|
||||
//alert('aaa');
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({search: search, period: period}),
|
||||
success: function (html) {
|
||||
|
||||
$('#tableContent').html(html);
|
||||
|
||||
//loading.busyBox('close');
|
||||
|
||||
$.prettyLoader.hide();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SendForm(form, val) {
|
||||
|
||||
|
||||
|
||||
var action = val;
|
||||
|
||||
$(form).attr("action", action);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function menuRwd() {
|
||||
|
||||
|
||||
|
||||
//alert($('#menu').css('display'));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if ($('.menu').css('display') == 'none') {
|
||||
|
||||
$('.menu').show('slow');
|
||||
|
||||
} else {
|
||||
|
||||
$('.menu').hide('slow');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function showTextarea(idCheckbox, idTextarea) {
|
||||
|
||||
val = $(idCheckbox).is(':checked');
|
||||
|
||||
//alert(val);
|
||||
|
||||
if (val == true) {
|
||||
|
||||
$(idTextarea).show();
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$(idTextarea).hide();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
// window.addEventListener('resize', function () {
|
||||
if (window.innerWidth > 780) {
|
||||
|
||||
$('#nav li').hover(function () {
|
||||
|
||||
clearTimeout($.data(this, 'timer'));
|
||||
|
||||
$('ul', this).stop(true, true).slideDown(200);
|
||||
|
||||
}, function () {
|
||||
|
||||
if (document.body.offsetWidth > 600) {
|
||||
|
||||
$.data(this, 'timer', setTimeout($.proxy(function () {
|
||||
|
||||
$('ul', this).stop(true, true).slideUp(200);
|
||||
|
||||
}, this), 200));
|
||||
|
||||
} else {
|
||||
|
||||
$('ul', this).click(function () {
|
||||
|
||||
$('ul', this).slideUp(200);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
//});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jQuery(document).ready(function ($) {
|
||||
|
||||
|
||||
|
||||
$('#banner-fade').bjqs({
|
||||
width: 1200,
|
||||
height: 390,
|
||||
// animation values
|
||||
|
||||
animtype: 'fade', // accepts 'fade' or 'slide'
|
||||
|
||||
animduration: 2650, // how fast the animation are
|
||||
|
||||
animspeed: 6000, // the delay between each slide
|
||||
|
||||
automatic: true, // automatic
|
||||
|
||||
|
||||
|
||||
// control and marker configuration
|
||||
|
||||
showcontrols: false, // show next and prev controls
|
||||
|
||||
centercontrols: false, // center controls verically
|
||||
|
||||
nexttext: ' ', // Text for 'next' button (can use HTML)
|
||||
|
||||
prevtext: ' ', // Text for 'previous' button (can use HTML)
|
||||
|
||||
showmarkers: true, // Show individual slide markers
|
||||
|
||||
centermarkers: true, // Center markers horizontally
|
||||
|
||||
|
||||
|
||||
// interaction values
|
||||
|
||||
keyboardnav: true, // enable keyboard navigation
|
||||
|
||||
hoverpause: true, // pause the slider on hover
|
||||
|
||||
|
||||
|
||||
// presentational options
|
||||
|
||||
usecaptions: true, // show captions for images using the image title tag
|
||||
|
||||
randomstart: false, // start slider at random slide
|
||||
|
||||
responsive: true // enable responsive capabilities (beta)
|
||||
|
||||
});
|
||||
|
||||
var cw = $('.bjqs').height() - 100;
|
||||
//alert(cw);
|
||||
$('.Panel2_aktualnosci').css({'height': cw + 'px'});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
// Using default configuration
|
||||
// $('#carousel').carouFredSel();
|
||||
// Responsive layout, resizing the items
|
||||
// $('#carousel').carouFredSel({
|
||||
// responsive: true,
|
||||
// width: '100%',
|
||||
// scroll : {
|
||||
// items : 1,
|
||||
// easing : "linear",
|
||||
// duration : 3000,
|
||||
// pauseOnHover : true
|
||||
// },
|
||||
// auto: {
|
||||
// timeoutDuration: 0
|
||||
// },
|
||||
// items: {
|
||||
// //width: 400,
|
||||
// // height: '75', // optionally resize item-height
|
||||
// visible: {
|
||||
// min: 2,
|
||||
// max: 5
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// $('#slider').nivoSlider({
|
||||
// effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
|
||||
// slices: 15, // For slice animations
|
||||
// boxCols: 8, // For box animations
|
||||
// boxRows: 4, // For box animations
|
||||
// animSpeed: 500, // Slide transition speed
|
||||
// pauseTime: 3000, // How long each slide will show
|
||||
// startSlide: 0, // Set starting Slide (0 index)
|
||||
// directionNav: true, // Next & Prev navigation
|
||||
// controlNav: true, // 1,2,3... navigation
|
||||
// controlNavThumbs: false, // Use thumbnails for Control Nav
|
||||
// pauseOnHover: true, // Stop animation while hovering
|
||||
// manualAdvance: false, // Force manual transitions
|
||||
// prevText: 'Prev', // Prev directionNav text
|
||||
// nextText: 'Next', // Next directionNav text
|
||||
// randomStart: false, // Start on a random slide
|
||||
// beforeChange: function(){}, // Triggers before a slide transition
|
||||
// afterChange: function(){}, // Triggers after a slide transition
|
||||
// slideshowEnd: function(){}, // Triggers after all slides have been shown
|
||||
// lastSlide: function(){}, // Triggers when last slide is shown
|
||||
// afterLoad: function(){} // Triggers when slider has loaded
|
||||
//});
|
||||
//
|
||||
// // Using custom configuration
|
||||
// $('#carousel').carouFredSel({
|
||||
// direction : "left",
|
||||
// scroll : {
|
||||
// items : 1,
|
||||
// easing : "elastic",
|
||||
// duration : 1000,
|
||||
// pauseOnHover : true
|
||||
// },
|
||||
// auto : {
|
||||
// play : true
|
||||
// },
|
||||
// items : {
|
||||
// visible: 8
|
||||
// }
|
||||
// });
|
||||
});
|
||||
|
||||
|
||||
|
||||
function showHide(idBox) {
|
||||
alert(val);
|
||||
alert(idBox);
|
||||
if ($(idBox).css("display") !== "none") {
|
||||
$(idBox).hide();
|
||||
} else {
|
||||
$(idBox).show('swing');
|
||||
}
|
||||
$('.hide').not(idBox).hide();
|
||||
}
|
||||
|
||||
function showHideAll(idBox) {
|
||||
|
||||
$('.hide').not('#' + idBox).hide();
|
||||
|
||||
}
|
||||
|
||||
function setCookie(c_name, value, exdays)
|
||||
{
|
||||
var exdate = new Date();
|
||||
exdate.setDate(exdate.getDate() + exdays);
|
||||
var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
|
||||
document.cookie = c_name + "=" + c_value;
|
||||
|
||||
$("#polityka").hide('fade');
|
||||
//location.reload();
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
$(".main a").each(function () {
|
||||
$(this).attr("rel", "external");
|
||||
});
|
||||
});
|
||||
|
||||
function splitPhone() {
|
||||
$('#phone').each(function () {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function GetFormContent(url, tableContent, type) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({type: type}),
|
||||
success: function(html){
|
||||
$(tableContent).html(html).fadeIn('slow');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showOptions(idCheckbox, idBox) {
|
||||
|
||||
val = $(idCheckbox).is(':checked');
|
||||
|
||||
alert(val);
|
||||
alert(idBox);
|
||||
|
||||
if (val == true) {
|
||||
|
||||
$(idBox).show();
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$(idBox).hide();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
751
_rejestracja/Static/script/jQuery/bjqs-1.3.js
Normal file
@@ -0,0 +1,751 @@
|
||||
/*
|
||||
* Basic jQuery Slider plug-in v.1.3
|
||||
*
|
||||
* http://www.basic-slider.com
|
||||
*
|
||||
* Authored by John Cobb
|
||||
* http://www.johncobb.name
|
||||
* @john0514
|
||||
*
|
||||
* Copyright 2011, John Cobb
|
||||
* License: GNU General Public License, version 3 (GPL-3.0)
|
||||
* http://www.opensource.org/licenses/gpl-3.0.html
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
$.fn.bjqs = function(o) {
|
||||
|
||||
// slider default settings
|
||||
var defaults = {
|
||||
|
||||
// w + h to enforce consistency
|
||||
width : 700,
|
||||
height : 300,
|
||||
|
||||
// transition valuess
|
||||
animtype : 'slide',
|
||||
animduration : 450, // length of transition
|
||||
animspeed : 4000, // delay between transitions
|
||||
automatic : true, // enable/disable automatic slide rotation
|
||||
|
||||
// control and marker configuration
|
||||
showcontrols : true, // enable/disable next + previous UI elements
|
||||
centercontrols : true, // vertically center controls
|
||||
nexttext : 'Next', // text/html inside next UI element
|
||||
prevtext : 'Prev', // text/html inside previous UI element
|
||||
showmarkers : true, // enable/disable individual slide UI markers
|
||||
centermarkers : true, // horizontally center markers
|
||||
|
||||
// interaction values
|
||||
keyboardnav : true, // enable/disable keyboard navigation
|
||||
hoverpause : true, // enable/disable pause slides on hover
|
||||
|
||||
// presentational options
|
||||
usecaptions : true, // enable/disable captions using img title attribute
|
||||
randomstart : false, // start from a random slide
|
||||
responsive : false // enable responsive behaviour
|
||||
|
||||
};
|
||||
|
||||
// create settings from defauls and user options
|
||||
var settings = $.extend({}, defaults, o);
|
||||
|
||||
// slider elements
|
||||
var $wrapper = this,
|
||||
$slider = $wrapper.find('ul.bjqs'),
|
||||
$slides = $slider.children('li'),
|
||||
$sliderBox = $('.slider'),
|
||||
|
||||
// control elements
|
||||
$c_wrapper = null,
|
||||
$c_fwd = null,
|
||||
$c_prev = null,
|
||||
|
||||
// marker elements
|
||||
$m_wrapper = null,
|
||||
$m_markers = null,
|
||||
|
||||
// elements for slide animation
|
||||
$canvas = null,
|
||||
$clone_first = null,
|
||||
$clone_last = null;
|
||||
|
||||
// state management object
|
||||
var state = {
|
||||
slidecount : $slides.length, // total number of slides
|
||||
animating : false, // bool: is transition is progress
|
||||
paused : false, // bool: is the slider paused
|
||||
currentslide : 1, // current slide being viewed (not 0 based)
|
||||
nextslide : 0, // slide to view next (not 0 based)
|
||||
currentindex : 0, // current slide being viewed (0 based)
|
||||
nextindex : 0, // slide to view next (0 based)
|
||||
interval : null // interval for automatic rotation
|
||||
};
|
||||
|
||||
var responsive = {
|
||||
width : null,
|
||||
height : null,
|
||||
ratio : null
|
||||
};
|
||||
|
||||
// helpful variables
|
||||
var vars = {
|
||||
fwd : 'forward',
|
||||
prev : 'previous'
|
||||
};
|
||||
|
||||
// run through options and initialise settings
|
||||
var init = function() {
|
||||
|
||||
// differentiate slider li from content li
|
||||
$slides.addClass('bjqs-slide');
|
||||
|
||||
// conf dimensions, responsive or static
|
||||
if( settings.responsive ){
|
||||
conf_responsive();
|
||||
}
|
||||
else{
|
||||
conf_static();
|
||||
}
|
||||
|
||||
// configurations only avaliable if more than 1 slide
|
||||
if( state.slidecount > 1 ){
|
||||
|
||||
// enable random start
|
||||
if (settings.randomstart){
|
||||
conf_random();
|
||||
}
|
||||
|
||||
// create and show controls
|
||||
if( settings.showcontrols ){
|
||||
conf_controls();
|
||||
}
|
||||
|
||||
// create and show markers
|
||||
if( settings.showmarkers ){
|
||||
conf_markers();
|
||||
}
|
||||
|
||||
// enable slidenumboard navigation
|
||||
if( settings.keyboardnav ){
|
||||
conf_keynav();
|
||||
}
|
||||
|
||||
// enable pause on hover
|
||||
if (settings.hoverpause && settings.automatic){
|
||||
conf_hoverpause();
|
||||
}
|
||||
|
||||
// conf slide animation
|
||||
if (settings.animtype === 'slide'){
|
||||
conf_slide();
|
||||
}
|
||||
|
||||
} else {
|
||||
// Stop automatic animation, because we only have one slide!
|
||||
settings.automatic = false;
|
||||
}
|
||||
|
||||
if(settings.usecaptions){
|
||||
conf_captions();
|
||||
}
|
||||
|
||||
// TODO: need to accomodate random start for slide transition setting
|
||||
if(settings.animtype === 'slide' && !settings.randomstart){
|
||||
state.currentindex = 1;
|
||||
state.currentslide = 2;
|
||||
}
|
||||
|
||||
// slide components are hidden by default, show them now
|
||||
$slider.show();
|
||||
$slides.eq(state.currentindex).show();
|
||||
|
||||
// Finally, if automatic is set to true, kick off the interval
|
||||
if(settings.automatic){
|
||||
state.interval = setInterval(function () {
|
||||
go(vars.fwd, false);
|
||||
}, settings.animspeed);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var conf_responsive = function() {
|
||||
|
||||
responsive.width = $wrapper.outerWidth();
|
||||
responsive.ratio = responsive.width/settings.width,
|
||||
responsive.height = settings.height * responsive.ratio;
|
||||
|
||||
if(settings.animtype === 'fade'){
|
||||
|
||||
// initial setup
|
||||
$slides.css({
|
||||
'height' : settings.height,
|
||||
'width' : '100%'
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : settings.height,
|
||||
'width' : '100%'
|
||||
});
|
||||
$slider.css({
|
||||
'height' : settings.height,
|
||||
'width' : '100%'
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : settings.height,
|
||||
'max-width' : settings.width,
|
||||
'position' : 'relative'
|
||||
});
|
||||
|
||||
if(responsive.width < settings.width){
|
||||
|
||||
$slides.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slider.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
|
||||
// calculate and update dimensions
|
||||
responsive.width = $wrapper.outerWidth();
|
||||
responsive.ratio = responsive.width/settings.width,
|
||||
responsive.height = settings.height * responsive.ratio;
|
||||
|
||||
$slides.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slider.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if(settings.animtype === 'slide'){
|
||||
|
||||
// initial setup
|
||||
$slides.css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width
|
||||
});
|
||||
$slider.css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width * settings.slidecount
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : settings.height,
|
||||
'max-width' : settings.width,
|
||||
'position' : 'relative'
|
||||
});
|
||||
|
||||
if(responsive.width < settings.width){
|
||||
|
||||
$slides.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$slider.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
|
||||
// calculate and update dimensions
|
||||
responsive.width = $wrapper.outerWidth(),
|
||||
responsive.ratio = responsive.width/settings.width,
|
||||
responsive.height = settings.height * responsive.ratio;
|
||||
|
||||
$slides.css({
|
||||
'height' : responsive.height,
|
||||
'width' : responsive.width
|
||||
});
|
||||
$slides.children('img').css({
|
||||
'height' : responsive.height,
|
||||
'width' : responsive.width
|
||||
});
|
||||
$slider.css({
|
||||
'height' : responsive.height,
|
||||
'width' : responsive.width * settings.slidecount
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : responsive.height
|
||||
});
|
||||
$canvas.css({
|
||||
'height' : responsive.height,
|
||||
'width' : responsive.width
|
||||
});
|
||||
|
||||
resize_complete(function(){
|
||||
go(false,state.currentslide);
|
||||
}, 200, "some unique string");
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var resize_complete = (function () {
|
||||
|
||||
var timers = {};
|
||||
|
||||
return function (callback, ms, uniqueId) {
|
||||
if (!uniqueId) {
|
||||
uniqueId = "Don't call this twice without a uniqueId";
|
||||
}
|
||||
if (timers[uniqueId]) {
|
||||
clearTimeout (timers[uniqueId]);
|
||||
}
|
||||
timers[uniqueId] = setTimeout(callback, ms);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
// enforce fixed sizing on slides, slider and wrapper
|
||||
var conf_static = function() {
|
||||
|
||||
$slides.css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width
|
||||
});
|
||||
$slider.css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width
|
||||
});
|
||||
$wrapper.css({
|
||||
'height' : settings.height,
|
||||
'width' : settings.width,
|
||||
'position' : 'relative'
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var conf_slide = function() {
|
||||
|
||||
// create two extra elements which are clones of the first and last slides
|
||||
$clone_first = $slides.eq(0).clone();
|
||||
$clone_last = $slides.eq(state.slidecount-1).clone();
|
||||
|
||||
// add them to the DOM where we need them
|
||||
$clone_first.attr({'data-clone' : 'last', 'data-slide' : 0}).appendTo($slider).show();
|
||||
|
||||
$clone_last.attr({'data-clone' : 'first', 'data-slide' : 0}).prependTo($slider).show();
|
||||
|
||||
// update the elements object
|
||||
$slides = $slider.children('li');
|
||||
state.slidecount = $slides.length;
|
||||
|
||||
// create a 'canvas' element which is neccessary for the slide animation to work
|
||||
$canvas = $('<div class="bjqs-wrapper"></div>');
|
||||
|
||||
|
||||
|
||||
// if the slider is responsive && the calculated width is less than the max width
|
||||
if(settings.responsive && (responsive.width < settings.width)){
|
||||
|
||||
$canvas.css({
|
||||
'width' : responsive.width,
|
||||
'height' : responsive.height,
|
||||
'overflow' : 'hidden',
|
||||
'position' : 'relative'
|
||||
});
|
||||
|
||||
// update the dimensions to the slider to accomodate all the slides side by side
|
||||
$slider.css({
|
||||
'width' : responsive.width * (state.slidecount + 2),
|
||||
'left' : -responsive.width * state.currentslide
|
||||
});
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$canvas.css({
|
||||
'width' : settings.width,
|
||||
'height' : settings.height,
|
||||
'overflow' : 'hidden',
|
||||
'position' : 'relative'
|
||||
});
|
||||
|
||||
// update the dimensions to the slider to accomodate all the slides side by side
|
||||
$slider.css({
|
||||
'width' : settings.width * (state.slidecount + 2),
|
||||
'left' : -settings.width * state.currentslide
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// add some inline styles which will align our slides for left-right sliding
|
||||
$slides.css({
|
||||
'float' : 'left',
|
||||
'position' : 'relative',
|
||||
'display' : 'list-item'
|
||||
});
|
||||
|
||||
// 'everything.. in it's right place'
|
||||
$canvas.prependTo($wrapper);
|
||||
$slider.appendTo($canvas);
|
||||
|
||||
};
|
||||
|
||||
var conf_controls = function() {
|
||||
|
||||
// create the elements for the controls
|
||||
$c_wrapper = $('<ul class="bjqs-controls"></ul>');
|
||||
$c_fwd = $('<li class="bjqs-next"><a href="#" data-direction="'+ vars.fwd +'">' + settings.nexttext + '</a></li>');
|
||||
$c_prev = $('<li class="bjqs-prev"><a href="#" data-direction="'+ vars.prev +'">' + settings.prevtext + '</a></li>');
|
||||
|
||||
// bind click events
|
||||
$c_wrapper.on('click','a',function(e){
|
||||
|
||||
e.preventDefault();
|
||||
var direction = $(this).attr('data-direction');
|
||||
|
||||
if(!state.animating){
|
||||
|
||||
if(direction === vars.fwd){
|
||||
go(vars.fwd,false);
|
||||
}
|
||||
|
||||
if(direction === vars.prev){
|
||||
go(vars.prev,false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// put 'em all together
|
||||
$c_prev.appendTo($c_wrapper);
|
||||
$c_fwd.appendTo($c_wrapper);
|
||||
$c_wrapper.appendTo($wrapper);
|
||||
|
||||
// vertically center the controls
|
||||
if (settings.centercontrols) {
|
||||
|
||||
$c_wrapper.addClass('v-centered');
|
||||
|
||||
// calculate offset % for vertical positioning
|
||||
var offset_px = ($wrapper.height() - $c_fwd.children('a').outerHeight()) / 2,
|
||||
ratio = (offset_px / settings.height) * 100,
|
||||
offset = ratio + '%';
|
||||
|
||||
$c_fwd.find('a').css('top', offset);
|
||||
$c_prev.find('a').css('top', offset);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var conf_markers = function() {
|
||||
|
||||
// create a wrapper for our markers
|
||||
$m_wrapper = $('<ol class="bjqs-markers"></ol>');
|
||||
|
||||
// for every slide, create a marker
|
||||
$.each($slides, function(key, slide){
|
||||
|
||||
var slidenum = key + 1,
|
||||
gotoslide = key + 1;
|
||||
|
||||
if(settings.animtype === 'slide'){
|
||||
// + 2 to account for clones
|
||||
gotoslide = key + 2;
|
||||
}
|
||||
|
||||
var marker = $('<li><a href="#"> </a></li>');
|
||||
|
||||
// set the first marker to be active
|
||||
if(slidenum === state.currentslide){ marker.addClass('active-marker'); }
|
||||
|
||||
// bind the click event
|
||||
marker.on('click','a',function(e){
|
||||
e.preventDefault();
|
||||
if(!state.animating && state.currentslide !== gotoslide){
|
||||
go(false,gotoslide);
|
||||
}
|
||||
});
|
||||
|
||||
// add the marker to the wrapper
|
||||
marker.appendTo($m_wrapper);
|
||||
|
||||
});
|
||||
|
||||
$m_wrapper.appendTo($wrapper);
|
||||
$m_markers = $m_wrapper.find('li');
|
||||
|
||||
// center the markers
|
||||
if (settings.centermarkers) {
|
||||
$m_wrapper.addClass('h-centered');
|
||||
var offset = (settings.width - $m_wrapper.width()) / 2;
|
||||
//$m_wrapper.css('left', offset);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var conf_keynav = function() {
|
||||
|
||||
$(document).keyup(function (event) {
|
||||
|
||||
if (!state.paused) {
|
||||
clearInterval(state.interval);
|
||||
state.paused = true;
|
||||
}
|
||||
|
||||
if (!state.animating) {
|
||||
if (event.keyCode === 39) {
|
||||
event.preventDefault();
|
||||
go(vars.fwd, false);
|
||||
} else if (event.keyCode === 37) {
|
||||
event.preventDefault();
|
||||
go(vars.prev, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.paused && settings.automatic) {
|
||||
state.interval = setInterval(function () {
|
||||
go(vars.fwd);
|
||||
}, settings.animspeed);
|
||||
state.paused = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var conf_hoverpause = function() {
|
||||
|
||||
$wrapper.hover(function () {
|
||||
if (!state.paused) {
|
||||
clearInterval(state.interval);
|
||||
state.paused = true;
|
||||
}
|
||||
}, function () {
|
||||
if (state.paused) {
|
||||
state.interval = setInterval(function () {
|
||||
go(vars.fwd, false);
|
||||
}, settings.animspeed);
|
||||
state.paused = false;
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var conf_captions = function() {
|
||||
|
||||
$.each($slides, function (key, slide) {
|
||||
|
||||
var caption = $(slide).children('img:first-child').attr('title');
|
||||
|
||||
// Account for images wrapped in links
|
||||
if(!caption){
|
||||
caption = $(slide).children('a').find('img:first-child').attr('title');
|
||||
}
|
||||
|
||||
if (caption) {
|
||||
caption = $('<p class="bjqs-caption">' + caption + '</p>');
|
||||
caption.appendTo($(slide));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var conf_random = function() {
|
||||
|
||||
var rand = Math.floor(Math.random() * state.slidecount) + 1;
|
||||
state.currentslide = rand;
|
||||
state.currentindex = rand-1;
|
||||
|
||||
};
|
||||
|
||||
var set_next = function(direction) {
|
||||
|
||||
if(direction === vars.fwd){
|
||||
|
||||
if($slides.eq(state.currentindex).next().length){
|
||||
state.nextindex = state.currentindex + 1;
|
||||
state.nextslide = state.currentslide + 1;
|
||||
}
|
||||
else{
|
||||
state.nextindex = 0;
|
||||
state.nextslide = 1;
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
if($slides.eq(state.currentindex).prev().length){
|
||||
state.nextindex = state.currentindex - 1;
|
||||
state.nextslide = state.currentslide - 1;
|
||||
}
|
||||
else{
|
||||
state.nextindex = state.slidecount - 1;
|
||||
state.nextslide = state.slidecount;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var go = function(direction, position) {
|
||||
|
||||
// only if we're not already doing things
|
||||
if(!state.animating){
|
||||
|
||||
// doing things
|
||||
state.animating = true;
|
||||
|
||||
if(position){
|
||||
state.nextslide = position;
|
||||
state.nextindex = position-1;
|
||||
}
|
||||
else{
|
||||
set_next(direction);
|
||||
}
|
||||
|
||||
// fade animation
|
||||
if(settings.animtype === 'fade'){
|
||||
|
||||
if(settings.showmarkers){
|
||||
$m_markers.removeClass('active-marker');
|
||||
$m_markers.eq(state.nextindex).addClass('active-marker');
|
||||
}
|
||||
|
||||
// fade out current
|
||||
$slides.eq(state.currentindex).fadeOut(settings.animduration);
|
||||
//makl zmiany tła
|
||||
$( "#slider" ).animate({
|
||||
backgroundColor: $slides.eq(state.nextindex).attr('id')
|
||||
//color: "#fff",
|
||||
//width: 1300
|
||||
}, settings.animduration-500 );
|
||||
// alert(state.nextindex);
|
||||
// alert($slides.eq(state.nextindex).attr('id'));
|
||||
// $( "#slider" ).animate({
|
||||
// backgroundColor: '#fffffff'
|
||||
// }, 1000 );
|
||||
|
||||
//makl koniec zmian
|
||||
// fade in next
|
||||
$slides.eq(state.nextindex).fadeIn(settings.animduration, function(){
|
||||
|
||||
// update state variables
|
||||
state.animating = false;
|
||||
state.currentslide = state.nextslide;
|
||||
state.currentindex = state.nextindex;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// slide animation
|
||||
if(settings.animtype === 'slide'){
|
||||
|
||||
if(settings.showmarkers){
|
||||
|
||||
var markerindex = state.nextindex-1;
|
||||
|
||||
if(markerindex === state.slidecount-2){
|
||||
markerindex = 0;
|
||||
}
|
||||
else if(markerindex === -1){
|
||||
markerindex = state.slidecount-3;
|
||||
}
|
||||
|
||||
$m_markers.removeClass('active-marker');
|
||||
$m_markers.eq(markerindex).addClass('active-marker');
|
||||
}
|
||||
|
||||
// if the slider is responsive && the calculated width is less than the max width
|
||||
if(settings.responsive && ( responsive.width < settings.width ) ){
|
||||
state.slidewidth = responsive.width;
|
||||
}
|
||||
else{
|
||||
state.slidewidth = settings.width;
|
||||
}
|
||||
|
||||
$slider.animate({'left': -state.nextindex * state.slidewidth }, settings.animduration, function(){
|
||||
|
||||
state.currentslide = state.nextslide;
|
||||
state.currentindex = state.nextindex;
|
||||
|
||||
// is the current slide a clone?
|
||||
if($slides.eq(state.currentindex).attr('data-clone') === 'last'){
|
||||
|
||||
// affirmative, at the last slide (clone of first)
|
||||
$slider.css({'left': -state.slidewidth });
|
||||
state.currentslide = 2;
|
||||
state.currentindex = 1;
|
||||
|
||||
}
|
||||
else if($slides.eq(state.currentindex).attr('data-clone') === 'first'){
|
||||
|
||||
// affirmative, at the fist slide (clone of last)
|
||||
$slider.css({'left': -state.slidewidth *(state.slidecount - 2)});
|
||||
state.currentslide = state.slidecount - 1;
|
||||
state.currentindex = state.slidecount - 2;
|
||||
|
||||
}
|
||||
|
||||
state.animating = false;
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// lets get the party started :)
|
||||
init();
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Color animation 1.6.0
|
||||
http://www.bitstorm.org/jquery/color-animation/
|
||||
Copyright 2011, 2013 Edwin Martin <edwin@bitstorm.org>
|
||||
Released under the MIT and GPL licenses.
|
||||
*/
|
||||
'use strict';(function(d){function h(a,b,e){var c="rgb"+(d.support.rgba?"a":"")+"("+parseInt(a[0]+e*(b[0]-a[0]),10)+","+parseInt(a[1]+e*(b[1]-a[1]),10)+","+parseInt(a[2]+e*(b[2]-a[2]),10);d.support.rgba&&(c+=","+(a&&b?parseFloat(a[3]+e*(b[3]-a[3])):1));return c+")"}function f(a){var b;return(b=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(a))?[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16),1]:(b=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(a))?[17*parseInt(b[1],16),17*parseInt(b[2],
|
||||
16),17*parseInt(b[3],16),1]:(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a))?[parseInt(b[1]),parseInt(b[2]),parseInt(b[3]),1]:(b=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(a))?[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseFloat(b[4])]:l[a]}d.extend(!0,d,{support:{rgba:function(){var a=d("script:first"),b=a.css("color"),e=!1;if(/^rgba/.test(b))e=!0;else try{e=b!=a.css("color","rgba(0, 0, 0, 0.5)").css("color"),
|
||||
a.css("color",b)}catch(c){}return e}()}});var k="color backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor outlineColor".split(" ");d.each(k,function(a,b){d.Tween.propHooks[b]={get:function(a){return d(a.elem).css(b)},set:function(a){var c=a.elem.style,g=f(d(a.elem).css(b)),m=f(a.end);a.run=function(a){c[b]=h(g,m,a)}}}});d.Tween.propHooks.borderColor={set:function(a){var b=a.elem.style,e=[],c=k.slice(2,6);d.each(c,function(b,c){e[c]=f(d(a.elem).css(c))});var g=f(a.end);
|
||||
a.run=function(a){d.each(c,function(d,c){b[c]=h(e[c],g,a)})}}};var l={aqua:[0,255,255,1],azure:[240,255,255,1],beige:[245,245,220,1],black:[0,0,0,1],blue:[0,0,255,1],brown:[165,42,42,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgrey:[169,169,169,1],darkgreen:[0,100,0,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkviolet:[148,0,211,1],fuchsia:[255,
|
||||
0,255,1],gold:[255,215,0,1],green:[0,128,0,1],indigo:[75,0,130,1],khaki:[240,230,140,1],lightblue:[173,216,230,1],lightcyan:[224,255,255,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],magenta:[255,0,255,1],maroon:[128,0,0,1],navy:[0,0,128,1],olive:[128,128,0,1],orange:[255,165,0,1],pink:[255,192,203,1],purple:[128,0,128,1],violet:[128,0,128,1],red:[255,0,0,1],silver:[192,192,192,1],white:[255,255,255,1],yellow:[255,255,
|
||||
0,1],transparent:[255,255,255,0]}})(jQuery);
|
||||
|
||||
14
_rejestracja/Static/script/jQuery/bjqs-1.3.min.js
vendored
Normal file
8
_rejestracja/Static/script/jQuery/extras.sendContact.js
Normal file
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendContact').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendContactForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
14
_rejestracja/Static/script/jQuery/init.js
Normal file
@@ -0,0 +1,14 @@
|
||||
//Autor: Maciej.Szwed@MediaFlex.pl
|
||||
Cufon.replace('h1');
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.menu ul li a.inactive').hover(function(){
|
||||
$(this).css({backgroundPosition: '-6px -155px'});
|
||||
$(this).animate({'margin-left':'40px'});
|
||||
}, function(){
|
||||
$(this).css({backgroundPosition: '-6px -102px'});
|
||||
$(this).animate({'margin-left':'0px'});
|
||||
});
|
||||
|
||||
});
|
||||
6240
_rejestracja/Static/script/jQuery/jquery-1.4.2.js
vendored
Normal file
2
_rejestracja/Static/script/jQuery/jquery-migrate.min.js
vendored
Normal file
3
_rejestracja/Static/script/jQuery/jquery-swf.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
|
||||
// http://jquery.thewikies.com/swfobject
|
||||
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject)
|
||||
2223
_rejestracja/Static/script/jQuery/jquery-ui-timepicker-addon.js
vendored
Normal file
2383
_rejestracja/Static/script/jQuery/jquery-ui.js
vendored
Normal file
122
_rejestracja/Static/script/jQuery/jquery.busybox.js
Normal file
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* 'busyBox' v1.1
|
||||
* @author Roger Padilla C. - rogerjose81@gmail.com
|
||||
* Web: http://rogerpadilla.wordpress.com/2010/05/24/jquery-busybox/
|
||||
* Licensed under Apached License v2.0
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
/**
|
||||
* Main function; used to initialize the plugin or for calling the available functionalities of the plugin (such as 'open' or 'close').
|
||||
* The 'arguments' array is used to obtain the received parameters
|
||||
*/
|
||||
$.fn.busyBox = function() {
|
||||
|
||||
$.fn.busyBox.self = this;
|
||||
|
||||
if(arguments[0] == 'open') {
|
||||
$.fn.busyBox.open();
|
||||
} else if(arguments[0] == 'close') {
|
||||
$.fn.busyBox.close();
|
||||
} else {
|
||||
$.fn.busyBox.init(arguments[0]);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize the plugin using the passed options
|
||||
*/
|
||||
$.fn.busyBox.init = function(options) {
|
||||
|
||||
$.fn.busyBox.opts = $.extend({}, $.fn.busyBox.defaults, options);
|
||||
|
||||
// Adds the default classes if they are not present in the passed classes
|
||||
if($.fn.busyBox.opts.classes.indexOf($.fn.busyBox.defaults.classes) === -1){
|
||||
$.fn.busyBox.opts.classes += ' ' + $.fn.busyBox.defaults.classes;
|
||||
}
|
||||
|
||||
$.fn.busyBox.container = $(document.body);
|
||||
|
||||
if($.fn.busyBox.opts.autoOpen){
|
||||
$.fn.busyBox.open();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Display all the 'busyBoxes' over the matched boxes
|
||||
*/
|
||||
$.fn.busyBox.open = function(){
|
||||
|
||||
var box, inner, e, bOffset, bWidth, bHeight, iTop, iLeft;
|
||||
|
||||
$.fn.busyBox.self.each(function(index) {
|
||||
|
||||
e = $(this);
|
||||
bWidth = e.outerWidth();
|
||||
bHeight = e.outerHeight();
|
||||
bOffset = e.offset();
|
||||
|
||||
box = $('<div />');
|
||||
box.attr('id', 'busybox_' + index);
|
||||
box.addClass($.fn.busyBox.opts.classes);
|
||||
|
||||
box.css({
|
||||
width: bWidth,
|
||||
height: bHeight,
|
||||
top: bOffset.top,
|
||||
left: -9999 // Used to not display the box yet without hidden it (needed to be able to calculate its dimensions)
|
||||
});
|
||||
|
||||
inner = $($.fn.busyBox.opts.spinner);
|
||||
inner.attr('id', 'busybox_spinner_' + index);
|
||||
inner.addClass('busybox-spinner');
|
||||
|
||||
box.append(inner);
|
||||
|
||||
$.fn.busyBox.container.append(box);
|
||||
|
||||
// Set the position of the inner message inside its parent. Calculates the 'top' and/or 'left' coordinates of the inner-message (inside its parent) if those properties were configured as 'auto'
|
||||
iTop = ($.fn.busyBox.opts.top == 'auto' ? ((bHeight / 2) - (inner.outerHeight() / 2)) + 'px' : $.fn.busyBox.opts.top);
|
||||
iLeft = ($.fn.busyBox.opts.left == 'auto' ? ((bWidth / 2) - (inner.outerWidth() / 2)) + 'px' : $.fn.busyBox.opts.left);
|
||||
|
||||
inner.css({
|
||||
position: 'absolute',
|
||||
top: iTop,
|
||||
left: iLeft,
|
||||
opacity: 1.0
|
||||
});
|
||||
|
||||
// Hidde and relocate the 'busyBox' (previously displayed using a negative left-coord to be able to calculate its dimensions)
|
||||
box.css({display: 'none', left: bOffset.left});
|
||||
});
|
||||
|
||||
// Display all the 'busyBoxes'
|
||||
$.fn.busyBox.container.find('.' + $.fn.busyBox.defaults.classes).fadeIn('fast', $.fn.busyBox.opts.displayed.call(this));
|
||||
};
|
||||
|
||||
/**
|
||||
* Closes all the 'busyBoxes' being showed
|
||||
*/
|
||||
$.fn.busyBox.close = function(){
|
||||
if($.fn.busyBox.container) {
|
||||
$.fn.busyBox.container.find('.' + $.fn.busyBox.defaults.classes).fadeOut('fast', function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Default configuration
|
||||
*/
|
||||
$.fn.busyBox.defaults = {
|
||||
autoOpen: true,
|
||||
spinner: '<em>Cargando…</em>',
|
||||
classes: 'busybox',
|
||||
top: 'auto',
|
||||
left: 'auto',
|
||||
displayed: function(){}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
181
_rejestracja/Static/script/jQuery/jquery.canvas-loader.1.3.js
Normal file
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* jQuery Canvas Loader Plugin 1.3
|
||||
*
|
||||
* Creates an alternative to ajax loader images with the canvas element.
|
||||
*
|
||||
* Tested on Mobile Safari and Android browsers.
|
||||
*
|
||||
* By Jamund Xcot Ferguson
|
||||
*
|
||||
* Twitter: @xjamundx
|
||||
* Blog: http://www.jamund.com/
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* Without options:
|
||||
*
|
||||
* $("img.ajaxLoader").canvasLoader();
|
||||
*
|
||||
* With options:
|
||||
*
|
||||
* $("img.ajaxLoader").canvasLoader({
|
||||
* 'radius':10,
|
||||
* 'color':'rgb(255,0,0),
|
||||
* 'dotRadius':10,
|
||||
* 'backgroundColor':'transparent'
|
||||
* 'className':'canvasLoader',
|
||||
* 'id':'canvasLoader1',
|
||||
* 'fps':10
|
||||
* });
|
||||
*
|
||||
* Options:
|
||||
*
|
||||
* radius - width/height of the loader
|
||||
* color - color of the pulsing dots
|
||||
* dotRadius - radius of the pulsing dots
|
||||
* className - class name of the canvas tag
|
||||
* backgroundColor - a background color for the canvas
|
||||
* id - id of the canvas tag
|
||||
* fps - approximate frames per second of the pulsing
|
||||
*
|
||||
**/
|
||||
|
||||
(function($){
|
||||
/**
|
||||
* Replaces loading images with a canvas alternative
|
||||
*
|
||||
* @author Jamund Xcot Ferguson
|
||||
*/
|
||||
$.fn.canvasLoader = function(options) {
|
||||
|
||||
// holds my canvas loader object
|
||||
var loaders = [];
|
||||
|
||||
// holds my defaults object
|
||||
var globalDefaults = {
|
||||
'radius':20,
|
||||
'color':'rgb(0,0,0)',
|
||||
'dotRadius':2.5,
|
||||
'backgroundColor':'transparent',
|
||||
'className':'canvasLoader',
|
||||
'id':'canvasLoader1',
|
||||
'fps':10
|
||||
};
|
||||
|
||||
// holds the generic settings objects
|
||||
var globalOpts = $.extend(globalDefaults, options);
|
||||
|
||||
// start drawing right away
|
||||
setInterval(draw, 1000/globalOpts.fps);
|
||||
|
||||
// the main drawing function
|
||||
function draw() {
|
||||
for (i in loaders) {
|
||||
loaders[i].draw();
|
||||
}
|
||||
}
|
||||
|
||||
var CanvasLoader = function(ctx, radius, color, dotRadius) {
|
||||
this.ctx = ctx;
|
||||
this.radius = radius;
|
||||
this.x = this.radius/2;
|
||||
this.y = this.radius/2;
|
||||
this.color = color;
|
||||
this.dotRadius = dotRadius;
|
||||
this.opacity = 1;
|
||||
this.numDots = 8;
|
||||
this.dots = {};
|
||||
this.degrees = Math.PI*2/this.numDots;
|
||||
for (i=1;i<=this.numDots;i++) {
|
||||
this.dots[i] = new Dot(Math.cos(this.degrees * i) * this.radius/Math.PI, Math.sin(this.degrees * i) * this.radius/Math.PI, this.dotRadius, this.color, i/this.numDots);
|
||||
this.dots[i].parent = this;
|
||||
}
|
||||
}
|
||||
|
||||
CanvasLoader.prototype.draw = function() {
|
||||
// clear old stuff
|
||||
this.ctx.clearRect(0,0,this.radius,this.radius);
|
||||
|
||||
// draw the background color
|
||||
this.ctx.globalAlpha = 1;
|
||||
this.ctx.fillStyle = globalOpts.backgroundColor;
|
||||
this.ctx.fillRect(0,0,this.radius,this.radius);
|
||||
|
||||
// fill in the dots
|
||||
for (i in this.dots) {
|
||||
this.dots[i].changeOpacity();
|
||||
this.dots[i].draw();
|
||||
}
|
||||
}
|
||||
|
||||
var Dot = function(x, y, radius, color, opacity) {
|
||||
this.radius = radius;
|
||||
this.color = color;
|
||||
this.opacity = opacity;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
Dot.prototype.draw = function() {
|
||||
this.parent.ctx.beginPath();
|
||||
this.parent.ctx.globalAlpha = this.opacity;
|
||||
this.parent.ctx.fillStyle = this.color;
|
||||
this.parent.ctx.arc(this.x+(this.parent.radius/2), this.y+(this.parent.radius/2), this.radius, 0, Math.PI*2, true);
|
||||
this.parent.ctx.fill();
|
||||
}
|
||||
|
||||
Dot.prototype.changeOpacity = function() {
|
||||
this.opacity -= 1/this.parent.numDots;
|
||||
if (this.opacity < 0) this.opacity = 1;
|
||||
}
|
||||
|
||||
// we can't replace until the image is loaded (webkit bug?)
|
||||
return $(this).each(function() {
|
||||
if (this.tagName == 'IMG') {
|
||||
$(this).load(function() {
|
||||
// set some local defaults that change
|
||||
var localDefaults = {
|
||||
'radius':($(this).width()+$(this).height())/2,
|
||||
'dotRadius':($(this).width()+$(this).height())/16,
|
||||
'id':'canvasLoader'+(parseInt($(".canvasLoader").size())+1),
|
||||
};
|
||||
|
||||
// extend the global defaults with the local defaults and then the user-supplied defaults.
|
||||
var opts = $.extend(globalOpts, localDefaults, options);
|
||||
|
||||
// create a canvas object and get the context
|
||||
var canvas = $("<canvas width='"+opts.radius+"' height='"+opts.radius+"' id='"+opts.id+"' class='"+opts.className+"'></canvas>");
|
||||
var ctx = canvas.get(0).getContext("2d");
|
||||
|
||||
// simple feature detection, needs work
|
||||
if (!!ctx) {
|
||||
loaders[loaders.length+1] = new CanvasLoader(ctx, opts.radius, opts.color, opts.dotRadius);
|
||||
$(this).replaceWith(canvas);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// set some local defaults that change
|
||||
var localDefaults = {
|
||||
'radius':($(this).width()+$(this).height())/2,
|
||||
'dotRadius':($(this).width()+$(this).height())/16,
|
||||
'id':'canvasLoader'+(parseInt($("."+globalOpts.className).size())+1),
|
||||
};
|
||||
|
||||
// extend the global defaults with the local defaults and then the user-supplied defaults.
|
||||
var opts = $.extend(globalOpts, localDefaults, options);
|
||||
|
||||
// create a canvas object and get the context
|
||||
var canvas = $("<canvas width='"+opts.radius+"' height='"+opts.radius+"' id='"+opts.id+"' class='"+opts.className+"'></canvas>");
|
||||
var ctx = canvas.get(0).getContext("2d");
|
||||
|
||||
// simple feature detection, needs work
|
||||
if (!!ctx) {
|
||||
loaders[loaders.length+1] = new CanvasLoader(ctx, opts.radius, opts.color, opts.dotRadius);
|
||||
$(this).replaceWith(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
})(jQuery);
|
||||
4255
_rejestracja/Static/script/jQuery/jquery.carouFredSel.js
Normal file
176
_rejestracja/Static/script/jQuery/jquery.collapse.js
Normal file
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Collapse plugin for jQuery
|
||||
* --
|
||||
* source: http://github.com/danielstocks/jQuery-Collapse/
|
||||
* site: http://webcloud.se/jQuery-Collapse
|
||||
*
|
||||
* @author Daniel Stocks (http://webcloud.se)
|
||||
* Copyright 2013, Daniel Stocks
|
||||
* Released under the MIT, BSD, and GPL Licenses.
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
// Constructor
|
||||
function Collapse (el, options) {
|
||||
options = options || {};
|
||||
var _this = this,
|
||||
query = options.query || "> :even";
|
||||
|
||||
$.extend(_this, {
|
||||
$el: el,
|
||||
options : options,
|
||||
sections: [],
|
||||
isAccordion : options.accordion || false,
|
||||
db : options.persist ? jQueryCollapseStorage(el.get(0).id) : false
|
||||
});
|
||||
|
||||
// Figure out what sections are open if storage is used
|
||||
_this.states = _this.db ? _this.db.read() : [];
|
||||
|
||||
// For every pair of elements in given
|
||||
// element, create a section
|
||||
_this.$el.find(query).each(function() {
|
||||
new jQueryCollapseSection($(this), _this);
|
||||
});
|
||||
|
||||
// Capute ALL the clicks!
|
||||
(function(scope) {
|
||||
_this.$el.on("click", "[data-collapse-summary] " + (scope.options.clickQuery || ""),
|
||||
$.proxy(_this.handleClick, scope));
|
||||
|
||||
_this.$el.bind("toggle close open",
|
||||
$.proxy(_this.handleEvent, scope));
|
||||
|
||||
}(_this));
|
||||
}
|
||||
|
||||
Collapse.prototype = {
|
||||
handleClick: function(e, state) {
|
||||
e.preventDefault();
|
||||
var state = state || "toggle"
|
||||
var sections = this.sections,
|
||||
l = sections.length;
|
||||
while(l--) {
|
||||
if($.contains(sections[l].$summary[0], e.target)) {
|
||||
sections[l][state]();
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleEvent: function(e) {
|
||||
if(e.target == this.$el.get(0)) return this[e.type]();
|
||||
this.handleClick(e, e.type);
|
||||
},
|
||||
open: function(eq) {
|
||||
if(isFinite(eq)) return this.sections[eq].open();
|
||||
$.each(this.sections, function(i, section) {
|
||||
section.open();
|
||||
})
|
||||
},
|
||||
close: function(eq) {
|
||||
if(isFinite(eq)) return this.sections[eq].close();
|
||||
$.each(this.sections, function(i, section) {
|
||||
section.close();
|
||||
})
|
||||
},
|
||||
toggle: function(eq) {
|
||||
if(isFinite(eq)) return this.sections[eq].toggle();
|
||||
$.each(this.sections, function(i, section) {
|
||||
section.toggle();
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
// Section constructor
|
||||
function Section($el, parent) {
|
||||
|
||||
if(!parent.options.clickQuery) $el.wrapInner('<a href="#"/>');
|
||||
|
||||
$.extend(this, {
|
||||
isOpen : false,
|
||||
$summary : $el.attr("data-collapse-summary",""),
|
||||
$details : $el.next(),
|
||||
options: parent.options,
|
||||
parent: parent
|
||||
});
|
||||
parent.sections.push(this);
|
||||
|
||||
// Check current state of section
|
||||
var state = parent.states[this._index()];
|
||||
|
||||
if(state === 0) {
|
||||
this.close(true)
|
||||
}
|
||||
else if(this.$summary.is(".open") || state === 1) {
|
||||
this.open(true);
|
||||
} else {
|
||||
this.close(true)
|
||||
}
|
||||
}
|
||||
|
||||
Section.prototype = {
|
||||
toggle : function() {
|
||||
this.isOpen ? this.close() : this.open();
|
||||
},
|
||||
close: function(bypass) {
|
||||
this._changeState("close", bypass);
|
||||
},
|
||||
open: function(bypass) {
|
||||
var _this = this;
|
||||
if(_this.options.accordion && !bypass) {
|
||||
$.each(_this.parent.sections, function(i, section) {
|
||||
section.close()
|
||||
});
|
||||
}
|
||||
_this._changeState("open", bypass);
|
||||
},
|
||||
_index: function() {
|
||||
return $.inArray(this, this.parent.sections);
|
||||
},
|
||||
_changeState: function(state, bypass) {
|
||||
|
||||
var _this = this;
|
||||
_this.isOpen = state == "open";
|
||||
if($.isFunction(_this.options[state]) && !bypass) {
|
||||
_this.options[state].apply(_this.$details);
|
||||
} else {
|
||||
_this.$details[_this.isOpen ? "show" : "hide"]();
|
||||
}
|
||||
|
||||
_this.$summary.toggleClass("open", state != "close")
|
||||
_this.$details.attr("aria-hidden", state == "close");
|
||||
_this.$summary.attr("aria-expanded", state == "open");
|
||||
_this.$summary.trigger(state == "open" ? "opened" : "closed", _this);
|
||||
if(_this.parent.db) {
|
||||
_this.parent.db.write(_this._index(), _this.isOpen);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Expose in jQuery API
|
||||
$.fn.extend({
|
||||
collapse: function(options, scan) {
|
||||
var nodes = (scan) ? $("body").find("[data-collapse]") : $(this);
|
||||
return nodes.each(function() {
|
||||
var settings = (scan) ? {} : options,
|
||||
values = $(this).attr("data-collapse") || "";
|
||||
$.each(values.split(" "), function(i,v) {
|
||||
if(v) settings[v] = true;
|
||||
});
|
||||
new Collapse($(this), settings);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//jQuery DOM Ready
|
||||
$(function() {
|
||||
$.fn.collapse(false, true);
|
||||
});
|
||||
|
||||
// Expose constructor to
|
||||
// global namespace
|
||||
jQueryCollapse = Collapse;
|
||||
jQueryCollapseSection = Section;
|
||||
|
||||
})(window.jQuery);
|
||||
205
_rejestracja/Static/script/jQuery/jquery.easing.1.3.js
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* 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,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
205
_rejestracja/Static/script/jQuery/jquery.easing.js
Normal file
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* 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,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 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
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
1191
_rejestracja/Static/script/jQuery/jquery.flexslider.js
Normal file
317
_rejestracja/Static/script/jQuery/jquery.fs.picker.js
Normal file
@@ -0,0 +1,317 @@
|
||||
/*
|
||||
* Picker v3.0.11 - 2014-02-26
|
||||
* A jQuery plugin for replacing default checkboxes and radios. Part of the formstone library.
|
||||
* http://formstone.it/picker/
|
||||
*
|
||||
* Copyright 2014 Ben Plum; MIT Licensed
|
||||
*/
|
||||
|
||||
;(function ($, window) {
|
||||
"use strict";
|
||||
|
||||
var isIE8 = (document.all && document.querySelector && !document.addEventListener);
|
||||
|
||||
/**
|
||||
* @options
|
||||
* @param customClass [string] <''> "Class applied to instance"
|
||||
* @param toggle [boolean] <false> "Render 'toggle' styles"
|
||||
* @param labels.on [string] <'ON'> "Label for 'On' position; 'toggle' only"
|
||||
* @param labels.off [string] <'OFF'> "Label for 'Off' position; 'toggle' only"
|
||||
*/
|
||||
var options = {
|
||||
customClass: "",
|
||||
toggle: false,
|
||||
labels: {
|
||||
on: "ON",
|
||||
off: "OFF"
|
||||
}
|
||||
};
|
||||
|
||||
var pub = {
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @name defaults
|
||||
* @description Sets default plugin options
|
||||
* @param opts [object] <{}> "Options object"
|
||||
* @example $.picker("defaults", opts);
|
||||
*/
|
||||
defaults: function(opts) {
|
||||
options = $.extend(options, opts || {});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @name destroy
|
||||
* @description Removes instance of plugin
|
||||
* @example $(".target").picker("destroy");
|
||||
*/
|
||||
destroy: function() {
|
||||
return $(this).each(function(i, input) {
|
||||
var data = $(input).data("picker");
|
||||
|
||||
if (data) {
|
||||
data.$picker.off(".picker");
|
||||
data.$handle.remove();
|
||||
data.$labels.remove();
|
||||
data.$input.off(".picker")
|
||||
.removeClass("picker-element")
|
||||
.data("picker", null);
|
||||
data.$label.removeClass("picker-label")
|
||||
.unwrap();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @name disable
|
||||
* @description Disables target instance
|
||||
* @example $(".target").picker("disable");
|
||||
*/
|
||||
disable: function() {
|
||||
return $(this).each(function(i, input) {
|
||||
var data = $(input).data("picker");
|
||||
|
||||
if (data) {
|
||||
data.$input.prop("disabled", true);
|
||||
data.$picker.addClass("disabled");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @name enable
|
||||
* @description Enables target instance
|
||||
* @example $(".target").picker("enable");
|
||||
*/
|
||||
enable: function() {
|
||||
return $(this).each(function(i, input) {
|
||||
var data = $(input).data("picker");
|
||||
|
||||
if (data) {
|
||||
data.$input.prop("disabled", false);
|
||||
data.$picker.removeClass("disabled");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @name update
|
||||
* @description Updates instance of plugin
|
||||
* @example $(".target").picker("update");
|
||||
*/
|
||||
update: function() {
|
||||
return $(this).each(function(i, input) {
|
||||
var data = $(input).data("picker");
|
||||
|
||||
if (data && !data.$input.is(":disabled")) {
|
||||
if (data.$input.is(":checked")) {
|
||||
_onSelect({ data: data }, true);
|
||||
} else {
|
||||
_onDeselect({ data: data }, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _init
|
||||
* @description Initializes plugin
|
||||
* @param opts [object] "Initialization options"
|
||||
*/
|
||||
function _init(opts) {
|
||||
// Settings
|
||||
opts = $.extend({}, options, opts);
|
||||
|
||||
// Apply to each element
|
||||
var $items = $(this);
|
||||
for (var i = 0, count = $items.length; i < count; i++) {
|
||||
_build($items.eq(i), opts);
|
||||
}
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _build
|
||||
* @description Builds each instance
|
||||
* @param $input [jQuery object] "Target jQuery object"
|
||||
* @param opts [object] <{}> "Options object"
|
||||
*/
|
||||
function _build($input, opts) {
|
||||
if (!$input.data("picker")) {
|
||||
// EXTEND OPTIONS
|
||||
opts = $.extend({}, opts, $input.data("picker-options"));
|
||||
|
||||
var $parent = $input.closest("label"),
|
||||
$label = $parent.length ? $parent.eq(0) : $("label[for=" + $input.attr("id") + "]"),
|
||||
type = $input.attr("type"),
|
||||
typeClass = "picker-" + (type === "radio" ? "radio" : "checkbox"),
|
||||
group = $input.attr("name"),
|
||||
html = '<div class="picker-handle"><div class="picker-flag" /></div>';
|
||||
|
||||
if (opts.toggle) {
|
||||
typeClass += " picker-toggle";
|
||||
html = '<span class="picker-toggle-label on">' + opts.labels.on + '</span><span class="picker-toggle-label off">' + opts.labels.off + '</span>' + html;
|
||||
}
|
||||
|
||||
// Modify DOM
|
||||
$input.addClass("picker-element");
|
||||
$label.wrap('<div class="picker ' + typeClass + ' ' + opts.customClass + '" />')
|
||||
.before(html)
|
||||
.addClass("picker-label");
|
||||
|
||||
// Store plugin data
|
||||
var $picker = $label.parents(".picker"),
|
||||
$handle = $picker.find(".picker-handle"),
|
||||
$labels = $picker.find(".picker-toggle-label");
|
||||
|
||||
// Check checked
|
||||
if ($input.is(":checked")) {
|
||||
$picker.addClass("checked");
|
||||
}
|
||||
|
||||
// Check disabled
|
||||
if ($input.is(":disabled")) {
|
||||
$picker.addClass("disabled");
|
||||
}
|
||||
|
||||
var data = $.extend({}, opts, {
|
||||
$picker: $picker,
|
||||
$input: $input,
|
||||
$handle: $handle,
|
||||
$label: $label,
|
||||
$labels: $labels,
|
||||
group: group,
|
||||
isRadio: (type === "radio"),
|
||||
isCheckbox: (type === "checkbox")
|
||||
});
|
||||
|
||||
// Bind click events
|
||||
data.$input.on("focus.picker", data, _onFocus)
|
||||
.on("blur.picker", data, _onBlur)
|
||||
.on("change.picker", data, _onChange)
|
||||
.on("click.picker", data, _onClick)
|
||||
.on("deselect.picker", data, _onDeselect)
|
||||
.data("picker", data);
|
||||
|
||||
data.$picker.on("click.picker", data, _onClick);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onClick
|
||||
* @description Handles instance clicks
|
||||
* @param e [object] "Event data"
|
||||
*/
|
||||
function _onClick(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var data = e.data;
|
||||
|
||||
if (!$(e.target).is(data.$input)) {
|
||||
e.preventDefault();
|
||||
|
||||
data.$input.trigger("click");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onChange
|
||||
* @description Handles external changes
|
||||
* @param e [object] "Event data"
|
||||
*/
|
||||
function _onChange(e) {
|
||||
var data = e.data;
|
||||
|
||||
if (!data.$input.is(":disabled")) {
|
||||
// Checkbox change events fire after state has changed
|
||||
var checked = data.$input.is(":checked");
|
||||
if (data.isCheckbox) {
|
||||
if (checked) {
|
||||
_onSelect(e, true);
|
||||
} else {
|
||||
_onDeselect(e, true);
|
||||
}
|
||||
} else {
|
||||
// radio
|
||||
if (checked || (isIE8 && !checked)) {
|
||||
_onSelect(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onSelect
|
||||
* @description Changes input to "checked"
|
||||
* @param e [object] "Event data"
|
||||
* @param internal [boolean] "Internal update flag"
|
||||
*/
|
||||
function _onSelect(e, internal) {
|
||||
var data = e.data;
|
||||
|
||||
if (typeof data.group !== "undefined" && data.isRadio) {
|
||||
$('input[name="' + data.group + '"]').not(data.$input).trigger("deselect");
|
||||
}
|
||||
|
||||
data.$picker.addClass("checked");
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onDeselect
|
||||
* @description Changes input from "checked"
|
||||
* @param e [object] "Event data"
|
||||
* @param internal [boolean] "Internal update flag"
|
||||
*/
|
||||
function _onDeselect(e, internal) {
|
||||
var data = e.data;
|
||||
|
||||
data.$picker.removeClass("checked");
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onFocus
|
||||
* @description Handles instance focus
|
||||
* @param e [object] "Event data"
|
||||
*/
|
||||
function _onFocus(e) {
|
||||
e.data.$picker.addClass("focus");
|
||||
}
|
||||
|
||||
/**
|
||||
* @method private
|
||||
* @name _onBlur
|
||||
* @description Handles instance blur
|
||||
* @param e [object] "Event data"
|
||||
*/
|
||||
function _onBlur(e) {
|
||||
e.data.$picker.removeClass("focus");
|
||||
}
|
||||
|
||||
$.fn.picker = function(method) {
|
||||
if (pub[method]) {
|
||||
return pub[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method) {
|
||||
return _init.apply(this, arguments);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
$.picker = function(method) {
|
||||
if (method === "defaults") {
|
||||
pub.defaults.apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||
66
_rejestracja/Static/script/jQuery/jquery.imageLens.js
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
http://www.dailycoding.com/
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.imageLens = function (options) {
|
||||
|
||||
var defaults = {
|
||||
lensSize: 100,
|
||||
borderSize: 4,
|
||||
borderColor: "#888"
|
||||
};
|
||||
var options = $.extend(defaults, options);
|
||||
var lensStyle = "background-position: 0px 0px;width: " + String(options.lensSize) + "px;height: " + String(options.lensSize)
|
||||
+ "px;float: left;display: none;border-radius: " + String(options.lensSize / 2 + options.borderSize)
|
||||
+ "px;border: " + String(options.borderSize) + "px solid " + options.borderColor
|
||||
+ ";background-repeat: no-repeat;position: absolute;";
|
||||
|
||||
return this.each(function () {
|
||||
obj = $(this);
|
||||
|
||||
var offset = $(this).offset();
|
||||
|
||||
// Creating lens
|
||||
var target = $("<div style='" + lensStyle + "' class='" + options.lensCss + "'> </div>").appendTo($(this).parent());
|
||||
var targetSize = target.size();
|
||||
|
||||
// Calculating actual size of image
|
||||
var imageSrc = options.imageSrc ? options.imageSrc : $(this).attr("src");
|
||||
var imageTag = "<img style='display:none;' src='" + imageSrc + "' />";
|
||||
|
||||
var widthRatio = 0;
|
||||
var heightRatio = 0;
|
||||
|
||||
$(imageTag).load(function () {
|
||||
widthRatio = $(this).width() / obj.width();
|
||||
heightRatio = $(this).height() / obj.height();
|
||||
}).appendTo($(this).parent());
|
||||
|
||||
target.css({ backgroundImage: "url('" + imageSrc + "')" });
|
||||
|
||||
target.mousemove(setPosition);
|
||||
$(this).mousemove(setPosition);
|
||||
|
||||
function setPosition(e) {
|
||||
|
||||
var leftPos = parseInt(e.pageX - offset.left);
|
||||
var topPos = parseInt(e.pageY - offset.top);
|
||||
|
||||
if (leftPos < 0 || topPos < 0 || leftPos > obj.width() || topPos > obj.height()) {
|
||||
target.hide();
|
||||
}
|
||||
else {
|
||||
target.show();
|
||||
|
||||
leftPos = String(((e.pageX - offset.left) * widthRatio - target.width() / 2) * (-1));
|
||||
topPos = String(((e.pageY - offset.top) * heightRatio - target.height() / 2) * (-1));
|
||||
target.css({ backgroundPosition: leftPos + 'px ' + topPos + 'px' });
|
||||
|
||||
leftPos = String(e.pageX - target.width() / 2);
|
||||
topPos = String(e.pageY - target.height() / 2);
|
||||
target.css({ left: leftPos + 'px', top: topPos + 'px' });
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
1396
_rejestracja/Static/script/jQuery/jquery.jcarousel.js
Normal file
4
_rejestracja/Static/script/jQuery/jquery.jcarousel.min.js
vendored
Normal file
10220
_rejestracja/Static/script/jQuery/jquery.js
vendored
Normal file
485
_rejestracja/Static/script/jQuery/jquery.lightbox-0.5.js
Normal file
@@ -0,0 +1,485 @@
|
||||
/**
|
||||
* jQuery lightBox plugin
|
||||
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
|
||||
* and adapted to me for use like a plugin from jQuery.
|
||||
* @name jquery-lightbox-0.5.js
|
||||
* @author Leandro Vieira Pinho - http://leandrovieira.com
|
||||
* @version 0.5
|
||||
* @date April 11, 2008
|
||||
* @category jQuery plugin
|
||||
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
|
||||
* @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
|
||||
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
|
||||
(function($) {
|
||||
/**
|
||||
* $ is an alias to jQuery object
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$.fn.lightBox = function(settings) {
|
||||
// Settings to configure the jQuery lightBox plugin how you like
|
||||
settings = jQuery.extend({
|
||||
// Configuration related to overlay
|
||||
overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
|
||||
overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
|
||||
// Configuration related to navigation
|
||||
fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
|
||||
// Configuration related to images
|
||||
imageLoading: '../../image/Strona/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
|
||||
imageBtnPrev: '../../image/Strona/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
|
||||
imageBtnNext: '../../image/Strona/lightbox-btn-next.gif', // (string) Path and the name of the next button image
|
||||
imageBtnClose: '../../image/Strona/lightbox-btn-close.gif', // (string) Path and the name of the close btn
|
||||
imageBlank: '../../image/Strona/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
|
||||
// Configuration related to container image box
|
||||
containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
|
||||
containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
|
||||
// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
|
||||
txtImage: 'Image', // (string) Specify text "Image"
|
||||
txtOf: 'z', // (string) Specify text "of"
|
||||
// Configuration related to keyboard navigation
|
||||
keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
|
||||
keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
|
||||
keyToNext: 'n', // (string) (n = next) Letter to show the next image.
|
||||
// Don<6F>t alter these variables in any way
|
||||
imageArray: [],
|
||||
activeImage: 0
|
||||
},settings);
|
||||
// Caching the jQuery object with all elements matched
|
||||
var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
|
||||
/**
|
||||
* Initializing the plugin calling the start function
|
||||
*
|
||||
* @return boolean false
|
||||
*/
|
||||
function _initialize() {
|
||||
_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
|
||||
return false; // Avoid the browser following the link
|
||||
}
|
||||
/**
|
||||
* Start the jQuery lightBox plugin
|
||||
*
|
||||
* @param object objClicked The object (link) whick the user have clicked
|
||||
* @param object jQueryMatchedObj The jQuery object with all elements matched
|
||||
*/
|
||||
function _start(objClicked,jQueryMatchedObj) {
|
||||
// Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
|
||||
$('embed, object, select').css({ 'visibility' : 'hidden' });
|
||||
// Call the function to create the markup structure; style some elements; assign events in some elements.
|
||||
_set_interface();
|
||||
// Unset total images in imageArray
|
||||
settings.imageArray.length = 0;
|
||||
// Unset image active information
|
||||
settings.activeImage = 0;
|
||||
// We have an image set? Or just an image? Let<65>s see it.
|
||||
if ( jQueryMatchedObj.length == 1 ) {
|
||||
settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
|
||||
} else {
|
||||
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
|
||||
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
|
||||
settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
|
||||
}
|
||||
}
|
||||
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
|
||||
settings.activeImage++;
|
||||
}
|
||||
// Call the function that prepares image exibition
|
||||
_set_image_to_view();
|
||||
}
|
||||
/**
|
||||
* Create the jQuery lightBox plugin interface
|
||||
*
|
||||
* The HTML markup will be like that:
|
||||
<div id="jquery-overlay"></div>
|
||||
<div id="jquery-lightbox">
|
||||
<div id="lightbox-container-image-box">
|
||||
<div id="lightbox-container-image">
|
||||
<img src="../fotos/XX.jpg" id="lightbox-image">
|
||||
<div id="lightbox-nav">
|
||||
<a href="#" id="lightbox-nav-btnPrev"></a>
|
||||
<a href="#" id="lightbox-nav-btnNext"></a>
|
||||
</div>
|
||||
<div id="lightbox-loading">
|
||||
<a href="#" id="lightbox-loading-link">
|
||||
<img src="../images/lightbox-ico-loading.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lightbox-container-image-data-box">
|
||||
<div id="lightbox-container-image-data">
|
||||
<div id="lightbox-image-details">
|
||||
<span id="lightbox-image-details-caption"></span>
|
||||
<span id="lightbox-image-details-currentNumber"></span>
|
||||
</div>
|
||||
<div id="lightbox-secNav">
|
||||
<a href="#" id="lightbox-secNav-btnClose">
|
||||
<img src="../images/lightbox-btn-close.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
*
|
||||
*/
|
||||
function _set_interface() {
|
||||
|
||||
|
||||
|
||||
|
||||
// Apply the HTML markup into body tag
|
||||
$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><a id="lightbox-image-full" class="zoom" ><img id="lightbox-image"></a><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
|
||||
// Get page sizes
|
||||
var arrPageSizes = ___getPageSize();
|
||||
// Style overlay and show it
|
||||
$('#jquery-overlay').css({
|
||||
backgroundColor: settings.overlayBgColor,
|
||||
opacity: settings.overlayOpacity,
|
||||
width: arrPageSizes[0],
|
||||
height: arrPageSizes[1]
|
||||
}).fadeIn();
|
||||
// Get page scroll
|
||||
var arrPageScroll = ___getPageScroll();
|
||||
// Calculate top and left offset for the jquery-lightbox div object and show it
|
||||
$('#jquery-lightbox').css({
|
||||
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
|
||||
left: arrPageScroll[0]
|
||||
}).show();
|
||||
// Assigning click events in elements to close overlay
|
||||
$('#jquery-overlay,#jquery-lightbox').click(function() {
|
||||
//_finish();
|
||||
$('#zoom').zoomy();
|
||||
alert('qwert');
|
||||
});
|
||||
// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
|
||||
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
|
||||
_finish();
|
||||
return false;
|
||||
});
|
||||
// If window was resized, calculate the new overlay dimensions
|
||||
$(window).resize(function() {
|
||||
// Get page sizes
|
||||
var arrPageSizes = ___getPageSize();
|
||||
// Style overlay and show it
|
||||
$('#jquery-overlay').css({
|
||||
width: arrPageSizes[0],
|
||||
height: arrPageSizes[1]
|
||||
});
|
||||
// Get page scroll
|
||||
var arrPageScroll = ___getPageScroll();
|
||||
// Calculate top and left offset for the jquery-lightbox div object and show it
|
||||
$('#jquery-lightbox').css({
|
||||
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
|
||||
left: arrPageScroll[0]
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Prepares image exibition; doing a image<67>s preloader to calculate it<69>s size
|
||||
*
|
||||
*/
|
||||
function _set_image_to_view() { // show the loading
|
||||
// Show the loading
|
||||
$('#lightbox-loading').show();
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
|
||||
} else {
|
||||
// Hide some elements
|
||||
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
|
||||
}
|
||||
// Image preload process
|
||||
var objImagePreloader = new Image();
|
||||
objImagePreloader.onload = function() {
|
||||
$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
|
||||
$('#lightbox-image-full').attr('href','http://localhost/formix_old_projects/megalie/dev/src/Static/upload/Article/16/full_1374affe642f33107d6d38a23bd1a72c.jpg');
|
||||
// Perfomance an effect in the image container resizing it
|
||||
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
|
||||
// clear onLoad, IE behaves irratically with animated gifs otherwise
|
||||
objImagePreloader.onload=function(){};
|
||||
};
|
||||
objImagePreloader.src = settings.imageArray[settings.activeImage][0];
|
||||
};
|
||||
/**
|
||||
* Perfomance an effect in the image container resizing it
|
||||
*
|
||||
* @param integer intImageWidth The image<67>s width that will be showed
|
||||
* @param integer intImageHeight The image<67>s height that will be showed
|
||||
*/
|
||||
function _resize_container_image_box(intImageWidth,intImageHeight) {
|
||||
// Get current width and height
|
||||
var intCurrentWidth = $('#lightbox-container-image-box').width();
|
||||
var intCurrentHeight = $('#lightbox-container-image-box').height();
|
||||
// Get the width and height of the selected image plus the padding
|
||||
var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image<67>s width and the left and right padding value
|
||||
var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image<67>s height and the left and right padding value
|
||||
// Diferences
|
||||
var intDiffW = intCurrentWidth - intWidth;
|
||||
var intDiffH = intCurrentHeight - intHeight;
|
||||
// Perfomance the effect
|
||||
$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
|
||||
if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
|
||||
if ( $.browser.msie ) {
|
||||
___pause(250);
|
||||
} else {
|
||||
___pause(100);
|
||||
}
|
||||
}
|
||||
$('#lightbox-container-image-data-box').css({ width: intImageWidth });
|
||||
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
|
||||
};
|
||||
/**
|
||||
* Show the prepared image
|
||||
*
|
||||
*/
|
||||
function _show_image() {
|
||||
$('#lightbox-loading').hide();
|
||||
$('#lightbox-image').fadeIn(function() {
|
||||
_show_image_data();
|
||||
_set_navigation();
|
||||
});
|
||||
_preload_neighbor_images();
|
||||
};
|
||||
/**
|
||||
* Show the image information
|
||||
*
|
||||
*/
|
||||
function _show_image_data() {
|
||||
$('#lightbox-container-image-data-box').slideDown('fast');
|
||||
$('#lightbox-image-details-caption').hide();
|
||||
if ( settings.imageArray[settings.activeImage][1] ) {
|
||||
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
|
||||
}
|
||||
// If we have a image set, display 'Image X of X'
|
||||
if ( settings.imageArray.length > 1 ) {
|
||||
$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' (' + settings.imageArray.length+') ').show();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Display the button navigations
|
||||
*
|
||||
*/
|
||||
function _set_navigation() {
|
||||
$('#lightbox-nav').show();
|
||||
|
||||
// Instead to define this configuration in CSS file, we define here. And it<69>s need to IE. Just.
|
||||
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
|
||||
// Show the prev button, if not the first image in set
|
||||
if ( settings.activeImage != 0 ) {
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
|
||||
.unbind()
|
||||
.bind('click',function() {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
// Show the images button for Next buttons
|
||||
$('#lightbox-nav-btnPrev').unbind().hover(function() {
|
||||
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
|
||||
},function() {
|
||||
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
}).show().bind('click',function() {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Show the next button, if not the last image in set
|
||||
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
|
||||
.unbind()
|
||||
.bind('click',function() {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
// Show the images button for Next buttons
|
||||
$('#lightbox-nav-btnNext').unbind().hover(function() {
|
||||
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
|
||||
},function() {
|
||||
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
}).show().bind('click',function() {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
// Enable keyboard navigation
|
||||
_enable_keyboard_navigation();
|
||||
}
|
||||
/**
|
||||
* Enable a support to keyboard navigation
|
||||
*
|
||||
*/
|
||||
function _enable_keyboard_navigation() {
|
||||
$(document).keydown(function(objEvent) {
|
||||
_keyboard_action(objEvent);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Disable the support to keyboard navigation
|
||||
*
|
||||
*/
|
||||
function _disable_keyboard_navigation() {
|
||||
$(document).unbind();
|
||||
}
|
||||
/**
|
||||
* Perform the keyboard actions
|
||||
*
|
||||
*/
|
||||
function _keyboard_action(objEvent) {
|
||||
// To ie
|
||||
if ( objEvent == null ) {
|
||||
keycode = event.keyCode;
|
||||
escapeKey = 27;
|
||||
// To Mozilla
|
||||
} else {
|
||||
keycode = objEvent.keyCode;
|
||||
escapeKey = objEvent.DOM_VK_ESCAPE;
|
||||
}
|
||||
// Get the key in lower case form
|
||||
key = String.fromCharCode(keycode).toLowerCase();
|
||||
// Verify the keys to close the ligthBox
|
||||
if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
|
||||
_finish();
|
||||
}
|
||||
// Verify the key to show the previous image
|
||||
if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
|
||||
// If we<77>re not showing the first image, call the previous
|
||||
if ( settings.activeImage != 0 ) {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
_disable_keyboard_navigation();
|
||||
}
|
||||
}
|
||||
// Verify the key to show the next image
|
||||
if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
|
||||
// If we<77>re not showing the last image, call the next
|
||||
if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
_disable_keyboard_navigation();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Preload prev and next images being showed
|
||||
*
|
||||
*/
|
||||
function _preload_neighbor_images() {
|
||||
if ( (settings.imageArray.length -1) > settings.activeImage ) {
|
||||
objNext = new Image();
|
||||
objNext.src = settings.imageArray[settings.activeImage + 1][0];
|
||||
}
|
||||
if ( settings.activeImage > 0 ) {
|
||||
objPrev = new Image();
|
||||
objPrev.src = settings.imageArray[settings.activeImage -1][0];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove jQuery lightBox plugin HTML markup
|
||||
*
|
||||
*/
|
||||
function _finish() {
|
||||
$('#jquery-lightbox').remove();
|
||||
$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
|
||||
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
|
||||
$('embed, object, select').css({ 'visibility' : 'visible' });
|
||||
}
|
||||
/**
|
||||
/ THIRD FUNCTION
|
||||
* getPageSize() by quirksmode.com
|
||||
*
|
||||
* @return Array Return an array with page width, height and window width, height
|
||||
*/
|
||||
function ___getPageSize() {
|
||||
var xScroll, yScroll;
|
||||
if (window.innerHeight && window.scrollMaxY) {
|
||||
xScroll = window.innerWidth + window.scrollMaxX;
|
||||
yScroll = window.innerHeight + window.scrollMaxY;
|
||||
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
|
||||
xScroll = document.body.scrollWidth;
|
||||
yScroll = document.body.scrollHeight;
|
||||
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
|
||||
xScroll = document.body.offsetWidth;
|
||||
yScroll = document.body.offsetHeight;
|
||||
}
|
||||
var windowWidth, windowHeight;
|
||||
if (self.innerHeight) { // all except Explorer
|
||||
if(document.documentElement.clientWidth){
|
||||
windowWidth = document.documentElement.clientWidth;
|
||||
} else {
|
||||
windowWidth = self.innerWidth;
|
||||
}
|
||||
windowHeight = self.innerHeight;
|
||||
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
|
||||
windowWidth = document.documentElement.clientWidth;
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
} else if (document.body) { // other Explorers
|
||||
windowWidth = document.body.clientWidth;
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
// for small pages with total height less then height of the viewport
|
||||
if(yScroll < windowHeight){
|
||||
pageHeight = windowHeight;
|
||||
} else {
|
||||
pageHeight = yScroll;
|
||||
}
|
||||
// for small pages with total width less then width of the viewport
|
||||
if(xScroll < windowWidth){
|
||||
pageWidth = xScroll;
|
||||
} else {
|
||||
pageWidth = windowWidth;
|
||||
}
|
||||
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
|
||||
return arrayPageSize;
|
||||
};
|
||||
/**
|
||||
/ THIRD FUNCTION
|
||||
* getPageScroll() by quirksmode.com
|
||||
*
|
||||
* @return Array Return an array with x,y page scroll values.
|
||||
*/
|
||||
function ___getPageScroll() {
|
||||
var xScroll, yScroll;
|
||||
if (self.pageYOffset) {
|
||||
yScroll = self.pageYOffset;
|
||||
xScroll = self.pageXOffset;
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
||||
yScroll = document.documentElement.scrollTop;
|
||||
xScroll = document.documentElement.scrollLeft;
|
||||
} else if (document.body) {// all other Explorers
|
||||
yScroll = document.body.scrollTop;
|
||||
xScroll = document.body.scrollLeft;
|
||||
}
|
||||
arrayPageScroll = new Array(xScroll,yScroll);
|
||||
return arrayPageScroll;
|
||||
};
|
||||
/**
|
||||
* Stop the code execution from a escified time in milisecond
|
||||
*
|
||||
*/
|
||||
function ___pause(ms) {
|
||||
var date = new Date();
|
||||
curDate = null;
|
||||
do { var curDate = new Date(); }
|
||||
while ( curDate - date < ms);
|
||||
};
|
||||
// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
|
||||
return this.unbind('click').click(_initialize);
|
||||
};
|
||||
})(jQuery); // Call and execute the function immediately passing the jQuery object
|
||||
14933
_rejestracja/Static/script/jQuery/jquery.mobile-1.4.1.js
Normal file
11129
_rejestracja/Static/script/jQuery/jquery.mobile.custom.js
Normal file
84
_rejestracja/Static/script/jQuery/jquery.mousewheel.js
Normal file
@@ -0,0 +1,84 @@
|
||||
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
*
|
||||
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
||||
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
||||
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
||||
*
|
||||
* Version: 3.0.6
|
||||
*
|
||||
* Requires: 1.2.2+
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
var types = ['DOMMouseScroll', 'mousewheel'];
|
||||
|
||||
if ($.event.fixHooks) {
|
||||
for ( var i=types.length; i; ) {
|
||||
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
|
||||
}
|
||||
}
|
||||
|
||||
$.event.special.mousewheel = {
|
||||
setup: function() {
|
||||
if ( this.addEventListener ) {
|
||||
for ( var i=types.length; i; ) {
|
||||
this.addEventListener( types[--i], handler, false );
|
||||
}
|
||||
} else {
|
||||
this.onmousewheel = handler;
|
||||
}
|
||||
},
|
||||
|
||||
teardown: function() {
|
||||
if ( this.removeEventListener ) {
|
||||
for ( var i=types.length; i; ) {
|
||||
this.removeEventListener( types[--i], handler, false );
|
||||
}
|
||||
} else {
|
||||
this.onmousewheel = null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
mousewheel: function(fn) {
|
||||
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
|
||||
},
|
||||
|
||||
unmousewheel: function(fn) {
|
||||
return this.unbind("mousewheel", fn);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function handler(event) {
|
||||
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
|
||||
event = $.event.fix(orgEvent);
|
||||
event.type = "mousewheel";
|
||||
|
||||
// Old school scrollwheel delta
|
||||
if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
|
||||
if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
|
||||
|
||||
// New school multidimensional scroll (touchpads) deltas
|
||||
deltaY = delta;
|
||||
|
||||
// Gecko
|
||||
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
||||
deltaY = 0;
|
||||
deltaX = -1*delta;
|
||||
}
|
||||
|
||||
// Webkit
|
||||
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
|
||||
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
|
||||
|
||||
// Add event and delta to the front of the arguments
|
||||
args.unshift(event, delta, deltaX, deltaY);
|
||||
|
||||
return ($.event.dispatch || $.event.handle).apply(this, args);
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
11
_rejestracja/Static/script/jQuery/jquery.mousewheel.min.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
||||
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
||||
*
|
||||
* Version: 3.0.2
|
||||
*
|
||||
* Requires: 1.2.2+
|
||||
*/
|
||||
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
|
||||
668
_rejestracja/Static/script/jQuery/jquery.nivo.slider.js
Normal file
@@ -0,0 +1,668 @@
|
||||
/*
|
||||
* jQuery Nivo Slider v3.2
|
||||
* http://nivo.dev7studios.com
|
||||
*
|
||||
* Copyright 2012, Dev7studios
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
var NivoSlider = function(element, options){
|
||||
// Defaults are below
|
||||
var settings = $.extend({}, $.fn.nivoSlider.defaults, options);
|
||||
|
||||
// Useful variables. Play carefully.
|
||||
var vars = {
|
||||
currentSlide: 0,
|
||||
currentImage: '',
|
||||
totalSlides: 0,
|
||||
running: false,
|
||||
paused: false,
|
||||
stop: false,
|
||||
controlNavEl: false
|
||||
};
|
||||
|
||||
// Get this slider
|
||||
var slider = $(element);
|
||||
slider.data('nivo:vars', vars).addClass('nivoSlider');
|
||||
|
||||
// Find our slider children
|
||||
var kids = slider.children();
|
||||
kids.each(function() {
|
||||
var child = $(this);
|
||||
var link = '';
|
||||
if(!child.is('img')){
|
||||
if(child.is('a')){
|
||||
child.addClass('nivo-imageLink');
|
||||
link = child;
|
||||
}
|
||||
child = child.find('img:first');
|
||||
}
|
||||
// Get img width & height
|
||||
var childWidth = (childWidth === 0) ? child.attr('width') : child.width(),
|
||||
childHeight = (childHeight === 0) ? child.attr('height') : child.height();
|
||||
|
||||
if(link !== ''){
|
||||
link.css('display','none');
|
||||
}
|
||||
child.css('display','none');
|
||||
vars.totalSlides++;
|
||||
});
|
||||
|
||||
// If randomStart
|
||||
if(settings.randomStart){
|
||||
settings.startSlide = Math.floor(Math.random() * vars.totalSlides);
|
||||
}
|
||||
|
||||
// Set startSlide
|
||||
if(settings.startSlide > 0){
|
||||
if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; }
|
||||
vars.currentSlide = settings.startSlide;
|
||||
}
|
||||
|
||||
// Get initial image
|
||||
if($(kids[vars.currentSlide]).is('img')){
|
||||
vars.currentImage = $(kids[vars.currentSlide]);
|
||||
} else {
|
||||
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
||||
}
|
||||
|
||||
// Show initial link
|
||||
if($(kids[vars.currentSlide]).is('a')){
|
||||
$(kids[vars.currentSlide]).css('display','block');
|
||||
}
|
||||
|
||||
// Set first background
|
||||
var sliderImg = $('<img/>').addClass('nivo-main-image');
|
||||
sliderImg.attr('src', vars.currentImage.attr('src')).show();
|
||||
slider.append(sliderImg);
|
||||
|
||||
// Detect Window Resize
|
||||
$(window).resize(function() {
|
||||
slider.children('img').width(slider.width());
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
sliderImg.stop().height('auto');
|
||||
$('.nivo-slice').remove();
|
||||
$('.nivo-box').remove();
|
||||
});
|
||||
|
||||
//Create caption
|
||||
slider.append($('<div class="nivo-caption"></div>'));
|
||||
|
||||
// Process caption function
|
||||
var processCaption = function(settings){
|
||||
var nivoCaption = $('.nivo-caption', slider);
|
||||
if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
|
||||
var title = vars.currentImage.attr('title');
|
||||
if(title.substr(0,1) == '#') title = $(title).html();
|
||||
|
||||
if(nivoCaption.css('display') == 'block'){
|
||||
setTimeout(function(){
|
||||
nivoCaption.html(title);
|
||||
}, settings.animSpeed);
|
||||
} else {
|
||||
nivoCaption.html(title);
|
||||
nivoCaption.stop().fadeIn(settings.animSpeed);
|
||||
}
|
||||
} else {
|
||||
nivoCaption.stop().fadeOut(settings.animSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
//Process initial caption
|
||||
processCaption(settings);
|
||||
|
||||
// In the words of Super Mario "let's a go!"
|
||||
var timer = 0;
|
||||
if(!settings.manualAdvance && kids.length > 1){
|
||||
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
||||
}
|
||||
|
||||
// Add Direction nav
|
||||
if(settings.directionNav){
|
||||
slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>');
|
||||
|
||||
$(slider).on('click', 'a.nivo-prevNav', function(){
|
||||
if(vars.running) { return false; }
|
||||
clearInterval(timer);
|
||||
timer = '';
|
||||
vars.currentSlide -= 2;
|
||||
nivoRun(slider, kids, settings, 'prev');
|
||||
});
|
||||
|
||||
$(slider).on('click', 'a.nivo-nextNav', function(){
|
||||
if(vars.running) { return false; }
|
||||
clearInterval(timer);
|
||||
timer = '';
|
||||
nivoRun(slider, kids, settings, 'next');
|
||||
});
|
||||
}
|
||||
|
||||
// Add Control nav
|
||||
if(settings.controlNav){
|
||||
vars.controlNavEl = $('<div class="nivo-controlNav"></div>');
|
||||
slider.after(vars.controlNavEl);
|
||||
for(var i = 0; i < kids.length; i++){
|
||||
if(settings.controlNavThumbs){
|
||||
vars.controlNavEl.addClass('nivo-thumbs-enabled');
|
||||
var child = kids.eq(i);
|
||||
if(!child.is('img')){
|
||||
child = child.find('img:first');
|
||||
}
|
||||
if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>');
|
||||
} else {
|
||||
vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>');
|
||||
}
|
||||
}
|
||||
|
||||
//Set initial active link
|
||||
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
||||
|
||||
$('a', vars.controlNavEl).bind('click', function(){
|
||||
if(vars.running) return false;
|
||||
if($(this).hasClass('active')) return false;
|
||||
clearInterval(timer);
|
||||
timer = '';
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
vars.currentSlide = $(this).attr('rel') - 1;
|
||||
nivoRun(slider, kids, settings, 'control');
|
||||
});
|
||||
}
|
||||
|
||||
//For pauseOnHover setting
|
||||
if(settings.pauseOnHover){
|
||||
slider.hover(function(){
|
||||
vars.paused = true;
|
||||
clearInterval(timer);
|
||||
timer = '';
|
||||
}, function(){
|
||||
vars.paused = false;
|
||||
// Restart the timer
|
||||
if(timer === '' && !settings.manualAdvance){
|
||||
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Event when Animation finishes
|
||||
slider.bind('nivo:animFinished', function(){
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
vars.running = false;
|
||||
// Hide child links
|
||||
$(kids).each(function(){
|
||||
if($(this).is('a')){
|
||||
$(this).css('display','none');
|
||||
}
|
||||
});
|
||||
// Show current link
|
||||
if($(kids[vars.currentSlide]).is('a')){
|
||||
$(kids[vars.currentSlide]).css('display','block');
|
||||
}
|
||||
// Restart the timer
|
||||
if(timer === '' && !vars.paused && !settings.manualAdvance){
|
||||
timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
|
||||
}
|
||||
// Trigger the afterChange callback
|
||||
settings.afterChange.call(this);
|
||||
});
|
||||
|
||||
// Add slices for slice animations
|
||||
var createSlices = function(slider, settings, vars) {
|
||||
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
||||
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
||||
var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height();
|
||||
|
||||
for(var i = 0; i < settings.slices; i++){
|
||||
var sliceWidth = Math.round(slider.width()/settings.slices);
|
||||
|
||||
if(i === settings.slices-1){
|
||||
slider.append(
|
||||
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
||||
left:(sliceWidth*i)+'px',
|
||||
width:(slider.width()-(sliceWidth*i))+'px',
|
||||
height:sliceHeight+'px',
|
||||
opacity:'0',
|
||||
overflow:'hidden'
|
||||
})
|
||||
);
|
||||
} else {
|
||||
slider.append(
|
||||
$('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
|
||||
left:(sliceWidth*i)+'px',
|
||||
width:sliceWidth+'px',
|
||||
height:sliceHeight+'px',
|
||||
opacity:'0',
|
||||
overflow:'hidden'
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$('.nivo-slice', slider).height(sliceHeight);
|
||||
sliderImg.stop().animate({
|
||||
height: $(vars.currentImage).height()
|
||||
}, settings.animSpeed);
|
||||
};
|
||||
|
||||
// Add boxes for box animations
|
||||
var createBoxes = function(slider, settings, vars){
|
||||
if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
|
||||
$('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
|
||||
var boxWidth = Math.round(slider.width()/settings.boxCols),
|
||||
boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows);
|
||||
|
||||
|
||||
for(var rows = 0; rows < settings.boxRows; rows++){
|
||||
for(var cols = 0; cols < settings.boxCols; cols++){
|
||||
if(cols === settings.boxCols-1){
|
||||
slider.append(
|
||||
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
||||
opacity:0,
|
||||
left:(boxWidth*cols)+'px',
|
||||
top:(boxHeight*rows)+'px',
|
||||
width:(slider.width()-(boxWidth*cols))+'px'
|
||||
|
||||
})
|
||||
);
|
||||
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
||||
} else {
|
||||
slider.append(
|
||||
$('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
|
||||
opacity:0,
|
||||
left:(boxWidth*cols)+'px',
|
||||
top:(boxHeight*rows)+'px',
|
||||
width:boxWidth+'px'
|
||||
})
|
||||
);
|
||||
$('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sliderImg.stop().animate({
|
||||
height: $(vars.currentImage).height()
|
||||
}, settings.animSpeed);
|
||||
};
|
||||
|
||||
// Private run method
|
||||
var nivoRun = function(slider, kids, settings, nudge){
|
||||
// Get our vars
|
||||
var vars = slider.data('nivo:vars');
|
||||
|
||||
// Trigger the lastSlide callback
|
||||
if(vars && (vars.currentSlide === vars.totalSlides - 1)){
|
||||
settings.lastSlide.call(this);
|
||||
}
|
||||
|
||||
// Stop
|
||||
if((!vars || vars.stop) && !nudge) { return false; }
|
||||
|
||||
// Trigger the beforeChange callback
|
||||
settings.beforeChange.call(this);
|
||||
|
||||
// Set current background before change
|
||||
if(!nudge){
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
} else {
|
||||
if(nudge === 'prev'){
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
}
|
||||
if(nudge === 'next'){
|
||||
sliderImg.attr('src', vars.currentImage.attr('src'));
|
||||
}
|
||||
}
|
||||
|
||||
vars.currentSlide++;
|
||||
// Trigger the slideshowEnd callback
|
||||
if(vars.currentSlide === vars.totalSlides){
|
||||
vars.currentSlide = 0;
|
||||
settings.slideshowEnd.call(this);
|
||||
}
|
||||
if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); }
|
||||
// Set vars.currentImage
|
||||
if($(kids[vars.currentSlide]).is('img')){
|
||||
vars.currentImage = $(kids[vars.currentSlide]);
|
||||
} else {
|
||||
vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
|
||||
}
|
||||
|
||||
// Set active links
|
||||
if(settings.controlNav){
|
||||
$('a', vars.controlNavEl).removeClass('active');
|
||||
$('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
|
||||
}
|
||||
|
||||
// Process caption
|
||||
processCaption(settings);
|
||||
|
||||
// Remove any slices from last transition
|
||||
$('.nivo-slice', slider).remove();
|
||||
|
||||
// Remove any boxes from last transition
|
||||
$('.nivo-box', slider).remove();
|
||||
|
||||
var currentEffect = settings.effect,
|
||||
anims = '';
|
||||
|
||||
// Generate random effect
|
||||
if(settings.effect === 'random'){
|
||||
anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade',
|
||||
'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse');
|
||||
currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))];
|
||||
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
||||
}
|
||||
|
||||
// Run random effect from specified set (eg: effect:'fold,fade')
|
||||
if(settings.effect.indexOf(',') !== -1){
|
||||
anims = settings.effect.split(',');
|
||||
currentEffect = anims[Math.floor(Math.random()*(anims.length))];
|
||||
if(currentEffect === undefined) { currentEffect = 'fade'; }
|
||||
}
|
||||
|
||||
// Custom transition as defined by "data-transition" attribute
|
||||
if(vars.currentImage.attr('data-transition')){
|
||||
currentEffect = vars.currentImage.attr('data-transition');
|
||||
}
|
||||
|
||||
// Run effects
|
||||
vars.running = true;
|
||||
var timeBuff = 0,
|
||||
i = 0,
|
||||
slices = '',
|
||||
firstSlice = '',
|
||||
totalBoxes = '',
|
||||
boxes = '';
|
||||
|
||||
if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){
|
||||
createSlices(slider, settings, vars);
|
||||
timeBuff = 0;
|
||||
i = 0;
|
||||
slices = $('.nivo-slice', slider);
|
||||
if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
||||
|
||||
slices.each(function(){
|
||||
var slice = $(this);
|
||||
slice.css({ 'top': '0px' });
|
||||
if(i === settings.slices-1){
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + timeBuff));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
||||
}, (100 + timeBuff));
|
||||
}
|
||||
timeBuff += 50;
|
||||
i++;
|
||||
});
|
||||
} else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){
|
||||
createSlices(slider, settings, vars);
|
||||
timeBuff = 0;
|
||||
i = 0;
|
||||
slices = $('.nivo-slice', slider);
|
||||
if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
||||
|
||||
slices.each(function(){
|
||||
var slice = $(this);
|
||||
slice.css({ 'bottom': '0px' });
|
||||
if(i === settings.slices-1){
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + timeBuff));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
||||
}, (100 + timeBuff));
|
||||
}
|
||||
timeBuff += 50;
|
||||
i++;
|
||||
});
|
||||
} else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){
|
||||
createSlices(slider, settings, vars);
|
||||
timeBuff = 0;
|
||||
i = 0;
|
||||
var v = 0;
|
||||
slices = $('.nivo-slice', slider);
|
||||
if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
|
||||
|
||||
slices.each(function(){
|
||||
var slice = $(this);
|
||||
if(i === 0){
|
||||
slice.css('top','0px');
|
||||
i++;
|
||||
} else {
|
||||
slice.css('bottom','0px');
|
||||
i = 0;
|
||||
}
|
||||
|
||||
if(v === settings.slices-1){
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + timeBuff));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
slice.animate({opacity:'1.0' }, settings.animSpeed);
|
||||
}, (100 + timeBuff));
|
||||
}
|
||||
timeBuff += 50;
|
||||
v++;
|
||||
});
|
||||
} else if(currentEffect === 'fold'){
|
||||
createSlices(slider, settings, vars);
|
||||
timeBuff = 0;
|
||||
i = 0;
|
||||
|
||||
$('.nivo-slice', slider).each(function(){
|
||||
var slice = $(this);
|
||||
var origWidth = slice.width();
|
||||
slice.css({ top:'0px', width:'0px' });
|
||||
if(i === settings.slices-1){
|
||||
setTimeout(function(){
|
||||
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + timeBuff));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed);
|
||||
}, (100 + timeBuff));
|
||||
}
|
||||
timeBuff += 50;
|
||||
i++;
|
||||
});
|
||||
} else if(currentEffect === 'fade'){
|
||||
createSlices(slider, settings, vars);
|
||||
|
||||
firstSlice = $('.nivo-slice:first', slider);
|
||||
firstSlice.css({
|
||||
'width': slider.width() + 'px'
|
||||
});
|
||||
|
||||
firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
//makl zmiany tła
|
||||
$( "#sliderBox" ).animate({
|
||||
backgroundColor: $('#slider').eq(state.nextindex).attr('id')
|
||||
//color: "#fff",
|
||||
//width: 1300
|
||||
}, 3000 );
|
||||
} else if(currentEffect === 'slideInRight'){
|
||||
createSlices(slider, settings, vars);
|
||||
|
||||
firstSlice = $('.nivo-slice:first', slider);
|
||||
firstSlice.css({
|
||||
'width': '0px',
|
||||
'opacity': '1'
|
||||
});
|
||||
|
||||
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
} else if(currentEffect === 'slideInLeft'){
|
||||
createSlices(slider, settings, vars);
|
||||
|
||||
firstSlice = $('.nivo-slice:first', slider);
|
||||
firstSlice.css({
|
||||
'width': '0px',
|
||||
'opacity': '1',
|
||||
'left': '',
|
||||
'right': '0px'
|
||||
});
|
||||
|
||||
firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){
|
||||
// Reset positioning
|
||||
firstSlice.css({
|
||||
'left': '0px',
|
||||
'right': ''
|
||||
});
|
||||
slider.trigger('nivo:animFinished');
|
||||
});
|
||||
} else if(currentEffect === 'boxRandom'){
|
||||
createBoxes(slider, settings, vars);
|
||||
|
||||
totalBoxes = settings.boxCols * settings.boxRows;
|
||||
i = 0;
|
||||
timeBuff = 0;
|
||||
|
||||
boxes = shuffle($('.nivo-box', slider));
|
||||
boxes.each(function(){
|
||||
var box = $(this);
|
||||
if(i === totalBoxes-1){
|
||||
setTimeout(function(){
|
||||
box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + timeBuff));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
box.animate({ opacity:'1' }, settings.animSpeed);
|
||||
}, (100 + timeBuff));
|
||||
}
|
||||
timeBuff += 20;
|
||||
i++;
|
||||
});
|
||||
} else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
||||
createBoxes(slider, settings, vars);
|
||||
|
||||
totalBoxes = settings.boxCols * settings.boxRows;
|
||||
i = 0;
|
||||
timeBuff = 0;
|
||||
|
||||
// Split boxes into 2D array
|
||||
var rowIndex = 0;
|
||||
var colIndex = 0;
|
||||
var box2Darr = [];
|
||||
box2Darr[rowIndex] = [];
|
||||
boxes = $('.nivo-box', slider);
|
||||
if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){
|
||||
boxes = $('.nivo-box', slider)._reverse();
|
||||
}
|
||||
boxes.each(function(){
|
||||
box2Darr[rowIndex][colIndex] = $(this);
|
||||
colIndex++;
|
||||
if(colIndex === settings.boxCols){
|
||||
rowIndex++;
|
||||
colIndex = 0;
|
||||
box2Darr[rowIndex] = [];
|
||||
}
|
||||
});
|
||||
|
||||
// Run animation
|
||||
for(var cols = 0; cols < (settings.boxCols * 2); cols++){
|
||||
var prevCol = cols;
|
||||
for(var rows = 0; rows < settings.boxRows; rows++){
|
||||
if(prevCol >= 0 && prevCol < settings.boxCols){
|
||||
/* Due to some weird JS bug with loop vars
|
||||
being used in setTimeout, this is wrapped
|
||||
with an anonymous function call */
|
||||
(function(row, col, time, i, totalBoxes) {
|
||||
var box = $(box2Darr[row][col]);
|
||||
var w = box.width();
|
||||
var h = box.height();
|
||||
if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
|
||||
box.width(0).height(0);
|
||||
}
|
||||
if(i === totalBoxes-1){
|
||||
setTimeout(function(){
|
||||
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); });
|
||||
}, (100 + time));
|
||||
} else {
|
||||
setTimeout(function(){
|
||||
box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3);
|
||||
}, (100 + time));
|
||||
}
|
||||
})(rows, prevCol, timeBuff, i, totalBoxes);
|
||||
i++;
|
||||
}
|
||||
prevCol--;
|
||||
}
|
||||
timeBuff += 100;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Shuffle an array
|
||||
var shuffle = function(arr){
|
||||
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x);
|
||||
return arr;
|
||||
};
|
||||
|
||||
// For debugging
|
||||
var trace = function(msg){
|
||||
if(this.console && typeof console.log !== 'undefined') { console.log(msg); }
|
||||
};
|
||||
|
||||
// Start / Stop
|
||||
this.stop = function(){
|
||||
if(!$(element).data('nivo:vars').stop){
|
||||
$(element).data('nivo:vars').stop = true;
|
||||
trace('Stop Slider');
|
||||
}
|
||||
};
|
||||
|
||||
this.start = function(){
|
||||
if($(element).data('nivo:vars').stop){
|
||||
$(element).data('nivo:vars').stop = false;
|
||||
trace('Start Slider');
|
||||
}
|
||||
};
|
||||
|
||||
// Trigger the afterLoad callback
|
||||
settings.afterLoad.call(this);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
$.fn.nivoSlider = function(options) {
|
||||
return this.each(function(key, value){
|
||||
var element = $(this);
|
||||
// Return early if this element already has a plugin instance
|
||||
if (element.data('nivoslider')) { return element.data('nivoslider'); }
|
||||
// Pass options to plugin constructor
|
||||
var nivoslider = new NivoSlider(this, options);
|
||||
// Store plugin object in this element's data
|
||||
element.data('nivoslider', nivoslider);
|
||||
});
|
||||
};
|
||||
|
||||
//Default settings
|
||||
$.fn.nivoSlider.defaults = {
|
||||
effect: 'random',
|
||||
slices: 15,
|
||||
boxCols: 8,
|
||||
boxRows: 4,
|
||||
animSpeed: 500,
|
||||
pauseTime: 3000,
|
||||
startSlide: 0,
|
||||
directionNav: true,
|
||||
controlNav: true,
|
||||
controlNavThumbs: false,
|
||||
pauseOnHover: true,
|
||||
manualAdvance: false,
|
||||
prevText: 'Prev',
|
||||
nextText: 'Next',
|
||||
randomStart: false,
|
||||
beforeChange: function(){},
|
||||
afterChange: function(){},
|
||||
slideshowEnd: function(){},
|
||||
lastSlide: function(){},
|
||||
afterLoad: function(){}
|
||||
};
|
||||
|
||||
$.fn._reverse = [].reverse;
|
||||
|
||||
})(jQuery);
|
||||
108
_rejestracja/Static/script/jQuery/jquery.prettyLoader.js
Normal file
@@ -0,0 +1,108 @@
|
||||
/* ------------------------------------------------------------------------
|
||||
Class: prettyLoader
|
||||
Use: A unified solution for AJAX loader
|
||||
Author: Stephane Caron (http://www.no-margin-for-errors.com)
|
||||
Version: 1.0.1
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
(function($) {
|
||||
$.prettyLoader = {version: '1.0.1'};
|
||||
|
||||
$.prettyLoader = function(settings) {
|
||||
settings = jQuery.extend({
|
||||
animation_speed: 'fast', /* fast/normal/slow/integer */
|
||||
bind_to_ajax: true, /* true/false */
|
||||
delay: false, /* false OR time in milliseconds (ms) */
|
||||
loader: '/images/prettyLoader/ajax-loader.gif', /* Path to your loader gif */
|
||||
offset_top: 13, /* integer */
|
||||
offset_left: 10 /* integer */
|
||||
}, settings);
|
||||
|
||||
scrollPos = _getScroll();
|
||||
|
||||
imgLoader = new Image();
|
||||
imgLoader.onerror = function(){
|
||||
//alert('Preloader image cannot be loaded. Make sure the path is correct in the settings and that the image is reachable.');
|
||||
|
||||
};
|
||||
imgLoader.src = settings.loader;
|
||||
|
||||
if(settings.bind_to_ajax)
|
||||
jQuery(document).ajaxStart(function(){ $.prettyLoader.show() }).ajaxStop(function(){ $.prettyLoader.hide() });
|
||||
|
||||
$.prettyLoader.positionLoader = function(e){
|
||||
e = e ? e : window.event;
|
||||
|
||||
// Set the cursor pos only if the even is returned by the browser.
|
||||
cur_x = (e.clientX) ? e.clientX : cur_x;
|
||||
cur_y = (e.clientY) ? e.clientY : cur_y;
|
||||
|
||||
left_pos = cur_x + settings.offset_left + scrollPos['scrollLeft'];
|
||||
top_pos = cur_y + settings.offset_top + scrollPos['scrollTop'];
|
||||
|
||||
$('.prettyLoader').css({
|
||||
'top':top_pos,
|
||||
'left':left_pos
|
||||
});
|
||||
}
|
||||
|
||||
$.prettyLoader.show = function(delay){
|
||||
if($('.prettyLoader').size() > 0) return;
|
||||
|
||||
// Get the scroll position
|
||||
scrollPos = _getScroll();
|
||||
|
||||
// Build the loader container
|
||||
$('<div></div>')
|
||||
.addClass('prettyLoader')
|
||||
.addClass('prettyLoader_'+ settings.theme)
|
||||
.appendTo('body')
|
||||
.hide();
|
||||
|
||||
// No png for IE6...sadly :(
|
||||
if($.browser.msie && $.browser.version == 6)
|
||||
$('.prettyLoader').addClass('pl_ie6');
|
||||
|
||||
// Build the loader image
|
||||
$('<img />')
|
||||
.attr('src',settings.loader)
|
||||
.appendTo('.prettyLoader');
|
||||
|
||||
// Show it!
|
||||
$('.prettyLoader').fadeIn(settings.animation_speed);
|
||||
|
||||
$(document).bind('click',$.prettyLoader.positionLoader);
|
||||
$(document).bind('mousemove',$.prettyLoader.positionLoader);
|
||||
$(window).scroll(function(){ scrollPos = _getScroll(); $(document).triggerHandler('mousemove'); });
|
||||
|
||||
delay = (delay) ? delay : settings.delay;
|
||||
|
||||
if(delay){
|
||||
setTimeout(function(){ $.prettyLoader.hide() }, delay);
|
||||
}
|
||||
};
|
||||
|
||||
$.prettyLoader.hide = function(){
|
||||
$(document).unbind('click',$.prettyLoader.positionLoader);
|
||||
$(document).unbind('mousemove',$.prettyLoader.positionLoader);
|
||||
$(window).unbind('scroll');
|
||||
|
||||
$('.prettyLoader').fadeOut(settings.animation_speed,function(){
|
||||
$(this).remove();
|
||||
});
|
||||
};
|
||||
|
||||
function _getScroll(){
|
||||
if (self.pageYOffset) {
|
||||
return {scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
||||
return {scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};
|
||||
} else if (document.body) {// all other Explorers
|
||||
return {scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};
|
||||
};
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
69
_rejestracja/Static/script/jQuery/jquery.prettyPhoto.js
Normal file
@@ -0,0 +1,69 @@
|
||||
/* ------------------------------------------------------------------------
|
||||
Class: prettyPhoto
|
||||
Use: Lightbox clone for jQuery
|
||||
Author: Stephane Caron (http://www.no-margin-for-errors.com)
|
||||
Version: 3.0.3
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
(function($){$.prettyPhoto={version:'3.0.2'};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:'fast',slideshow:false,autoplay_slideshow:false,opacity:0.80,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:'/',theme:'facebook',hideflash:false,wmode:'opaque',autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> \
|
||||
<div class="ppt"> </div> \
|
||||
<div class="pp_top"> \
|
||||
<div class="pp_left"></div> \
|
||||
<div class="pp_middle"></div> \
|
||||
<div class="pp_right"></div> \
|
||||
</div> \
|
||||
<div class="pp_content_container"> \
|
||||
<div class="pp_left"> \
|
||||
<div class="pp_right"> \
|
||||
<div class="pp_content"> \
|
||||
<div class="pp_loaderIcon"></div> \
|
||||
<div class="pp_fade"> \
|
||||
<a href="#" class="pp_expand" title="Expand the image">Expand</a> \
|
||||
<div class="pp_hoverContainer"> \
|
||||
<a class="pp_next" href="#">next</a> \
|
||||
<a class="pp_previous" href="#">previous</a> \
|
||||
</div> \
|
||||
<div id="pp_full_res"></div> \
|
||||
<div class="pp_details clearfix"> \
|
||||
<p class="pp_description"></p> \
|
||||
<a class="pp_close" href="#">Close</a> \
|
||||
<div class="pp_nav"> \
|
||||
<a href="#" class="pp_arrow_previous">Previous</a> \
|
||||
<p class="currentTextHolder">0/0</p> \
|
||||
<a href="#" class="pp_arrow_next">Next</a> \
|
||||
</div> \
|
||||
</div> \
|
||||
</div> \
|
||||
</div> \
|
||||
</div> \
|
||||
</div> \
|
||||
</div> \
|
||||
<div class="pp_bottom"> \
|
||||
<div class="pp_left"></div> \
|
||||
<div class="pp_middle"></div> \
|
||||
<div class="pp_right"></div> \
|
||||
</div> \
|
||||
</div> \
|
||||
<div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> \
|
||||
<a href="#" class="pp_arrow_previous">Previous</a> \
|
||||
<ul> \
|
||||
{gallery} \
|
||||
</ul> \
|
||||
<a href="#" class="pp_arrow_next">Next</a> \
|
||||
</div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>',custom_markup:''},pp_settings);var matchedObjects=this,percentBased=false,pp_dimensions,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind('resize.prettyphoto').bind('resize.prettyphoto',function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind('keydown.prettyphoto').bind('keydown.prettyphoto',function(e){if(typeof $pp_pic_holder!='undefined'){if($pp_pic_holder.is(':visible')){switch(e.keyCode){case 37:$.prettyPhoto.changePage('previous');e.preventDefault();break;case 39:$.prettyPhoto.changePage('next');e.preventDefault();break;case 27:if(!settings.modal)
|
||||
$.prettyPhoto.close();e.preventDefault();break;};};};});}
|
||||
$.prettyPhoto.initialize=function(){settings=pp_settings;if($.browser.msie&&parseInt($.browser.version)==6)settings.theme="light_square";theRel=$(this).attr('rel');galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return $(n).attr('href');}):$.makeArray($(this).attr('href'));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).find('img').attr('alt'))?$(n).find('img').attr('alt'):"";}):$.makeArray($(this).find('img').attr('alt'));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr('rel').indexOf(theRel)!=-1)return($(n).attr('title'))?$(n).attr('title'):"";}):$.makeArray($(this).attr('title'));_buildOverlay(this);if(settings.allow_resize)
|
||||
$(window).bind('scroll.prettyphoto',function(){_center_overlay();});set_position=jQuery.inArray($(this).attr('href'),pp_images);$.prettyPhoto.open();return false;}
|
||||
$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6)settings.theme="light_square";pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=0;_buildOverlay(event.target);}
|
||||
if($.browser.msie&&$.browser.version==6)$('select').css('visibility','hidden');if(settings.hideflash)$('object,embed').css('visibility','hidden');_checkPosition($(pp_images).size());$('.pp_loaderIcon').show();if($ppt.is(':hidden'))$ppt.css('opacity',0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find('.currentTextHolder').text((set_position+1)+settings.counter_separator_label+$(pp_images).size());$pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position]));(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(' ');movie_width=(parseFloat(grab_param('width',pp_images[set_position])))?grab_param('width',pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(grab_param('height',pp_images[set_position])))?grab_param('height',pp_images[set_position]):settings.default_height.toString();if(movie_height.indexOf('%')!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);percentBased=true;}
|
||||
if(movie_width.indexOf('%')!=-1){movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}
|
||||
$pp_pic_holder.fadeIn(function(){imgPreloader="";switch(_getFileType(pp_images[set_position])){case'image':imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position<$(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image();if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-1];$pp_pic_holder.find('#pp_full_res')[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){pp_dimensions=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert('Image cannot be loaded. Make sure the path is correct and image exist.');$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case'youtube':pp_dimensions=_fitToViewport(movie_width,movie_height);movie='http://www.youtube.com/v/'+grab_param('v',pp_images[set_position]);if(settings.autoplay)movie+="&autoplay=1";toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case'vimeo':pp_dimensions=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie='http://player.vimeo.com/video/'+match[2]+'?title=0&byline=0&portrait=0';if(settings.autoplay)movie+="&autoplay=1;";vimeo_width=pp_dimensions['width']+'/embed/?moog_width='+pp_dimensions['width'];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,movie);break;case'quicktime':pp_dimensions=_fitToViewport(movie_width,movie_height);pp_dimensions['height']+=15;pp_dimensions['contentHeight']+=15;pp_dimensions['containerHeight']+=15;toInject=settings.quicktime_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case'flash':pp_dimensions=_fitToViewport(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf('flashvars')+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf('?'));toInject=settings.flash_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+'?'+flash_vars);break;case'iframe':pp_dimensions=_fitToViewport(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf('iframe')-1);toInject=settings.iframe_markup.replace(/{width}/g,pp_dimensions['width']).replace(/{height}/g,pp_dimensions['height']).replace(/{path}/g,frame_url);break;case'custom':pp_dimensions=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case'inline':myClone=$(pp_images[set_position]).clone().css({'width':settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($('body')).show();doresize=false;pp_dimensions=_fitToViewport($(myClone).width(),$(myClone).height());doresize=true;$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;};if(!imgPreloader){$pp_pic_holder.find('#pp_full_res')[0].innerHTML=toInject;_showContent();};});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=='previous'){set_position--;if(set_position<0){set_position=0;return;};}else if(direction=='next'){set_position++;if(set_position>$(pp_images).size()-1){set_position=0;}}else{set_position=direction;};if(!doresize)doresize=true;$('.pp_contract').removeClass('pp_contract').addClass('pp_expand');_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=='next'){currentGalleryPage++;if(currentGalleryPage>totalPage){currentGalleryPage=0;};}else if(direction=='previous'){currentGalleryPage--;if(currentGalleryPage<0){currentGalleryPage=totalPage;};}else{currentGalleryPage=direction;};itemsToSlide=(currentGalleryPage==totalPage)?pp_images.length-((totalPage)*itemsPerPage):itemsPerPage;$pp_pic_holder.find('.pp_gallery li').each(function(i){$(this).animate({'left':(i*itemWidth)-((itemsToSlide*itemWidth)*currentGalleryPage)});});};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=='undefined'){$pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage('next');};}
|
||||
$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;}
|
||||
$.prettyPhoto.close=function(){if($pp_overlay.is(":animated"))return;$.prettyPhoto.stopSlideshow();$pp_pic_holder.stop().find('object,embed').css('visibility','hidden');$('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6)$('select').css('visibility','visible');if(settings.hideflash)$('object,embed').css('visibility','visible');$(this).remove();$(window).unbind('scroll');settings.callback();doresize=true;pp_open=false;delete settings;});};function _showContent(){$('.pp_loaderIcon').hide();$ppt.fadeTo(settings.animation_speed,1);projectedTop=scroll_pos['scrollTop']+((windowHeight/2)-(pp_dimensions['containerHeight']/2));if(projectedTop<0)projectedTop=0;$pp_pic_holder.find('.pp_content').animate({height:pp_dimensions['contentHeight'],width:pp_dimensions['contentWidth']},settings.animation_speed);$pp_pic_holder.animate({'top':projectedTop,'left':(windowWidth/2)-(pp_dimensions['containerWidth']/2),width:pp_dimensions['containerWidth']},settings.animation_speed,function(){$pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(pp_dimensions['height']).width(pp_dimensions['width']);$pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find('.pp_hoverContainer').show();}else{$pp_pic_holder.find('.pp_hoverContainer').hide();}
|
||||
if(pp_dimensions['resized']){$('a.pp_expand,a.pp_contract').show();}else{$('a.pp_expand,a.pp_contract').hide();}
|
||||
if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open)$.prettyPhoto.startSlideshow();settings.changepicturecallback();pp_open=true;});_insert_gallery();};function _hideContent(callback){$pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility','hidden');$pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed,function(){$('.pp_loaderIcon').show();callback();});};function _checkPosition(setCount){(setCount>1)?$('.pp_nav').show():$('.pp_nav').hide();};function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;};pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;};_getDimensions(imageWidth,imageHeight);};return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth)+40,contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};};function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find('.pp_details');$pp_details.width(width);detailsHeight=parseFloat($pp_details.css('marginTop'))+parseFloat($pp_details.css('marginBottom'));$pp_details=$pp_details.clone().appendTo($('body')).css({'position':'absolute','top':-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7)detailsHeight+=8;$pp_details.remove();$pp_title=$pp_pic_holder.find('.ppt');$pp_title.width(width);titleHeight=parseFloat($pp_title.css('marginTop'))+parseFloat($pp_title.css('marginBottom'));$pp_title=$pp_title.clone().appendTo($('body')).css({'position':'absolute','top':-10000});titleHeight+=$pp_title.height();$pp_title.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+titleHeight+$pp_pic_holder.find('.pp_top').height()+$pp_pic_holder.find('.pp_bottom').height();pp_containerWidth=width;}
|
||||
function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return'youtube';}else if(itemSrc.match(/vimeo\.com/i)){return'vimeo';}else if(itemSrc.match(/\b.mov\b/i)){return'quicktime';}else if(itemSrc.match(/\b.swf\b/i)){return'flash';}else if(itemSrc.match(/\biframe=true\b/i)){return'iframe';}else if(itemSrc.match(/\bcustom=true\b/i)){return'custom';}else if(itemSrc.substr(0,1)=='#'){return'inline';}else{return'image';};};function _center_overlay(){if(doresize&&typeof $pp_pic_holder!='undefined'){scroll_pos=_get_scroll();contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos['scrollTop']-(contentHeight/2);if(projectedTop<0)projectedTop=0;$pp_pic_holder.css({'top':projectedTop,'left':(windowWidth/2)+scroll_pos['scrollLeft']-(contentwidth/2)});};};function _get_scroll(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};}else if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};}else if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft};};};function _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined")$pp_overlay.height($(document).height()).width(windowWidth);};function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook")?58:38;itemsPerPage=Math.floor((pp_dimensions['containerWidth']-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide();}else{$pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show();};galleryWidth=itemsPerPage*itemWidth+navWidth;$pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left',-(galleryWidth/2));$pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage*itemWidth).find('li.selected').removeClass('selected');goToPage=(Math.ceil((set_position+1)/itemsPerPage)<totalPage)?Math.ceil((set_position+1)/itemsPerPage):totalPage;$.prettyPhoto.changeGalleryPage(goToPage);$pp_pic_holder.find('.pp_gallery ul li:eq('+set_position+')').addClass('selected');}else{$pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave');$pp_pic_holder.find('.pp_gallery').hide();}}
|
||||
function _buildOverlay(caller){$('body').append(settings.markup);$pp_pic_holder=$('.pp_pic_holder'),$ppt=$('.ppt'),$pp_overlay=$('div.pp_overlay');if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){if(!pp_images[i].match(/\b(jpg|jpeg|png|gif)\b/gi)){classname='default';}else{classname='';}
|
||||
toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";};toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find('#pp_full_res').after(toInject);$pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function(){$.prettyPhoto.changeGalleryPage('next');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function(){$.prettyPhoto.changeGalleryPage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_content').hover(function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn();},function(){$pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut();});itemWidth=52+5;$pp_pic_holder.find('.pp_gallery ul li').each(function(i){$(this).css({'position':'absolute','left':i*itemWidth});$(this).find('a').unbind('click').click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});};if(settings.slideshow){$pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>')
|
||||
$pp_pic_holder.find('.pp_nav .pp_play').click(function(){$.prettyPhoto.startSlideshow();return false;});}
|
||||
$pp_pic_holder.attr('class','pp_pic_holder '+settings.theme);$pp_overlay.css({'opacity':0,'height':$(document).height(),'width':$(window).width()}).bind('click',function(){if(!settings.modal)$.prettyPhoto.close();});$('a.pp_close').bind('click',function(){$.prettyPhoto.close();return false;});$('a.pp_expand').bind('click',function(e){if($(this).hasClass('pp_expand')){$(this).removeClass('pp_expand').addClass('pp_contract');doresize=false;}else{$(this).removeClass('pp_contract').addClass('pp_expand');doresize=true;};_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){$.prettyPhoto.changePage('previous');$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){$.prettyPhoto.changePage('next');$.prettyPhoto.stopSlideshow();return false;});_center_overlay();};return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);
|
||||
11
_rejestracja/Static/script/jQuery/jquery.scrollTo-min.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* jQuery.ScrollTo - Easy element scrolling using jQuery.
|
||||
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* Date: 5/25/2009
|
||||
* @author Ariel Flesler
|
||||
* @version 1.4.2
|
||||
*
|
||||
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
||||
*/
|
||||
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
||||
2
_rejestracja/Static/script/jQuery/jquery.scrollex.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */
|
||||
!function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r<this.length;r++)t(this[r]).scrollex(l);return s}if(s.data("_scrollexId"))return s;var a,u,h,c,p;switch(a=i++,u=jQuery.extend({top:0,bottom:0,delay:0,mode:"default",enter:null,leave:null,initialize:null,terminate:null,scroll:null},l),u.mode){case"top":h=function(t,e,n,i,o){return t>=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n<this.length;n++)t(this[n]).unscrollex();return e}var i,l;return(i=e.data("_scrollexId"))?(l=o[i],window.clearTimeout(l.timeoutId),delete o[i],e.removeData("_scrollexId"),l.options.terminate&&l.options.terminate.apply(this),e):e}}(jQuery);
|
||||
226
_rejestracja/Static/script/jQuery/jquery.sticky.js
Normal file
@@ -0,0 +1,226 @@
|
||||
// Sticky Plugin v1.0.3 for jQuery
|
||||
// =============
|
||||
// Author: Anthony Garand
|
||||
// Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk)
|
||||
// Improvements by Leonardo C. Daronco (daronco)
|
||||
// Created: 02/14/2011
|
||||
// Date: 07/20/2015
|
||||
// Website: http://stickyjs.com/
|
||||
// Description: Makes an element on the page stick on the screen as you scroll
|
||||
// It will only set the 'top' and 'position' of your element, you
|
||||
// might need to adjust the width in some cases.
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
var slice = Array.prototype.slice; // save ref to original slice()
|
||||
var splice = Array.prototype.splice; // save ref to original slice()
|
||||
|
||||
var defaults = {
|
||||
topSpacing: 0,
|
||||
bottomSpacing: 0,
|
||||
className: 'is-sticky',
|
||||
wrapperClassName: 'sticky-wrapper',
|
||||
center: false,
|
||||
getWidthFrom: '',
|
||||
widthFromWrapper: true, // works only when .getWidthFrom is empty
|
||||
responsiveWidth: false
|
||||
},
|
||||
$window = $(window),
|
||||
$document = $(document),
|
||||
sticked = [],
|
||||
windowHeight = $window.height(),
|
||||
scroller = function() {
|
||||
var scrollTop = $window.scrollTop(),
|
||||
documentHeight = $document.height(),
|
||||
dwh = documentHeight - windowHeight,
|
||||
extra = (scrollTop > dwh) ? dwh - scrollTop : 0;
|
||||
|
||||
for (var i = 0, l = sticked.length; i < l; i++) {
|
||||
var s = sticked[i],
|
||||
elementTop = s.stickyWrapper.offset().top,
|
||||
etse = elementTop - s.topSpacing - extra;
|
||||
|
||||
//update height in case of dynamic content
|
||||
s.stickyWrapper.css('height', s.stickyElement.outerHeight());
|
||||
|
||||
if (scrollTop <= etse) {
|
||||
if (s.currentTop !== null) {
|
||||
s.stickyElement
|
||||
.css({
|
||||
'width': '',
|
||||
'position': '',
|
||||
'top': ''
|
||||
});
|
||||
s.stickyElement.parent().removeClass(s.className);
|
||||
s.stickyElement.trigger('sticky-end', [s]);
|
||||
s.currentTop = null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
var newTop = documentHeight - s.stickyElement.outerHeight()
|
||||
- s.topSpacing - s.bottomSpacing - scrollTop - extra;
|
||||
if (newTop < 0) {
|
||||
newTop = newTop + s.topSpacing;
|
||||
} else {
|
||||
newTop = s.topSpacing;
|
||||
}
|
||||
if (s.currentTop !== newTop) {
|
||||
var newWidth;
|
||||
if (s.getWidthFrom) {
|
||||
newWidth = $(s.getWidthFrom).width() || null;
|
||||
} else if (s.widthFromWrapper) {
|
||||
newWidth = s.stickyWrapper.width();
|
||||
}
|
||||
if (newWidth == null) {
|
||||
newWidth = s.stickyElement.width();
|
||||
}
|
||||
s.stickyElement
|
||||
.css('width', newWidth)
|
||||
.css('position', 'fixed')
|
||||
.css('top', newTop);
|
||||
|
||||
s.stickyElement.parent().addClass(s.className);
|
||||
|
||||
if (s.currentTop === null) {
|
||||
s.stickyElement.trigger('sticky-start', [s]);
|
||||
} else {
|
||||
// sticky is started but it have to be repositioned
|
||||
s.stickyElement.trigger('sticky-update', [s]);
|
||||
}
|
||||
|
||||
if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) {
|
||||
// just reached bottom || just started to stick but bottom is already reached
|
||||
s.stickyElement.trigger('sticky-bottom-reached', [s]);
|
||||
} else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) {
|
||||
// sticky is started && sticked at topSpacing && overflowing from top just finished
|
||||
s.stickyElement.trigger('sticky-bottom-unreached', [s]);
|
||||
}
|
||||
|
||||
s.currentTop = newTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resizer = function() {
|
||||
windowHeight = $window.height();
|
||||
|
||||
for (var i = 0, l = sticked.length; i < l; i++) {
|
||||
var s = sticked[i];
|
||||
var newWidth = null;
|
||||
if (s.getWidthFrom) {
|
||||
if (s.responsiveWidth) {
|
||||
newWidth = $(s.getWidthFrom).width();
|
||||
}
|
||||
} else if(s.widthFromWrapper) {
|
||||
newWidth = s.stickyWrapper.width();
|
||||
}
|
||||
if (newWidth != null) {
|
||||
s.stickyElement.css('width', newWidth);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods = {
|
||||
init: function(options) {
|
||||
var o = $.extend({}, defaults, options);
|
||||
return this.each(function() {
|
||||
var stickyElement = $(this);
|
||||
|
||||
var stickyId = stickyElement.attr('id');
|
||||
var stickyHeight = stickyElement.outerHeight();
|
||||
var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName;
|
||||
var wrapper = $('<div></div>')
|
||||
.attr('id', wrapperId)
|
||||
.addClass(o.wrapperClassName);
|
||||
|
||||
stickyElement.wrapAll(wrapper);
|
||||
|
||||
var stickyWrapper = stickyElement.parent();
|
||||
|
||||
if (o.center) {
|
||||
stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});
|
||||
}
|
||||
|
||||
if (stickyElement.css("float") === "right") {
|
||||
stickyElement.css({"float":"none"}).parent().css({"float":"right"});
|
||||
}
|
||||
|
||||
stickyWrapper.css('height', stickyHeight);
|
||||
|
||||
o.stickyElement = stickyElement;
|
||||
o.stickyWrapper = stickyWrapper;
|
||||
o.currentTop = null;
|
||||
|
||||
sticked.push(o);
|
||||
});
|
||||
},
|
||||
update: scroller,
|
||||
unstick: function(options) {
|
||||
return this.each(function() {
|
||||
var that = this;
|
||||
var unstickyElement = $(that);
|
||||
|
||||
var removeIdx = -1;
|
||||
var i = sticked.length;
|
||||
while (i-- > 0) {
|
||||
if (sticked[i].stickyElement.get(0) === that) {
|
||||
splice.call(sticked,i,1);
|
||||
removeIdx = i;
|
||||
}
|
||||
}
|
||||
if(removeIdx !== -1) {
|
||||
unstickyElement.unwrap();
|
||||
unstickyElement
|
||||
.css({
|
||||
'width': '',
|
||||
'position': '',
|
||||
'top': '',
|
||||
'float': ''
|
||||
})
|
||||
;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// should be more efficient than using $window.scroll(scroller) and $window.resize(resizer):
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('scroll', scroller, false);
|
||||
window.addEventListener('resize', resizer, false);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent('onscroll', scroller);
|
||||
window.attachEvent('onresize', resizer);
|
||||
}
|
||||
|
||||
$.fn.sticky = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method ) {
|
||||
return methods.init.apply( this, arguments );
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.unstick = function(method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, slice.call(arguments, 1));
|
||||
} else if (typeof method === 'object' || !method ) {
|
||||
return methods.unstick.apply( this, arguments );
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.sticky');
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
setTimeout(scroller, 0);
|
||||
});
|
||||
}));
|
||||
3
_rejestracja/Static/script/jQuery/jquery.swfobject.1-1-1.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
|
||||
// http://jquery.thewikies.com/swfobject
|
||||
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
|
||||
950
_rejestracja/Static/script/jQuery/jquery.swipebox.js
Normal file
@@ -0,0 +1,950 @@
|
||||
/*! Swipebox v1.4.1 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
|
||||
|
||||
;( function ( window, document, $, undefined ) {
|
||||
|
||||
$.swipebox = function( elem, options ) {
|
||||
|
||||
// Default options
|
||||
var ui,
|
||||
defaults = {
|
||||
useCSS : true,
|
||||
useSVG : true,
|
||||
initialIndexOnArray : 0,
|
||||
removeBarsOnMobile : true,
|
||||
hideCloseButtonOnMobile : false,
|
||||
hideBarsDelay : 3000,
|
||||
videoMaxWidth : 1140,
|
||||
vimeoColor : 'cccccc',
|
||||
beforeOpen: null,
|
||||
afterOpen: null,
|
||||
afterClose: null,
|
||||
nextSlide: null,
|
||||
prevSlide: null,
|
||||
loopAtEnd: false,
|
||||
autoplayVideos: false,
|
||||
queryStringData: {},
|
||||
toggleClassOnLoad: ''
|
||||
},
|
||||
|
||||
plugin = this,
|
||||
elements = [], // slides array [ { href:'...', title:'...' }, ...],
|
||||
$elem,
|
||||
selector = elem.selector,
|
||||
$selector = $( selector ),
|
||||
isMobile = navigator.userAgent.match( /(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i ),
|
||||
isTouch = isMobile !== null || document.createTouch !== undefined || ( 'ontouchstart' in window ) || ( 'onmsgesturechange' in window ) || navigator.msMaxTouchPoints,
|
||||
supportSVG = !! document.createElementNS && !! document.createElementNS( 'http://www.w3.org/2000/svg', 'svg').createSVGRect,
|
||||
winWidth = window.innerWidth ? window.innerWidth : $( window ).width(),
|
||||
winHeight = window.innerHeight ? window.innerHeight : $( window ).height(),
|
||||
currentX = 0,
|
||||
/* jshint multistr: true */
|
||||
html = '<div id="swipebox-overlay">\
|
||||
<div id="swipebox-container">\
|
||||
<div id="swipebox-slider"></div>\
|
||||
<div id="swipebox-top-bar">\
|
||||
<div id="swipebox-title"></div>\
|
||||
</div>\
|
||||
<div id="swipebox-bottom-bar">\
|
||||
<div id="swipebox-arrows">\
|
||||
<a id="swipebox-prev"></a>\
|
||||
<a id="swipebox-next"></a>\
|
||||
</div>\
|
||||
</div>\
|
||||
<a id="swipebox-close"></a>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
plugin.settings = {};
|
||||
|
||||
$.swipebox.close = function () {
|
||||
ui.closeSlide();
|
||||
};
|
||||
|
||||
$.swipebox.extend = function () {
|
||||
return ui;
|
||||
};
|
||||
|
||||
plugin.init = function() {
|
||||
|
||||
plugin.settings = $.extend( {}, defaults, options );
|
||||
|
||||
if ( $.isArray( elem ) ) {
|
||||
|
||||
elements = elem;
|
||||
ui.target = $( window );
|
||||
ui.init( plugin.settings.initialIndexOnArray );
|
||||
|
||||
} else {
|
||||
|
||||
$( document ).on( 'click', selector, function( event ) {
|
||||
|
||||
// console.log( isTouch );
|
||||
|
||||
if ( event.target.parentNode.className === 'slide current' ) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $.isArray( elem ) ) {
|
||||
ui.destroy();
|
||||
$elem = $( selector );
|
||||
ui.actions();
|
||||
}
|
||||
|
||||
elements = [];
|
||||
var index , relType, relVal;
|
||||
|
||||
// Allow for HTML5 compliant attribute before legacy use of rel
|
||||
if ( ! relVal ) {
|
||||
relType = 'data-rel';
|
||||
relVal = $( this ).attr( relType );
|
||||
}
|
||||
|
||||
if ( ! relVal ) {
|
||||
relType = 'rel';
|
||||
relVal = $( this ).attr( relType );
|
||||
}
|
||||
|
||||
if ( relVal && relVal !== '' && relVal !== 'nofollow' ) {
|
||||
$elem = $selector.filter( '[' + relType + '="' + relVal + '"]' );
|
||||
} else {
|
||||
$elem = $( selector );
|
||||
}
|
||||
|
||||
$elem.each( function() {
|
||||
|
||||
var title = null,
|
||||
href = null;
|
||||
|
||||
if ( $( this ).attr( 'title' ) ) {
|
||||
title = $( this ).attr( 'title' );
|
||||
}
|
||||
|
||||
|
||||
if ( $( this ).attr( 'href' ) ) {
|
||||
href = $( this ).attr( 'href' );
|
||||
}
|
||||
|
||||
elements.push( {
|
||||
href: href,
|
||||
title: title
|
||||
} );
|
||||
} );
|
||||
|
||||
index = $elem.index( $( this ) );
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
ui.target = $( event.target );
|
||||
ui.init( index );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
ui = {
|
||||
|
||||
/**
|
||||
* Initiate Swipebox
|
||||
*/
|
||||
init : function( index ) {
|
||||
if ( plugin.settings.beforeOpen ) {
|
||||
plugin.settings.beforeOpen();
|
||||
}
|
||||
this.target.trigger( 'swipebox-start' );
|
||||
$.swipebox.isOpen = true;
|
||||
this.build();
|
||||
this.openSlide( index );
|
||||
this.openMedia( index );
|
||||
this.preloadMedia( index+1 );
|
||||
this.preloadMedia( index-1 );
|
||||
if ( plugin.settings.afterOpen ) {
|
||||
plugin.settings.afterOpen();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Built HTML containers and fire main functions
|
||||
*/
|
||||
build : function () {
|
||||
var $this = this, bg;
|
||||
|
||||
$( 'body' ).append( html );
|
||||
|
||||
if ( supportSVG && plugin.settings.useSVG === true ) {
|
||||
bg = $( '#swipebox-close' ).css( 'background-image' );
|
||||
bg = bg.replace( 'png', 'svg' );
|
||||
$( '#swipebox-prev, #swipebox-next, #swipebox-close' ).css( {
|
||||
'background-image' : bg
|
||||
} );
|
||||
}
|
||||
|
||||
if ( isMobile && plugin.settings.removeBarsOnMobile ) {
|
||||
$( '#swipebox-bottom-bar, #swipebox-top-bar' ).remove();
|
||||
}
|
||||
|
||||
$.each( elements, function() {
|
||||
$( '#swipebox-slider' ).append( '<div class="slide"></div>' );
|
||||
} );
|
||||
|
||||
$this.setDim();
|
||||
$this.actions();
|
||||
|
||||
if ( isTouch ) {
|
||||
$this.gesture();
|
||||
}
|
||||
|
||||
// Devices can have both touch and keyboard input so always allow key events
|
||||
$this.keyboard();
|
||||
|
||||
$this.animBars();
|
||||
$this.resize();
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Set dimensions depending on windows width and height
|
||||
*/
|
||||
setDim : function () {
|
||||
|
||||
var width, height, sliderCss = {};
|
||||
|
||||
// Reset dimensions on mobile orientation change
|
||||
if ( 'onorientationchange' in window ) {
|
||||
|
||||
window.addEventListener( 'orientationchange', function() {
|
||||
if ( window.orientation === 0 ) {
|
||||
width = winWidth;
|
||||
height = winHeight;
|
||||
} else if ( window.orientation === 90 || window.orientation === -90 ) {
|
||||
width = winHeight;
|
||||
height = winWidth;
|
||||
}
|
||||
}, false );
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
width = window.innerWidth ? window.innerWidth : $( window ).width();
|
||||
height = window.innerHeight ? window.innerHeight : $( window ).height();
|
||||
}
|
||||
|
||||
sliderCss = {
|
||||
width : width,
|
||||
height : height
|
||||
};
|
||||
|
||||
$( '#swipebox-overlay' ).css( sliderCss );
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Reset dimensions on window resize envent
|
||||
*/
|
||||
resize : function () {
|
||||
var $this = this;
|
||||
|
||||
$( window ).resize( function() {
|
||||
$this.setDim();
|
||||
} ).resize();
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if device supports CSS transitions
|
||||
*/
|
||||
supportTransition : function () {
|
||||
|
||||
var prefixes = 'transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split( ' ' ),
|
||||
i;
|
||||
|
||||
for ( i = 0; i < prefixes.length; i++ ) {
|
||||
if ( document.createElement( 'div' ).style[ prefixes[i] ] !== undefined ) {
|
||||
return prefixes[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if CSS transitions are allowed (options + devicesupport)
|
||||
*/
|
||||
doCssTrans : function () {
|
||||
if ( plugin.settings.useCSS && this.supportTransition() ) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Touch navigation
|
||||
*/
|
||||
gesture : function () {
|
||||
|
||||
var $this = this,
|
||||
index,
|
||||
hDistance,
|
||||
vDistance,
|
||||
hDistanceLast,
|
||||
vDistanceLast,
|
||||
hDistancePercent,
|
||||
vSwipe = false,
|
||||
hSwipe = false,
|
||||
hSwipMinDistance = 10,
|
||||
vSwipMinDistance = 50,
|
||||
startCoords = {},
|
||||
endCoords = {},
|
||||
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' ),
|
||||
slider = $( '#swipebox-slider' );
|
||||
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
|
||||
$( 'body' ).bind( 'touchstart', function( event ) {
|
||||
|
||||
$( this ).addClass( 'touching' );
|
||||
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
||||
endCoords = event.originalEvent.targetTouches[0];
|
||||
startCoords.pageX = event.originalEvent.targetTouches[0].pageX;
|
||||
startCoords.pageY = event.originalEvent.targetTouches[0].pageY;
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + currentX +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
||||
} );
|
||||
|
||||
$( '.touching' ).bind( 'touchmove',function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
endCoords = event.originalEvent.targetTouches[0];
|
||||
|
||||
if ( ! hSwipe ) {
|
||||
vDistanceLast = vDistance;
|
||||
vDistance = endCoords.pageY - startCoords.pageY;
|
||||
if ( Math.abs( vDistance ) >= vSwipMinDistance || vSwipe ) {
|
||||
var opacity = 0.75 - Math.abs(vDistance) / slider.height();
|
||||
|
||||
slider.css( { 'top': vDistance + 'px' } );
|
||||
slider.css( { 'opacity': opacity } );
|
||||
|
||||
vSwipe = true;
|
||||
}
|
||||
}
|
||||
|
||||
hDistanceLast = hDistance;
|
||||
hDistance = endCoords.pageX - startCoords.pageX;
|
||||
hDistancePercent = hDistance * 100 / winWidth;
|
||||
|
||||
if ( ! hSwipe && ! vSwipe && Math.abs( hDistance ) >= hSwipMinDistance ) {
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transition' : '',
|
||||
'transition' : ''
|
||||
} );
|
||||
hSwipe = true;
|
||||
}
|
||||
|
||||
if ( hSwipe ) {
|
||||
|
||||
// swipe left
|
||||
if ( 0 < hDistance ) {
|
||||
|
||||
// first slide
|
||||
if ( 0 === index ) {
|
||||
// console.log( 'first' );
|
||||
$( '#swipebox-overlay' ).addClass( 'leftSpringTouch' );
|
||||
} else {
|
||||
// Follow gesture
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
||||
} );
|
||||
}
|
||||
|
||||
// swipe rught
|
||||
} else if ( 0 > hDistance ) {
|
||||
|
||||
// last Slide
|
||||
if ( elements.length === index +1 ) {
|
||||
// console.log( 'last' );
|
||||
$( '#swipebox-overlay' ).addClass( 'rightSpringTouch' );
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + ( currentX + hDistancePercent ) +'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + ( currentX + hDistancePercent ) + '%, 0, 0)'
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
return false;
|
||||
|
||||
} ).bind( 'touchend',function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transition' : '-webkit-transform 0.4s ease',
|
||||
'transition' : 'transform 0.4s ease'
|
||||
} );
|
||||
|
||||
vDistance = endCoords.pageY - startCoords.pageY;
|
||||
hDistance = endCoords.pageX - startCoords.pageX;
|
||||
hDistancePercent = hDistance*100/winWidth;
|
||||
|
||||
// Swipe to bottom to close
|
||||
if ( vSwipe ) {
|
||||
vSwipe = false;
|
||||
if ( Math.abs( vDistance ) >= 2 * vSwipMinDistance && Math.abs( vDistance ) > Math.abs( vDistanceLast ) ) {
|
||||
var vOffset = vDistance > 0 ? slider.height() : - slider.height();
|
||||
slider.animate( { top: vOffset + 'px', 'opacity': 0 },
|
||||
300,
|
||||
function () {
|
||||
$this.closeSlide();
|
||||
} );
|
||||
} else {
|
||||
slider.animate( { top: 0, 'opacity': 1 }, 300 );
|
||||
}
|
||||
|
||||
} else if ( hSwipe ) {
|
||||
|
||||
hSwipe = false;
|
||||
|
||||
// swipeLeft
|
||||
if( hDistance >= hSwipMinDistance && hDistance >= hDistanceLast) {
|
||||
|
||||
$this.getPrev();
|
||||
|
||||
// swipeRight
|
||||
} else if ( hDistance <= -hSwipMinDistance && hDistance <= hDistanceLast) {
|
||||
|
||||
$this.getNext();
|
||||
}
|
||||
|
||||
} else { // Top and bottom bars have been removed on touchable devices
|
||||
// tap
|
||||
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
||||
$this.showBars();
|
||||
$this.setTimeout();
|
||||
} else {
|
||||
$this.clearTimeout();
|
||||
$this.hideBars();
|
||||
}
|
||||
}
|
||||
|
||||
$( '#swipebox-slider' ).css( {
|
||||
'-webkit-transform' : 'translate3d(' + currentX + '%, 0, 0)',
|
||||
'transform' : 'translate3d(' + currentX + '%, 0, 0)'
|
||||
} );
|
||||
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpringTouch' ).removeClass( 'rightSpringTouch' );
|
||||
$( '.touching' ).off( 'touchmove' ).removeClass( 'touching' );
|
||||
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set timer to hide the action bars
|
||||
*/
|
||||
setTimeout: function () {
|
||||
if ( plugin.settings.hideBarsDelay > 0 ) {
|
||||
var $this = this;
|
||||
$this.clearTimeout();
|
||||
$this.timeout = window.setTimeout( function() {
|
||||
$this.hideBars();
|
||||
},
|
||||
|
||||
plugin.settings.hideBarsDelay
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clear timer
|
||||
*/
|
||||
clearTimeout: function () {
|
||||
window.clearTimeout( this.timeout );
|
||||
this.timeout = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Show navigation and title bars
|
||||
*/
|
||||
showBars : function () {
|
||||
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
if ( this.doCssTrans() ) {
|
||||
bars.addClass( 'visible-bars' );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).animate( { top : 0 }, 500 );
|
||||
$( '#swipebox-bottom-bar' ).animate( { bottom : 0 }, 500 );
|
||||
setTimeout( function() {
|
||||
bars.addClass( 'visible-bars' );
|
||||
}, 1000 );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide navigation and title bars
|
||||
*/
|
||||
hideBars : function () {
|
||||
var bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
if ( this.doCssTrans() ) {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).animate( { top : '-50px' }, 500 );
|
||||
$( '#swipebox-bottom-bar' ).animate( { bottom : '-50px' }, 500 );
|
||||
setTimeout( function() {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
}, 1000 );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Animate navigation and top bars
|
||||
*/
|
||||
animBars : function () {
|
||||
var $this = this,
|
||||
bars = $( '#swipebox-top-bar, #swipebox-bottom-bar' );
|
||||
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
|
||||
$( '#swipebox-slider' ).click( function() {
|
||||
if ( ! bars.hasClass( 'visible-bars' ) ) {
|
||||
$this.showBars();
|
||||
$this.setTimeout();
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#swipebox-bottom-bar' ).hover( function() {
|
||||
$this.showBars();
|
||||
bars.addClass( 'visible-bars' );
|
||||
$this.clearTimeout();
|
||||
|
||||
}, function() {
|
||||
if ( plugin.settings.hideBarsDelay > 0 ) {
|
||||
bars.removeClass( 'visible-bars' );
|
||||
$this.setTimeout();
|
||||
}
|
||||
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Keyboard navigation
|
||||
*/
|
||||
keyboard : function () {
|
||||
var $this = this;
|
||||
$( window ).bind( 'keyup', function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if ( event.keyCode === 37 ) {
|
||||
|
||||
$this.getPrev();
|
||||
|
||||
} else if ( event.keyCode === 39 ) {
|
||||
|
||||
$this.getNext();
|
||||
|
||||
} else if ( event.keyCode === 27 ) {
|
||||
|
||||
$this.closeSlide();
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Navigation events : go to next slide, go to prevous slide and close
|
||||
*/
|
||||
actions : function () {
|
||||
var $this = this,
|
||||
action = 'touchend click'; // Just detect for both event types to allow for multi-input
|
||||
|
||||
if ( elements.length < 2 ) {
|
||||
|
||||
$( '#swipebox-bottom-bar' ).hide();
|
||||
|
||||
if ( undefined === elements[ 1 ] ) {
|
||||
$( '#swipebox-top-bar' ).hide();
|
||||
}
|
||||
|
||||
} else {
|
||||
$( '#swipebox-prev' ).bind( action, function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$this.getPrev();
|
||||
$this.setTimeout();
|
||||
} );
|
||||
|
||||
$( '#swipebox-next' ).bind( action, function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$this.getNext();
|
||||
$this.setTimeout();
|
||||
} );
|
||||
}
|
||||
|
||||
$( '#swipebox-close' ).bind( action, function() {
|
||||
$this.closeSlide();
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set current slide
|
||||
*/
|
||||
setSlide : function ( index, isFirst ) {
|
||||
|
||||
isFirst = isFirst || false;
|
||||
|
||||
var slider = $( '#swipebox-slider' );
|
||||
|
||||
currentX = -index*100;
|
||||
|
||||
if ( this.doCssTrans() ) {
|
||||
slider.css( {
|
||||
'-webkit-transform' : 'translate3d(' + (-index*100)+'%, 0, 0)',
|
||||
'transform' : 'translate3d(' + (-index*100)+'%, 0, 0)'
|
||||
} );
|
||||
} else {
|
||||
slider.animate( { left : ( -index*100 )+'%' } );
|
||||
}
|
||||
|
||||
$( '#swipebox-slider .slide' ).removeClass( 'current' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).addClass( 'current' );
|
||||
this.setTitle( index );
|
||||
|
||||
if ( isFirst ) {
|
||||
slider.fadeIn();
|
||||
}
|
||||
|
||||
$( '#swipebox-prev, #swipebox-next' ).removeClass( 'disabled' );
|
||||
|
||||
if ( index === 0 ) {
|
||||
$( '#swipebox-prev' ).addClass( 'disabled' );
|
||||
} else if ( index === elements.length - 1 && plugin.settings.loopAtEnd !== true ) {
|
||||
$( '#swipebox-next' ).addClass( 'disabled' );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Open slide
|
||||
*/
|
||||
openSlide : function ( index ) {
|
||||
$( 'html' ).addClass( 'swipebox-html' );
|
||||
if ( isTouch ) {
|
||||
$( 'html' ).addClass( 'swipebox-touch' );
|
||||
|
||||
if ( plugin.settings.hideCloseButtonOnMobile ) {
|
||||
$( 'html' ).addClass( 'swipebox-no-close-button' );
|
||||
}
|
||||
} else {
|
||||
$( 'html' ).addClass( 'swipebox-no-touch' );
|
||||
}
|
||||
$( window ).trigger( 'resize' ); // fix scroll bar visibility on desktop
|
||||
this.setSlide( index, true );
|
||||
},
|
||||
|
||||
/**
|
||||
* Set a time out if the media is a video
|
||||
*/
|
||||
preloadMedia : function ( index ) {
|
||||
var $this = this,
|
||||
src = null;
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
src = elements[ index ].href;
|
||||
}
|
||||
|
||||
if ( ! $this.isVideo( src ) ) {
|
||||
setTimeout( function() {
|
||||
$this.openMedia( index );
|
||||
}, 1000);
|
||||
} else {
|
||||
$this.openMedia( index );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Open
|
||||
*/
|
||||
openMedia : function ( index ) {
|
||||
var $this = this,
|
||||
src,
|
||||
slide;
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
src = elements[ index ].href;
|
||||
}
|
||||
|
||||
if ( index < 0 || index >= elements.length ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
slide = $( '#swipebox-slider .slide' ).eq( index );
|
||||
|
||||
if ( ! $this.isVideo( src ) ) {
|
||||
slide.addClass( 'slide-loading' );
|
||||
$this.loadMedia( src, function() {
|
||||
slide.removeClass( 'slide-loading' );
|
||||
slide.html( this );
|
||||
} );
|
||||
} else {
|
||||
slide.html( $this.getVideo( src ) );
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Set link title attribute as caption
|
||||
*/
|
||||
setTitle : function ( index ) {
|
||||
var title = null;
|
||||
|
||||
$( '#swipebox-title' ).empty();
|
||||
|
||||
if ( elements[ index ] !== undefined ) {
|
||||
title = elements[ index ].title;
|
||||
}
|
||||
|
||||
if ( title ) {
|
||||
$( '#swipebox-top-bar' ).show();
|
||||
$( '#swipebox-title' ).append( title );
|
||||
} else {
|
||||
$( '#swipebox-top-bar' ).hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if the URL is a video
|
||||
*/
|
||||
isVideo : function ( src ) {
|
||||
|
||||
if ( src ) {
|
||||
if ( src.match( /(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || src.match( /vimeo\.com\/([0-9]*)/ ) || src.match( /youtu\.be\/([a-zA-Z0-9\-_]+)/ ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( src.toLowerCase().indexOf( 'swipeboxvideo=1' ) >= 0 ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse URI querystring and:
|
||||
* - overrides value provided via dictionary
|
||||
* - rebuild it again returning a string
|
||||
*/
|
||||
parseUri : function (uri, customData) {
|
||||
var a = document.createElement('a'),
|
||||
qs = {};
|
||||
|
||||
// Decode the URI
|
||||
a.href = decodeURIComponent( uri );
|
||||
|
||||
// QueryString to Object
|
||||
if ( a.search ) {
|
||||
qs = JSON.parse( '{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}' );
|
||||
}
|
||||
|
||||
// Extend with custom data
|
||||
if ( $.isPlainObject( customData ) ) {
|
||||
qs = $.extend( qs, customData, plugin.settings.queryStringData ); // The dev has always the final word
|
||||
}
|
||||
|
||||
// Return querystring as a string
|
||||
return $
|
||||
.map( qs, function (val, key) {
|
||||
if ( val && val > '' ) {
|
||||
return encodeURIComponent( key ) + '=' + encodeURIComponent( val );
|
||||
}
|
||||
})
|
||||
.join('&');
|
||||
},
|
||||
|
||||
/**
|
||||
* Get video iframe code from URL
|
||||
*/
|
||||
getVideo : function( url ) {
|
||||
var iframe = '',
|
||||
youtubeUrl = url.match( /((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/ ),
|
||||
youtubeShortUrl = url.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),
|
||||
vimeoUrl = url.match( /(?:www\.)?vimeo\.com\/([0-9]*)/ ),
|
||||
qs = '';
|
||||
if ( youtubeUrl || youtubeShortUrl) {
|
||||
if ( youtubeShortUrl ) {
|
||||
youtubeUrl = youtubeShortUrl;
|
||||
}
|
||||
qs = ui.parseUri( url, {
|
||||
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
||||
'v' : ''
|
||||
});
|
||||
iframe = '<iframe width="560" height="315" src="//' + youtubeUrl[1] + '/embed/' + youtubeUrl[2] + '?' + qs + '" frameborder="0" allowfullscreen></iframe>';
|
||||
|
||||
} else if ( vimeoUrl ) {
|
||||
qs = ui.parseUri( url, {
|
||||
'autoplay' : ( plugin.settings.autoplayVideos ? '1' : '0' ),
|
||||
'byline' : '0',
|
||||
'portrait' : '0',
|
||||
'color': plugin.settings.vimeoColor
|
||||
});
|
||||
iframe = '<iframe width="560" height="315" src="//player.vimeo.com/video/' + vimeoUrl[1] + '?' + qs + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
||||
|
||||
} else {
|
||||
iframe = '<iframe width="560" height="315" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
|
||||
}
|
||||
|
||||
return '<div class="swipebox-video-container" style="max-width:' + plugin.settings.videoMaxWidth + 'px"><div class="swipebox-video">' + iframe + '</div></div>';
|
||||
},
|
||||
|
||||
/**
|
||||
* Load image
|
||||
*/
|
||||
loadMedia : function ( src, callback ) {
|
||||
// Inline content
|
||||
if ( src.trim().indexOf('#') === 0 ) {
|
||||
callback.call(
|
||||
$('<div>', {
|
||||
'class' : 'swipebox-inline-container'
|
||||
})
|
||||
.append(
|
||||
$(src)
|
||||
.clone()
|
||||
.toggleClass( plugin.settings.toggleClassOnLoad )
|
||||
)
|
||||
);
|
||||
}
|
||||
// Everything else
|
||||
else {
|
||||
if ( ! this.isVideo( src ) ) {
|
||||
var img = $( '<img>' ).on( 'load', function() {
|
||||
callback.call( img );
|
||||
} );
|
||||
|
||||
img.attr( 'src', src );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get next slide
|
||||
*/
|
||||
getNext : function () {
|
||||
var $this = this,
|
||||
src,
|
||||
index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) );
|
||||
if ( index + 1 < elements.length ) {
|
||||
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index++;
|
||||
$this.setSlide( index );
|
||||
$this.preloadMedia( index+1 );
|
||||
if ( plugin.settings.nextSlide ) {
|
||||
plugin.settings.nextSlide();
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( plugin.settings.loopAtEnd === true ) {
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index = 0;
|
||||
$this.preloadMedia( index );
|
||||
$this.setSlide( index );
|
||||
$this.preloadMedia( index + 1 );
|
||||
if ( plugin.settings.nextSlide ) {
|
||||
plugin.settings.nextSlide();
|
||||
}
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).addClass( 'rightSpring' );
|
||||
setTimeout( function() {
|
||||
$( '#swipebox-overlay' ).removeClass( 'rightSpring' );
|
||||
}, 500 );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get previous slide
|
||||
*/
|
||||
getPrev : function () {
|
||||
var index = $( '#swipebox-slider .slide' ).index( $( '#swipebox-slider .slide.current' ) ),
|
||||
src;
|
||||
if ( index > 0 ) {
|
||||
src = $( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe').attr( 'src' );
|
||||
$( '#swipebox-slider .slide' ).eq( index ).contents().find( 'iframe' ).attr( 'src', src );
|
||||
index--;
|
||||
this.setSlide( index );
|
||||
this.preloadMedia( index-1 );
|
||||
if ( plugin.settings.prevSlide ) {
|
||||
plugin.settings.prevSlide();
|
||||
}
|
||||
} else {
|
||||
$( '#swipebox-overlay' ).addClass( 'leftSpring' );
|
||||
setTimeout( function() {
|
||||
$( '#swipebox-overlay' ).removeClass( 'leftSpring' );
|
||||
}, 500 );
|
||||
}
|
||||
},
|
||||
|
||||
nextSlide : function () {
|
||||
// Callback for next slide
|
||||
},
|
||||
|
||||
prevSlide : function () {
|
||||
// Callback for prev slide
|
||||
},
|
||||
|
||||
/**
|
||||
* Close
|
||||
*/
|
||||
closeSlide : function () {
|
||||
$( 'html' ).removeClass( 'swipebox-html' );
|
||||
$( 'html' ).removeClass( 'swipebox-touch' );
|
||||
$( window ).trigger( 'resize' );
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroy the whole thing
|
||||
*/
|
||||
destroy : function () {
|
||||
$( window ).unbind( 'keyup' );
|
||||
$( 'body' ).unbind( 'touchstart' );
|
||||
$( 'body' ).unbind( 'touchmove' );
|
||||
$( 'body' ).unbind( 'touchend' );
|
||||
$( '#swipebox-slider' ).unbind();
|
||||
$( '#swipebox-overlay' ).remove();
|
||||
|
||||
if ( ! $.isArray( elem ) ) {
|
||||
elem.removeData( '_swipebox' );
|
||||
}
|
||||
|
||||
if ( this.target ) {
|
||||
this.target.trigger( 'swipebox-destroy' );
|
||||
}
|
||||
|
||||
$.swipebox.isOpen = false;
|
||||
|
||||
if ( plugin.settings.afterClose ) {
|
||||
plugin.settings.afterClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
plugin.init();
|
||||
};
|
||||
|
||||
$.fn.swipebox = function( options ) {
|
||||
|
||||
if ( ! $.data( this, '_swipebox' ) ) {
|
||||
var swipebox = new $.swipebox( this, options );
|
||||
this.data( '_swipebox', swipebox );
|
||||
}
|
||||
return this.data( '_swipebox' );
|
||||
|
||||
};
|
||||
|
||||
}( window, document, jQuery ) );
|
||||
75
_rejestracja/Static/script/jQuery/jquery.timer.js
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
*
|
||||
* jQuery Timer plugin v0.1
|
||||
* Matt Schmidt [http://www.mattptr.net]
|
||||
*
|
||||
* Licensed under the BSD License:
|
||||
* http://mattptr.net/license/license.txt
|
||||
*
|
||||
*/
|
||||
|
||||
jQuery.timer = function (interval, callback)
|
||||
{
|
||||
/**
|
||||
*
|
||||
* timer() provides a cleaner way to handle intervals
|
||||
*
|
||||
* @usage
|
||||
* $.timer(interval, callback);
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* $.timer(1000, function (timer) {
|
||||
* alert("hello");
|
||||
* timer.stop();
|
||||
* });
|
||||
* @desc Show an alert box after 1 second and stop
|
||||
*
|
||||
* @example
|
||||
* var second = false;
|
||||
* $.timer(1000, function (timer) {
|
||||
* if (!second) {
|
||||
* alert('First time!');
|
||||
* second = true;
|
||||
* timer.reset(3000);
|
||||
* }
|
||||
* else {
|
||||
* alert('Second time');
|
||||
* timer.stop();
|
||||
* }
|
||||
* });
|
||||
* @desc Show an alert box after 1 second and show another after 3 seconds
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
var interval = interval || 100;
|
||||
|
||||
if (!callback)
|
||||
return false;
|
||||
|
||||
_timer = function (interval, callback) {
|
||||
this.stop = function () {
|
||||
clearInterval(self.id);
|
||||
};
|
||||
|
||||
this.internalCallback = function () {
|
||||
callback(self);
|
||||
};
|
||||
|
||||
this.reset = function (val) {
|
||||
if (self.id)
|
||||
clearInterval(self.id);
|
||||
|
||||
var val = val || 100;
|
||||
this.id = setInterval(this.internalCallback, val);
|
||||
};
|
||||
|
||||
this.interval = interval;
|
||||
this.id = setInterval(this.internalCallback, this.interval);
|
||||
|
||||
var self = this;
|
||||
};
|
||||
|
||||
return new _timer(interval, callback);
|
||||
};
|
||||
46
_rejestracja/Static/script/jQuery/jquery.tooltip.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Image preview script
|
||||
* powered by jQuery (http://www.jquery.com)
|
||||
*
|
||||
* written by Alen Grakalic (http://cssglobe.com)
|
||||
*
|
||||
* for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
|
||||
*
|
||||
*/
|
||||
|
||||
this.imagePreview = function(){
|
||||
/* CONFIG */
|
||||
|
||||
xOffset = 10;
|
||||
yOffset = 30;
|
||||
|
||||
// these 2 variable determine popup's distance from the cursor
|
||||
// you might want to adjust to get the right result
|
||||
|
||||
/* END CONFIG */
|
||||
$("a.preview").hover(function(e){
|
||||
this.t = this.title;
|
||||
this.title = "";
|
||||
var c = (this.t != "") ? "<br/>" + this.t : "";
|
||||
$("body").append("<p id='preview'><img src='"+ this.href +"' alt='Image preview' />"+ c +"</p>");
|
||||
$("#preview")
|
||||
.css("top",(e.pageY - xOffset) + "px")
|
||||
.css("left",(e.pageX + yOffset) + "px")
|
||||
.fadeIn("fast");
|
||||
},
|
||||
function(){
|
||||
this.title = this.t;
|
||||
$("#preview").remove();
|
||||
});
|
||||
$("a.preview").mousemove(function(e){
|
||||
$("#preview")
|
||||
.css("top",(e.pageY - xOffset) + "px")
|
||||
.css("left",(e.pageX + yOffset) + "px");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// starting the script on page load
|
||||
$(document).ready(function(){
|
||||
imagePreview();
|
||||
});
|
||||
216
_rejestracja/Static/script/jQuery/jquery.ui.core.js
vendored
Normal file
@@ -0,0 +1,216 @@
|
||||
/*!
|
||||
* jQuery UI 1.8.2
|
||||
*
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://docs.jquery.com/UI
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
// prevent duplicate loading
|
||||
// this is only a problem because we proxy existing functions
|
||||
// and we don't want to double proxy them
|
||||
$.ui = $.ui || {};
|
||||
if ($.ui.version) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Helper functions and ui object
|
||||
$.extend($.ui, {
|
||||
version: "1.8.2",
|
||||
|
||||
// $.ui.plugin is deprecated. Use the proxy pattern instead.
|
||||
plugin: {
|
||||
add: function(module, option, set) {
|
||||
var proto = $.ui[module].prototype;
|
||||
for(var i in set) {
|
||||
proto.plugins[i] = proto.plugins[i] || [];
|
||||
proto.plugins[i].push([option, set[i]]);
|
||||
}
|
||||
},
|
||||
call: function(instance, name, args) {
|
||||
var set = instance.plugins[name];
|
||||
if(!set || !instance.element[0].parentNode) { return; }
|
||||
|
||||
for (var i = 0; i < set.length; i++) {
|
||||
if (instance.options[set[i][0]]) {
|
||||
set[i][1].apply(instance.element, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
contains: function(a, b) {
|
||||
return document.compareDocumentPosition
|
||||
? a.compareDocumentPosition(b) & 16
|
||||
: a !== b && a.contains(b);
|
||||
},
|
||||
|
||||
hasScroll: function(el, a) {
|
||||
|
||||
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
||||
if ($(el).css('overflow') == 'hidden') { return false; }
|
||||
|
||||
var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
|
||||
has = false;
|
||||
|
||||
if (el[scroll] > 0) { return true; }
|
||||
|
||||
// TODO: determine which cases actually cause this to happen
|
||||
// if the element doesn't have the scroll set, see if it's possible to
|
||||
// set the scroll
|
||||
el[scroll] = 1;
|
||||
has = (el[scroll] > 0);
|
||||
el[scroll] = 0;
|
||||
return has;
|
||||
},
|
||||
|
||||
isOverAxis: function(x, reference, size) {
|
||||
//Determines when x coordinate is over "b" element axis
|
||||
return (x > reference) && (x < (reference + size));
|
||||
},
|
||||
|
||||
isOver: function(y, x, top, left, height, width) {
|
||||
//Determines when x, y coordinates is over "b" element
|
||||
return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
|
||||
},
|
||||
|
||||
keyCode: {
|
||||
ALT: 18,
|
||||
BACKSPACE: 8,
|
||||
CAPS_LOCK: 20,
|
||||
COMMA: 188,
|
||||
COMMAND: 91,
|
||||
COMMAND_LEFT: 91, // COMMAND
|
||||
COMMAND_RIGHT: 93,
|
||||
CONTROL: 17,
|
||||
DELETE: 46,
|
||||
DOWN: 40,
|
||||
END: 35,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
INSERT: 45,
|
||||
LEFT: 37,
|
||||
MENU: 93, // COMMAND_RIGHT
|
||||
NUMPAD_ADD: 107,
|
||||
NUMPAD_DECIMAL: 110,
|
||||
NUMPAD_DIVIDE: 111,
|
||||
NUMPAD_ENTER: 108,
|
||||
NUMPAD_MULTIPLY: 106,
|
||||
NUMPAD_SUBTRACT: 109,
|
||||
PAGE_DOWN: 34,
|
||||
PAGE_UP: 33,
|
||||
PERIOD: 190,
|
||||
RIGHT: 39,
|
||||
SHIFT: 16,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38,
|
||||
WINDOWS: 91 // COMMAND
|
||||
}
|
||||
});
|
||||
|
||||
//jQuery plugins
|
||||
$.fn.extend({
|
||||
_focus: $.fn.focus,
|
||||
focus: function(delay, fn) {
|
||||
return typeof delay === 'number'
|
||||
? this.each(function() {
|
||||
var elem = this;
|
||||
setTimeout(function() {
|
||||
$(elem).focus();
|
||||
(fn && fn.call(elem));
|
||||
}, delay);
|
||||
})
|
||||
: this._focus.apply(this, arguments);
|
||||
},
|
||||
|
||||
enableSelection: function() {
|
||||
return this
|
||||
.attr('unselectable', 'off')
|
||||
.css('MozUserSelect', '');
|
||||
},
|
||||
|
||||
disableSelection: function() {
|
||||
return this
|
||||
.attr('unselectable', 'on')
|
||||
.css('MozUserSelect', 'none');
|
||||
},
|
||||
|
||||
scrollParent: function() {
|
||||
var scrollParent;
|
||||
if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
|
||||
scrollParent = this.parents().filter(function() {
|
||||
return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
||||
}).eq(0);
|
||||
} else {
|
||||
scrollParent = this.parents().filter(function() {
|
||||
return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
|
||||
}).eq(0);
|
||||
}
|
||||
|
||||
return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
|
||||
},
|
||||
|
||||
zIndex: function(zIndex) {
|
||||
if (zIndex !== undefined) {
|
||||
return this.css('zIndex', zIndex);
|
||||
}
|
||||
|
||||
if (this.length) {
|
||||
var elem = $(this[0]), position, value;
|
||||
while (elem.length && elem[0] !== document) {
|
||||
// Ignore z-index if position is set to a value where z-index is ignored by the browser
|
||||
// This makes behavior of this function consistent across browsers
|
||||
// WebKit always returns auto if the element is positioned
|
||||
position = elem.css('position');
|
||||
if (position == 'absolute' || position == 'relative' || position == 'fixed')
|
||||
{
|
||||
// IE returns 0 when zIndex is not specified
|
||||
// other browsers return a string
|
||||
// we ignore the case of nested elements with an explicit value of 0
|
||||
// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
|
||||
value = parseInt(elem.css('zIndex'));
|
||||
if (!isNaN(value) && value != 0) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
elem = elem.parent();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//Additional selectors
|
||||
$.extend($.expr[':'], {
|
||||
data: function(elem, i, match) {
|
||||
return !!$.data(elem, match[3]);
|
||||
},
|
||||
|
||||
focusable: function(element) {
|
||||
var nodeName = element.nodeName.toLowerCase(),
|
||||
tabIndex = $.attr(element, 'tabindex');
|
||||
return (/input|select|textarea|button|object/.test(nodeName)
|
||||
? !element.disabled
|
||||
: 'a' == nodeName || 'area' == nodeName
|
||||
? element.href || !isNaN(tabIndex)
|
||||
: !isNaN(tabIndex))
|
||||
// the element and all of its ancestors must be visible
|
||||
// the browser may report that the area is hidden
|
||||
&& !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
|
||||
},
|
||||
|
||||
tabbable: function(element) {
|
||||
var tabIndex = $.attr(element, 'tabindex');
|
||||
return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
23
_rejestracja/Static/script/jQuery/jquery.ui.datepicker-pl.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/* Polish initialisation for the jQuery UI date picker plugin. */
|
||||
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
||||
jQuery(function($){
|
||||
$.datepicker.regional['pl'] = {
|
||||
closeText: 'Zamknij',
|
||||
prevText: '<Poprzedni',
|
||||
nextText: 'Następny>',
|
||||
currentText: 'Dziś',
|
||||
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
||||
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
||||
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
|
||||
'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
||||
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
||||
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
||||
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
||||
weekHeader: 'Tydz',
|
||||
dateFormat: 'dd.mm.yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''};
|
||||
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
||||
});
|
||||
1730
_rejestracja/Static/script/jQuery/jquery.ui.datepicker.js
vendored
Normal file
233
_rejestracja/Static/script/jQuery/jquery.ui.position.js
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
/*
|
||||
* jQuery UI Position 1.8.2
|
||||
*
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://docs.jquery.com/UI/Position
|
||||
*/
|
||||
(function( $ ) {
|
||||
|
||||
$.ui = $.ui || {};
|
||||
|
||||
var horizontalPositions = /left|center|right/,
|
||||
horizontalDefault = "center",
|
||||
verticalPositions = /top|center|bottom/,
|
||||
verticalDefault = "center",
|
||||
_position = $.fn.position,
|
||||
_offset = $.fn.offset;
|
||||
|
||||
$.fn.position = function( options ) {
|
||||
if ( !options || !options.of ) {
|
||||
return _position.apply( this, arguments );
|
||||
}
|
||||
|
||||
// make a copy, we don't want to modify arguments
|
||||
options = $.extend( {}, options );
|
||||
|
||||
var target = $( options.of ),
|
||||
collision = ( options.collision || "flip" ).split( " " ),
|
||||
offset = options.offset ? options.offset.split( " " ) : [ 0, 0 ],
|
||||
targetWidth,
|
||||
targetHeight,
|
||||
basePosition;
|
||||
|
||||
if ( options.of.nodeType === 9 ) {
|
||||
targetWidth = target.width();
|
||||
targetHeight = target.height();
|
||||
basePosition = { top: 0, left: 0 };
|
||||
} else if ( options.of.scrollTo && options.of.document ) {
|
||||
targetWidth = target.width();
|
||||
targetHeight = target.height();
|
||||
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
|
||||
} else if ( options.of.preventDefault ) {
|
||||
// force left top to allow flipping
|
||||
options.at = "left top";
|
||||
targetWidth = targetHeight = 0;
|
||||
basePosition = { top: options.of.pageY, left: options.of.pageX };
|
||||
} else {
|
||||
targetWidth = target.outerWidth();
|
||||
targetHeight = target.outerHeight();
|
||||
basePosition = target.offset();
|
||||
}
|
||||
|
||||
// force my and at to have valid horizontal and veritcal positions
|
||||
// if a value is missing or invalid, it will be converted to center
|
||||
$.each( [ "my", "at" ], function() {
|
||||
var pos = ( options[this] || "" ).split( " " );
|
||||
if ( pos.length === 1) {
|
||||
pos = horizontalPositions.test( pos[0] ) ?
|
||||
pos.concat( [verticalDefault] ) :
|
||||
verticalPositions.test( pos[0] ) ?
|
||||
[ horizontalDefault ].concat( pos ) :
|
||||
[ horizontalDefault, verticalDefault ];
|
||||
}
|
||||
pos[ 0 ] = horizontalPositions.test( pos[0] ) ? pos[ 0 ] : horizontalDefault;
|
||||
pos[ 1 ] = verticalPositions.test( pos[1] ) ? pos[ 1 ] : verticalDefault;
|
||||
options[ this ] = pos;
|
||||
});
|
||||
|
||||
// normalize collision option
|
||||
if ( collision.length === 1 ) {
|
||||
collision[ 1 ] = collision[ 0 ];
|
||||
}
|
||||
|
||||
// normalize offset option
|
||||
offset[ 0 ] = parseInt( offset[0], 10 ) || 0;
|
||||
if ( offset.length === 1 ) {
|
||||
offset[ 1 ] = offset[ 0 ];
|
||||
}
|
||||
offset[ 1 ] = parseInt( offset[1], 10 ) || 0;
|
||||
|
||||
if ( options.at[0] === "right" ) {
|
||||
basePosition.left += targetWidth;
|
||||
} else if (options.at[0] === horizontalDefault ) {
|
||||
basePosition.left += targetWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.at[1] === "bottom" ) {
|
||||
basePosition.top += targetHeight;
|
||||
} else if ( options.at[1] === verticalDefault ) {
|
||||
basePosition.top += targetHeight / 2;
|
||||
}
|
||||
|
||||
basePosition.left += offset[ 0 ];
|
||||
basePosition.top += offset[ 1 ];
|
||||
|
||||
return this.each(function() {
|
||||
var elem = $( this ),
|
||||
elemWidth = elem.outerWidth(),
|
||||
elemHeight = elem.outerHeight(),
|
||||
position = $.extend( {}, basePosition );
|
||||
|
||||
if ( options.my[0] === "right" ) {
|
||||
position.left -= elemWidth;
|
||||
} else if ( options.my[0] === horizontalDefault ) {
|
||||
position.left -= elemWidth / 2;
|
||||
}
|
||||
|
||||
if ( options.my[1] === "bottom" ) {
|
||||
position.top -= elemHeight;
|
||||
} else if ( options.my[1] === verticalDefault ) {
|
||||
position.top -= elemHeight / 2;
|
||||
}
|
||||
|
||||
// prevent fractions (see #5280)
|
||||
position.left = parseInt( position.left );
|
||||
position.top = parseInt( position.top );
|
||||
|
||||
$.each( [ "left", "top" ], function( i, dir ) {
|
||||
if ( $.ui.position[ collision[i] ] ) {
|
||||
$.ui.position[ collision[i] ][ dir ]( position, {
|
||||
targetWidth: targetWidth,
|
||||
targetHeight: targetHeight,
|
||||
elemWidth: elemWidth,
|
||||
elemHeight: elemHeight,
|
||||
offset: offset,
|
||||
my: options.my,
|
||||
at: options.at
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if ( $.fn.bgiframe ) {
|
||||
elem.bgiframe();
|
||||
}
|
||||
elem.offset( $.extend( position, { using: options.using } ) );
|
||||
});
|
||||
};
|
||||
|
||||
$.ui.position = {
|
||||
fit: {
|
||||
left: function( position, data ) {
|
||||
var win = $( window ),
|
||||
over = position.left + data.elemWidth - win.width() - win.scrollLeft();
|
||||
position.left = over > 0 ? position.left - over : Math.max( 0, position.left );
|
||||
},
|
||||
top: function( position, data ) {
|
||||
var win = $( window ),
|
||||
over = position.top + data.elemHeight - win.height() - win.scrollTop();
|
||||
position.top = over > 0 ? position.top - over : Math.max( 0, position.top );
|
||||
}
|
||||
},
|
||||
|
||||
flip: {
|
||||
left: function( position, data ) {
|
||||
if ( data.at[0] === "center" ) {
|
||||
return;
|
||||
}
|
||||
var win = $( window ),
|
||||
over = position.left + data.elemWidth - win.width() - win.scrollLeft(),
|
||||
myOffset = data.my[ 0 ] === "left" ?
|
||||
-data.elemWidth :
|
||||
data.my[ 0 ] === "right" ?
|
||||
data.elemWidth :
|
||||
0,
|
||||
offset = -2 * data.offset[ 0 ];
|
||||
position.left += position.left < 0 ?
|
||||
myOffset + data.targetWidth + offset :
|
||||
over > 0 ?
|
||||
myOffset - data.targetWidth + offset :
|
||||
0;
|
||||
},
|
||||
top: function( position, data ) {
|
||||
if ( data.at[1] === "center" ) {
|
||||
return;
|
||||
}
|
||||
var win = $( window ),
|
||||
over = position.top + data.elemHeight - win.height() - win.scrollTop(),
|
||||
myOffset = data.my[ 1 ] === "top" ?
|
||||
-data.elemHeight :
|
||||
data.my[ 1 ] === "bottom" ?
|
||||
data.elemHeight :
|
||||
0,
|
||||
atOffset = data.at[ 1 ] === "top" ?
|
||||
data.targetHeight :
|
||||
-data.targetHeight,
|
||||
offset = -2 * data.offset[ 1 ];
|
||||
position.top += position.top < 0 ?
|
||||
myOffset + data.targetHeight + offset :
|
||||
over > 0 ?
|
||||
myOffset + atOffset + offset :
|
||||
0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// offset setter from jQuery 1.4
|
||||
if ( !$.offset.setOffset ) {
|
||||
$.offset.setOffset = function( elem, options ) {
|
||||
// set position first, in-case top/left are set even on static elem
|
||||
if ( /static/.test( $.curCSS( elem, "position" ) ) ) {
|
||||
elem.style.position = "relative";
|
||||
}
|
||||
var curElem = $( elem ),
|
||||
curOffset = curElem.offset(),
|
||||
curTop = parseInt( $.curCSS( elem, "top", true ), 10 ) || 0,
|
||||
curLeft = parseInt( $.curCSS( elem, "left", true ), 10) || 0,
|
||||
props = {
|
||||
top: (options.top - curOffset.top) + curTop,
|
||||
left: (options.left - curOffset.left) + curLeft
|
||||
};
|
||||
|
||||
if ( 'using' in options ) {
|
||||
options.using.call( elem, props );
|
||||
} else {
|
||||
curElem.css( props );
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.offset = function( options ) {
|
||||
var elem = this[ 0 ];
|
||||
if ( !elem || !elem.ownerDocument ) { return null; }
|
||||
if ( options ) {
|
||||
return this.each(function() {
|
||||
$.offset.setOffset( this, options );
|
||||
});
|
||||
}
|
||||
return _offset.call( this );
|
||||
};
|
||||
}
|
||||
|
||||
}( jQuery ));
|
||||
729
_rejestracja/Static/script/jQuery/jquery.ui.tabs.js
vendored
Normal file
@@ -0,0 +1,729 @@
|
||||
/*
|
||||
* jQuery UI Tabs 1.8.2
|
||||
*
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
var tabId = 0,
|
||||
listId = 0;
|
||||
|
||||
function getNextTabId() {
|
||||
return ++tabId;
|
||||
}
|
||||
|
||||
function getNextListId() {
|
||||
return ++listId;
|
||||
}
|
||||
|
||||
$.widget("ui.tabs", {
|
||||
options: {
|
||||
add: null,
|
||||
ajaxOptions: null,
|
||||
cache: false,
|
||||
cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
|
||||
collapsible: false,
|
||||
disable: null,
|
||||
disabled: [],
|
||||
enable: null,
|
||||
event: 'click',
|
||||
fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
|
||||
idPrefix: 'ui-tabs-',
|
||||
load: null,
|
||||
panelTemplate: '<div></div>',
|
||||
remove: null,
|
||||
select: null,
|
||||
show: null,
|
||||
spinner: '<em>Loading…</em>',
|
||||
tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
|
||||
},
|
||||
_create: function() {
|
||||
this._tabify(true);
|
||||
},
|
||||
|
||||
_setOption: function(key, value) {
|
||||
if (key == 'selected') {
|
||||
if (this.options.collapsible && value == this.options.selected) {
|
||||
return;
|
||||
}
|
||||
this.select(value);
|
||||
}
|
||||
else {
|
||||
this.options[key] = value;
|
||||
this._tabify();
|
||||
}
|
||||
},
|
||||
|
||||
_tabId: function(a) {
|
||||
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
|
||||
this.options.idPrefix + getNextTabId();
|
||||
},
|
||||
|
||||
_sanitizeSelector: function(hash) {
|
||||
return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
|
||||
},
|
||||
|
||||
_cookie: function() {
|
||||
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + getNextListId());
|
||||
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
|
||||
},
|
||||
|
||||
_ui: function(tab, panel) {
|
||||
return {
|
||||
tab: tab,
|
||||
panel: panel,
|
||||
index: this.anchors.index(tab)
|
||||
};
|
||||
},
|
||||
|
||||
_cleanup: function() {
|
||||
// restore all former loading tabs labels
|
||||
this.lis.filter('.ui-state-processing').removeClass('ui-state-processing')
|
||||
.find('span:data(label.tabs)')
|
||||
.each(function() {
|
||||
var el = $(this);
|
||||
el.html(el.data('label.tabs')).removeData('label.tabs');
|
||||
});
|
||||
},
|
||||
|
||||
_tabify: function(init) {
|
||||
|
||||
this.list = this.element.find('ol,ul').eq(0);
|
||||
this.lis = $('li:has(a[href])', this.list);
|
||||
this.anchors = this.lis.map(function() { return $('a', this)[0]; });
|
||||
this.panels = $([]);
|
||||
|
||||
var self = this, o = this.options;
|
||||
|
||||
var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
|
||||
this.anchors.each(function(i, a) {
|
||||
var href = $(a).attr('href');
|
||||
|
||||
// For dynamically created HTML that contains a hash as href IE < 8 expands
|
||||
// such href to the full page url with hash and then misinterprets tab as ajax.
|
||||
// Same consideration applies for an added tab with a fragment identifier
|
||||
// since a[href=#fragment-identifier] does unexpectedly not match.
|
||||
// Thus normalize href attribute...
|
||||
var hrefBase = href.split('#')[0], baseEl;
|
||||
if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
|
||||
(baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
|
||||
href = a.hash;
|
||||
a.href = href;
|
||||
}
|
||||
|
||||
// inline tab
|
||||
if (fragmentId.test(href)) {
|
||||
self.panels = self.panels.add(self._sanitizeSelector(href));
|
||||
}
|
||||
|
||||
// remote tab
|
||||
else if (href != '#') { // prevent loading the page itself if href is just "#"
|
||||
$.data(a, 'href.tabs', href); // required for restore on destroy
|
||||
|
||||
// TODO until #3808 is fixed strip fragment identifier from url
|
||||
// (IE fails to load from such url)
|
||||
$.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
|
||||
|
||||
var id = self._tabId(a);
|
||||
a.href = '#' + id;
|
||||
var $panel = $('#' + id);
|
||||
if (!$panel.length) {
|
||||
$panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
|
||||
.insertAfter(self.panels[i - 1] || self.list);
|
||||
$panel.data('destroy.tabs', true);
|
||||
}
|
||||
self.panels = self.panels.add($panel);
|
||||
}
|
||||
|
||||
// invalid tab href
|
||||
else {
|
||||
o.disabled.push(i);
|
||||
}
|
||||
});
|
||||
|
||||
// initialization from scratch
|
||||
if (init) {
|
||||
|
||||
// attach necessary classes for styling
|
||||
this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
|
||||
this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
|
||||
this.lis.addClass('ui-state-default ui-corner-top');
|
||||
this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
|
||||
|
||||
// Selected tab
|
||||
// use "selected" option or try to retrieve:
|
||||
// 1. from fragment identifier in url
|
||||
// 2. from cookie
|
||||
// 3. from selected class attribute on <li>
|
||||
if (o.selected === undefined) {
|
||||
if (location.hash) {
|
||||
this.anchors.each(function(i, a) {
|
||||
if (a.hash == location.hash) {
|
||||
o.selected = i;
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
}
|
||||
if (typeof o.selected != 'number' && o.cookie) {
|
||||
o.selected = parseInt(self._cookie(), 10);
|
||||
}
|
||||
if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
|
||||
o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
|
||||
}
|
||||
o.selected = o.selected || (this.lis.length ? 0 : -1);
|
||||
}
|
||||
else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
|
||||
o.selected = -1;
|
||||
}
|
||||
|
||||
// sanity check - default to first tab...
|
||||
o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;
|
||||
|
||||
// Take disabling tabs via class attribute from HTML
|
||||
// into account and update option properly.
|
||||
// A selected tab cannot become disabled.
|
||||
o.disabled = $.unique(o.disabled.concat(
|
||||
$.map(this.lis.filter('.ui-state-disabled'),
|
||||
function(n, i) { return self.lis.index(n); } )
|
||||
)).sort();
|
||||
|
||||
if ($.inArray(o.selected, o.disabled) != -1) {
|
||||
o.disabled.splice($.inArray(o.selected, o.disabled), 1);
|
||||
}
|
||||
|
||||
// highlight selected tab
|
||||
this.panels.addClass('ui-tabs-hide');
|
||||
this.lis.removeClass('ui-tabs-selected ui-state-active');
|
||||
if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
|
||||
this.panels.eq(o.selected).removeClass('ui-tabs-hide');
|
||||
this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');
|
||||
|
||||
// seems to be expected behavior that the show callback is fired
|
||||
self.element.queue("tabs", function() {
|
||||
self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
|
||||
});
|
||||
|
||||
this.load(o.selected);
|
||||
}
|
||||
|
||||
// clean up to avoid memory leaks in certain versions of IE 6
|
||||
$(window).bind('unload', function() {
|
||||
self.lis.add(self.anchors).unbind('.tabs');
|
||||
self.lis = self.anchors = self.panels = null;
|
||||
});
|
||||
|
||||
}
|
||||
// update selected after add/remove
|
||||
else {
|
||||
o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
|
||||
}
|
||||
|
||||
// update collapsible
|
||||
this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');
|
||||
|
||||
// set or update cookie after init and add/remove respectively
|
||||
if (o.cookie) {
|
||||
this._cookie(o.selected, o.cookie);
|
||||
}
|
||||
|
||||
// disable tabs
|
||||
for (var i = 0, li; (li = this.lis[i]); i++) {
|
||||
$(li)[$.inArray(i, o.disabled) != -1 &&
|
||||
!$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
|
||||
}
|
||||
|
||||
// reset cache if switching from cached to not cached
|
||||
if (o.cache === false) {
|
||||
this.anchors.removeData('cache.tabs');
|
||||
}
|
||||
|
||||
// remove all handlers before, tabify may run on existing tabs after add or option change
|
||||
this.lis.add(this.anchors).unbind('.tabs');
|
||||
|
||||
if (o.event != 'mouseover') {
|
||||
var addState = function(state, el) {
|
||||
if (el.is(':not(.ui-state-disabled)')) {
|
||||
el.addClass('ui-state-' + state);
|
||||
}
|
||||
};
|
||||
var removeState = function(state, el) {
|
||||
el.removeClass('ui-state-' + state);
|
||||
};
|
||||
this.lis.bind('mouseover.tabs', function() {
|
||||
addState('hover', $(this));
|
||||
});
|
||||
this.lis.bind('mouseout.tabs', function() {
|
||||
removeState('hover', $(this));
|
||||
});
|
||||
this.anchors.bind('focus.tabs', function() {
|
||||
addState('focus', $(this).closest('li'));
|
||||
});
|
||||
this.anchors.bind('blur.tabs', function() {
|
||||
removeState('focus', $(this).closest('li'));
|
||||
});
|
||||
}
|
||||
|
||||
// set up animations
|
||||
var hideFx, showFx;
|
||||
if (o.fx) {
|
||||
if ($.isArray(o.fx)) {
|
||||
hideFx = o.fx[0];
|
||||
showFx = o.fx[1];
|
||||
}
|
||||
else {
|
||||
hideFx = showFx = o.fx;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset certain styles left over from animation
|
||||
// and prevent IE's ClearType bug...
|
||||
function resetStyle($el, fx) {
|
||||
$el.css({ display: '' });
|
||||
if (!$.support.opacity && fx.opacity) {
|
||||
$el[0].style.removeAttribute('filter');
|
||||
}
|
||||
}
|
||||
|
||||
// Show a tab...
|
||||
var showTab = showFx ?
|
||||
function(clicked, $show) {
|
||||
$(clicked).closest('li').addClass('ui-tabs-selected ui-state-active');
|
||||
$show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
|
||||
.animate(showFx, showFx.duration || 'normal', function() {
|
||||
resetStyle($show, showFx);
|
||||
self._trigger('show', null, self._ui(clicked, $show[0]));
|
||||
});
|
||||
} :
|
||||
function(clicked, $show) {
|
||||
$(clicked).closest('li').addClass('ui-tabs-selected ui-state-active');
|
||||
$show.removeClass('ui-tabs-hide');
|
||||
self._trigger('show', null, self._ui(clicked, $show[0]));
|
||||
};
|
||||
|
||||
// Hide a tab, $show is optional...
|
||||
var hideTab = hideFx ?
|
||||
function(clicked, $hide) {
|
||||
$hide.animate(hideFx, hideFx.duration || 'normal', function() {
|
||||
self.lis.removeClass('ui-tabs-selected ui-state-active');
|
||||
$hide.addClass('ui-tabs-hide');
|
||||
resetStyle($hide, hideFx);
|
||||
self.element.dequeue("tabs");
|
||||
});
|
||||
} :
|
||||
function(clicked, $hide, $show) {
|
||||
self.lis.removeClass('ui-tabs-selected ui-state-active');
|
||||
$hide.addClass('ui-tabs-hide');
|
||||
self.element.dequeue("tabs");
|
||||
};
|
||||
|
||||
// attach tab event handler, unbind to avoid duplicates from former tabifying...
|
||||
this.anchors.bind(o.event + '.tabs', function() {
|
||||
var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
|
||||
$show = $(self._sanitizeSelector(this.hash));
|
||||
|
||||
// If tab is already selected and not collapsible or tab disabled or
|
||||
// or is already loading or click callback returns false stop here.
|
||||
// Check if click handler returns false last so that it is not executed
|
||||
// for a disabled or loading tab!
|
||||
if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
|
||||
$li.hasClass('ui-state-disabled') ||
|
||||
$li.hasClass('ui-state-processing') ||
|
||||
self._trigger('select', null, self._ui(this, $show[0])) === false) {
|
||||
this.blur();
|
||||
return false;
|
||||
}
|
||||
|
||||
o.selected = self.anchors.index(this);
|
||||
|
||||
self.abort();
|
||||
|
||||
// if tab may be closed
|
||||
if (o.collapsible) {
|
||||
if ($li.hasClass('ui-tabs-selected')) {
|
||||
o.selected = -1;
|
||||
|
||||
if (o.cookie) {
|
||||
self._cookie(o.selected, o.cookie);
|
||||
}
|
||||
|
||||
self.element.queue("tabs", function() {
|
||||
hideTab(el, $hide);
|
||||
}).dequeue("tabs");
|
||||
|
||||
this.blur();
|
||||
return false;
|
||||
}
|
||||
else if (!$hide.length) {
|
||||
if (o.cookie) {
|
||||
self._cookie(o.selected, o.cookie);
|
||||
}
|
||||
|
||||
self.element.queue("tabs", function() {
|
||||
showTab(el, $show);
|
||||
});
|
||||
|
||||
self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
|
||||
|
||||
this.blur();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (o.cookie) {
|
||||
self._cookie(o.selected, o.cookie);
|
||||
}
|
||||
|
||||
// show new tab
|
||||
if ($show.length) {
|
||||
if ($hide.length) {
|
||||
self.element.queue("tabs", function() {
|
||||
hideTab(el, $hide);
|
||||
});
|
||||
}
|
||||
self.element.queue("tabs", function() {
|
||||
showTab(el, $show);
|
||||
});
|
||||
|
||||
self.load(self.anchors.index(this));
|
||||
}
|
||||
else {
|
||||
throw 'jQuery UI Tabs: Mismatching fragment identifier.';
|
||||
}
|
||||
|
||||
// Prevent IE from keeping other link focussed when using the back button
|
||||
// and remove dotted border from clicked link. This is controlled via CSS
|
||||
// in modern browsers; blur() removes focus from address bar in Firefox
|
||||
// which can become a usability and annoying problem with tabs('rotate').
|
||||
if ($.browser.msie) {
|
||||
this.blur();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// disable click in any case
|
||||
this.anchors.bind('click.tabs', function(){return false;});
|
||||
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
var o = this.options;
|
||||
|
||||
this.abort();
|
||||
|
||||
this.element.unbind('.tabs')
|
||||
.removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible')
|
||||
.removeData('tabs');
|
||||
|
||||
this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
|
||||
|
||||
this.anchors.each(function() {
|
||||
var href = $.data(this, 'href.tabs');
|
||||
if (href) {
|
||||
this.href = href;
|
||||
}
|
||||
var $this = $(this).unbind('.tabs');
|
||||
$.each(['href', 'load', 'cache'], function(i, prefix) {
|
||||
$this.removeData(prefix + '.tabs');
|
||||
});
|
||||
});
|
||||
|
||||
this.lis.unbind('.tabs').add(this.panels).each(function() {
|
||||
if ($.data(this, 'destroy.tabs')) {
|
||||
$(this).remove();
|
||||
}
|
||||
else {
|
||||
$(this).removeClass([
|
||||
'ui-state-default',
|
||||
'ui-corner-top',
|
||||
'ui-tabs-selected',
|
||||
'ui-state-active',
|
||||
'ui-state-hover',
|
||||
'ui-state-focus',
|
||||
'ui-state-disabled',
|
||||
'ui-tabs-panel',
|
||||
'ui-widget-content',
|
||||
'ui-corner-bottom',
|
||||
'ui-tabs-hide'
|
||||
].join(' '));
|
||||
}
|
||||
});
|
||||
|
||||
if (o.cookie) {
|
||||
this._cookie(null, o.cookie);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
add: function(url, label, index) {
|
||||
if (index === undefined) {
|
||||
index = this.anchors.length; // append by default
|
||||
}
|
||||
|
||||
var self = this, o = this.options,
|
||||
$li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)),
|
||||
id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]);
|
||||
|
||||
$li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true);
|
||||
|
||||
// try to find an existing element before creating a new one
|
||||
var $panel = $('#' + id);
|
||||
if (!$panel.length) {
|
||||
$panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
|
||||
}
|
||||
$panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
|
||||
|
||||
if (index >= this.lis.length) {
|
||||
$li.appendTo(this.list);
|
||||
$panel.appendTo(this.list[0].parentNode);
|
||||
}
|
||||
else {
|
||||
$li.insertBefore(this.lis[index]);
|
||||
$panel.insertBefore(this.panels[index]);
|
||||
}
|
||||
|
||||
o.disabled = $.map(o.disabled,
|
||||
function(n, i) { return n >= index ? ++n : n; });
|
||||
|
||||
this._tabify();
|
||||
|
||||
if (this.anchors.length == 1) { // after tabify
|
||||
o.selected = 0;
|
||||
$li.addClass('ui-tabs-selected ui-state-active');
|
||||
$panel.removeClass('ui-tabs-hide');
|
||||
this.element.queue("tabs", function() {
|
||||
self._trigger('show', null, self._ui(self.anchors[0], self.panels[0]));
|
||||
});
|
||||
|
||||
this.load(0);
|
||||
}
|
||||
|
||||
// callback
|
||||
this._trigger('add', null, this._ui(this.anchors[index], this.panels[index]));
|
||||
return this;
|
||||
},
|
||||
|
||||
remove: function(index) {
|
||||
var o = this.options, $li = this.lis.eq(index).remove(),
|
||||
$panel = this.panels.eq(index).remove();
|
||||
|
||||
// If selected tab was removed focus tab to the right or
|
||||
// in case the last tab was removed the tab to the left.
|
||||
if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) {
|
||||
this.select(index + (index + 1 < this.anchors.length ? 1 : -1));
|
||||
}
|
||||
|
||||
o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
|
||||
function(n, i) { return n >= index ? --n : n; });
|
||||
|
||||
this._tabify();
|
||||
|
||||
// callback
|
||||
this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0]));
|
||||
return this;
|
||||
},
|
||||
|
||||
enable: function(index) {
|
||||
var o = this.options;
|
||||
if ($.inArray(index, o.disabled) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.lis.eq(index).removeClass('ui-state-disabled');
|
||||
o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
|
||||
|
||||
// callback
|
||||
this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index]));
|
||||
return this;
|
||||
},
|
||||
|
||||
disable: function(index) {
|
||||
var self = this, o = this.options;
|
||||
if (index != o.selected) { // cannot disable already selected tab
|
||||
this.lis.eq(index).addClass('ui-state-disabled');
|
||||
|
||||
o.disabled.push(index);
|
||||
o.disabled.sort();
|
||||
|
||||
// callback
|
||||
this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index]));
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
select: function(index) {
|
||||
if (typeof index == 'string') {
|
||||
index = this.anchors.index(this.anchors.filter('[href$=' + index + ']'));
|
||||
}
|
||||
else if (index === null) { // usage of null is deprecated, TODO remove in next release
|
||||
index = -1;
|
||||
}
|
||||
if (index == -1 && this.options.collapsible) {
|
||||
index = this.options.selected;
|
||||
}
|
||||
|
||||
this.anchors.eq(index).trigger(this.options.event + '.tabs');
|
||||
return this;
|
||||
},
|
||||
|
||||
load: function(index) {
|
||||
var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs');
|
||||
|
||||
this.abort();
|
||||
|
||||
// not remote or from cache
|
||||
if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) {
|
||||
this.element.dequeue("tabs");
|
||||
return;
|
||||
}
|
||||
|
||||
// load remote from here on
|
||||
this.lis.eq(index).addClass('ui-state-processing');
|
||||
|
||||
if (o.spinner) {
|
||||
var span = $('span', a);
|
||||
span.data('label.tabs', span.html()).html(o.spinner);
|
||||
}
|
||||
|
||||
this.xhr = $.ajax($.extend({}, o.ajaxOptions, {
|
||||
url: url,
|
||||
success: function(r, s) {
|
||||
$(self._sanitizeSelector(a.hash)).html(r);
|
||||
|
||||
// take care of tab labels
|
||||
self._cleanup();
|
||||
|
||||
if (o.cache) {
|
||||
$.data(a, 'cache.tabs', true); // if loaded once do not load them again
|
||||
}
|
||||
|
||||
// callbacks
|
||||
self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
|
||||
try {
|
||||
o.ajaxOptions.success(r, s);
|
||||
}
|
||||
catch (e) {}
|
||||
},
|
||||
error: function(xhr, s, e) {
|
||||
// take care of tab labels
|
||||
self._cleanup();
|
||||
|
||||
// callbacks
|
||||
self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
|
||||
try {
|
||||
// Passing index avoid a race condition when this method is
|
||||
// called after the user has selected another tab.
|
||||
// Pass the anchor that initiated this request allows
|
||||
// loadError to manipulate the tab content panel via $(a.hash)
|
||||
o.ajaxOptions.error(xhr, s, index, a);
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
}));
|
||||
|
||||
// last, so that load event is fired before show...
|
||||
self.element.dequeue("tabs");
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
abort: function() {
|
||||
// stop possibly running animations
|
||||
this.element.queue([]);
|
||||
this.panels.stop(false, true);
|
||||
|
||||
// "tabs" queue must not contain more than two elements,
|
||||
// which are the callbacks for the latest clicked tab...
|
||||
this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2));
|
||||
|
||||
// terminate pending requests from other tabs
|
||||
if (this.xhr) {
|
||||
this.xhr.abort();
|
||||
delete this.xhr;
|
||||
}
|
||||
|
||||
// take care of tab labels
|
||||
this._cleanup();
|
||||
return this;
|
||||
},
|
||||
|
||||
url: function(index, url) {
|
||||
this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url);
|
||||
return this;
|
||||
},
|
||||
|
||||
length: function() {
|
||||
return this.anchors.length;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$.extend($.ui.tabs, {
|
||||
version: '1.8.2'
|
||||
});
|
||||
|
||||
/*
|
||||
* Tabs Extensions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Rotate
|
||||
*/
|
||||
$.extend($.ui.tabs.prototype, {
|
||||
rotation: null,
|
||||
rotate: function(ms, continuing) {
|
||||
|
||||
var self = this, o = this.options;
|
||||
|
||||
var rotate = self._rotate || (self._rotate = function(e) {
|
||||
clearTimeout(self.rotation);
|
||||
self.rotation = setTimeout(function() {
|
||||
var t = o.selected;
|
||||
self.select( ++t < self.anchors.length ? t : 0 );
|
||||
}, ms);
|
||||
|
||||
if (e) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
|
||||
var stop = self._unrotate || (self._unrotate = !continuing ?
|
||||
function(e) {
|
||||
if (e.clientX) { // in case of a true click
|
||||
self.rotate(null);
|
||||
}
|
||||
} :
|
||||
function(e) {
|
||||
t = o.selected;
|
||||
rotate();
|
||||
});
|
||||
|
||||
// start rotation
|
||||
if (ms) {
|
||||
this.element.bind('tabsshow', rotate);
|
||||
this.anchors.bind(o.event + '.tabs', stop);
|
||||
rotate();
|
||||
}
|
||||
// stop rotation
|
||||
else {
|
||||
clearTimeout(self.rotation);
|
||||
this.element.unbind('tabsshow', rotate);
|
||||
this.anchors.unbind(o.event + '.tabs', stop);
|
||||
delete this._rotate;
|
||||
delete this._unrotate;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
147
_rejestracja/Static/script/jQuery/jquery.ui.tooltip.js
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* jQuery UI Tooltip @VERSION
|
||||
*
|
||||
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tooltip
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.position.js
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
// role=application on body required for screenreaders to correctly interpret aria attributes
|
||||
if( !$(document.body).is('[role]') ){
|
||||
$(document.body).attr('role','application');
|
||||
}
|
||||
|
||||
var increments = 0;
|
||||
|
||||
$.widget("ui.tooltip", {
|
||||
options: {
|
||||
tooltipClass: "ui-widget-content",
|
||||
content: function() {
|
||||
return $(this).attr("title");
|
||||
},
|
||||
position: {
|
||||
my: "left center",
|
||||
at: "right center",
|
||||
offset: "15 0"
|
||||
}
|
||||
},
|
||||
_init: function() {
|
||||
var self = this;
|
||||
this.tooltip = $("<div></div>")
|
||||
.attr("id", "ui-tooltip-" + increments++)
|
||||
.attr("role", "tooltip")
|
||||
.attr("aria-hidden", "true")
|
||||
.addClass("ui-tooltip ui-widget ui-corner-all")
|
||||
.addClass(this.options.tooltipClass)
|
||||
.appendTo(document.body)
|
||||
.hide();
|
||||
this.tooltipContent = $("<div></div>")
|
||||
.addClass("ui-tooltip-content")
|
||||
.appendTo(this.tooltip);
|
||||
this.opacity = this.tooltip.css("opacity");
|
||||
this.element
|
||||
.bind("focus.tooltip mouseenter.tooltip", function(event) {
|
||||
self.open( event );
|
||||
})
|
||||
.bind("blur.tooltip mouseleave.tooltip", function(event) {
|
||||
self.close( event );
|
||||
});
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
this.options.disabled = false;
|
||||
},
|
||||
|
||||
disable: function() {
|
||||
this.options.disabled = true;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.tooltip.remove();
|
||||
$.Widget.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.tooltip;
|
||||
},
|
||||
|
||||
open: function(event) {
|
||||
var target = this.element;
|
||||
// already visible? possible when both focus and mouseover events occur
|
||||
if (this.current && this.current[0] == target[0])
|
||||
return;
|
||||
var self = this;
|
||||
this.current = target;
|
||||
this.currentTitle = target.attr("title");
|
||||
var content = this.options.content.call(target[0], function(response) {
|
||||
// ignore async responses that come in after the tooltip is already hidden
|
||||
if (self.current == target)
|
||||
self._show(event, target, response);
|
||||
});
|
||||
if (content) {
|
||||
self._show(event, target, content);
|
||||
}
|
||||
},
|
||||
|
||||
_show: function(event, target, content) {
|
||||
if (!content)
|
||||
return;
|
||||
|
||||
target.attr("title", "");
|
||||
|
||||
if (this.options.disabled)
|
||||
return;
|
||||
|
||||
this.tooltipContent.html(content);
|
||||
this.tooltip.css({
|
||||
top: 0,
|
||||
left: 0
|
||||
}).show().position($.extend(this.options.position, {
|
||||
of: target
|
||||
})).hide();
|
||||
|
||||
this.tooltip.attr("aria-hidden", "false");
|
||||
target.attr("aria-describedby", this.tooltip.attr("id"));
|
||||
|
||||
if (this.tooltip.is(":animated"))
|
||||
this.tooltip.stop().show().fadeTo("normal", this.opacity);
|
||||
else
|
||||
this.tooltip.is(':visible') ? this.tooltip.fadeTo("normal", this.opacity) : this.tooltip.fadeIn();
|
||||
|
||||
this._trigger( "open", event );
|
||||
},
|
||||
|
||||
close: function(event) {
|
||||
if (!this.current)
|
||||
return;
|
||||
|
||||
var current = this.current.attr("title", this.currentTitle);
|
||||
this.current = null;
|
||||
|
||||
if (this.options.disabled)
|
||||
return;
|
||||
|
||||
current.removeAttr("aria-describedby");
|
||||
this.tooltip.attr("aria-hidden", "true");
|
||||
|
||||
if (this.tooltip.is(':animated'))
|
||||
this.tooltip.stop().fadeTo("normal", 0, function() {
|
||||
$(this).hide().css("opacity", "");
|
||||
});
|
||||
else
|
||||
this.tooltip.stop().fadeOut();
|
||||
|
||||
this._trigger( "close", event );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
236
_rejestracja/Static/script/jQuery/jquery.ui.widget.js
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
/*!
|
||||
* jQuery UI Widget 1.8.2
|
||||
*
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* http://docs.jquery.com/UI/Widget
|
||||
*/
|
||||
(function( $ ) {
|
||||
|
||||
var _remove = $.fn.remove;
|
||||
|
||||
$.fn.remove = function( selector, keepData ) {
|
||||
return this.each(function() {
|
||||
if ( !keepData ) {
|
||||
if ( !selector || $.filter( selector, [ this ] ).length ) {
|
||||
$( "*", this ).add( this ).each(function() {
|
||||
$( this ).triggerHandler( "remove" );
|
||||
});
|
||||
}
|
||||
}
|
||||
return _remove.call( $(this), selector, keepData );
|
||||
});
|
||||
};
|
||||
|
||||
$.widget = function( name, base, prototype ) {
|
||||
var namespace = name.split( "." )[ 0 ],
|
||||
fullName;
|
||||
name = name.split( "." )[ 1 ];
|
||||
fullName = namespace + "-" + name;
|
||||
|
||||
if ( !prototype ) {
|
||||
prototype = base;
|
||||
base = $.Widget;
|
||||
}
|
||||
|
||||
// create selector for plugin
|
||||
$.expr[ ":" ][ fullName ] = function( elem ) {
|
||||
return !!$.data( elem, name );
|
||||
};
|
||||
|
||||
$[ namespace ] = $[ namespace ] || {};
|
||||
$[ namespace ][ name ] = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
var basePrototype = new base();
|
||||
// we need to make the options hash a property directly on the new instance
|
||||
// otherwise we'll modify the options hash on the prototype that we're
|
||||
// inheriting from
|
||||
// $.each( basePrototype, function( key, val ) {
|
||||
// if ( $.isPlainObject(val) ) {
|
||||
// basePrototype[ key ] = $.extend( {}, val );
|
||||
// }
|
||||
// });
|
||||
basePrototype.options = $.extend( {}, basePrototype.options );
|
||||
$[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
|
||||
namespace: namespace,
|
||||
widgetName: name,
|
||||
widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
|
||||
widgetBaseClass: fullName
|
||||
}, prototype );
|
||||
|
||||
$.widget.bridge( name, $[ namespace ][ name ] );
|
||||
};
|
||||
|
||||
$.widget.bridge = function( name, object ) {
|
||||
$.fn[ name ] = function( options ) {
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = Array.prototype.slice.call( arguments, 1 ),
|
||||
returnValue = this;
|
||||
|
||||
// allow multiple hashes to be passed on init
|
||||
options = !isMethodCall && args.length ?
|
||||
$.extend.apply( null, [ true, options ].concat(args) ) :
|
||||
options;
|
||||
|
||||
// prevent calls to internal methods
|
||||
if ( isMethodCall && options.substring( 0, 1 ) === "_" ) {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
if ( isMethodCall ) {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name ),
|
||||
methodValue = instance && $.isFunction( instance[options] ) ?
|
||||
instance[ options ].apply( instance, args ) :
|
||||
instance;
|
||||
if ( methodValue !== instance && methodValue !== undefined ) {
|
||||
returnValue = methodValue;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.each(function() {
|
||||
var instance = $.data( this, name );
|
||||
if ( instance ) {
|
||||
if ( options ) {
|
||||
instance.option( options );
|
||||
}
|
||||
instance._init();
|
||||
} else {
|
||||
$.data( this, name, new object( options, this ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
};
|
||||
|
||||
$.Widget = function( options, element ) {
|
||||
// allow instantiation without initializing for simple inheritance
|
||||
if ( arguments.length ) {
|
||||
this._createWidget( options, element );
|
||||
}
|
||||
};
|
||||
|
||||
$.Widget.prototype = {
|
||||
widgetName: "widget",
|
||||
widgetEventPrefix: "",
|
||||
options: {
|
||||
disabled: false
|
||||
},
|
||||
_createWidget: function( options, element ) {
|
||||
// $.widget.bridge stores the plugin instance, but we do it anyway
|
||||
// so that it's stored even before the _create function runs
|
||||
this.element = $( element ).data( this.widgetName, this );
|
||||
this.options = $.extend( true, {},
|
||||
this.options,
|
||||
$.metadata && $.metadata.get( element )[ this.widgetName ],
|
||||
options );
|
||||
|
||||
var self = this;
|
||||
this.element.bind( "remove." + this.widgetName, function() {
|
||||
self.destroy();
|
||||
});
|
||||
|
||||
this._create();
|
||||
this._init();
|
||||
},
|
||||
_create: function() {},
|
||||
_init: function() {},
|
||||
|
||||
destroy: function() {
|
||||
this.element
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeData( this.widgetName );
|
||||
this.widget()
|
||||
.unbind( "." + this.widgetName )
|
||||
.removeAttr( "aria-disabled" )
|
||||
.removeClass(
|
||||
this.widgetBaseClass + "-disabled " +
|
||||
"ui-state-disabled" );
|
||||
},
|
||||
|
||||
widget: function() {
|
||||
return this.element;
|
||||
},
|
||||
|
||||
option: function( key, value ) {
|
||||
var options = key,
|
||||
self = this;
|
||||
|
||||
if ( arguments.length === 0 ) {
|
||||
// don't return a reference to the internal hash
|
||||
return $.extend( {}, self.options );
|
||||
}
|
||||
|
||||
if (typeof key === "string" ) {
|
||||
if ( value === undefined ) {
|
||||
return this.options[ key ];
|
||||
}
|
||||
options = {};
|
||||
options[ key ] = value;
|
||||
}
|
||||
|
||||
$.each( options, function( key, value ) {
|
||||
self._setOption( key, value );
|
||||
});
|
||||
|
||||
return self;
|
||||
},
|
||||
_setOption: function( key, value ) {
|
||||
this.options[ key ] = value;
|
||||
|
||||
if ( key === "disabled" ) {
|
||||
this.widget()
|
||||
[ value ? "addClass" : "removeClass"](
|
||||
this.widgetBaseClass + "-disabled" + " " +
|
||||
"ui-state-disabled" )
|
||||
.attr( "aria-disabled", value );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
return this._setOption( "disabled", false );
|
||||
},
|
||||
disable: function() {
|
||||
return this._setOption( "disabled", true );
|
||||
},
|
||||
|
||||
_trigger: function( type, event, data ) {
|
||||
var callback = this.options[ type ];
|
||||
|
||||
event = $.Event( event );
|
||||
event.type = ( type === this.widgetEventPrefix ?
|
||||
type :
|
||||
this.widgetEventPrefix + type ).toLowerCase();
|
||||
data = data || {};
|
||||
|
||||
// copy original event properties over to the new event
|
||||
// this would happen if we could call $.event.fix instead of $.Event
|
||||
// but we don't have a way to force an event to be fixed multiple times
|
||||
if ( event.originalEvent ) {
|
||||
for ( var i = $.event.props.length, prop; i; ) {
|
||||
prop = $.event.props[ --i ];
|
||||
event[ prop ] = event.originalEvent[ prop ];
|
||||
}
|
||||
}
|
||||
|
||||
this.element.trigger( event, data );
|
||||
|
||||
return !( $.isFunction(callback) &&
|
||||
callback.call( this.element[0], event, data ) === false ||
|
||||
event.isDefaultPrevented() );
|
||||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
26
_rejestracja/Static/script/jQuery/jquery.uploadify.v2.1.4.min.js
vendored
Normal file
1231
_rejestracja/Static/script/jQuery/jquery.validate.js
vendored
Normal file
1146
_rejestracja/Static/script/jQuery/jquery.validate.js.old
Normal file
24
_rejestracja/Static/script/jQuery/messages_pl.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Translated default messages for the jQuery validation plugin.
|
||||
* Locale: PL (Polish; język polski, polszczyzna)
|
||||
*/
|
||||
$.extend( $.validator.messages, {
|
||||
required: "To pole jest wymagane.",
|
||||
remote: "Proszę o wypełnienie tego pola.",
|
||||
email: "Proszę o podanie prawidłowego adresu email.",
|
||||
url: "Proszę o podanie prawidłowego URL.",
|
||||
date: "Proszę o podanie prawidłowej daty.",
|
||||
dateISO: "Proszę o podanie prawidłowej daty (ISO).",
|
||||
number: "Proszę o podanie prawidłowej liczby.",
|
||||
digits: "Proszę o podanie samych cyfr.",
|
||||
creditcard: "Proszę o podanie prawidłowej karty kredytowej.",
|
||||
equalTo: "Proszę o podanie tej samej wartości ponownie.",
|
||||
extension: "Proszę o podanie wartości z prawidłowym rozszerzeniem.",
|
||||
maxlength: $.validator.format( "Proszę o podanie nie więcej niż {0} znaków." ),
|
||||
minlength: $.validator.format( "Proszę o podanie przynajmniej {0} znaków." ),
|
||||
rangelength: $.validator.format( "Proszę o podanie wartości o długości od {0} do {1} znaków." ),
|
||||
range: $.validator.format( "Proszę o podanie wartości z przedziału od {0} do {1}." ),
|
||||
max: $.validator.format( "Proszę o podanie wartości mniejszej bądź równej {0}." ),
|
||||
min: $.validator.format( "Proszę o podanie wartości większej bądź równej {0}." ),
|
||||
pattern: $.validator.format( "Pole zawiera niedozwolone znaki." )
|
||||
} );
|
||||
208
_rejestracja/Static/script/jQuery/scrollintoview.js
Normal file
@@ -0,0 +1,208 @@
|
||||
/*!
|
||||
* jQuery scrollintoview() plugin and :scrollable selector filter
|
||||
*
|
||||
* Version 1.8 (14 Jul 2011)
|
||||
* Requires jQuery 1.4 or newer
|
||||
*
|
||||
* Copyright (c) 2011 Robert Koritnik
|
||||
* Licensed under the terms of the MIT license
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var converter = {
|
||||
vertical: { x: false, y: true },
|
||||
horizontal: { x: true, y: false },
|
||||
both: { x: true, y: true },
|
||||
x: { x: true, y: false },
|
||||
y: { x: false, y: true }
|
||||
};
|
||||
|
||||
var settings = {
|
||||
duration: "fast",
|
||||
direction: "both"
|
||||
};
|
||||
|
||||
var rootrx = /^(?:html)$/i;
|
||||
|
||||
// gets border dimensions
|
||||
var borders = function (domElement, styles) {
|
||||
styles = styles || (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(domElement, null) : domElement.currentStyle);
|
||||
var px = document.defaultView && document.defaultView.getComputedStyle ? true : false;
|
||||
var b = {
|
||||
top: (parseFloat(px ? styles.borderTopWidth : $.css(domElement, "borderTopWidth")) || 0),
|
||||
left: (parseFloat(px ? styles.borderLeftWidth : $.css(domElement, "borderLeftWidth")) || 0),
|
||||
bottom: (parseFloat(px ? styles.borderBottomWidth : $.css(domElement, "borderBottomWidth")) || 0),
|
||||
right: (parseFloat(px ? styles.borderRightWidth : $.css(domElement, "borderRightWidth")) || 0)
|
||||
};
|
||||
return {
|
||||
top: b.top,
|
||||
left: b.left,
|
||||
bottom: b.bottom,
|
||||
right: b.right,
|
||||
vertical: b.top + b.bottom,
|
||||
horizontal: b.left + b.right
|
||||
};
|
||||
};
|
||||
|
||||
var dimensions = function ($element) {
|
||||
var win = $(window);
|
||||
var isRoot = rootrx.test($element[0].nodeName);
|
||||
return {
|
||||
border: isRoot ? { top: 0, left: 0, bottom: 0, right: 0} : borders($element[0]),
|
||||
scroll: {
|
||||
top: (isRoot ? win : $element).scrollTop(),
|
||||
left: (isRoot ? win : $element).scrollLeft()
|
||||
},
|
||||
scrollbar: {
|
||||
right: isRoot ? 0 : $element.innerWidth() - $element[0].clientWidth,
|
||||
bottom: isRoot ? 0 : $element.innerHeight() - $element[0].clientHeight
|
||||
},
|
||||
rect: (function () {
|
||||
var r = $element[0].getBoundingClientRect();
|
||||
return {
|
||||
top: isRoot ? 0 : r.top,
|
||||
left: isRoot ? 0 : r.left,
|
||||
bottom: isRoot ? $element[0].clientHeight : r.bottom,
|
||||
right: isRoot ? $element[0].clientWidth : r.right
|
||||
};
|
||||
})()
|
||||
};
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
scrollintoview: function (options) {
|
||||
/// <summary>Scrolls the first element in the set into view by scrolling its closest scrollable parent.</summary>
|
||||
/// <param name="options" type="Object">Additional options that can configure scrolling:
|
||||
/// duration (default: "fast") - jQuery animation speed (can be a duration string or number of milliseconds)
|
||||
/// direction (default: "both") - select possible scrollings ("vertical" or "y", "horizontal" or "x", "both")
|
||||
/// complete (default: none) - a function to call when scrolling completes (called in context of the DOM element being scrolled)
|
||||
/// </param>
|
||||
/// <return type="jQuery">Returns the same jQuery set that this function was run on.</return>
|
||||
|
||||
options = $.extend({}, settings, options);
|
||||
options.direction = converter[typeof (options.direction) === "string" && options.direction.toLowerCase()] || converter.both;
|
||||
|
||||
var dirStr = "";
|
||||
if (options.direction.x === true) dirStr = "horizontal";
|
||||
if (options.direction.y === true) dirStr = dirStr ? "both" : "vertical";
|
||||
|
||||
var el = this.eq(0);
|
||||
var scroller = el.closest(":scrollable(" + dirStr + ")");
|
||||
|
||||
// check if there's anything to scroll in the first place
|
||||
if (scroller.length > 0)
|
||||
{
|
||||
scroller = scroller.eq(0);
|
||||
|
||||
var dim = {
|
||||
e: dimensions(el),
|
||||
s: dimensions(scroller)
|
||||
};
|
||||
|
||||
var rel = {
|
||||
top: dim.e.rect.top - (dim.s.rect.top + dim.s.border.top),
|
||||
bottom: dim.s.rect.bottom - dim.s.border.bottom - dim.s.scrollbar.bottom - dim.e.rect.bottom,
|
||||
left: dim.e.rect.left - (dim.s.rect.left + dim.s.border.left),
|
||||
right: dim.s.rect.right - dim.s.border.right - dim.s.scrollbar.right - dim.e.rect.right
|
||||
};
|
||||
|
||||
var animOptions = {};
|
||||
|
||||
// vertical scroll
|
||||
if (options.direction.y === true)
|
||||
{
|
||||
if (rel.top < 0)
|
||||
{
|
||||
animOptions.scrollTop = dim.s.scroll.top + rel.top;
|
||||
}
|
||||
else if (rel.top > 0 && rel.bottom < 0)
|
||||
{
|
||||
animOptions.scrollTop = dim.s.scroll.top + Math.min(rel.top, -rel.bottom);
|
||||
}
|
||||
}
|
||||
|
||||
// horizontal scroll
|
||||
if (options.direction.x === true)
|
||||
{
|
||||
if (rel.left < 0)
|
||||
{
|
||||
animOptions.scrollLeft = dim.s.scroll.left + rel.left;
|
||||
}
|
||||
else if (rel.left > 0 && rel.right < 0)
|
||||
{
|
||||
animOptions.scrollLeft = dim.s.scroll.left + Math.min(rel.left, -rel.right);
|
||||
}
|
||||
}
|
||||
|
||||
// scroll if needed
|
||||
if (!$.isEmptyObject(animOptions))
|
||||
{
|
||||
if (rootrx.test(scroller[0].nodeName))
|
||||
{
|
||||
scroller = $("html,body");
|
||||
}
|
||||
scroller
|
||||
.animate(animOptions, options.duration)
|
||||
.eq(0) // we want function to be called just once (ref. "html,body")
|
||||
.queue(function (next) {
|
||||
$.isFunction(options.complete) && options.complete.call(scroller[0]);
|
||||
next();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// when there's nothing to scroll, just call the "complete" function
|
||||
$.isFunction(options.complete) && options.complete.call(scroller[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// return set back
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
var scrollValue = {
|
||||
auto: true,
|
||||
scroll: true,
|
||||
visible: false,
|
||||
hidden: false
|
||||
};
|
||||
|
||||
$.extend($.expr[":"], {
|
||||
scrollable: function (element, index, meta, stack) {
|
||||
var direction = converter[typeof (meta[3]) === "string" && meta[3].toLowerCase()] || converter.both;
|
||||
var styles = (document.defaultView && document.defaultView.getComputedStyle ? document.defaultView.getComputedStyle(element, null) : element.currentStyle);
|
||||
var overflow = {
|
||||
x: scrollValue[styles.overflowX.toLowerCase()] || false,
|
||||
y: scrollValue[styles.overflowY.toLowerCase()] || false,
|
||||
isRoot: rootrx.test(element.nodeName)
|
||||
};
|
||||
|
||||
// check if completely unscrollable (exclude HTML element because it's special)
|
||||
if (!overflow.x && !overflow.y && !overflow.isRoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var size = {
|
||||
height: {
|
||||
scroll: element.scrollHeight,
|
||||
client: element.clientHeight
|
||||
},
|
||||
width: {
|
||||
scroll: element.scrollWidth,
|
||||
client: element.clientWidth
|
||||
},
|
||||
// check overflow.x/y because iPad (and possibly other tablets) don't dislay scrollbars
|
||||
scrollableX: function () {
|
||||
return (overflow.x || overflow.isRoot) && this.width.scroll > this.width.client;
|
||||
},
|
||||
scrollableY: function () {
|
||||
return (overflow.y || overflow.isRoot) && this.height.scroll > this.height.client;
|
||||
}
|
||||
};
|
||||
return direction.y && size.scrollableY() || direction.x && size.scrollableX();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
60
_rejestracja/Static/script/jQuery/validate.sendCareer.js
Normal file
@@ -0,0 +1,60 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendCareer').submit(function() {
|
||||
$('._phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendCareer').validate({
|
||||
rules: {
|
||||
name : {
|
||||
required: true
|
||||
},
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
message : {
|
||||
required: true
|
||||
},
|
||||
agreement : {
|
||||
required: true
|
||||
},
|
||||
file : {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: translate('required_field')
|
||||
},
|
||||
email: {
|
||||
required: translate('required_field'),
|
||||
email: translate('invalid_email')
|
||||
},
|
||||
agreement: {
|
||||
required: translate('required_field')
|
||||
},
|
||||
file: {
|
||||
required: translate('required_field')
|
||||
},
|
||||
message: {
|
||||
required: translate('required_field')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
57
_rejestracja/Static/script/jQuery/validate.sendContact.js
Normal file
@@ -0,0 +1,57 @@
|
||||
$(document).ready(function () {
|
||||
$('#sendContactForm').submit(function () {
|
||||
$('._phone').each(function () {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function (value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendContactForm').validate({
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
surname: {
|
||||
required: true
|
||||
},
|
||||
email: {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
phone: {
|
||||
required: true
|
||||
},
|
||||
message: {
|
||||
required: true
|
||||
},
|
||||
hiddenRecaptcha: {
|
||||
required: function () {
|
||||
if (grecaptcha.getResponse() == '') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function recaptchaCallback() {
|
||||
$('#hiddenRecaptcha').valid();
|
||||
}
|
||||
;
|
||||
@@ -0,0 +1,51 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendFormDownload').submit(function() {
|
||||
$('._phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendFormDownload').validate({
|
||||
rules: {
|
||||
name : {
|
||||
required: true
|
||||
},
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
message : {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: translate('required_field')
|
||||
},
|
||||
email: {
|
||||
required: translate('required_field'),
|
||||
email: translate('invalid_email')
|
||||
},
|
||||
agreement: {
|
||||
required: translate('required_field')
|
||||
},
|
||||
message: {
|
||||
required: translate('required_field')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
610
_rejestracja/Static/script/jQuery/zoomy.js
Normal file
@@ -0,0 +1,610 @@
|
||||
/*
|
||||
* Zoomy 1.3.3 - jQuery plugin
|
||||
* http://redeyeops.com/plugins/zoomy
|
||||
*
|
||||
* Copyright (c) 2010 Jacob Lowe (http://redeyeoperations.com)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* and GPL (GPL-LICENSE.txt) licenses.
|
||||
*
|
||||
* Built for jQuery library
|
||||
* http://jquery.com
|
||||
*
|
||||
* Addition fixes and modifications done by Larry Battle ( blarry@bateru.com )
|
||||
* Code has been refactored and the logic has been corrected.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
(function ($) {
|
||||
|
||||
// global zoomys state, Indexed, 0 = no zoom, 1 = zoom;
|
||||
|
||||
'use strict';
|
||||
var ZoomyS = {
|
||||
count : [],
|
||||
pos: null
|
||||
};
|
||||
|
||||
|
||||
$.fn.zoomy = function (event, options) {
|
||||
|
||||
//defaults && option list
|
||||
var defaults = {
|
||||
zoomSize: 200,
|
||||
round: true,
|
||||
glare: true,
|
||||
clickable: false,
|
||||
attr: 'href',
|
||||
border: '5px solid #999',
|
||||
zoomInit: null, //callback for when zoom initializes
|
||||
zoomStart: null, // callback for when zoom starts
|
||||
zoomStop: null // callback for when the zoom ends
|
||||
},
|
||||
defaultEvent = 'click',
|
||||
|
||||
|
||||
change = {
|
||||
|
||||
// Move Zoom Cursor
|
||||
|
||||
move : function (ele, zoom, e) {
|
||||
var ratio = function (x, y) {
|
||||
var z = x / y;
|
||||
return z;
|
||||
},
|
||||
id = zoom.attr('rel'),
|
||||
l = ele.offset(),
|
||||
theOffset = ZoomyS[id].zoom.border,
|
||||
zoomImgX = ZoomyS[id].zoom.x,
|
||||
zoomImgY = ZoomyS[id].zoom.y,
|
||||
tnImgX = ZoomyS[id].css.width,
|
||||
tnImgY = ZoomyS[id].css.height,
|
||||
zoomSize = options.zoomSize + (theOffset * 2),
|
||||
halfSize = zoomSize / 2,
|
||||
ratioX = ratio(tnImgX, zoomImgX),
|
||||
ratioY = ratio(tnImgY, zoomImgY),
|
||||
stop = halfSize - (halfSize * ratioX) - (theOffset * ratioX) + theOffset,
|
||||
stopPos = function (x) {
|
||||
var p = (x - zoomSize - theOffset) + stop;
|
||||
return p;
|
||||
},
|
||||
rightStop = stopPos(tnImgX),
|
||||
bottomStop = stopPos(tnImgY),
|
||||
zoomY = zoomImgY - zoomSize,
|
||||
zoomX = zoomImgX - zoomSize,
|
||||
mousePos = function (x, y) {
|
||||
var p = x - y - halfSize;
|
||||
return p;
|
||||
},
|
||||
zoomPos = function (x, y, z) {
|
||||
var p = ((x - y) / z) - halfSize + theOffset;
|
||||
return p;
|
||||
},
|
||||
cdCreate = function (a, b, c, d) {
|
||||
var bgPos = '-' + a + 'px ' + '-' + b + 'px',
|
||||
o = {
|
||||
backgroundPosition: bgPos,
|
||||
left: c,
|
||||
top: d
|
||||
};
|
||||
return o;
|
||||
},
|
||||
posX = mousePos(e.pageX, l.left),
|
||||
posY = mousePos(e.pageY, l.top),
|
||||
leftX = zoomPos(e.pageX, l.left, ratioX),
|
||||
topY = zoomPos(e.pageY, l.top, ratioY),
|
||||
|
||||
// Collision Detection Possiblities
|
||||
|
||||
arrPosb = {
|
||||
|
||||
// In the Center
|
||||
|
||||
0 : [leftX, topY, posX, posY],
|
||||
|
||||
// On Left Side
|
||||
|
||||
1 : [0, topY, -stop, posY],
|
||||
|
||||
// On the Top Left Corner
|
||||
|
||||
2 : [0, 0, -stop, -stop],
|
||||
|
||||
//On the Bottom Left Corner
|
||||
|
||||
3 : [0, zoomY, -stop, bottomStop],
|
||||
|
||||
// On the Top
|
||||
|
||||
4 : [leftX, 0, posX, -stop],
|
||||
|
||||
//On the Top Right Corner
|
||||
|
||||
5 : [zoomX, 0, rightStop, -stop],
|
||||
|
||||
//On the Right Side
|
||||
|
||||
6 : [zoomX, topY, rightStop, posY],
|
||||
|
||||
|
||||
//On the Bottom Right Corner
|
||||
|
||||
7 : [zoomX, zoomY, rightStop, bottomStop],
|
||||
|
||||
//On the Bottom
|
||||
|
||||
8 : [leftX, zoomY, posX, bottomStop]
|
||||
},
|
||||
|
||||
// Test for collisions
|
||||
|
||||
a = -stop <= posX,
|
||||
e2 = -stop > posX,
|
||||
b = -stop <= posY,
|
||||
f = -stop > posY,
|
||||
d = bottomStop > posY,
|
||||
g = bottomStop <= posY,
|
||||
c = rightStop > posX,
|
||||
j = rightStop <= posX,
|
||||
|
||||
|
||||
// Results
|
||||
|
||||
cssArrIndex = (a && b && c && d) ? 0 : (e2) ? (b && d) ? 1 : (f) ? 2 : (g) ? 3 : null : (f) ? (c) ? 4 : 5 : (j) ? (d) ? 6 : 7 : (g) ? 8 : null,
|
||||
|
||||
//Create CSS object to move Zoomy
|
||||
|
||||
move = cdCreate(arrPosb[cssArrIndex][0], arrPosb[cssArrIndex][1], arrPosb[cssArrIndex][2], arrPosb[cssArrIndex][3], arrPosb[cssArrIndex][4], arrPosb[cssArrIndex][5]);
|
||||
|
||||
|
||||
//Uncomment to see Index number for collision type
|
||||
//console.log(cssArrIndex)
|
||||
|
||||
// And Actual Call
|
||||
|
||||
zoom.css(move || {});
|
||||
|
||||
},
|
||||
|
||||
// Change classes for original image effect
|
||||
|
||||
classes : function (ele) {
|
||||
var i = ele.find('.zoomy').attr('rel');
|
||||
if (ZoomyS[i].state === 0 || ZoomyS[i].state === null) {
|
||||
ele.removeClass('inactive');
|
||||
} else {
|
||||
ele.addClass('inactive');
|
||||
}
|
||||
},
|
||||
|
||||
// Enter zoom area start up Zoom again
|
||||
|
||||
enter : function (ele, zoom) {
|
||||
var i = zoom.attr('rel');
|
||||
ZoomyS[i].state = 1;
|
||||
zoom.css('visibility', 'visible');
|
||||
change.classes(ele);
|
||||
},
|
||||
|
||||
// Leave zoom area
|
||||
|
||||
leave : function (ele, zoom, x) {
|
||||
var i = zoom.attr('rel');
|
||||
if (x !== null) {
|
||||
ZoomyS[i].state = null;
|
||||
} else {
|
||||
ZoomyS[i].state = 0;
|
||||
}
|
||||
zoom.css('visibility', 'hidden');
|
||||
change.classes(ele);
|
||||
},
|
||||
|
||||
// Callback handler (startZoom && stopZoom)
|
||||
|
||||
callback : function (type, zoom) {
|
||||
var callbackFunc = type,
|
||||
zoomId = zoom.attr('rel');
|
||||
|
||||
if (callbackFunc !== null && typeof callbackFunc === 'function') {
|
||||
|
||||
callbackFunc($.extend({}, ZoomyS[zoomId], ZoomyS.pos));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
// Styling Object, holds pretty much all styling except for some minor tweeks
|
||||
|
||||
style = {
|
||||
|
||||
round : function (x, y) {
|
||||
var cssObj = (!options.round) ? 0 : ( x === undefined) ? options.zoomSize + y / 2 + 'px' : options.zoomSize / 2 + 'px ' + options.zoomSize / 2 + 'px 0px 0px';
|
||||
return cssObj;
|
||||
},
|
||||
|
||||
glare : function (zoom) {
|
||||
zoom.children('span').css({
|
||||
height: options.zoomSize / 2,
|
||||
width: options.zoomSize - 10,
|
||||
margin: ($.browser.msie && parseInt($.browser.version, 10) === 9) ? 0 : '5px auto',
|
||||
'border-radius': style.round(0)
|
||||
});
|
||||
},
|
||||
|
||||
border: function (zoom) {
|
||||
|
||||
var borderRaw = options.border.replace(/^\s*|\s*$/g,''),
|
||||
borderArr = borderRaw.split(' '),
|
||||
interger = parseFloat(borderArr[0]),
|
||||
size = (borderArr.length > 2 && interger * 1 === interger ) ? interger : 0;
|
||||
|
||||
|
||||
|
||||
return [borderRaw, size];
|
||||
},
|
||||
|
||||
params : function (ele, zoom) {
|
||||
var img = ele.children('img'),
|
||||
|
||||
// TODO: Create function to filter out percents
|
||||
border = style.border(zoom),
|
||||
|
||||
margin = {
|
||||
'marginTop': img.css('margin-top'),
|
||||
'marginRight': img.css('margin-right'),
|
||||
'marginBottom': img.css('margin-bottom'),
|
||||
'marginLeft': img.css('margin-left')
|
||||
},
|
||||
|
||||
floats = {
|
||||
'float': img.css('float')
|
||||
},
|
||||
|
||||
//Zoomy needs these to work
|
||||
|
||||
zoomMin = {
|
||||
'display': 'block',
|
||||
height: img.height(),
|
||||
width: img.width(),
|
||||
'position': 'relative'
|
||||
|
||||
},
|
||||
|
||||
//A lil bit of geneology o.0
|
||||
|
||||
parentCenter = function () {
|
||||
|
||||
//Checking for parent text-align center
|
||||
|
||||
var textAlign = ele.parent('*:first').css('text-align');
|
||||
if (textAlign === 'center') {
|
||||
margin.marginRight = 'auto';
|
||||
margin.marginLeft = 'auto';
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
id = zoom.attr('rel'),
|
||||
css = {};
|
||||
|
||||
|
||||
|
||||
if (floats['float'] === 'none') {
|
||||
parentCenter();
|
||||
}
|
||||
|
||||
$.extend(css, margin, floats, zoomMin);
|
||||
|
||||
ZoomyS[id].css = css;
|
||||
|
||||
if (!options.glare) {
|
||||
zoom.children('span').css({
|
||||
height: options.zoomSize - 10,
|
||||
width: options.zoomSize - 10
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
zoom.css({
|
||||
height: options.zoomSize,
|
||||
width: options.zoomSize,
|
||||
'border-radius': style.round(undefined, border[1]),
|
||||
border: border[0]
|
||||
});
|
||||
|
||||
|
||||
|
||||
img.css('margin', '0px');
|
||||
|
||||
|
||||
img.one("load", function () {
|
||||
ele.css(ZoomyS[id].css);
|
||||
}).each(function () {
|
||||
if (this.complete || ($.browser.msie && parseInt($.browser.version, 10) === 6)) {
|
||||
$(this).trigger("load");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
// Build Object, Elements are added to the DOM here
|
||||
|
||||
build = {
|
||||
|
||||
// Load Zoom Image
|
||||
|
||||
image : function (image, zoom) {
|
||||
var id = zoom.attr('rel');
|
||||
//Move the Zoomy out of the screen view while loading img
|
||||
zoom.show().css({top: '-999999px', left: '-999999px'});
|
||||
|
||||
if (zoom.find('img').attr('src') !== image) {
|
||||
zoom.find('img').attr('src', image).load(function () {
|
||||
|
||||
var assets = (options.glare) ? '<span/>' : '',
|
||||
border = style.border(zoom);
|
||||
|
||||
image = image.replace(/ /g, '%20');
|
||||
|
||||
ZoomyS[id].zoom = {
|
||||
'x': zoom.find('img').width(),
|
||||
'y': zoom.find('img').height(),
|
||||
'border': border[1]
|
||||
};
|
||||
|
||||
zoom.append(assets)
|
||||
.css({
|
||||
'background-image': 'url(' + image + ')'
|
||||
})
|
||||
.find('img')
|
||||
.remove();
|
||||
|
||||
style.glare(zoom);
|
||||
|
||||
}).each(function () {
|
||||
|
||||
if (this.complete || ($.browser.msie && parseInt($.browser.version, 10) === 6)) {
|
||||
|
||||
$(this).trigger("load");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
// Add zoom element to page
|
||||
|
||||
zoom : function (ele, i) {
|
||||
|
||||
//Adding Initial State
|
||||
|
||||
ZoomyS[i] = {
|
||||
state: null,
|
||||
index : i
|
||||
};
|
||||
|
||||
ZoomyS.count.push(0);
|
||||
|
||||
// Picking from the right attibute
|
||||
|
||||
var image = (typeof (ele.attr(options.attr)) === 'string' && options.attr !== 'href') ? ele.attr(options.attr) : ele.attr('href'),
|
||||
zoom = null,
|
||||
initCallback = options.zoomInit,
|
||||
eventHandler = function () {
|
||||
var eventlist = [], //List of Actual Events
|
||||
zoomMove = function (e) {
|
||||
|
||||
change.move(ele, zoom, e);
|
||||
|
||||
//ZoomyS.pos = e;
|
||||
|
||||
},
|
||||
zoomStart = function () {
|
||||
change.enter(ele, zoom);
|
||||
|
||||
ele.bind('mousemove', zoomMove);
|
||||
|
||||
/* Start Zoom Callback */
|
||||
|
||||
change.callback(options.zoomStart, zoom);
|
||||
},
|
||||
zoomStop = function (x) {
|
||||
change.leave(ele, zoom, x);
|
||||
|
||||
ele.unbind('mousemove', zoomMove);
|
||||
|
||||
/* Start Zoom Callback */
|
||||
|
||||
change.callback(options.zoomStop, zoom);
|
||||
},
|
||||
events = { //List of Possible Events
|
||||
event: function (e) {
|
||||
|
||||
ZoomyS.pos = e;
|
||||
|
||||
if (!options.clickable) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (ZoomyS[i].state === 0 || ZoomyS[i].state === null) {
|
||||
|
||||
zoomStart();
|
||||
|
||||
//Fix on click show and positioning issues
|
||||
|
||||
change.move(ele, zoom, e);
|
||||
|
||||
} else if (ZoomyS[i].state === 1 && event !== 'mouseover' && event !== 'mouseenter') {
|
||||
|
||||
zoomStop(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
'mouseover': function (e) {
|
||||
|
||||
ZoomyS.pos = e;
|
||||
|
||||
if (ZoomyS[i].state === 0) {
|
||||
zoomStart();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
'mouseleave': function (e) {
|
||||
|
||||
ZoomyS.pos = e;
|
||||
|
||||
if (ZoomyS[i].state === 1) {
|
||||
|
||||
zoomStop(null);
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
'click': function () {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// Making sure there is only one mouse over event & Click returns false when it suppose to
|
||||
|
||||
|
||||
if (event === 'mouseover') {
|
||||
eventlist[event] = events.event;
|
||||
} else {
|
||||
eventlist[event] = events.event;
|
||||
eventlist.mouseover = events.mouseover;
|
||||
}
|
||||
|
||||
if (!options.clickable && event !== 'click') {
|
||||
eventlist.click = events.click;
|
||||
}
|
||||
eventlist.mouseleave = events.mouseleave;
|
||||
|
||||
|
||||
|
||||
// Binding Events to element
|
||||
|
||||
ele.bind(eventlist);
|
||||
|
||||
};
|
||||
|
||||
eventHandler();
|
||||
|
||||
//Creating Zoomy Element
|
||||
ele.addClass('parent-zoom').append('<div class="zoomy zoom-obj-' + i + '" rel="' + i + '"><img id="tmp"/></div>');
|
||||
|
||||
|
||||
//Setting the Zoom Variable towards the right zoom object
|
||||
|
||||
zoom = $('.zoom-obj-' + i);
|
||||
|
||||
|
||||
if (initCallback !== null && typeof initCallback === 'function') {
|
||||
initCallback(ele);
|
||||
}
|
||||
|
||||
// Set basic parameters
|
||||
|
||||
style.params(ele, zoom);
|
||||
|
||||
// Load zoom image
|
||||
|
||||
build.image(image, zoom);
|
||||
|
||||
//Event Handler added 1.2
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
// Initialize element to add to page, check for initial image to be loaded
|
||||
|
||||
init : function (ele, img) {
|
||||
|
||||
|
||||
img.one("load", function () {
|
||||
|
||||
// Ready to build zoom
|
||||
|
||||
build.zoom(ele, ZoomyS.count.length);
|
||||
|
||||
}).each(function () {
|
||||
|
||||
if (this.complete || ($.browser.msie && parseInt($.browser.version, 10) === 6)) {
|
||||
|
||||
$(this).trigger("load");
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Fallback if there is no event but there are options
|
||||
|
||||
if (typeof (event) === 'object' && options === undefined) {
|
||||
|
||||
options = event;
|
||||
|
||||
event = defaultEvent;
|
||||
|
||||
} else if (event === undefined) {
|
||||
|
||||
event = defaultEvent;
|
||||
|
||||
}
|
||||
|
||||
//overriding defaults with options
|
||||
|
||||
options = $.extend(defaults, options);
|
||||
|
||||
|
||||
$(this).each(function () {
|
||||
|
||||
var ele = $(this),
|
||||
img = ele.find('img');
|
||||
|
||||
|
||||
// Start Building Zoom
|
||||
|
||||
build.init(ele, img);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}(jQuery));
|
||||
BIN
_rejestracja/Static/script/news.frmx_pliki/icon0.gif
Normal file
|
After Width: | Height: | Size: 573 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/icon1.gif
Normal file
|
After Width: | Height: | Size: 577 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconAdd.gif
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconDown.gif
Normal file
|
After Width: | Height: | Size: 129 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconEdit.gif
Normal file
|
After Width: | Height: | Size: 245 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconLeft.gif
Normal file
|
After Width: | Height: | Size: 133 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconPreview.gif
Normal file
|
After Width: | Height: | Size: 587 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconRight.gif
Normal file
|
After Width: | Height: | Size: 134 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/iconUp.gif
Normal file
|
After Width: | Height: | Size: 131 B |
BIN
_rejestracja/Static/script/news.frmx_pliki/logoCms.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
232
_rejestracja/Static/script/news.frmx_pliki/style.css
Normal file
@@ -0,0 +1,232 @@
|
||||
@CHARSET "ISO-8859-2";
|
||||
|
||||
body, table, input, textarea, select {
|
||||
font-family: Tahoma, Verdana;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-top: 10px;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
background-image: url('../../image/Admin/backgroundBody.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top center;
|
||||
}
|
||||
form { margin: 0px; padding: 0px;}
|
||||
.blue { color: #6eb6df; }
|
||||
div.clearBoth { clear: both; }
|
||||
|
||||
div.displayNone { display: none; }
|
||||
|
||||
|
||||
|
||||
/* NAG<41>OWEK PANELU ADMINISTRACYJNEGO */
|
||||
div.titleHeader { margin: auto; width: 970px; font-size: 20px; }
|
||||
div.titleHeader img { vertical-align: middle; }
|
||||
|
||||
|
||||
|
||||
|
||||
/* ZAK<41>ADKI MENU G<><47>WNEGO */
|
||||
div.tabs {
|
||||
margin: auto;
|
||||
margin-top: 10px;
|
||||
width: 970px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
div.tabs a {
|
||||
float: left; width: 130px; height: 20px; background-repeat: no-repeat;
|
||||
color:#ffffff; text-decoration: none; font-weight: normal; font-size: 11px;
|
||||
background-image: url('../../image/Admin/tabBackground.gif');
|
||||
background-position: right center;
|
||||
}
|
||||
div.tabs a:hover {
|
||||
background-image: url('../../image/Admin/tabActive.gif');
|
||||
background-position: bottom;
|
||||
}
|
||||
div.tabs a.selected { background-image: url('../../image/Admin/tabActive.gif'); background-position: top; color: #3b3b3b; border: none; font-weight: bold; }
|
||||
div.tabs a.selected:hover { background-position: top; color: #000000; }
|
||||
div.tabs a div { text-align: center; padding-top: 3px;}
|
||||
|
||||
|
||||
|
||||
|
||||
/* G<><47>WNA NIEBIESKA RAMKA */
|
||||
div.mainContentFrame, div.mainContentFrameTop, div.mainContentFrameBottom { width: 970px; margin: auto; }
|
||||
div.mainContentFrameTop, div.mainContentFrameBottom { font-size: 1px; height: 5px; background-repeat: none;}
|
||||
div.mainContentFrameTop { background-image: url('../../image/Admin/mainFrameTop.gif'); }
|
||||
div.mainContentFrameBottom { background-image: url('../../image/Admin/mainFrameBottom.gif'); }
|
||||
div.mainContentFrame { background-color: #ccdef3; color: #3b3b3b; }
|
||||
|
||||
|
||||
/* PANELE - LEWY I PRAWY */
|
||||
div.panelLeft {
|
||||
float: left;
|
||||
width: 290px;
|
||||
padding-left: 5px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
div.panelLeftBody, div.panelLeftTop, div.panelLeftBottom { width: 290px; }
|
||||
div.panelLeftTop { font-size: 1px; height: 5px; background-image: url('../../image/Admin/panelLeftTop.gif'); background-repeat: no-repeat;}
|
||||
div.panelLeftBody { background-image: url('../../image/Admin/panelLeftBody.gif'); background-repeat: repeat-y;}
|
||||
div.panelLeftBottom { height: 25px; background-image: url('../../image/Admin/panelLeftBottom.gif'); background-repeat: no-repeat; padding-top: 5px; font-size: 11px; text-align: center; border-top: 1px solid #999999;}
|
||||
|
||||
div.paddedContent { padding: 5px;}
|
||||
|
||||
|
||||
div.panelRight {
|
||||
float: left;
|
||||
width: 655px;
|
||||
margin-left: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
div.panelRightBody, div.panelRightTop, div.panelRightBottom { width: 655px; }
|
||||
div.panelRightTop { font-size: 1px; height: 5px; background-image: url('../../image/Admin/panelRightTop.gif'); background-repeat: no-repeat;}
|
||||
div.panelRightBody { background-image: url('../../image/Admin/panelRightBody.gif'); background-repeat: repeat-y;}
|
||||
div.panelRightBottom { height: 47px; background-image: url('../../image/Admin/panelRightBottom.gif'); background-repeat: no-repeat; padding-top: 5px; font-size: 11px; text-align: center; }
|
||||
div.panelButtons { padding-top: 5px; padding-right: 10px; text-align: right; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* IKONKI PANELU LEWEGO */
|
||||
div.panelLeftIcons { background-image: url('../../image/Admin/panelLeftBody.gif'); background-repeat: repeat-y; width: 290px; border-bottom: 1px solid #999999;}
|
||||
div.panelLeftIcons div.overflow { padding-left: 5px; overflow: hidden; }
|
||||
div.panelLeftIcons a { float: left; background-image: url('../../image/Admin/backgroundIconsA.gif'); background-repeat: repeat-y; background-position: right; margin-bottom: 5px; }
|
||||
div.panelLeftIcons a:hover { background-color: #ffffff; }
|
||||
div.panelLeftIcons a img { margin: 5px; }
|
||||
|
||||
/* LOGOWANIE */
|
||||
|
||||
div.mainContentFrameLogin, div.mainContentFrameLoginTop, div.mainContentFrameLoginBottom { width: 675px; margin: auto; }
|
||||
div.mainContentFrameLoginTop, div.mainContentFrameLoginBottom { font-size: 1px; height: 5px; background-repeat: none;}
|
||||
div.mainContentFrameLoginTop { background-image: url('../../image/Admin/mainFrameLoginTop.gif'); }
|
||||
div.mainContentFrameLoginBottom { background-image: url('../../image/Admin/mainFrameLoginBottom.gif'); }
|
||||
div.mainContentFrameLogin { background-color: #ccdef3; color: #3b3b3b; }
|
||||
|
||||
|
||||
div.panelLogin{
|
||||
float: left;
|
||||
width: 655px;
|
||||
margin-left: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
div.panelRightBody, div.panelRightTop, div.panelRightBottom { width: 655px; }
|
||||
div.panelRightTop { font-size: 1px; height: 5px; background-image: url('../../image/Admin/panelRightTop.gif'); background-repeat: no-repeat;}
|
||||
div.panelRightBody { background-image: url('../../image/Admin/panelRightBody.gif'); background-repeat: repeat-y;}
|
||||
div.panelRightBottom { height: 47px; background-image: url('../../image/Admin/panelRightBottom.gif'); background-repeat: no-repeat; padding-top: 5px; font-size: 11px; text-align: center; }
|
||||
div.panelButtons { padding-top: 5px; padding-right: 10px; text-align: right; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* STOPKA PANELU ADMINISTRACYJNEGO */
|
||||
div.footer { width: 960px; margin: auto; margin-top: 5px; font-size: 11px;}
|
||||
div.footer div.floatLeft { float: left; color: #525252; }
|
||||
div.footer div.floatRight { float: right; }
|
||||
div.footer a { color: #ffffff; }
|
||||
div.footer a:hover { color: #6eb6df; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
div.sitePath {
|
||||
font-size: 11px;
|
||||
color: #3691cb;
|
||||
margin-bottom: 10px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
div.sitePath a {
|
||||
color: #3691cb;
|
||||
}
|
||||
|
||||
/* ZAK<41>ADKI PANELU PRAWEGO */
|
||||
div.panelContentTop {
|
||||
width: 645px;
|
||||
height: 25px;
|
||||
background-image: url('../../image/Admin/panelContentTop.gif');
|
||||
}
|
||||
div.panelContentBottom {
|
||||
width: 645px;
|
||||
height: 4px;
|
||||
font-size: 1px;
|
||||
background-image: url('../../image/Admin/panelContentBottom.gif');
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
div.panelContentBody {
|
||||
width: 635px;
|
||||
background-image: url('../../image/Admin/panelContentBody.gif');
|
||||
padding: 5px;
|
||||
}
|
||||
div.panelContentBodyLogin {
|
||||
width: 635px;
|
||||
background-image: url('../../image/Admin/panelContentBody.gif');
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
div.panelContentTop h2 {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
padding-top: 5px;
|
||||
padding-left: 10px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
div.panelContentTop h2 a {
|
||||
text-decoration: none;
|
||||
background-image: url('../../image/Admin/panelContentShort.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: left;
|
||||
padding-left: 12px;
|
||||
color: #585e67;
|
||||
}
|
||||
div.panelContentTop h2 a.long {
|
||||
background-image: url('../../image/Admin/panelContentLong.gif');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* tabelki do wy<77>wietlania danych */
|
||||
table.datagrid {
|
||||
font-size: 11px;
|
||||
}
|
||||
table.datagrid th {
|
||||
background-color: #222222;
|
||||
font-size: 10px;
|
||||
color: #ffffff;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table.datagrid tr { background-color: #ffffff; }
|
||||
table.datagrid tr.even { background-color: #eeeeee; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* definicje przycisk<73>w */
|
||||
input.button, input.button120 { height: 25px; background-repeat: no-repeat; background: transparent; border: none; cursor: pointer; }
|
||||
input.button120 { width: 120px;}
|
||||
input.button { width: 70px; }
|
||||
|
||||
input.buttonZapiszIPublikuj { background-image: url('../../image/Admin/buttonZapiszIPublikuj.gif'); }
|
||||
input.buttonZapisz { background-image: url('../../image/Admin/buttonZapisz.gif'); }
|
||||
input.buttonAnuluj { background-image: url('../../image/Admin/buttonAnuluj.gif'); }
|
||||
input.buttonZaloguj { background-image: url('../../image/Admin/buttonZaloguj.gif'); }
|
||||
input.buttonPodglad { background-image: url('../../image/Admin/buttonPodglad.gif'); }
|
||||
|
||||
|
||||
div.panelElement {
|
||||
width: 210px; float: left; margin-left: 15px; margin-bottom: 10px;
|
||||
}
|
||||
div.panelEditElement {
|
||||
float: left; margin-bottom: 10px;
|
||||
}
|
||||
675
_rejestracja/Static/script/structure.js
Normal file
@@ -0,0 +1,675 @@
|
||||
var activeTreeNode;
|
||||
|
||||
function bold(element) {
|
||||
if(activeTreeNode) {
|
||||
$(activeTreeNode).setStyle({
|
||||
fontWeight: 'normal',
|
||||
backgroundColor: '',
|
||||
color: ''
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(element).setStyle({
|
||||
fontWeight: 'bold',
|
||||
backgroundColor: '#333c8e',
|
||||
color: '#ffffff'
|
||||
});
|
||||
|
||||
activeTreeNode = element;
|
||||
}
|
||||
|
||||
function load(url) {
|
||||
try {
|
||||
var contentNode = $("mainFrame");
|
||||
var treeElementNode = $("node{$objElementSub->GetId()}");
|
||||
if (typeof url == 'object') {
|
||||
url = url.href;
|
||||
}
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
var myAjax = new Ajax.Request(
|
||||
url,
|
||||
{
|
||||
method: 'post',
|
||||
parameters: this.parameters,
|
||||
onComplete: function(response) {
|
||||
Dosia.DisplayLoader(false);
|
||||
Dosia.executeJS(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function loadTree() {
|
||||
try {
|
||||
var contentNode = $("TreeFrame");
|
||||
|
||||
if (typeof url == 'object') {
|
||||
url = url.href;
|
||||
}
|
||||
|
||||
|
||||
url = 'structure,shared.frmx';
|
||||
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
var myAjax = new Ajax.Request(
|
||||
url,
|
||||
{
|
||||
method: 'post',
|
||||
parameters: this.parameters,
|
||||
onComplete: function(response) {
|
||||
Dosia.DisplayLoader(false);
|
||||
Dosia.executeJS(response.responseText);
|
||||
//alert(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
initTree();
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function DelteElement(url) {
|
||||
|
||||
if (confirm('Czy napewno usunąć ten element?')) {
|
||||
try {
|
||||
|
||||
var contentNode = $("mainFrame");
|
||||
|
||||
if (typeof url == 'object') {
|
||||
url = url.href;
|
||||
}
|
||||
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
|
||||
|
||||
var myAjax = new Ajax.Request(
|
||||
url,
|
||||
{
|
||||
method: 'post',
|
||||
parameters: this.parameters,
|
||||
onComplete: function(response) {
|
||||
Dosia.DisplayLoader(false);
|
||||
Dosia.executeJS(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
loadTree();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function GetForm(form) {
|
||||
try {
|
||||
var contentNode = $("mainFrame");
|
||||
|
||||
if (typeof form == 'string') {
|
||||
form = $(form);
|
||||
}
|
||||
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
form.request({
|
||||
onComplete: function(response){
|
||||
Dosia.DisplayLoader(false);
|
||||
$('stucturePopover').hide();
|
||||
Dosia.executeJS(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
}
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function GetModuleCategorys(value, url) {
|
||||
try {
|
||||
var contentNode = $("categoryOptions");
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
new Ajax.Request(url,
|
||||
{
|
||||
method:'post',
|
||||
parameters: {id: value},
|
||||
onComplete: function(response) {
|
||||
Dosia.DisplayLoader(false);
|
||||
Dosia.executeJS(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
},
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
});
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//jQuery
|
||||
function GetModuleCategory(value, url){
|
||||
|
||||
////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({id: value}),
|
||||
success: function(html){
|
||||
//$("#longer").show();
|
||||
$("#categoryOptions").html(html);
|
||||
////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
//$('#datePast').val($('#calendar').val());
|
||||
}
|
||||
|
||||
function PostRequest(target, post) {
|
||||
|
||||
|
||||
////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: target,
|
||||
cache: false,
|
||||
data: ('data='+post),
|
||||
success: function(html){
|
||||
//$("#longer").show();
|
||||
//$("#categoryOptions").html(html);
|
||||
////$.prettyLoader.hide();
|
||||
return html;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// var url = target;
|
||||
// new Ajax.Request(url, {
|
||||
// method: 'post', parameters: 'data='+post,
|
||||
// onSuccess: function(transport) {
|
||||
// Dosia.DisplayLoader(false);
|
||||
// Dosia.Run(transport.responseText);
|
||||
// return transport.responseText;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
function GetList(url) {
|
||||
try {
|
||||
var contentNode = $("ListBox");
|
||||
Dosia.DisplayLoader(true);
|
||||
|
||||
if (typeof url == 'object') {
|
||||
url = url.href;
|
||||
}
|
||||
new Ajax.Request(url,
|
||||
{
|
||||
method:'post',
|
||||
onComplete: function(response) {
|
||||
Dosia.DisplayLoader(false);
|
||||
Dosia.executeJS(response.responseText);
|
||||
contentNode.innerHTML = response.responseText;
|
||||
},
|
||||
onFailure: function(){ alert('Something went wrong...') }
|
||||
});
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
//
|
||||
//function Special(id, value, url) {
|
||||
// try {
|
||||
// var contentNode = $('special_info_'+id);
|
||||
// Dosia.DisplayLoader(true);
|
||||
//
|
||||
// //alert(value);
|
||||
// if (value == '1') {
|
||||
// //alert('add'+' id'+id);
|
||||
// document.getElementById('special_'+id).value = '0';
|
||||
// var special = '0';
|
||||
// } else {
|
||||
// //alert('delete'+' id'+id);
|
||||
// document.getElementById('special_'+id).value = '1';
|
||||
// var special = '1';
|
||||
// }
|
||||
//
|
||||
//
|
||||
// new Ajax.Request(url,
|
||||
// {
|
||||
// method:'post',
|
||||
// parameters: {id: id, value: special},
|
||||
// onComplete: function(response) {
|
||||
// Dosia.DisplayLoader(false);
|
||||
// Dosia.executeJS(response.responseText);
|
||||
// contentNode.innerHTML = response.responseText;
|
||||
// },
|
||||
// onFailure: function(){ alert('Something went wrong...') }
|
||||
// });
|
||||
// } catch (err) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
//}
|
||||
|
||||
|
||||
//function LinkList(id) {
|
||||
// if (document.getElementById(id).style.display == '') {
|
||||
// $(id+'Top').hide();
|
||||
// $(id).hide();
|
||||
// $(id+'Bottom').hide();
|
||||
//
|
||||
// } else {
|
||||
// $(id+'Top').show();
|
||||
// $(id).show();
|
||||
// $(id+'Bottom').show();
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
//function ChangeLang(lang, url) {
|
||||
// try {
|
||||
// var contentNode = $("mainFrame");
|
||||
// Dosia.DisplayLoader(true);
|
||||
//
|
||||
// new Ajax.Request(url,
|
||||
// {
|
||||
// method:'post',
|
||||
// parameters: {lang: lang},
|
||||
// onComplete: function(response) {
|
||||
// Dosia.DisplayLoader(false);
|
||||
// Dosia.executeJS(response.responseText);
|
||||
// contentNode.innerHTML = response.responseText;
|
||||
// },
|
||||
// onFailure: function(){ alert('Something went wrong...') }
|
||||
// });
|
||||
// } catch (err) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
//}
|
||||
|
||||
function ConfirmChange(field, value) {
|
||||
|
||||
var fieldAlert = document.getElementById(field+'Alert').value;
|
||||
if (fieldAlert != 'true') {
|
||||
if (confirm('Zmiana tego pola nastąpi dla wszystkich kopii tego elementu, czy chcesz kontynuować?')) {
|
||||
document.getElementById(field+'Alert').value = true;
|
||||
return true;
|
||||
} else {
|
||||
document.getElementById(field).value = value;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//jQuery
|
||||
function GetParentTree(url, value, destination){
|
||||
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({id: value}),
|
||||
success: function(html){
|
||||
$(destination).html(html);
|
||||
//////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//funkcja sprawdza czy to IE od razu zwracając wersję w postaci integer
|
||||
function czyIE(){
|
||||
var IE=v=false,n;try{n=navigator.appVersion;IE=(n.indexOf('MSIE')!=-1)}catch(e){}
|
||||
if(IE)v=n.substr(n.indexOf('MSIE')+5,1);return parseInt(v);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//$(document).ready(function(){
|
||||
//
|
||||
//
|
||||
// //przyklad użycia
|
||||
// //if(czyIE()){
|
||||
// // alert('Wersja IE: '+czyIE());
|
||||
// //}
|
||||
// //inny przykład
|
||||
// // if(czyIE()){
|
||||
// // alert('Wersja Internet Explorera jest nie aktualna. Niektóre funkcje serwisu moga działac nie prawidłowo. Zaleca się zainstalowanie nowszej wersji minimum 8');
|
||||
// // }
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// $("a[rel^='prettyPhoto']").prettyPhoto();
|
||||
//
|
||||
// //////$.prettyLoader({
|
||||
// animation_speed: 'slow', /* fast/normal/slow/integer */
|
||||
// bind_to_ajax: false, /* true/false */
|
||||
// delay: false, /* false OR time in milliseconds (ms) */
|
||||
// loader: 'http://produkty.mediaflex.pl/cyfrowemuzeum/site/Static/images/prettyLoader/ajax-loader.gif', /* Path to your loader gif */
|
||||
// offset_top: 13, /* integer */
|
||||
// offset_left: 10 /* integer */
|
||||
// });
|
||||
//
|
||||
//
|
||||
// // $(function() {
|
||||
// // $("#sortable").sortable({ opacity: 0.6, cursor: 'move', update: function() {
|
||||
// // var order = $('#sortable').sortable("toArray");
|
||||
// // //var result = $('#sortable').sortable('toArray');
|
||||
// // alert(order[0]);
|
||||
// // var sortUrl = $('#sortUrl').val();
|
||||
// //
|
||||
// // //////$.prettyLoader.show();
|
||||
// //
|
||||
// // $.ajax({
|
||||
// // type: "POST",
|
||||
// // url: sortUrl,
|
||||
// // cache: false,
|
||||
// // data: ({order: order}),
|
||||
// // success: function(text){
|
||||
// // //$("#sortTest").html(theResponse);
|
||||
// //
|
||||
// // //////$.prettyLoader.hide();
|
||||
// // }
|
||||
// // });
|
||||
// //
|
||||
// //
|
||||
// //
|
||||
// // }
|
||||
// // });
|
||||
// // $( "#sortable" ).disableSelection();
|
||||
// // });
|
||||
//
|
||||
//
|
||||
//});
|
||||
|
||||
|
||||
|
||||
|
||||
function GetTableContent(url, tableContent, search, linked, sortVal) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({search: search, linked: linked, sortVal: sortVal}),
|
||||
success: function(html){
|
||||
$(tableContent).html(html);
|
||||
//loading.busyBox('close');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function LinkFileClient(url, element, destination, source, idDest, idSource) {
|
||||
action = 'delete';
|
||||
if ($(element).is(':checked')) {
|
||||
action = 'add';
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({action: action, idDest: idDest, idSource: idSource, destination: destination, source: source}),
|
||||
success: function(html){
|
||||
//$(container).remove();
|
||||
//loading.busyBox('close');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function StatusConfigArchive(url, id, status) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({id: id, status: status}),
|
||||
success: function(html){
|
||||
$('#statusInfo').html('Zapisono');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function LinkContent(url, destination, idDestination, source, idSource, description, idCategory, container) {
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({destination: destination, idDestination: idDestination, source: source, idSource: idSource, idCategory: idCategory, description: description}),
|
||||
success: function(html){
|
||||
window.parent.$(container).append(html);
|
||||
window.parent.$.prettyPhoto.close();
|
||||
//////$.prettyLoader.hide();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function UnlinkContent(url, destination, idDestination, source, idSource, idCategory, container) {
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({destination: destination, idDestination: idDestination, source: source, idSource: idSource, idCategory: idCategory}),
|
||||
success: function(html){
|
||||
$(container).remove();
|
||||
//////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function PersonSaved(val, text) {
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
window.parent.$('#author').append(
|
||||
$('<option></option>').val(val).html(text).attr("selected","selected")
|
||||
);
|
||||
window.parent.$("#authorStr").val(text);
|
||||
//////$.prettyLoader.hide();
|
||||
window.parent.$.prettyPhoto.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function CategorySaved(url, id) {
|
||||
|
||||
var action = 'delete';
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
if ($(id).is(':checked')) {
|
||||
action = 'add';
|
||||
}
|
||||
var idCategory = $(id).val();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({idCategory: idCategory, action: action}),
|
||||
success: function(html){
|
||||
////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
function AjaxCheckExt(url, file, container) {
|
||||
|
||||
////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({file: file}),
|
||||
success: function(text){
|
||||
if (text != 'ok') {
|
||||
$('#filename').val('');
|
||||
$(container).html('Dostępne rozszerzenie to: flv, swf');
|
||||
|
||||
} else {
|
||||
$(container).html('');
|
||||
}
|
||||
|
||||
////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//$(function() {
|
||||
// $( "#sortable" ).sortable();
|
||||
//
|
||||
//});
|
||||
//
|
||||
//$(function() {
|
||||
// $("#sortable").sortable({ opacity: 0.6, cursor: 'move', update: function() {
|
||||
// var order = $(this).sortable("serialize");
|
||||
// var result = $('#sortable').sortable('toArray');
|
||||
// alert(result);
|
||||
// // $.post("updateDB.php", order, function(theResponse){
|
||||
// // $("#contentRight").html(theResponse);
|
||||
// // });
|
||||
// }
|
||||
// });
|
||||
// $( "#sortable" ).disableSelection();
|
||||
//});
|
||||
|
||||
function AjaxSaveSortImage() {
|
||||
|
||||
////$.prettyLoader.show();
|
||||
|
||||
// $.ajax({
|
||||
// type: "POST",
|
||||
// url: url,
|
||||
// cache: false,
|
||||
// data: ({file: file}),
|
||||
// success: function(text){
|
||||
// if (text != 'ok') {
|
||||
// $('#filename').val('');
|
||||
// $(container).html('Dostępne rozszerzenie to: flv, swf');
|
||||
//
|
||||
// } else {
|
||||
// $(container).html('');
|
||||
// }
|
||||
var result = $('#sortable').sortable('toArray');
|
||||
alert(result);
|
||||
////$.prettyLoader.hide();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=product=======================================================
|
||||
//AddLinkAttr is not defined
|
||||
|
||||
function AddLinkAttr(value, id){
|
||||
//alert($(value).html());
|
||||
|
||||
htmlAttr = $(value).html().replace('attr_'+id,'linked_attr_'+id);
|
||||
//htmlAttrVal = htmlAttr.replace('<td><a href="#" onclick="AddLinkAttr(\'#attr_'+id+'\', \''+id+'\')" class="add">Powiąż</a></td>','<td><a href="#" onclick="DeleteLinkAttr(\'#linked_attr_'+id+'\', \''+id+'\')" class="add">Usuń</a><input type="text" name="attr[]" value="'+id+'" /></td>');
|
||||
htmlAttrVal = htmlAttr.replace('AddLinkAttr','DeleteLinkAttr');
|
||||
htmlAttrVal = htmlAttrVal.replace('class="add">Powiąż</a>','class="delete">Usuń</a><input type="hidden" name="attr[]" value="'+id+'" />');
|
||||
//alert(htmlAttrVal);
|
||||
$("#AddLink").append('<tr id="linked_attr_'+id+'">'+htmlAttrVal+'<tr>');
|
||||
$(value).remove();
|
||||
$('#emptyAttr').remove();
|
||||
|
||||
}
|
||||
|
||||
function DeleteLinkAttr(value, id){
|
||||
|
||||
htmlAttr = $(value).html().replace('linked_attr_'+id, 'attr_'+id);
|
||||
//htmlAttrVal = htmlAttr.replace('<td><a href="#" onclick="AddLinkAttr(\'#attr_'+id+'\', \''+id+'\')" class="add">Powiąż</a></td>','<td><a href="#" onclick="DeleteLinkAttr(\'#linked_attr_'+id+'\', \''+id+'\')" class="add">Usuń</a><input type="text" name="attr[]" value="'+id+'" /></td>');
|
||||
htmlAttrVal = htmlAttr.replace('DeleteLinkAttr','AddLinkAttr');
|
||||
htmlAttrVal = htmlAttrVal.replace('class="delete">Usuń', 'class="add">Powiąż');
|
||||
htmlAttrVal = htmlAttrVal.replace('<input name="attr[]" value="'+id+'" type="hidden">', '');
|
||||
//alert(htmlAttrVal);
|
||||
$("#DeleteLink").append('<tr id="attr_'+id+'">'+htmlAttrVal+'<tr>');
|
||||
$(value).remove();
|
||||
$('#emptyUnlinkedAttr').remove();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function checkLang(value, url, urlDelete){
|
||||
|
||||
//////$.prettyLoader.show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
cache: false,
|
||||
data: ({id: value}),
|
||||
success: function(script){
|
||||
if (script) {
|
||||
if (confirm('Element posiada innę wersję jezykową!\n Czy napewno usunęć ten element w tym języku?')){document.location.href = urlDelete;} else {return false;}
|
||||
} else {
|
||||
if(confirm('Czy napewno usunęć ten element?')){
|
||||
document.location.href = urlDelete;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//$("#categoryOptions").html(html);
|
||||
//////$.prettyLoader.hide();
|
||||
}
|
||||
});
|
||||
//$('#datePast').val($('#calendar').val());
|
||||
}
|
||||
|
||||
37
_rejestracja/Static/script/tree.js
Normal file
@@ -0,0 +1,37 @@
|
||||
function ShowChildren(id) {
|
||||
document.getElementById(id).style.display='';
|
||||
document.getElementById('minus_'+id).style.display='';
|
||||
document.getElementById('plus_'+id).style.display='none';
|
||||
}
|
||||
|
||||
function HiddenChildren(id) {
|
||||
document.getElementById(id).style.display='none';
|
||||
document.getElementById('minus_'+id).style.display='none';
|
||||
document.getElementById('plus_'+id).style.display='';
|
||||
}
|
||||
|
||||
|
||||
function GetFromFCK(name) {
|
||||
|
||||
var oEditor;
|
||||
|
||||
//alert(name);
|
||||
|
||||
//try {
|
||||
//oEditor = FCKeditorAPI.GetInstance(name) ;
|
||||
//$(name + 'FromFCK').value = FCKeditorAPI.GetInstance('zajawka').EditorDocument.body.innerHTML;
|
||||
|
||||
$(name + 'FromFCK').value = $(name + '___Frame').contentWindow.document.getElementById('xEditingArea').firstChild.contentWindow.document.body.innerHTML;
|
||||
|
||||
//} catch (err) {
|
||||
// try {
|
||||
// oEditor = FCKeditorAPI.GetInstance(name) ;
|
||||
// $(name + 'FromFCK').value = oEditor.GetXHTML();
|
||||
// } catch (err) {
|
||||
// alert(err.message + '\n\n' + name);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
function displayLightbox(ob) {
|
||||
}
|
||||
211
_rejestracja/Static/script/uploader.js
Normal file
@@ -0,0 +1,211 @@
|
||||
var globCropLBox = null;
|
||||
var globImgSrc = null;
|
||||
|
||||
function createUploadLightbox(url, options, parameters) {
|
||||
var lbIdent, lbAction, create;
|
||||
|
||||
if (url == undefined) {
|
||||
create = false;
|
||||
} else {
|
||||
create = true;
|
||||
}
|
||||
|
||||
if (typeof url == 'object') {
|
||||
url = url.href;
|
||||
}
|
||||
|
||||
if (create) {
|
||||
globCropLBox = new lightbox(url, options, parameters);
|
||||
}
|
||||
|
||||
lbIdent = 'lightboxClose';
|
||||
lbAction = 'delete globCropperObj; globCropperObj = null;';
|
||||
|
||||
if (!Dosia.CheckAction(lbIdent, lbAction)) {
|
||||
Dosia.AddAction2Run(lbIdent, lbAction);
|
||||
}
|
||||
}
|
||||
|
||||
function displayUpload(url, options) {
|
||||
createUploadLightbox(url, options);
|
||||
}
|
||||
|
||||
function cropperLoading(display, alt) {
|
||||
var uploadForm, loading;
|
||||
|
||||
try {
|
||||
uploadForm = document.forms['photoCropperPhotoUpload'];
|
||||
|
||||
if (display == true) {
|
||||
|
||||
uploadForm.style.display = 'none';
|
||||
|
||||
loading = new Element('img', {'src' : urlStatic + '/image/Admin/loaderH.gif', 'alt' : alt, 'title' : alt});
|
||||
|
||||
uploadForm.appendChild(loading);
|
||||
}
|
||||
} catch (err) {
|
||||
alert('1' + err.message);
|
||||
}
|
||||
}
|
||||
|
||||
function cropperDisplayError(error) {
|
||||
var uploadForm, errorArea;
|
||||
try {
|
||||
uploadForm = document.forms['photoCropperPhotoUpload'];
|
||||
errorArea = $('photoCropperErrorArea');
|
||||
|
||||
uploadForm.firstChild.style.display = 'block';
|
||||
errorArea.innerHTML = error;
|
||||
|
||||
cropperLoading(false); } catch (err) {
|
||||
alert('2' + err.message);
|
||||
}
|
||||
}
|
||||
|
||||
function startUpload(iframeName, obj) {
|
||||
var iframeObj;
|
||||
|
||||
try {
|
||||
|
||||
cropperLoading(true, 'Trwa wczytywanie zdjęcia...');
|
||||
|
||||
if (obj.elements[0].value == '' || !obj.elements[0].value) {
|
||||
cropperDisplayError('Musisz wybrać plik na avatara.');
|
||||
}
|
||||
|
||||
iframeObj = $(iframeName);
|
||||
|
||||
iframeObj.src = obj.action;
|
||||
|
||||
if (globCropperObj) {
|
||||
globCropperObj.reset();
|
||||
}
|
||||
|
||||
obj.submit();
|
||||
} catch (err) {
|
||||
alert('3' + err.message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function finishUpload(url, parameters) {
|
||||
var cropArea;
|
||||
|
||||
if (!globCropLBox) {
|
||||
params = {'photoWidth' : parameters.photoWidth, 'photoHeight' : parameters.photoHeight, 'photoFile' : parameters.photoPath};
|
||||
createUploadLightbox(url, null, params);
|
||||
}
|
||||
|
||||
cropArea = $(parameters.prefix + 'CropArea');
|
||||
|
||||
if (!globImgSrc) {
|
||||
globImgSrc = cropArea.src;
|
||||
}
|
||||
|
||||
cropArea.src = urlStatic + parameters.photoPath;
|
||||
|
||||
initCropper(null, parameters.photoWidth, parameters.photoHeight);
|
||||
|
||||
$(parameters.prefix + 'ImageFileName').value = parameters.photoPath;
|
||||
|
||||
cropperLoading(false);
|
||||
}
|
||||
|
||||
function failedUpload(fieldName, parameters) {
|
||||
var cropArea = $(globCropperParam.prefix + 'CropArea');
|
||||
|
||||
if (parameters) {
|
||||
cropperDisplayError(parameters.error);
|
||||
}
|
||||
|
||||
if (globImgSrc && cropArea) {
|
||||
cropArea.src = globImgSrc;
|
||||
}
|
||||
|
||||
if (globCropperObj) {
|
||||
globCropperObj.setSize(300, 300);
|
||||
}
|
||||
|
||||
destructCropper(true);
|
||||
}
|
||||
|
||||
function refreshImage(className, photoPath) {
|
||||
var places, data, image;
|
||||
|
||||
places = document.getElementsByClassName(className);
|
||||
|
||||
//alert(places);
|
||||
|
||||
if (places && places.length > 0) {
|
||||
data = new Date();
|
||||
image = new Element('img', {'src' : urlStatic + '/upload/' + photoPath + '?' + data.getSeconds() + data.getMilliseconds(), 'alt' : ''});
|
||||
|
||||
for ( i = 0 ; i < places.length ; i++) {
|
||||
places[i].innerHTML = '';
|
||||
places[i].appendChild(image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doCropPhoto(formik, prefix) {
|
||||
|
||||
try {
|
||||
var url = formik.action;
|
||||
|
||||
formik.action="#";
|
||||
|
||||
var myAjax = new Ajax.Request(
|
||||
url,
|
||||
{
|
||||
method: 'post',
|
||||
parameters: {
|
||||
'prefix': prefix,
|
||||
'x' : $(prefix + 'ImageCropX1').value,
|
||||
'y' : $(prefix + 'ImageCropY1').value,
|
||||
'w' : $(prefix + 'ImageCropWidth').value,
|
||||
'h' : $(prefix + 'ImageCropHeight').value,
|
||||
'photoFileName' : $(prefix + 'ImageFileName').value,
|
||||
'description' : $(prefix + 'Description').value
|
||||
},
|
||||
onSuccess: function(transport) {
|
||||
var data;
|
||||
var dir;
|
||||
|
||||
try {
|
||||
|
||||
destructCropper();
|
||||
|
||||
data=transport.responseText.evalJSON();
|
||||
|
||||
document.href = document.href + "#EtykietaZdj";
|
||||
|
||||
deactivateLBox(data);
|
||||
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch(err) {
|
||||
alert('a' + err.message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function deactivateLBox(data) {
|
||||
|
||||
refreshImage('_zajawkaPhoto', data['photoPath']);
|
||||
|
||||
globCropLBox.deactivate();
|
||||
|
||||
if(data['redirect']) {
|
||||
if(data['redirect'] == 'self') {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Dosia.AddAction2Run('lightboxOpen', 'createUploadLightbox();');
|
||||
20
_rejestracja/Static/script/validate/extras.editProfile.js
Normal file
@@ -0,0 +1,20 @@
|
||||
$(document).ready(function() {
|
||||
$('._editProfile').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#editProfileForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
$('._changePassword').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#changePasswordForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
$('._cancel').each(function() {
|
||||
$(this).click(function() {
|
||||
document.location.href=this;
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
38
_rejestracja/Static/script/validate/extras.register.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(document).ready(function() {
|
||||
$('._register').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#registerForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
// $('#pinNumber').val(function() {
|
||||
// var l = 0;
|
||||
// while(l < 1000 || l > 9999) {
|
||||
// l = Math.floor(Math.random()*10000);
|
||||
// }
|
||||
// return l;
|
||||
// });
|
||||
//
|
||||
// $('#wgrajAvatar').each(function() {
|
||||
// $(this).click(function() {
|
||||
// MFcropper();
|
||||
// })
|
||||
// });
|
||||
|
||||
|
||||
$('._cancel').each(function() {
|
||||
$(this).click(function() {
|
||||
document.location.href=this;
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function recaptcha(obj) {
|
||||
var arr = $(obj).attr('src').split(",");
|
||||
var rand = Math.random();
|
||||
rand = rand + ".html";
|
||||
arr[1] = rand;
|
||||
$(obj).attr('src',arr.join(","));
|
||||
}
|
||||
8
_rejestracja/Static/script/validate/extras.sendCalc.js
Normal file
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendContact').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendContactForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
8
_rejestracja/Static/script/validate/extras.sendConfig.js
Normal file
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendConfig').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendConfigForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendContact').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendContactForm').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendContactIndex').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendContactFormIndex').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
$(document).ready(function() {
|
||||
$('._sendNewsletterIndex').each(function() {
|
||||
$(this).click(function() {
|
||||
$('#sendNewsletterFormIndex').submit();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
139
_rejestracja/Static/script/validate/validate.editProfile.js
Normal file
@@ -0,0 +1,139 @@
|
||||
$(document).ready(function(){
|
||||
$('#editProfileForm').submit(function() {
|
||||
$('#phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$.validator.addMethod(
|
||||
"requiredCondition",
|
||||
function(value, element, param) {
|
||||
if ($(param).val() != '' && value == '') {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"Pole nie może być puste"
|
||||
);
|
||||
|
||||
$.validator.addMethod(
|
||||
"notEqualTo",
|
||||
function(value, element, param) {
|
||||
if ($(param).val() == value) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
'Nie może być takie samo'
|
||||
);
|
||||
|
||||
$('#editProfileForm').validate({
|
||||
rules: {
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
lastName : {
|
||||
required: true
|
||||
},
|
||||
firstName : {
|
||||
required: true
|
||||
},
|
||||
// address : {
|
||||
// required: true
|
||||
// },
|
||||
city : {
|
||||
required: true
|
||||
},
|
||||
phone : {
|
||||
required: true,
|
||||
regex: /^[0-9\+]{9,14}$/,
|
||||
//remote: mainUrl + "check/phone.html"
|
||||
},
|
||||
zipCode: {
|
||||
regex: /[0-9]{2}\-[0-9]{3}/
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
email : {
|
||||
required: translate('required_email'),
|
||||
email: translate('incorrect_email')
|
||||
},
|
||||
lastName : {
|
||||
required: translate('required_last_name')
|
||||
},
|
||||
firstName : {
|
||||
required: translate('required_first_name')
|
||||
},
|
||||
address: {
|
||||
required: translate('required_address')
|
||||
},
|
||||
city: {
|
||||
required: translate('required_city')
|
||||
},
|
||||
phone : {
|
||||
required: translate('required_phone'),
|
||||
regex: translate('incorrect_phone_number'),
|
||||
remote: translate('phone_in_use')
|
||||
},
|
||||
zipCode : {
|
||||
regex: translate('incorrect_zip_code')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
$('#changePasswordForm').validate({
|
||||
rules: {
|
||||
oldPasswd: {
|
||||
minlength: 5,
|
||||
required: true
|
||||
},
|
||||
newPasswd: {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
notEqualTo: "#oldPasswd"
|
||||
|
||||
},
|
||||
newPasswd2: {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
equalTo: "#newPasswd"
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
oldPasswd: {
|
||||
minlength: translate('too_short_password'),
|
||||
required: translate('required_password')
|
||||
},
|
||||
newPasswd: {
|
||||
required: translate('required_password'),
|
||||
minlength: translate('too_short_password'),
|
||||
notEqualTo: translate('new_and_old_password_are_equal')
|
||||
|
||||
},
|
||||
newPasswd2: {
|
||||
required: translate('required_password'),
|
||||
minlength: translate('too_short_password'),
|
||||
equalTo: translate('not_equal_passwords')
|
||||
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
});
|
||||
138
_rejestracja/Static/script/validate/validate.register.js
Normal file
@@ -0,0 +1,138 @@
|
||||
$(document).ready(function(){
|
||||
$('#registerForm').submit(function() {
|
||||
$('#phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$.validator.addMethod(
|
||||
"requiredCondition",
|
||||
function(value, element, param) {
|
||||
if ($(param).val() != '' || value != '') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
"Pole nie może być puste"
|
||||
);
|
||||
|
||||
// $.validator.addMethod(
|
||||
// "company",
|
||||
// function(value, element, param) {
|
||||
// if(document.getElementById('companyName').value!=''){
|
||||
// if(document.getElementsByName('nip').value=='') {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
// return true
|
||||
// },
|
||||
// "Proszę wypełnić NIP"
|
||||
// );
|
||||
|
||||
$('#registerForm').validate({
|
||||
rules: {
|
||||
login : {
|
||||
required: true,
|
||||
regex: /^[a-zA-Z0-9_-]{4,25}$/,
|
||||
remote: mainUrl + "check_login"
|
||||
},
|
||||
agreement : "required",
|
||||
email : {
|
||||
required: true,
|
||||
email: true,
|
||||
//remote: mainUrl + "check/email.html"
|
||||
},
|
||||
captcha : {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 5,
|
||||
//remote: mainUrl + "check/captcha.html"
|
||||
},
|
||||
password : {
|
||||
required: true,
|
||||
minlength: 5
|
||||
},
|
||||
password2 : {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
equalTo: "#password"
|
||||
},
|
||||
lastName : {
|
||||
required: true
|
||||
},
|
||||
firstName : {
|
||||
required: true
|
||||
},
|
||||
// address : {
|
||||
// required: true
|
||||
// },
|
||||
phone : {
|
||||
required: true,
|
||||
regex: /^[0-9\+]{9,14}$/,
|
||||
//remote: mainUrl + "check/phone.html"
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
login: {
|
||||
required: translate("required_username"),
|
||||
regex: translate('invalid_username'),
|
||||
remote: translate("login_in_use")
|
||||
},
|
||||
agreement: translate('required_agreement'),
|
||||
email: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email'),
|
||||
//remote: translate('email_in_use')
|
||||
},
|
||||
password: {
|
||||
required: translate('required_password'),
|
||||
minlength: translate('too_short_password')
|
||||
},
|
||||
password2: {
|
||||
required: translate('required_password2'),
|
||||
minlength: translate('too_short_password'),
|
||||
equalTo: translate('not_equal_passwords')
|
||||
},
|
||||
captcha: {
|
||||
required: translate('required_captcha'),
|
||||
minlength: translate('too_short_captcha'),
|
||||
maxlength: translate('too_long_captcha'),
|
||||
//remote: translate('incorrect_captcha')
|
||||
},
|
||||
lastName : {
|
||||
required: translate('required_last_name')
|
||||
},
|
||||
firstName: {
|
||||
required: translate('required_first_name')
|
||||
},
|
||||
address: {
|
||||
required: translate('required_address')
|
||||
},
|
||||
city: {
|
||||
required: translate('required_city')
|
||||
},
|
||||
phone : {
|
||||
regex: translate('incorrect_phone_number'),
|
||||
required: translate('required_phone'),
|
||||
remote: translate('phone_in_use')
|
||||
},
|
||||
zipCode : {
|
||||
required: translate('required_zip_code'),
|
||||
regex: translate('incorrect_zip_code')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
$().ready(function(){
|
||||
$('#remindPassword').validate({
|
||||
rules: {
|
||||
confirm_email : {
|
||||
required: true,
|
||||
email: true,
|
||||
remote: mainUrl + "check/email/new/password.html"
|
||||
}
|
||||
|
||||
},
|
||||
messages: {
|
||||
confirm_email: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email'),
|
||||
remote: translate('invalid_email')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
72
_rejestracja/Static/script/validate/validate.sendCalc.js
Normal file
@@ -0,0 +1,72 @@
|
||||
$(document).ready(function () {
|
||||
$('#sendContactForm').submit(function () {
|
||||
$('._phone').each(function () {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#sendContactForm').validate({
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
},
|
||||
surname: {
|
||||
required: true
|
||||
},
|
||||
agree1: {
|
||||
required: true
|
||||
},
|
||||
email: {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
phone: {
|
||||
required: true
|
||||
},
|
||||
address: {
|
||||
required: true
|
||||
},
|
||||
city: {
|
||||
required: true
|
||||
},
|
||||
post_code: {
|
||||
required: true
|
||||
},
|
||||
message: {
|
||||
required: {
|
||||
depends: function() {
|
||||
return ($('input[name=referat]:checked').val() == '1' || $('input[name=poster]:checked').val() == '1');
|
||||
}
|
||||
}
|
||||
},
|
||||
message_long: {
|
||||
required: {
|
||||
depends: function() {
|
||||
return $('input[name=referat]:checked').val() == '1' || $('input[name=poster]:checked').val() == '1';
|
||||
}
|
||||
}
|
||||
},
|
||||
hiddenRecaptcha: {
|
||||
required: function () {
|
||||
if (grecaptcha.getResponse() == '') {
|
||||
$('#hiddenRecaptcha').valid();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
//function recaptchaCallback() {
|
||||
// $('#hiddenRecaptcha').valid();
|
||||
//}
|
||||
//;
|
||||
75
_rejestracja/Static/script/validate/validate.sendConfig.js
Normal file
@@ -0,0 +1,75 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendConfigForm').submit(function() {
|
||||
$('#phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendConfigForm').validate({
|
||||
rules: {
|
||||
// name : {
|
||||
// required: true
|
||||
// },
|
||||
// company : {
|
||||
// required: true
|
||||
// },
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
captcha : {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 5,
|
||||
//remote: mainUrl + "check/captcha.html"
|
||||
},
|
||||
// fax : {
|
||||
// number: true
|
||||
// },
|
||||
phone : {
|
||||
required: true,
|
||||
regex: /^[0-9\+]{9,14}$/,
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: translate('required_name')
|
||||
},
|
||||
company : {
|
||||
required: translate('required_company')
|
||||
},
|
||||
email: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email')
|
||||
},
|
||||
content: {
|
||||
required: translate('required_message')
|
||||
},
|
||||
captcha: {
|
||||
required: translate('required_captcha'),
|
||||
minlength: translate('too_short_captcha'),
|
||||
maxlength: translate('too_long_captcha'),
|
||||
//remote: translate('incorrect_captcha')
|
||||
},
|
||||
phone : {
|
||||
regex: translate('incorrect_phone_number'),
|
||||
required: translate('required_phone'),
|
||||
//remote: translate('phone_in_use')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
75
_rejestracja/Static/script/validate/validate.sendContact.js
Normal file
@@ -0,0 +1,75 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendContactForm').submit(function() {
|
||||
$('#phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendContactForm').validate({
|
||||
rules: {
|
||||
name : {
|
||||
required: true
|
||||
},
|
||||
company : {
|
||||
required: true
|
||||
},
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
captcha : {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 5,
|
||||
//remote: mainUrl + "check/captcha.html"
|
||||
},
|
||||
fax : {
|
||||
number: true
|
||||
},
|
||||
content : {
|
||||
required: true
|
||||
},
|
||||
subject : {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: translate('required_name')
|
||||
},
|
||||
company : {
|
||||
required: translate('required_company')
|
||||
},
|
||||
email: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email')
|
||||
},
|
||||
content: {
|
||||
required: translate('required_message')
|
||||
},
|
||||
captcha: {
|
||||
required: translate('required_captcha'),
|
||||
minlength: translate('too_short_captcha'),
|
||||
maxlength: translate('too_long_captcha'),
|
||||
//remote: translate('incorrect_captcha')
|
||||
},
|
||||
subject: {
|
||||
required: translate('required_subject')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendContactFormIndex').submit(function() {
|
||||
$('#phone').each(function() {
|
||||
this.value = this.value.toString().split(" ").join("").split("-").join("").split("+").join("00");
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.addMethod(
|
||||
"regex",
|
||||
function(value, element, regexp) {
|
||||
var check = false;
|
||||
var re = new RegExp(regexp);
|
||||
return this.optional(element) || re.test(value);
|
||||
},
|
||||
"pole musi zawierać tylko litery"
|
||||
);
|
||||
|
||||
$('#sendContactFormIndex').validate({
|
||||
rules: {
|
||||
name : {
|
||||
required: true
|
||||
},
|
||||
company : {
|
||||
required: true
|
||||
},
|
||||
email : {
|
||||
required: true,
|
||||
email: true
|
||||
},
|
||||
captcha : {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 5,
|
||||
remote: mainUrl + "/check/captcha.html"
|
||||
},
|
||||
fax : {
|
||||
number: true
|
||||
},
|
||||
content : {
|
||||
required: true
|
||||
},
|
||||
subject : {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
name: {
|
||||
required: translate('required_name')
|
||||
},
|
||||
company : {
|
||||
required: translate('required_company')
|
||||
},
|
||||
email: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email')
|
||||
},
|
||||
content: {
|
||||
required: translate('required_message')
|
||||
},
|
||||
captcha: {
|
||||
required: translate('required_captcha'),
|
||||
minlength: translate('too_short_captcha'),
|
||||
maxlength: translate('too_long_captcha'),
|
||||
//remote: translate('incorrect_captcha')
|
||||
},
|
||||
subject: {
|
||||
required: translate('required_subject')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -0,0 +1,23 @@
|
||||
$(document).ready(function(){
|
||||
$('#sendNewsletterFormIndex').submit(function() {
|
||||
});
|
||||
|
||||
$('#sendNewsletterFormIndex').validate({
|
||||
rules: {
|
||||
email_newsletter : {
|
||||
required: true,
|
||||
email: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
email_newsletter: {
|
||||
required: translate('required_email'),
|
||||
email: translate('invalid_email')
|
||||
}
|
||||
},
|
||||
errorElement: "p",
|
||||
errorClass: "warning"
|
||||
});
|
||||
|
||||
|
||||
});
|
||||