Initial commit: Backup der Webseiten
- zoesch.de - blitzkiste.net - gruene-hassberge (norbert.zoesch.de) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
887
zoesch.de/preis/scripts/bootstrap-datetimepicker.min.js
vendored
Normal file
887
zoesch.de/preis/scripts/bootstrap-datetimepicker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
zoesch.de/preis/scripts/bootstrap.min.js
vendored
Normal file
7
zoesch.de/preis/scripts/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
92
zoesch.de/preis/scripts/globalize.culture.de-DE.js
Normal file
92
zoesch.de/preis/scripts/globalize.culture.de-DE.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Globalize Culture de-DE
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright Software Freedom Conservancy, Inc.
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* This file was generated by the Globalize Culture Generator
|
||||
* Translation: bugs found in this file need to be fixed in the generator
|
||||
*/
|
||||
|
||||
(function( window, undefined ) {
|
||||
|
||||
var Globalize;
|
||||
|
||||
if ( typeof require !== "undefined"
|
||||
&& typeof exports !== "undefined"
|
||||
&& typeof module !== "undefined" ) {
|
||||
// Assume CommonJS
|
||||
Globalize = require( "globalize" );
|
||||
} else {
|
||||
// Global variable
|
||||
Globalize = window.Globalize;
|
||||
}
|
||||
|
||||
Globalize.addCultureInfo( "de-DE", "default", {
|
||||
name: "de-DE",
|
||||
englishName: "German (Germany)",
|
||||
nativeName: "Deutsch (Deutschland)",
|
||||
language: "de",
|
||||
numberFormat: {
|
||||
",": ".",
|
||||
".": ",",
|
||||
NaN: "n. def.",
|
||||
negativeInfinity: "-unendlich",
|
||||
positiveInfinity: "+unendlich",
|
||||
percent: {
|
||||
pattern: ["-n%","n%"],
|
||||
",": ".",
|
||||
".": ","
|
||||
},
|
||||
currency: {
|
||||
pattern: ["-n $","n $"],
|
||||
",": ".",
|
||||
".": ",",
|
||||
symbol: "€"
|
||||
}
|
||||
},
|
||||
calendars: {
|
||||
standard: {
|
||||
"/": ".",
|
||||
firstDay: 1,
|
||||
days: {
|
||||
names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
|
||||
namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
|
||||
namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
|
||||
},
|
||||
months: {
|
||||
names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
|
||||
namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
|
||||
},
|
||||
AM: null,
|
||||
PM: null,
|
||||
eras: [{"name":"n. Chr.","start":null,"offset":0}],
|
||||
patterns: {
|
||||
d: "dd.MM.yyyy",
|
||||
D: "dddd, d. MMMM yyyy",
|
||||
t: "HH:mm",
|
||||
T: "HH:mm:ss",
|
||||
f: "dddd, d. MMMM yyyy HH:mm",
|
||||
F: "dddd, d. MMMM yyyy HH:mm:ss",
|
||||
M: "dd MMMM",
|
||||
Y: "MMMM yyyy"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}( this ));
|
||||
Hide details
|
||||
Change log
|
||||
r595 by hrishi2323 on May 17, 2012 Diff
|
||||
jquery grid demo.
|
||||
Go to:
|
||||
Project members, sign in to write a code review
|
||||
Older revisions
|
||||
All revisions of this file
|
||||
File info
|
||||
Size: 1898 bytes, 81 lines
|
||||
View raw file
|
||||
355
zoesch.de/preis/scripts/globalize.js
Normal file
355
zoesch.de/preis/scripts/globalize.js
Normal file
@@ -0,0 +1,355 @@
|
||||
/**
|
||||
* Globalize v1.0.0
|
||||
*
|
||||
* http://github.com/jquery/globalize
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-04-23T12:02Z
|
||||
*/
|
||||
/*!
|
||||
* Globalize v1.0.0 2015-04-23T12:02Z Released under the MIT license
|
||||
* http://git.io/TrdQbw
|
||||
*/
|
||||
(function( root, factory ) {
|
||||
|
||||
// UMD returnExports
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD
|
||||
define([
|
||||
"cldr",
|
||||
"cldr/event"
|
||||
], factory );
|
||||
} else if ( typeof exports === "object" ) {
|
||||
|
||||
// Node, CommonJS
|
||||
module.exports = factory( require( "cldrjs" ) );
|
||||
} else {
|
||||
|
||||
// Global
|
||||
root.Globalize = factory( root.Cldr );
|
||||
}
|
||||
}( this, function( Cldr ) {
|
||||
|
||||
|
||||
/**
|
||||
* A toString method that outputs meaningful values for objects or arrays and
|
||||
* still performs as fast as a plain string in case variable is string, or as
|
||||
* fast as `"" + number` in case variable is a number.
|
||||
* Ref: http://jsperf.com/my-stringify
|
||||
*/
|
||||
var toString = function( variable ) {
|
||||
return typeof variable === "string" ? variable : ( typeof variable === "number" ? "" +
|
||||
variable : JSON.stringify( variable ) );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* formatMessage( message, data )
|
||||
*
|
||||
* @message [String] A message with optional {vars} to be replaced.
|
||||
*
|
||||
* @data [Array or JSON] Object with replacing-variables content.
|
||||
*
|
||||
* Return the formatted message. For example:
|
||||
*
|
||||
* - formatMessage( "{0} second", [ 1 ] ); // 1 second
|
||||
*
|
||||
* - formatMessage( "{0}/{1}", ["m", "s"] ); // m/s
|
||||
*
|
||||
* - formatMessage( "{name} <{email}>", {
|
||||
* name: "Foo",
|
||||
* email: "bar@baz.qux"
|
||||
* }); // Foo <bar@baz.qux>
|
||||
*/
|
||||
var formatMessage = function( message, data ) {
|
||||
|
||||
// Replace {attribute}'s
|
||||
message = message.replace( /{[0-9a-zA-Z-_. ]+}/g, function( name ) {
|
||||
name = name.replace( /^{([^}]*)}$/, "$1" );
|
||||
return toString( data[ name ] );
|
||||
});
|
||||
|
||||
return message;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var objectExtend = function() {
|
||||
var destination = arguments[ 0 ],
|
||||
sources = [].slice.call( arguments, 1 );
|
||||
|
||||
sources.forEach(function( source ) {
|
||||
var prop;
|
||||
for ( prop in source ) {
|
||||
destination[ prop ] = source[ prop ];
|
||||
}
|
||||
});
|
||||
|
||||
return destination;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var createError = function( code, message, attributes ) {
|
||||
var error;
|
||||
|
||||
message = code + ( message ? ": " + formatMessage( message, attributes ) : "" );
|
||||
error = new Error( message );
|
||||
error.code = code;
|
||||
|
||||
objectExtend( error, attributes );
|
||||
|
||||
return error;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validate = function( code, message, check, attributes ) {
|
||||
if ( !check ) {
|
||||
throw createError( code, message, attributes );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var alwaysArray = function( stringOrArray ) {
|
||||
return Array.isArray( stringOrArray ) ? stringOrArray : stringOrArray ? [ stringOrArray ] : [];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateCldr = function( path, value, options ) {
|
||||
var skipBoolean;
|
||||
options = options || {};
|
||||
|
||||
skipBoolean = alwaysArray( options.skip ).some(function( pathRe ) {
|
||||
return pathRe.test( path );
|
||||
});
|
||||
|
||||
validate( "E_MISSING_CLDR", "Missing required CLDR content `{path}`.", value || skipBoolean, {
|
||||
path: path
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateDefaultLocale = function( value ) {
|
||||
validate( "E_DEFAULT_LOCALE_NOT_DEFINED", "Default locale has not been defined.",
|
||||
value !== undefined, {} );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateParameterPresence = function( value, name ) {
|
||||
validate( "E_MISSING_PARAMETER", "Missing required parameter `{name}`.",
|
||||
value !== undefined, { name: name });
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* range( value, name, minimum, maximum )
|
||||
*
|
||||
* @value [Number].
|
||||
*
|
||||
* @name [String] name of variable.
|
||||
*
|
||||
* @minimum [Number]. The lowest valid value, inclusive.
|
||||
*
|
||||
* @maximum [Number]. The greatest valid value, inclusive.
|
||||
*/
|
||||
var validateParameterRange = function( value, name, minimum, maximum ) {
|
||||
validate(
|
||||
"E_PAR_OUT_OF_RANGE",
|
||||
"Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].",
|
||||
value === undefined || value >= minimum && value <= maximum,
|
||||
{
|
||||
maximum: maximum,
|
||||
minimum: minimum,
|
||||
name: name,
|
||||
value: value
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateParameterType = function( value, name, check, expected ) {
|
||||
validate(
|
||||
"E_INVALID_PAR_TYPE",
|
||||
"Invalid `{name}` parameter ({value}). {expected} expected.",
|
||||
check,
|
||||
{
|
||||
expected: expected,
|
||||
name: name,
|
||||
value: value
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateParameterTypeLocale = function( value, name ) {
|
||||
validateParameterType(
|
||||
value,
|
||||
name,
|
||||
value === undefined || typeof value === "string" || value instanceof Cldr,
|
||||
"String or Cldr instance"
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Function inspired by jQuery Core, but reduced to our use case.
|
||||
*/
|
||||
var isPlainObject = function( obj ) {
|
||||
return obj !== null && "" + obj === "[object Object]";
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var validateParameterTypePlainObject = function( value, name ) {
|
||||
validateParameterType(
|
||||
value,
|
||||
name,
|
||||
value === undefined || isPlainObject( value ),
|
||||
"Plain Object"
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var alwaysCldr = function( localeOrCldr ) {
|
||||
return localeOrCldr instanceof Cldr ? localeOrCldr : new Cldr( localeOrCldr );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions?redirectlocale=en-US&redirectslug=JavaScript%2FGuide%2FRegular_Expressions
|
||||
var regexpEscape = function( string ) {
|
||||
return string.replace( /([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1" );
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
var stringPad = function( str, count, right ) {
|
||||
var length;
|
||||
if ( typeof str !== "string" ) {
|
||||
str = String( str );
|
||||
}
|
||||
for ( length = str.length; length < count; length += 1 ) {
|
||||
str = ( right ? ( str + "0" ) : ( "0" + str ) );
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
function validateLikelySubtags( cldr ) {
|
||||
cldr.once( "get", validateCldr );
|
||||
cldr.get( "supplemental/likelySubtags" );
|
||||
}
|
||||
|
||||
/**
|
||||
* [new] Globalize( locale|cldr )
|
||||
*
|
||||
* @locale [String]
|
||||
*
|
||||
* @cldr [Cldr instance]
|
||||
*
|
||||
* Create a Globalize instance.
|
||||
*/
|
||||
function Globalize( locale ) {
|
||||
if ( !( this instanceof Globalize ) ) {
|
||||
return new Globalize( locale );
|
||||
}
|
||||
|
||||
validateParameterPresence( locale, "locale" );
|
||||
validateParameterTypeLocale( locale, "locale" );
|
||||
|
||||
this.cldr = alwaysCldr( locale );
|
||||
|
||||
validateLikelySubtags( this.cldr );
|
||||
}
|
||||
|
||||
/**
|
||||
* Globalize.load( json, ... )
|
||||
*
|
||||
* @json [JSON]
|
||||
*
|
||||
* Load resolved or unresolved cldr data.
|
||||
* Somewhat equivalent to previous Globalize.addCultureInfo(...).
|
||||
*/
|
||||
Globalize.load = function() {
|
||||
// validations are delegated to Cldr.load().
|
||||
Cldr.load.apply( Cldr, arguments );
|
||||
};
|
||||
|
||||
/**
|
||||
* Globalize.locale( [locale|cldr] )
|
||||
*
|
||||
* @locale [String]
|
||||
*
|
||||
* @cldr [Cldr instance]
|
||||
*
|
||||
* Set default Cldr instance if locale or cldr argument is passed.
|
||||
*
|
||||
* Return the default Cldr instance.
|
||||
*/
|
||||
Globalize.locale = function( locale ) {
|
||||
validateParameterTypeLocale( locale, "locale" );
|
||||
|
||||
if ( arguments.length ) {
|
||||
this.cldr = alwaysCldr( locale );
|
||||
validateLikelySubtags( this.cldr );
|
||||
}
|
||||
return this.cldr;
|
||||
};
|
||||
|
||||
/**
|
||||
* Optimization to avoid duplicating some internal functions across modules.
|
||||
*/
|
||||
Globalize._alwaysArray = alwaysArray;
|
||||
Globalize._createError = createError;
|
||||
Globalize._formatMessage = formatMessage;
|
||||
Globalize._isPlainObject = isPlainObject;
|
||||
Globalize._objectExtend = objectExtend;
|
||||
Globalize._regexpEscape = regexpEscape;
|
||||
Globalize._stringPad = stringPad;
|
||||
Globalize._validate = validate;
|
||||
Globalize._validateCldr = validateCldr;
|
||||
Globalize._validateDefaultLocale = validateDefaultLocale;
|
||||
Globalize._validateParameterPresence = validateParameterPresence;
|
||||
Globalize._validateParameterRange = validateParameterRange;
|
||||
Globalize._validateParameterTypePlainObject = validateParameterTypePlainObject;
|
||||
Globalize._validateParameterType = validateParameterType;
|
||||
|
||||
return Globalize;
|
||||
|
||||
|
||||
|
||||
|
||||
}));
|
||||
1662
zoesch.de/preis/scripts/jqm-datebox.core.js
Normal file
1662
zoesch.de/preis/scripts/jqm-datebox.core.js
Normal file
File diff suppressed because it is too large
Load Diff
714
zoesch.de/preis/scripts/jqm-datebox.mode.calbox.js
Normal file
714
zoesch.de/preis/scripts/jqm-datebox.mode.calbox.js
Normal file
@@ -0,0 +1,714 @@
|
||||
/* jQuery-Mobile-DateBox */
|
||||
|
||||
/*! CALBOX Mode */
|
||||
|
||||
(function($) {
|
||||
$.extend( $.mobile.datebox.prototype.options, {
|
||||
themeDateToday: "b",
|
||||
themeDayHigh: "b",
|
||||
themeDatePick: "b",
|
||||
themeDateHigh: "b",
|
||||
themeDateHighAlt: "b",
|
||||
themeDateHighRec: "b",
|
||||
themeDate: "a",
|
||||
|
||||
calNextMonthIcon: "plus",
|
||||
calPrevMonthIcon: "minus",
|
||||
|
||||
calHighToday: true,
|
||||
calHighPick: true,
|
||||
|
||||
calShowDays: true,
|
||||
calOnlyMonth: false,
|
||||
calWeekMode: false,
|
||||
calWeekModeDay: 1,
|
||||
calControlGroup: false,
|
||||
calShowWeek: false,
|
||||
calUsePickers: false,
|
||||
calNoHeader: false,
|
||||
calFormatter: false,
|
||||
calAlwaysValidateDates: false,
|
||||
|
||||
calYearPickMin: -6,
|
||||
calYearPickMax: 6,
|
||||
|
||||
useTodayButton: false,
|
||||
useTomorrowButton: false,
|
||||
useCollapsedBut: false,
|
||||
|
||||
highDays: false,
|
||||
highDates: false,
|
||||
highDatesRec: false,
|
||||
highDatesAlt: false,
|
||||
enableDates: false,
|
||||
calDateList: false,
|
||||
calShowDateList: false
|
||||
});
|
||||
$.extend( $.mobile.datebox.prototype, {
|
||||
_cal_gen: function (start,prev,last,other,month) {
|
||||
var rc = 0, cc = 0, day = 1,
|
||||
next = 1, cal = [], row = [], stop = false;
|
||||
|
||||
for ( rc = 0; rc <= 5; rc++ ) {
|
||||
if ( stop === false ) {
|
||||
row = [];
|
||||
for ( cc = 0; cc <= 6; cc++ ) {
|
||||
if ( rc === 0 && cc < start ) {
|
||||
if ( other === true ) {
|
||||
row.push([prev + (cc - start) + 1,month-1]);
|
||||
} else {
|
||||
row.push(false);
|
||||
}
|
||||
} else if ( rc > 3 && day > last ) {
|
||||
if ( other === true ) {
|
||||
row.push([next,month+1]); next++;
|
||||
} else {
|
||||
row.push(false);
|
||||
}
|
||||
stop = true;
|
||||
} else {
|
||||
row.push([day,month]); day++;
|
||||
if ( day > last ) { stop = true; }
|
||||
}
|
||||
}
|
||||
cal.push(row);
|
||||
}
|
||||
}
|
||||
return cal;
|
||||
},
|
||||
_cal_check : function (checkDates, year, month, date, done) {
|
||||
var w = this, i,
|
||||
o = this.options,
|
||||
maxDate = done.x,
|
||||
minDate = done.i,
|
||||
thisDate = done.t,
|
||||
presetDay = done.p,
|
||||
day = new this._date(year,month,date,0,0,0,0).getDay(),
|
||||
bdRec = o.blackDatesRec,
|
||||
hdRec = o.highDatesRec,
|
||||
ret = {
|
||||
ok: true,
|
||||
iso: year + "-" + w._zPad(month+1) + "-" + w._zPad(date),
|
||||
theme: o.themeDate,
|
||||
force: false,
|
||||
recok: true,
|
||||
rectheme: false
|
||||
};
|
||||
|
||||
if ( month === 12 ) { ret.iso = ( year + 1 ) + "-01-" + w._zPad(date); }
|
||||
if ( month === -1 ) { ret.iso = ( year - 1 ) + "-12-" + w._zPad(date); }
|
||||
|
||||
ret.comp = parseInt( ret.iso.replace( /-/g, "" ), 10 );
|
||||
|
||||
if ( bdRec !== false ) {
|
||||
for ( i=0; i < bdRec.length; i++ ) {
|
||||
if (
|
||||
( bdRec[i][0] === -1 || bdRec[i][0] === year ) &&
|
||||
( bdRec[i][1] === -1 || bdRec[i][1] === month ) &&
|
||||
( bdRec[i][2] === -1 || bdRec[i][2] === date )
|
||||
) { ret.ok = false; }
|
||||
}
|
||||
}
|
||||
|
||||
if ( $.isArray( o.enableDates ) && $.inArray( ret.iso, o.enableDates ) < 0 ) {
|
||||
ret.ok = false;
|
||||
} else if ( checkDates ) {
|
||||
if (
|
||||
( ret.recok !== true ) ||
|
||||
( o.afterToday && thisDate.comp() > ret.comp ) ||
|
||||
( o.beforeToday && thisDate.comp() < ret.comp ) ||
|
||||
( o.notToday && thisDate.comp() === ret.comp ) ||
|
||||
( o.maxDays !== false && maxDate.comp() < ret.comp ) ||
|
||||
( o.minDays !== false && minDate.comp() > ret.comp ) ||
|
||||
( $.isArray(o.blackDays) && $.inArray(day, o.blackDays) > -1 ) ||
|
||||
( $.isArray(o.blackDates) && $.inArray(ret.iso, o.blackDates) > -1 )
|
||||
) {
|
||||
ret.ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $.isArray(o.whiteDates) && $.inArray(ret.iso, o.whiteDates) > -1 ) {
|
||||
ret.ok = true;
|
||||
}
|
||||
|
||||
if ( ret.ok ) {
|
||||
if ( hdRec !== false ) {
|
||||
for ( i=0; i < hdRec.length; i++ ) {
|
||||
if (
|
||||
( hdRec[i][0] === -1 || hdRec[i][0] === year ) &&
|
||||
( hdRec[i][1] === -1 || hdRec[i][1] === month ) &&
|
||||
( hdRec[i][2] === -1 || hdRec[i][2] === date )
|
||||
) { ret.rectheme = true; }
|
||||
}
|
||||
}
|
||||
|
||||
if ( o.calHighPick && date === presetDay &&
|
||||
( w.d.input.val() !== "" || o.defaultValue !== false )) {
|
||||
ret.theme = o.themeDatePick;
|
||||
} else if ( o.calHighToday && ret.comp === thisDate.comp() ) {
|
||||
ret.theme = o.themeDateToday;
|
||||
} else if ( o.calHighPick && w.calDateVisible && w.calBackDate !== false &&
|
||||
w.calBackDate.comp() === ret.comp ) {
|
||||
ret.theme = o.themeDatePick;
|
||||
ret.force = true;
|
||||
} else if ( $.isArray(o.highDatesAlt) &&
|
||||
($.inArray(ret.iso, o.highDatesAlt) > -1)
|
||||
) {
|
||||
ret.theme = o.themeDateHighAlt;
|
||||
} else if ( $.isArray(o.highDates) && ($.inArray(ret.iso, o.highDates) > -1) ) {
|
||||
ret.theme = o.themeDateHigh;
|
||||
} else if ( $.isArray(o.highDays) && ($.inArray(day, o.highDays) > -1) ) {
|
||||
ret.theme = o.themeDayHigh;
|
||||
} else if ( $.isArray(o.highDatesRec) && ret.rectheme === true ) {
|
||||
ret.theme = o.themeDateHighRec;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
});
|
||||
$.extend( $.mobile.datebox.prototype._build, {
|
||||
"calbox": function () {
|
||||
var tempVal, pickerControl, calContent, genny, weekdayControl, listControl,
|
||||
row, col, rows, cols, htmlRow, i, prangeS, prangeL, fmtRet, fmtObj,
|
||||
absStartDO, absEndDO,
|
||||
w = this,
|
||||
o = this.options,
|
||||
dList = o.calDateList,
|
||||
uid = "ui-datebox-",
|
||||
curDate = ( ( w.calBackDate !== false &&
|
||||
w.theDate.get(0) === w.calBackDate.get(0) &&
|
||||
w.theDate.get(1) === w.calBackDate.get(1) ) ?
|
||||
new w._date(w.calBackDate.getTime()) :
|
||||
w.theDate ),
|
||||
checked = false,
|
||||
checkDatesObj = {},
|
||||
minDate = w.initDate.copy(),
|
||||
maxDate = w.initDate.copy(),
|
||||
cStartDay = (curDate.copy([0],[0,0,1]).getDay() - w.__( "calStartDay" ) + 7) % 7,
|
||||
curMonth = curDate.get(1),
|
||||
curYear = curDate.get(0),
|
||||
curDateArr = curDate.getArray(),
|
||||
presetDate = ( w.d.input.val() === "" ) ?
|
||||
w._startOffset( w._makeDate( w.d.input.val() ) ) :
|
||||
w._makeDate( w.d.input.val() ),
|
||||
presetDay = -1,
|
||||
cTodayDate = new w._date(),
|
||||
cTodayDateArr = cTodayDate.getArray(),
|
||||
weekNum = curDate
|
||||
.copy( [0], [0,0,1] )
|
||||
.adj( 2, ( -1 * cStartDay ) +( w.__( "calStartDay" ) === 0 ? 1 : 0 ) )
|
||||
.getDWeek(4),
|
||||
weekModeSel = 0,
|
||||
isTrueMonth = false,
|
||||
isTrueYear = false,
|
||||
cMonthEnd = 32 - w.theDate.copy([0],[0,0,32,13]).getDate(),
|
||||
cPrevMonthEnd = 32 - w.theDate.copy([0,-1],[0,0,32,13]).getDate(),
|
||||
checkDates = (
|
||||
o.afterToday || o.beforeToday || o.notToday || o.calAlwaysValidateDates ||
|
||||
o.maxDays || o.minDays || o.blackDays || o.blackDates
|
||||
) ?
|
||||
true :
|
||||
false;
|
||||
|
||||
if ( w.calBackDate !== false ) {
|
||||
if ( w.theDate.get(0) === w.calBackDate.get(0) &&
|
||||
w.theDate.get(1) === w.calBackDate.get(1) ) {
|
||||
w.theDate = new w._date(w.calBackDate.getTime());
|
||||
w.calBackDate = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( typeof w.d.intHTML !== "boolean" ) {
|
||||
w.d.intHTML.remove();
|
||||
w.d.intHTML = null;
|
||||
}
|
||||
|
||||
w.d.headerText = ( ( w._grabLabel() !== false ) ?
|
||||
w._grabLabel() :
|
||||
w.__( "titleDateDialogLabel" )
|
||||
);
|
||||
w.d.intHTML = $( "<span>" );
|
||||
|
||||
$("<div class='" + uid + "gridheader'><div class='" + uid + "gridlabel'><h4>" +
|
||||
w._formatter( w.__( "calHeaderFormat" ), w.theDate ) +
|
||||
"</h4></div></div>")
|
||||
.appendTo(w.d.intHTML);
|
||||
|
||||
// Previous and next month buttons, define booleans to decide if they should do anything
|
||||
$( "<div class='" + uid + "gridplus" + ( w.__( "isRTL" ) ? "-rtl" : "") +
|
||||
"'><a href='#'>" + w.__( "nextMonth") + "</a></div>" )
|
||||
.prependTo( w.d.intHTML.find( "." + uid + "gridheader" ) )
|
||||
.find( "a" )
|
||||
.addClass( "ui-btn-inline ui-link ui-btn ui-btn-" +
|
||||
o.themeDate +
|
||||
" ui-icon-" + o.calNextMonthIcon +
|
||||
" ui-btn-icon-notext ui-shadow ui-corner-all"
|
||||
)
|
||||
.on(o.clickEventAlt, function(e) {
|
||||
e.preventDefault();
|
||||
if ( w.calNext ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
if ( w.theDate.getDate() > 28 ) { w.theDate.setDate(1); }
|
||||
w._offset( "m", 1 );
|
||||
}
|
||||
});
|
||||
$( "<div class='" + uid + "gridminus" + ( w.__( "isRTL" ) ? "-rtl": "" ) +
|
||||
"'><a href='#'>" + w.__( "prevMonth") + "</a></div>" )
|
||||
.prependTo( w.d.intHTML.find( "." + uid + "gridheader" ) )
|
||||
.find( "a" )
|
||||
.addClass( "ui-btn-inline ui-link ui-btn ui-btn-" +
|
||||
o.themeDate +
|
||||
" ui-icon-" + o.calPrevMonthIcon +
|
||||
" ui-btn-icon-notext ui-shadow ui-corner-all"
|
||||
)
|
||||
.on(o.clickEventAlt, function(e) {
|
||||
e.preventDefault();
|
||||
if ( w.calPrev ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
if ( w.theDate.getDate() > 28 ) {
|
||||
w.theDate.setDate(1);
|
||||
}
|
||||
w._offset( "m", -1 );
|
||||
}
|
||||
});
|
||||
|
||||
if ( o.calNoHeader ) {
|
||||
if ( o.calUsePickersIcons ) {
|
||||
w.d.intHTML.find( "." + uid + "gridlabel" ).hide();
|
||||
} else {
|
||||
w.d.intHTML.find( "." + uid + "gridheader" ).remove();
|
||||
}
|
||||
}
|
||||
|
||||
w.calNext = true;
|
||||
w.calPrev = true;
|
||||
|
||||
if ( Math.floor( cTodayDate.comp() / 100 ) === Math.floor( curDate.comp() / 100 ) ) {
|
||||
isTrueMonth = true;
|
||||
}
|
||||
if ( Math.floor( cTodayDate.comp() / 10e3 ) === Math.floor( curDate.comp() / 10e3 ) ) {
|
||||
isTrueYear = true;
|
||||
}
|
||||
if ( presetDate.comp() === curDate.comp() ) { presetDay = presetDate.get(2); }
|
||||
|
||||
if ( o.afterToday &&
|
||||
( isTrueMonth || ( isTrueYear && cTodayDateArr[1] >= curDateArr[1] ) ) ) {
|
||||
w.calPrev = false; }
|
||||
if ( o.beforeToday &&
|
||||
( isTrueMonth || ( isTrueYear && cTodayDateArr[1] <= curDateArr[1] ) ) ) {
|
||||
w.calNext = false; }
|
||||
|
||||
if ( o.minDays !== false ) {
|
||||
minDate.adj( 2, o.minDays * -1 );
|
||||
tempVal = minDate.getArray();
|
||||
if ( curDateArr[0] === tempVal[0] && curDateArr[1] <= tempVal[1] ) {
|
||||
w.calPrev = false;
|
||||
}
|
||||
}
|
||||
if ( o.maxDays !== false ) {
|
||||
maxDate.adj( 2, o.maxDays );
|
||||
tempVal = maxDate.getArray();
|
||||
if ( curDateArr[0] === tempVal[0] && curDateArr[1] >= tempVal[1] ) {
|
||||
w.calNext = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( o.calUsePickers ) {
|
||||
pickerControl = $("<div>");
|
||||
if ( o.calNoHeader && o.calUsePickersIcons ) {
|
||||
pickerControl.addClass( "ui-datebox-pickicon" );
|
||||
}
|
||||
|
||||
pickerControl.i = $("<fieldset>").appendTo(pickerControl);
|
||||
|
||||
pickerControl.a = $( "<select>" )
|
||||
.appendTo( pickerControl.i );
|
||||
pickerControl.b = $( "<select>" )
|
||||
.appendTo( pickerControl.i );
|
||||
|
||||
for ( i=0; i<=11; i++ ) {
|
||||
pickerControl.a.append(
|
||||
$( "<option value='" + i + "'" +
|
||||
( ( curMonth === i ) ?
|
||||
" selected='selected'" :
|
||||
""
|
||||
) + ">" + w.__( "monthsOfYear" )[ i ] + "</option>"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ( o.calYearPickMin < 1 ) {
|
||||
prangeS = curYear + o.calYearPickMin;
|
||||
} else if ( o.calYearPickMin < 1800 ) {
|
||||
prangeS = curYear - o.calYearPickMin;
|
||||
} else if ( o.calYearPickMin === "NOW" ) {
|
||||
prangeS = cTodayDateArr[0];
|
||||
} else {
|
||||
prangeS = o.calYearPickMin;
|
||||
}
|
||||
|
||||
if ( o.calYearPickMax < 1800 ) {
|
||||
prangeL = curYear + o.calYearPickMax;
|
||||
} else if ( o.calYearPickMax === "NOW" ) {
|
||||
prangeL = cTodayDateArr[0];
|
||||
} else {
|
||||
prangeL = o.calYearPickMax;
|
||||
}
|
||||
for ( i = prangeS; i <= prangeL; i++ ) {
|
||||
pickerControl.b.append(
|
||||
$( "<option value='" + i + "'" +
|
||||
( ( curYear===i ) ? " selected='selected'" : "" ) +
|
||||
">" + i + "</option>"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
pickerControl.a.on( "change", function () {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w.theDate.setD( 1, $( this ).val() );
|
||||
if ( w.theDate.get(1) !== parseInt( $( this ).val(), 10 ) ) {
|
||||
w.theDate.setD( 2, 0 );
|
||||
}
|
||||
if ( w.calBackDate !== false ) {
|
||||
w._t( {
|
||||
method: "displayChange",
|
||||
selectedDate: w.calBackDate,
|
||||
shownDate: w.theDate,
|
||||
thisChange: "p",
|
||||
thisChangeAmount: null
|
||||
});
|
||||
}
|
||||
w.refresh();
|
||||
});
|
||||
pickerControl.b.on( "change", function () {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w.theDate.setD( 0, $( this ).val() );
|
||||
if (w.theDate.get(1) !== parseInt( pickerControl.a.val(), 10)) {
|
||||
w.theDate.setD( 2, 0 );
|
||||
}
|
||||
if ( w.calBackDate !== false ) {
|
||||
w._t( {
|
||||
method: "displayChange",
|
||||
selectedDate: w.calBackDate,
|
||||
shownDate: w.theDate,
|
||||
thisChange: "p",
|
||||
thisChangeAmount: null
|
||||
});
|
||||
}
|
||||
w.refresh();
|
||||
});
|
||||
|
||||
pickerControl.i.controlgroup({ mini: true, type: "horizontal" });
|
||||
pickerControl.i.find( "select" ).selectmenu( {
|
||||
//mini: true,
|
||||
nativeMenu: true
|
||||
} );
|
||||
pickerControl.i.find( ".ui-controlgroup-controls" ).css({
|
||||
marginRight: "auto",
|
||||
marginLeft: "auto",
|
||||
width: "100%",
|
||||
display: "table",
|
||||
});
|
||||
pickerControl.i.find( ".ui-select" )
|
||||
.first().css({ width: "60%" })
|
||||
.end().last().css({ width: "40%" });
|
||||
|
||||
if ( o.calNoHeader && o.calUsePickersIcons ) {
|
||||
pickerControl.i.css({ padding: "0 10px 5px 10px" });
|
||||
}
|
||||
pickerControl.appendTo( w.d.intHTML );
|
||||
}
|
||||
|
||||
calContent = $("<div class='" + uid + "grid'>" ).appendTo( w.d.intHTML );
|
||||
|
||||
if ( o.calShowDays ) {
|
||||
w._cal_days = w.__( "daysOfWeekShort").concat( w.__( "daysOfWeekShort" ) );
|
||||
weekdayControl = $( "<div>", { "class": uid + "gridrow" } ).appendTo( calContent );
|
||||
|
||||
if ( o.calControlGroup ) { weekdayControl.addClass( uid + "gridrow-last" ); }
|
||||
if ( w.__( "isRTL" ) === true ) {
|
||||
weekdayControl.css( "direction", "rtl" );
|
||||
}
|
||||
if ( o.calShowWeek ) {
|
||||
$("<div>")
|
||||
.addClass( uid + "griddate " + uid + "griddate-label" )
|
||||
.appendTo( weekdayControl );
|
||||
}
|
||||
for ( i=0; i<=6;i++ ) {
|
||||
$( "<div>" )
|
||||
.text( w._cal_days[ ( i + w.__( "calStartDay") ) % 7 ] )
|
||||
.addClass( uid + "griddate " + uid + "griddate-label" )
|
||||
.appendTo( weekdayControl );
|
||||
}
|
||||
}
|
||||
|
||||
checkDatesObj = { i: minDate, x: maxDate, t: cTodayDate, p: presetDay };
|
||||
genny = w._cal_gen(
|
||||
cStartDay,
|
||||
cPrevMonthEnd,
|
||||
cMonthEnd,
|
||||
!o.calOnlyMonth,
|
||||
curDate.get(1)
|
||||
);
|
||||
|
||||
if ( ! $.isFunction( o.calFormatter ) &&
|
||||
o.calFormatter !== false &&
|
||||
$.isFunction( window[ o.calFormatter ] ) ) {
|
||||
o.calFormatter = window[ o.calFormatter ];
|
||||
}
|
||||
|
||||
absStartDO = new Date(
|
||||
w.theDate.get(0),
|
||||
genny[0][0][1],
|
||||
genny[0][0][0],
|
||||
0, 0, 0, 0 );
|
||||
absEndDO = new Date(
|
||||
w.theDate.get(0),
|
||||
genny[genny.length-1][6][1],
|
||||
genny[genny.length-1][6][0],
|
||||
0, 0, 0, 0 );
|
||||
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calDateVisible = true;
|
||||
} else {
|
||||
if ( o.calOnlyMonth ) {
|
||||
w.calDateVisible = false;
|
||||
} else {
|
||||
if ( w.calBackDate.comp() < absStartDO.comp() ||
|
||||
w.calBackDate.comp() > absEndDO.comp() ) {
|
||||
w.calDateVisible = false;
|
||||
} else {
|
||||
w.calDateVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( row = 0, rows = genny.length; row < rows; row++ ) {
|
||||
htmlRow = $("<div>", { "class": uid + "gridrow" } );
|
||||
if ( w.__( "isRTL" ) ) { htmlRow.css( "direction", "rtl" ); }
|
||||
if ( o.calShowWeek ) {
|
||||
$("<div>", { "class": uid + "griddate " + uid + "griddate-empty" } )
|
||||
.text( "W" + weekNum )
|
||||
.css( (o.calControlGroup ? {"float": "left"} : {}) )
|
||||
.appendTo( htmlRow );
|
||||
weekNum++;
|
||||
if ( weekNum > 52 && typeof(genny[ row + 1 ]) !== "undefined" ) {
|
||||
weekNum = new w._date(
|
||||
curDateArr[0],
|
||||
curDateArr[1],
|
||||
( w.__( "calStartDay" )===0 ) ?
|
||||
genny[ row + 1 ][ 1 ][ 0 ] :
|
||||
genny[ row + 1 ][ 0 ][ 0 ],
|
||||
0, 0, 0, 0
|
||||
).getDWeek( 4 ); }
|
||||
}
|
||||
for ( col=0, cols = genny[row].length; col < cols; col++ ) {
|
||||
if ( o.calWeekMode ) {
|
||||
weekModeSel = genny[row][o.calWeekModeDay][0];
|
||||
}
|
||||
if ( typeof genny[row][col] === "boolean" ) {
|
||||
$("<div>", {
|
||||
"class": uid + "griddate " + uid + "griddate-empty"
|
||||
} ).appendTo( htmlRow );
|
||||
} else {
|
||||
checked = w._cal_check(
|
||||
checkDates,
|
||||
curDateArr[0],
|
||||
genny[row][col][1],
|
||||
genny[row][col][0],
|
||||
checkDatesObj
|
||||
);
|
||||
if ( genny[row][col][0]) {
|
||||
if ( ! $.isFunction(o.calFormatter) ) {
|
||||
fmtRet = { text: genny[row][col][0], "class": "" };
|
||||
} else {
|
||||
fmtObj = {
|
||||
"Year": ( ( genny[row][col][1] > 11 ) ? curYear + 1 :
|
||||
( genny[row][col][1] < 0 ) ? curYear - 1 : curYear ),
|
||||
"Month" : ( ( genny[row][col][1] === 12 ) ? 0 :
|
||||
( genny[row][col][1] === -1 ) ? 11 : genny[row][col][1] ),
|
||||
"Date" : genny[row][col][0]
|
||||
};
|
||||
fmtObj.ISO = fmtObj.Year + "-" +
|
||||
w._zPad(fmtObj.Month + 1) + "-" +
|
||||
w._zPad(fmtObj.Date);
|
||||
fmtObj.Comp = parseInt( fmtObj.ISO.replace( /-/g, "" ), 10 );
|
||||
fmtObj.dateVisible = w.calDateVisible;
|
||||
tempVal = o.calFormatter(fmtObj);
|
||||
if ( typeof tempVal !== "object" ) {
|
||||
fmtRet = { text: tempVal, "class": "" };
|
||||
} else {
|
||||
fmtRet = {
|
||||
"text": tempVal.text,
|
||||
"class": tempVal["class"]
|
||||
};
|
||||
}
|
||||
}
|
||||
$("<div>")
|
||||
.html( fmtRet.text )
|
||||
.addClass( uid + "griddate ui-corner-all ui-btn")
|
||||
.addClass( ( curMonth === genny[row][col][1] || checked.force ) ?
|
||||
( "ui-btn-" + checked.theme +
|
||||
( checked.ok ? "" : " ui-state-disabled" )
|
||||
) :
|
||||
( uid + "griddate-empty" )
|
||||
)
|
||||
.addClass( fmtRet["class"] )
|
||||
.css(( curMonth !== genny[row][col][1] && !o.calOnlyMonth ) ?
|
||||
{ cursor: "pointer" } :
|
||||
{}
|
||||
)
|
||||
.data( "date",
|
||||
( ( o.calWeekMode ) ?
|
||||
weekModeSel :
|
||||
genny[row][col][0] )
|
||||
)
|
||||
.data( "enabled", checked.ok)
|
||||
.data( "month",
|
||||
genny[ row ][ ( ( o.calWeekMode ) ?
|
||||
o.calWeekModeDay :
|
||||
col
|
||||
) ][1]
|
||||
)
|
||||
.appendTo( htmlRow );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( o.calControlGroup ) {
|
||||
htmlRow.controlgroup({type: "horizontal"});
|
||||
}
|
||||
if ( row === rows - 1 ) { htmlRow.addClass( uid + "gridrow-last" ); }
|
||||
htmlRow.appendTo(calContent);
|
||||
}
|
||||
if ( o.calShowWeek ) {
|
||||
calContent.find( "." + uid + "griddate" ).addClass( uid + "griddate-week" );
|
||||
}
|
||||
|
||||
if ( o.calShowDateList && dList !== false ) {
|
||||
listControl = $( "<div>" );
|
||||
listControl.a = $( "<select name='pickdate'></select>" ).appendTo(listControl);
|
||||
|
||||
listControl.a.append("<option value='false' selected='selected'>" +
|
||||
w.__( "calDateListLabel" ) + "</option>" );
|
||||
|
||||
for ( i = 0; i < dList.length; i++ ) {
|
||||
listControl.a.append(
|
||||
$( "<option value='" + dList[i][0] + "'>" + dList[i][1] + "</option>" )
|
||||
);
|
||||
}
|
||||
|
||||
listControl.a.on( "change", function() {
|
||||
tempVal = $( this ).val().split( "-" );
|
||||
w.theDate = new w._date(tempVal[0], tempVal[1]-1, tempVal[2], 0,0,0,0);
|
||||
w._t( { method: "doset" } );
|
||||
});
|
||||
|
||||
listControl.find( "select" ).selectmenu( { mini: true, nativeMenu: true } );
|
||||
listControl.appendTo( calContent );
|
||||
}
|
||||
|
||||
if ( o.useTodayButton || o.useTomorrowButton || o.useClearButton ) {
|
||||
htmlRow = $("<div>", { "class": uid + "controls" } );
|
||||
|
||||
if ( o.useTodayButton ) {
|
||||
$( "<a href='#' role='button'>" + w.__( "calTodayButtonLabel" ) + "</a>" )
|
||||
.appendTo(htmlRow)
|
||||
.addClass( "ui-btn ui-btn-" + o.theme +
|
||||
" ui-icon-navigation ui-btn-icon-left ui-shadow ui-corner-all"
|
||||
)
|
||||
.on(o.clickEvent, function(e) {
|
||||
e.preventDefault();
|
||||
w.theDate = w._pa([0,0,0], new w._date());
|
||||
w.calBackDate = false;
|
||||
w._t( { method: "doset" } );
|
||||
});
|
||||
}
|
||||
if ( o.useTomorrowButton ) {
|
||||
$( "<a href='#' role='button'>" + w.__( "calTomorrowButtonLabel" ) + "</a>" )
|
||||
.appendTo(htmlRow)
|
||||
.addClass( "ui-btn ui-btn-" + o.theme +
|
||||
" ui-icon-navigation ui-btn-icon-left ui-shadow ui-corner-all"
|
||||
)
|
||||
.on(o.clickEvent, function(e) {
|
||||
e.preventDefault();
|
||||
w.theDate = w._pa([0,0,0], new w._date()).adj( 2, 1 );
|
||||
w.calBackDate = false;
|
||||
w._t( { method: "doset" } );
|
||||
});
|
||||
}
|
||||
if ( o.useClearButton ) {
|
||||
htmlRow.append(w._stdBtn.clear.apply(w));
|
||||
}
|
||||
if ( o.useCollapsedBut ) {
|
||||
htmlRow.controlgroup({ type: "horizontal" });
|
||||
htmlRow.addClass( "ui-datebox-collapse" );
|
||||
} else {
|
||||
htmlRow.controlgroup();
|
||||
}
|
||||
htmlRow.appendTo( calContent );
|
||||
}
|
||||
|
||||
w.d.intHTML.on(o.clickEventAlt, "div." + uid + "griddate", function(e) {
|
||||
e.preventDefault();
|
||||
if ( $( this ).data( "enabled" ) ) {
|
||||
w.calBackDate = false;
|
||||
w.theDate
|
||||
.setD( 2, 1 )
|
||||
.setD( 1, $( this ).jqmData( "month" ) )
|
||||
.setD( 2, $( this ).data( "date" ) );
|
||||
w._t( {
|
||||
method: "set",
|
||||
value: w._formatter( w.__fmt(),w.theDate ),
|
||||
date: w.theDate
|
||||
} );
|
||||
w._t( { method: "close" } );
|
||||
}
|
||||
});
|
||||
w.d.intHTML
|
||||
.on( "swipeleft", function() {
|
||||
if ( w.calNext ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w._offset( "m", 1 );
|
||||
}
|
||||
} )
|
||||
.on( "swiperight", function() {
|
||||
if ( w.calPrev ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w._offset( "m", -1 );
|
||||
}
|
||||
} );
|
||||
|
||||
if ( w.wheelExists ) { // Mousewheel operations, if plugin is loaded
|
||||
w.d.intHTML.on( "mousewheel", function(e,d) {
|
||||
e.preventDefault();
|
||||
if ( d > 0 && w.calNext ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w.theDate.setD( 2, 1 );
|
||||
w._offset( "m", 1 );
|
||||
}
|
||||
if ( d < 0 && w.calPrev ) {
|
||||
if ( w.calBackDate === false ) {
|
||||
w.calBackDate = new Date(w.theDate.getTime());
|
||||
}
|
||||
w.theDate.setD( 2, 1 );
|
||||
w._offset( "m", -1 );
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
378
zoesch.de/preis/scripts/jqm-datebox.mode.flipbox.js
Normal file
378
zoesch.de/preis/scripts/jqm-datebox.mode.flipbox.js
Normal file
@@ -0,0 +1,378 @@
|
||||
/* jQuery-Mobile-DateBox */
|
||||
|
||||
/*! FLIPBOX/TIMEFLIPBOX/DURATIONFLIPBOX Mode */
|
||||
|
||||
(function($) {
|
||||
$.extend( $.mobile.datebox.prototype.options, {
|
||||
themeDatePick: "b",
|
||||
themeDate: "a",
|
||||
useSetButton: true,
|
||||
validHours: false,
|
||||
flen: {
|
||||
"y": 15,
|
||||
"m": 12,
|
||||
"d": 20,
|
||||
"h": 12,
|
||||
"i": 15,
|
||||
},
|
||||
durationStep: 1,
|
||||
durationSteppers: {
|
||||
"d": 1,
|
||||
"h": 1,
|
||||
"i": 1,
|
||||
"s": 1
|
||||
}
|
||||
});
|
||||
$.extend( $.mobile.datebox.prototype, {
|
||||
_fbox_pos: function () {
|
||||
var pos1, ech, top, fixer,
|
||||
w = this,
|
||||
par = this.d.intHTML.find( ".ui-datebox-flipcontent" ).innerHeight();
|
||||
|
||||
w.d.intHTML.find( ".ui-datebox-flipcenter" ).each(function() {
|
||||
ech = $( this );
|
||||
top = ech.innerHeight();
|
||||
ech.css( "top", ( ( par / 2 ) - ( top / 2 ) - 3 ) * -1 );
|
||||
});
|
||||
w.d.intHTML.find( "ul" ).each(function () {
|
||||
ech = $( this );
|
||||
par = ech.parent().innerHeight();
|
||||
top = ech.find( "li" ).first();
|
||||
fixer = ech.find( "li" ).last().offset().top - ech.find("li").first().offset().top;
|
||||
pos1 = ( ( ( fixer-par ) / 2 ) + top.outerHeight() ) * -1;
|
||||
top.css( "marginTop", pos1 );
|
||||
});
|
||||
|
||||
},
|
||||
_fbox_fixstep: function( order ) {
|
||||
// Turn back off steppers when displaying a less precise
|
||||
// unit in the same control.
|
||||
var step = this.options.durationSteppers,
|
||||
actual = this.options.durationStep;
|
||||
|
||||
if ( $.inArray( "h", order ) > -1 ) {
|
||||
step.d = 1;
|
||||
step.h = actual;
|
||||
}
|
||||
if ( $.inArray( "i", order ) > -1 ) {
|
||||
step.h = 1;
|
||||
step.i = actual;
|
||||
}
|
||||
if ( $.inArray( "s", order ) > -1 ) {
|
||||
step.i = 1;
|
||||
step.s = actual;
|
||||
}
|
||||
},
|
||||
_fbox_series: function (middle, side, type, neg) {
|
||||
// This builds the series that duration uses.
|
||||
var nxt, prv,
|
||||
o = this.options,
|
||||
maxval = ( type === "h" ) ? 24 : 60,
|
||||
ret = [ [ middle.toString(), middle ] ];
|
||||
|
||||
for ( var i = 1; i <= side; i++ ) {
|
||||
nxt = middle + ( i * o.durationSteppers[type] );
|
||||
prv = middle - ( i * o.durationSteppers[type] );
|
||||
ret.unshift([nxt.toString(), nxt]);
|
||||
if ( prv > -1 ) {
|
||||
ret.push([prv.toString(), prv]);
|
||||
} else {
|
||||
if ( neg ) {
|
||||
ret.push([(maxval+prv).toString(),prv]);
|
||||
} else {
|
||||
ret.push(["",-1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
_fbox_mktxt: {
|
||||
y: function(i) {
|
||||
return this.theDate.get(0) + i;
|
||||
},
|
||||
m: function(i) {
|
||||
var testDate = ( this.theDate.copy( [0], [0,0,1] ) ).adj( 1, i );
|
||||
return this.__("monthsOfYearShort")[ testDate.get(1) ];
|
||||
},
|
||||
d: function(i) {
|
||||
return ( this.theDate.copy([0,0,i]) ).get(2);
|
||||
},
|
||||
h: function(i) {
|
||||
var testDate = this.theDate.copy( [0,0,0,i] );
|
||||
return ( ( this.__("timeFormat") === 12 ) ?
|
||||
testDate.get12hr() :
|
||||
testDate.get(3) );
|
||||
},
|
||||
i: function(i) {
|
||||
return this._zPad( ( this.theDate.copy( [0,0,0,0,i] )).get(4) );
|
||||
}
|
||||
}
|
||||
});
|
||||
$.extend( $.mobile.datebox.prototype._build, {
|
||||
"timeflipbox": function() {
|
||||
this._build.flipbox.apply(this);
|
||||
},
|
||||
"durationflipbox": function() {
|
||||
this._build.flipbox.apply(this);
|
||||
},
|
||||
"flipbox": function () {
|
||||
var i, y, hRow, tmp, hRowIn, stdPos,
|
||||
w = this,
|
||||
o = this.options,
|
||||
g = this.drag,
|
||||
cDurS = {},
|
||||
normDurPositions = ["d", "h", "i", "s"],
|
||||
dur = ( o.mode === "durationflipbox" ? true : false ),
|
||||
uid = "ui-datebox-",
|
||||
flipBase = $( "<div class='ui-overlay-shadow'><ul></ul></div>" ),
|
||||
ctrl = $( "<div>", { "class": uid+"flipcontent" } ),
|
||||
ti = w.theDate.getTime() - w.initDate.getTime(),
|
||||
cDur = w._dur( ti<0 ? 0 : ti ),
|
||||
currentTerm, currentText;
|
||||
|
||||
if ( ti < 0 ) {
|
||||
w.lastDuration = 0;
|
||||
if ( dur ) { w.theDate.setTime( w.initDate.getTime() ); }
|
||||
} else {
|
||||
if ( dur ) { w.lastDuration = ti / 1000; }
|
||||
}
|
||||
|
||||
if ( typeof w.d.intHTML !== "boolean" ) {
|
||||
w.d.intHTML.empty().remove();
|
||||
} else {
|
||||
w.d.input.on( "datebox", function (e,p) {
|
||||
if ( p.method === "postrefresh" ) {
|
||||
w._fbox_pos();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
w.d.headerText = ( ( w._grabLabel() !== false) ?
|
||||
w._grabLabel() :
|
||||
( (o.mode === "flipbox") ?
|
||||
w.__( "titleDateDialogLabel" ) :
|
||||
w.__( "titleTimeDialogLabel" )
|
||||
)
|
||||
);
|
||||
w.d.intHTML = $( "<span>" );
|
||||
|
||||
$(document).one( "popupafteropen", function() {
|
||||
// This fixes bad positioning on initial open - not found a way around this yet.
|
||||
w._fbox_pos();
|
||||
});
|
||||
|
||||
w.fldOrder = ( o.mode === "flipbox" ) ?
|
||||
w.__( "dateFieldOrder" ) :
|
||||
( dur ) ?
|
||||
w.__("durationOrder") :
|
||||
w.__( "timeFieldOrder" );
|
||||
|
||||
if ( !dur ) {
|
||||
w._check();
|
||||
w._minStepFix();
|
||||
} else {
|
||||
if ( o.minDur !== false &&
|
||||
( w.theDate.getEpoch() - w.initDate.getEpoch() ) < o.minDur ) {
|
||||
w.theDate = new Date( w.initDate.getTime() + ( o.minDur * 1000 ) );
|
||||
w.lastDuration = o.minDur;
|
||||
cDur = w._dur( o.minDur * 1000 );
|
||||
}
|
||||
if ( o.maxDur !== false &&
|
||||
( w.theDate.getEpoch() - w.initDate.getEpoch() ) > o.maxDur ) {
|
||||
w.theDate = new Date( w.initDate.getTime() + ( o.maxDur * 1000 ) );
|
||||
w.lastDuration = o.maxDur;
|
||||
cDur = w._dur( o.maxDur * 1000 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( o.mode === "flipbox" ) {
|
||||
$("<div class='" + uid + "header'><h4>" +
|
||||
w._formatter(w.__( "headerFormat"), w.theDate) + "</h4></div>")
|
||||
.appendTo(w.d.intHTML);
|
||||
}
|
||||
|
||||
if ( dur ) {
|
||||
w._fbox_fixstep(w.fldOrder);
|
||||
|
||||
tmp = $( "<div class='" + uid + "header ui-grid-" +
|
||||
w._gridblk.g[w.fldOrder.length] + "'></div>");
|
||||
|
||||
for ( y = 0; y < w.fldOrder.length; y++ ) {
|
||||
$("<div class='" + uid + "fliplab ui-block-" + w._gridblk.b[ y ] + "'>" +
|
||||
w.__( "durationLabel" )[$.inArray( w.fldOrder[y], normDurPositions )] +
|
||||
"</div>"
|
||||
)
|
||||
.appendTo(tmp);
|
||||
}
|
||||
tmp.appendTo(w.d.intHTML);
|
||||
|
||||
w.dateOK = true;
|
||||
cDurS.d = w._fbox_series(cDur[0],16,"d",false);
|
||||
cDurS.h = w._fbox_series(cDur[1],16,"h",(cDur[0]>0));
|
||||
cDurS.i = w._fbox_series(cDur[2],20,"i",(cDur[0]>0 || cDur[1]>0));
|
||||
cDurS.s = w._fbox_series(cDur[3],20,"s",(cDur[0]>0 || cDur[1]>0 || cDur[2]>0));
|
||||
|
||||
ctrl.addClass( uid + "flipcontentd" );
|
||||
|
||||
for ( y = 0; y < w.fldOrder.length; y++ ) {
|
||||
stdPos = w.fldOrder[ y ];
|
||||
currentTerm = cDur[ $.inArray( stdPos, normDurPositions ) ];
|
||||
|
||||
hRow = w._makeEl( flipBase, { "attr": {
|
||||
"field": stdPos,
|
||||
"amount": o.durationSteppers[ stdPos ]
|
||||
} });
|
||||
hRowIn = hRow.find( "ul" );
|
||||
|
||||
for ( i in cDurS[ stdPos ] ) {
|
||||
$("<li><span>" + cDurS[ stdPos ][ i ][ 0 ] + "</span></li>" )
|
||||
.addClass("ui-body-" + ((cDurS[ stdPos ][ i ][ 1 ] !== currentTerm ) ?
|
||||
o.themeDate :
|
||||
o.themeDatePick)
|
||||
)
|
||||
.appendTo( hRowIn );
|
||||
}
|
||||
hRow.appendTo(ctrl);
|
||||
}
|
||||
}
|
||||
|
||||
for ( y=0; ( y < w.fldOrder.length && !dur ); y++ ) {
|
||||
currentTerm = w.fldOrder[y];
|
||||
|
||||
hRow = w._makeEl( flipBase, { "attr": {
|
||||
"field": currentTerm,
|
||||
"amount": (currentTerm === "i") ? o.minuteStep : 1
|
||||
} } );
|
||||
hRowIn = hRow.find( "ul" );
|
||||
|
||||
|
||||
if ( typeof w._fbox_mktxt[currentTerm] === "function" ) {
|
||||
for ( i = -1 * o.flen[currentTerm]; i < ( o.flen[currentTerm] + 1 ); i++ ) {
|
||||
$("<li class='ui-body-" +
|
||||
(( i !== 0 ) ? o.themeDate : o.themeDatePick) + "'><span>" +
|
||||
w._fbox_mktxt[currentTerm].apply(
|
||||
w,
|
||||
[(currentTerm === "i") ? i * o.minuteStep : i]
|
||||
) + "</span></li>")
|
||||
.appendTo( hRowIn );
|
||||
}
|
||||
hRow.appendTo( ctrl );
|
||||
}
|
||||
if ( currentTerm === "a" && w.__("timeFormat") === 12 ) {
|
||||
currentText = $( "<li class='ui-body-" + o.themeDate + "'><span></span></li>");
|
||||
|
||||
tmp = (w.theDate.get(3) > 11) ?
|
||||
[o.themeDate,o.themeDatePick,2,5] :
|
||||
[o.themeDatePick,o.themeDate,2,3];
|
||||
|
||||
for ( i = -1 * tmp[2]; i < tmp[3]; i++ ) {
|
||||
if ( i < 0 || i > 1 ) {
|
||||
currentText.clone().appendTo( hRowIn );
|
||||
} else {
|
||||
$("<li>", { "class" : "ui-body-" + tmp[i] } )
|
||||
.html( "<span>" + w.__( "meridiem" )[i] + "</span>" )
|
||||
.appendTo( hRowIn );
|
||||
}
|
||||
}
|
||||
hRow.appendTo( ctrl );
|
||||
}
|
||||
}
|
||||
|
||||
w.d.intHTML.append( ctrl );
|
||||
|
||||
$("<div>", { "class": uid + "flipcenter ui-overlay-shadow" } )
|
||||
.css( "pointerEvents", "none")
|
||||
.appendTo( w.d.intHTML );
|
||||
|
||||
if ( o.useSetButton || o.useClearButton ) {
|
||||
y = $( "<div>", { "class": uid + "controls" } );
|
||||
|
||||
if ( o.useSetButton ) {
|
||||
y.append( w._stdBtn.close.apply(
|
||||
w, [ ( o.mode === "flipbox" ) ?
|
||||
w.__("setDateButtonLabel") :
|
||||
( dur ) ?
|
||||
w.__("setDurationButtonLabel") :
|
||||
w.__("setTimeButtonLabel")]
|
||||
));
|
||||
}
|
||||
|
||||
if ( o.useClearButton ) {
|
||||
y.append(w._stdBtn.clear.apply(w));
|
||||
}
|
||||
if ( o.useCollapsedBut ) {
|
||||
y.controlgroup({ type: "horizontal" });
|
||||
y.addClass( "ui-datebox-collapse" );
|
||||
} else {
|
||||
y.controlgroup();
|
||||
}
|
||||
y.appendTo(w.d.intHTML);
|
||||
}
|
||||
|
||||
if ( w.wheelExists ) { // Mousewheel operation, if plugin is loaded
|
||||
w.d.intHTML.on( "mousewheel", ".ui-overlay-shadow", function(e,d) {
|
||||
e.preventDefault();
|
||||
w._offset($(this).data("field"), ((d<0)?-1:1)*$(this).data("amount"));
|
||||
});
|
||||
}
|
||||
|
||||
w.d.intHTML.on(g.eStart, "ul", function(e,f) {
|
||||
if ( !g.move ) {
|
||||
if ( typeof f !== "undefined" ) { e = f; }
|
||||
g.move = true;
|
||||
g.target = $(this).find( "li" ).first();
|
||||
g.pos = parseInt(g.target.css("marginTop").replace(/px/i, ""),10);
|
||||
g.start = ( e.type.substr(0,5) === "touch" ) ?
|
||||
e.originalEvent.changedTouches[0].pageY :
|
||||
e.pageY;
|
||||
g.end = false;
|
||||
g.direc = ( dur ) ? -1 : 1;
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$.extend( $.mobile.datebox.prototype._drag, {
|
||||
"timeflipbox": function() {
|
||||
this._drag.flipbox.apply(this);
|
||||
},
|
||||
"durationflipbox": function() {
|
||||
this._drag.flipbox.apply(this);
|
||||
},
|
||||
"flipbox": function() {
|
||||
var w = this,
|
||||
o = this.options,
|
||||
g = this.drag;
|
||||
|
||||
$(document).on(g.eMove, function(e) {
|
||||
if ( g.move && o.mode.slice(-7) === "flipbox" ) {
|
||||
g.end = ( e.type.substr(0,5) === "touch" ) ?
|
||||
e.originalEvent.changedTouches[0].pageY :
|
||||
e.pageY;
|
||||
g.target.css("marginTop", (g.pos + g.end - g.start) + "px");
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on(g.eEnd, function(e) {
|
||||
if ( g.move && o.mode.slice(-7) === "flipbox" ) {
|
||||
g.move = false;
|
||||
if ( g.end !== false ) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
g.tmp = g.target.parent().parent();
|
||||
w._offset(
|
||||
g.tmp.data("field"),
|
||||
(parseInt((g.start - g.end) / ( g.target.outerHeight() - 2 ),10)*
|
||||
g.tmp.data( "amount" ) * g.direc));
|
||||
}
|
||||
g.start = false;
|
||||
g.end = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
9789
zoesch.de/preis/scripts/jquery-2.1.3.js
vendored
Normal file
9789
zoesch.de/preis/scripts/jquery-2.1.3.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
zoesch.de/preis/scripts/jquery-2.1.3.min.js
vendored
Normal file
4
zoesch.de/preis/scripts/jquery-2.1.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
zoesch.de/preis/scripts/jquery-ui.min.js
vendored
Normal file
13
zoesch.de/preis/scripts/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
15454
zoesch.de/preis/scripts/jquery.mobile-1.4.5.js
Normal file
15454
zoesch.de/preis/scripts/jquery.mobile-1.4.5.js
Normal file
File diff suppressed because it is too large
Load Diff
118
zoesch.de/preis/scripts/jquery.mobile.datebox.i18n.de.utf8.js
Normal file
118
zoesch.de/preis/scripts/jquery.mobile.datebox.i18n.de.utf8.js
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* jQuery-Mobile-DateBox
|
||||
* Date: Wed Nov 19 2014 21:05:33 UTC
|
||||
* http://dev.jtsage.com/jQM-DateBox/
|
||||
* https://github.com/jtsage/jquery-mobile-datebox
|
||||
*
|
||||
* Copyright 2010, 2014 JTSage. and other contributors
|
||||
* Released under the MIT license.
|
||||
* https://github.com/jtsage/jquery-mobile-datebox/blob/master/LICENSE.txt
|
||||
*
|
||||
*/
|
||||
jQuery.extend(jQuery.mobile.datebox.prototype.options.lang, { "de": {
|
||||
"setDateButtonLabel": "Datum einstellen",
|
||||
"setTimeButtonLabel": "Zeit einstellen",
|
||||
"setDurationButtonLabel": "Dauer einstellen",
|
||||
"calTodayButtonLabel": "heute",
|
||||
"titleDateDialogLabel": "Datum wählen",
|
||||
"titleTimeDialogLabel": "Zeit wählen",
|
||||
"daysOfWeek": [
|
||||
"Sonntag",
|
||||
"Montag",
|
||||
"Dienstag",
|
||||
"Mittwoch",
|
||||
"Donnerstag",
|
||||
"Freitag",
|
||||
"Samstag"
|
||||
],
|
||||
"daysOfWeekShort": [
|
||||
"So",
|
||||
"Mo",
|
||||
"Di",
|
||||
"Mi",
|
||||
"Do",
|
||||
"Fr",
|
||||
"Sa"
|
||||
],
|
||||
"monthsOfYear": [
|
||||
"Januar",
|
||||
"Februar",
|
||||
"März",
|
||||
"April",
|
||||
"Mai",
|
||||
"Juni",
|
||||
"Juli",
|
||||
"August",
|
||||
"September",
|
||||
"Oktober",
|
||||
"November",
|
||||
"Dezember"
|
||||
],
|
||||
"monthsOfYearShort": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mär",
|
||||
"Apr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dez"
|
||||
],
|
||||
"durationLabel": [
|
||||
"Tage",
|
||||
"Stunden",
|
||||
"Minuten",
|
||||
"Sekunden"
|
||||
],
|
||||
"durationDays": [
|
||||
"Tag",
|
||||
"Tage"
|
||||
],
|
||||
"tooltip": "Öffne Datumsauswahl",
|
||||
"nextMonth": "Nächster Monat",
|
||||
"prevMonth": "Vorheriger Monat",
|
||||
"timeFormat": 24,
|
||||
"headerFormat": "%A, %B %-d, %Y",
|
||||
"dateFieldOrder": [
|
||||
"d",
|
||||
"m",
|
||||
"y"
|
||||
],
|
||||
"timeFieldOrder": [
|
||||
"h",
|
||||
"i",
|
||||
"a"
|
||||
],
|
||||
"slideFieldOrder": [
|
||||
"y",
|
||||
"m",
|
||||
"d"
|
||||
],
|
||||
"dateFormat": "%d.%m.%Y",
|
||||
"useArabicIndic": false,
|
||||
"isRTL": false,
|
||||
"calStartDay": 1,
|
||||
"clearButton": "löschen",
|
||||
"durationOrder": [
|
||||
"d",
|
||||
"h",
|
||||
"i",
|
||||
"s"
|
||||
],
|
||||
"meridiem": [
|
||||
"AM",
|
||||
"PM"
|
||||
],
|
||||
"timeOutput": "%l:%M %p",
|
||||
"durationFormat": "%Dd %DA, %Dl:%DM:%DS",
|
||||
"calDateListLabel": "Weitere Termine",
|
||||
"calHeaderFormat": "%B %Y",
|
||||
"calTomorrowButtonLabel": "Springen bis morgen"
|
||||
}});
|
||||
jQuery.extend(jQuery.mobile.datebox.prototype.options, {
|
||||
useLang: "de"
|
||||
});
|
||||
1238
zoesch.de/preis/scripts/moment.js
Normal file
1238
zoesch.de/preis/scripts/moment.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user