mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
cambio de fuentes css
This commit is contained in:
parent
660c7292a5
commit
507faa52e1
@ -28,7 +28,6 @@
|
|||||||
.modalheadertex{
|
.modalheadertex{
|
||||||
color:white;
|
color:white;
|
||||||
position:relative;
|
position:relative;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:13pt;
|
font-size:13pt;
|
||||||
top:8px;
|
top:8px;
|
||||||
}
|
}
|
||||||
@ -70,7 +69,6 @@
|
|||||||
}
|
}
|
||||||
.modalwikibuttontex{
|
.modalwikibuttontex{
|
||||||
color:#ffffff;
|
color:#ffffff;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:10pt;
|
font-size:10pt;
|
||||||
position:relative;
|
position:relative;
|
||||||
top:6px;
|
top:6px;
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
}
|
}
|
||||||
.modalheadertex{
|
.modalheadertex{
|
||||||
color:#000;
|
color:#000;
|
||||||
font-family:Nunito;
|
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
font-size: 23pt;
|
font-size: 23pt;
|
||||||
margin-bottom:30px;
|
margin-bottom:30px;
|
||||||
@ -66,7 +65,6 @@
|
|||||||
}
|
}
|
||||||
.modalokbuttontex{
|
.modalokbuttontex{
|
||||||
color:#82b92e;
|
color:#82b92e;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:13pt;
|
font-size:13pt;
|
||||||
}
|
}
|
||||||
.modalgobutto{
|
.modalgobutto{
|
||||||
@ -80,7 +78,6 @@
|
|||||||
}
|
}
|
||||||
.modalgobuttontex{
|
.modalgobuttontex{
|
||||||
color:#82b92e;
|
color:#82b92e;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:10pt;
|
font-size:10pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
}
|
}
|
||||||
.modalheadertex{
|
.modalheadertex{
|
||||||
color:#000;
|
color:#000;
|
||||||
font-family:Nunito;
|
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
font-size: 23pt;
|
font-size: 23pt;
|
||||||
margin-bottom:30px;
|
margin-bottom:30px;
|
||||||
@ -66,7 +65,6 @@
|
|||||||
}
|
}
|
||||||
.modalokbuttontex{
|
.modalokbuttontex{
|
||||||
color:#82b92e;
|
color:#82b92e;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:13pt;
|
font-size:13pt;
|
||||||
}
|
}
|
||||||
.modalgobutto{
|
.modalgobutto{
|
||||||
@ -80,7 +78,6 @@
|
|||||||
}
|
}
|
||||||
.modalgobuttontex{
|
.modalgobuttontex{
|
||||||
color:#82b92e;
|
color:#82b92e;
|
||||||
font-family:Nunito;
|
|
||||||
font-size:10pt;
|
font-size:10pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@
|
|||||||
C0,3.19,3.188,0,7.087,0h14.826C25.809,0,29,3.188,29,7.088V21.915z"/>
|
C0,3.19,3.188,0,7.087,0h14.826C25.809,0,29,3.188,29,7.088V21.915z"/>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
<text transform="matrix(1 0 0 1 8.0737 21.2432)" fill="#FFFFFF" font-family="'Arial-BoldMT'" font-size="19">D</text>
|
<text transform="matrix(1 0 0 1 8.0737 21.2432)" fill="#FFFFFF" font-size="19">D</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 350 B |
@ -183,11 +183,9 @@
|
|||||||
|
|
||||||
var scwLanguage;
|
var scwLanguage;
|
||||||
|
|
||||||
function scwSetDefaultLanguage()
|
function scwSetDefaultLanguage() {
|
||||||
{try
|
try { scwSetLanguage(); }
|
||||||
{scwSetLanguage();}
|
catch (exception) {// English
|
||||||
catch (exception)
|
|
||||||
{// English
|
|
||||||
scwToday = 'Today:';
|
scwToday = 'Today:';
|
||||||
scwDrag = 'click here to drag';
|
scwDrag = 'click here to drag';
|
||||||
scwArrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
scwArrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||||
@ -436,7 +434,6 @@
|
|||||||
'vertical-align:middle;' +
|
'vertical-align:middle;' +
|
||||||
'border: ridge 2px;' +
|
'border: ridge 2px;' +
|
||||||
'font-size: 10pt;' +
|
'font-size: 10pt;' +
|
||||||
'font-family: Arial,Helvetica,Sans-Serif;'+
|
|
||||||
'font-weight: bold;}' +
|
'font-weight: bold;}' +
|
||||||
'td.scwDrag,' +
|
'td.scwDrag,' +
|
||||||
'td.scwHead {padding: 0px 0px;' +
|
'td.scwHead {padding: 0px 0px;' +
|
||||||
@ -451,7 +448,7 @@
|
|||||||
'margin: 2px 1px;' +
|
'margin: 2px 1px;' +
|
||||||
'font-weight: bold;' +
|
'font-weight: bold;' +
|
||||||
'font-size: 10pt;' +
|
'font-size: 10pt;' +
|
||||||
'font-family: fixedSys;}' +
|
'}' +
|
||||||
'td.scwWeekNumberHead,' +
|
'td.scwWeekNumberHead,' +
|
||||||
'td.scwWeek {padding: 0px;' +
|
'td.scwWeek {padding: 0px;' +
|
||||||
'text-align: center;' +
|
'text-align: center;' +
|
||||||
@ -599,21 +596,21 @@
|
|||||||
// Add a method to format a date into the required pattern
|
// Add a method to format a date into the required pattern
|
||||||
|
|
||||||
Date.prototype.scwFormat =
|
Date.prototype.scwFormat =
|
||||||
function(scwFormat)
|
function (scwFormat) {
|
||||||
{var charCount = 0,
|
var charCount = 0,
|
||||||
codeChar = '',
|
codeChar = '',
|
||||||
result = '';
|
result = '';
|
||||||
|
|
||||||
for (var i=0;i<=scwFormat.length;i++)
|
for (var i = 0; i <= scwFormat.length; i++) {
|
||||||
{if (i<scwFormat.length && scwFormat.charAt(i)==codeChar)
|
if (i < scwFormat.length && scwFormat.charAt(i) == codeChar) {// If we haven't hit the end of the string and
|
||||||
{// If we haven't hit the end of the string and
|
|
||||||
// the format string character is the same as
|
// the format string character is the same as
|
||||||
// the previous one, just clock up one to the
|
// the previous one, just clock up one to the
|
||||||
// length of the current element definition
|
// length of the current element definition
|
||||||
charCount++;
|
charCount++;
|
||||||
}
|
}
|
||||||
else {switch (codeChar)
|
else {
|
||||||
{case 'y': case 'Y':
|
switch (codeChar) {
|
||||||
|
case 'y': case 'Y':
|
||||||
result += (this.getFullYear() % Math.
|
result += (this.getFullYear() % Math.
|
||||||
pow(10, charCount)).toString().
|
pow(10, charCount)).toString().
|
||||||
scwPadLeft(charCount);
|
scwPadLeft(charCount);
|
||||||
@ -637,8 +634,7 @@
|
|||||||
while (charCount-- > 0) { result += codeChar; }
|
while (charCount-- > 0) { result += codeChar; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i<scwFormat.length)
|
if (i < scwFormat.length) {// Store the character we have just worked on
|
||||||
{// Store the character we have just worked on
|
|
||||||
codeChar = scwFormat.charAt(i);
|
codeChar = scwFormat.charAt(i);
|
||||||
charCount = 1;
|
charCount = 1;
|
||||||
}
|
}
|
||||||
@ -650,8 +646,8 @@
|
|||||||
// Add a method to left pad zeroes
|
// Add a method to left pad zeroes
|
||||||
|
|
||||||
String.prototype.scwPadLeft =
|
String.prototype.scwPadLeft =
|
||||||
function(padToLength)
|
function (padToLength) {
|
||||||
{var result = '';
|
var result = '';
|
||||||
for (var i = 0; i < (padToLength - this.length); i++) { result += '0'; }
|
for (var i = 0; i < (padToLength - this.length); i++) { result += '0'; }
|
||||||
return (result + this);
|
return (result + this);
|
||||||
};
|
};
|
||||||
@ -661,16 +657,14 @@
|
|||||||
// arguments.
|
// arguments.
|
||||||
|
|
||||||
Function.prototype.runsAfterSCW =
|
Function.prototype.runsAfterSCW =
|
||||||
function() {var func = this,
|
function () {
|
||||||
|
var func = this,
|
||||||
args = new Array(arguments.length);
|
args = new Array(arguments.length);
|
||||||
|
|
||||||
for (var i=0;i<args.length;++i)
|
for (var i = 0; i < args.length; ++i) { args[i] = arguments[i]; }
|
||||||
{args[i] = arguments[i];}
|
|
||||||
|
|
||||||
return function()
|
return function () {// concat/join the two argument arrays
|
||||||
{// concat/join the two argument arrays
|
for (var i = 0; i < arguments.length; ++i) { args[args.length] = arguments[i]; }
|
||||||
for (var i=0;i<arguments.length;++i)
|
|
||||||
{args[args.length] = arguments[i];}
|
|
||||||
|
|
||||||
return (args.shift() == scwTriggerEle)
|
return (args.shift() == scwTriggerEle)
|
||||||
? func.apply(this, args) : null;
|
? func.apply(this, args) : null;
|
||||||
@ -711,19 +705,19 @@
|
|||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
||||||
function showCal(scwEle, scwSourceEle) { scwShow(scwEle, scwSourceEle); }
|
function showCal(scwEle, scwSourceEle) { scwShow(scwEle, scwSourceEle); }
|
||||||
function scwShow(scwEle,scwSourceEle)
|
function scwShow(scwEle, scwSourceEle) {
|
||||||
{scwTriggerEle = scwSourceEle;
|
scwTriggerEle = scwSourceEle;
|
||||||
|
|
||||||
// Take any parameters that there might be from the third onwards as
|
// Take any parameters that there might be from the third onwards as
|
||||||
// day numbers to be disabled 0 = Sunday through to 6 = Saturday.
|
// day numbers to be disabled 0 = Sunday through to 6 = Saturday.
|
||||||
|
|
||||||
scwParmActiveToday = true;
|
scwParmActiveToday = true;
|
||||||
|
|
||||||
for (var i=0;i<7;i++)
|
for (var i = 0; i < 7; i++) {
|
||||||
{scwPassEnabledDay[(i+7-scwWeekStart)%7] = true;
|
scwPassEnabledDay[(i + 7 - scwWeekStart) % 7] = true;
|
||||||
for (var j=2;j<arguments.length;j++)
|
for (var j = 2; j < arguments.length; j++) {
|
||||||
{if (arguments[j]==i)
|
if (arguments[j] == i) {
|
||||||
{scwPassEnabledDay[(i+7-scwWeekStart)%7] = false;
|
scwPassEnabledDay[(i + 7 - scwWeekStart) % 7] = false;
|
||||||
if (scwDateNow.getDay() == i) scwParmActiveToday = false;
|
if (scwDateNow.getDay() == i) scwParmActiveToday = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -738,20 +732,19 @@
|
|||||||
// Find the date and Strip space characters from start and
|
// Find the date and Strip space characters from start and
|
||||||
// end of date input.
|
// end of date input.
|
||||||
|
|
||||||
if (typeof scwEle.value == 'undefined')
|
if (typeof scwEle.value == 'undefined') {
|
||||||
{var scwChildNodes = scwEle.childNodes;
|
var scwChildNodes = scwEle.childNodes;
|
||||||
for (var i = 0; i < scwChildNodes.length; i++)
|
for (var i = 0; i < scwChildNodes.length; i++)
|
||||||
if (scwChildNodes[i].nodeType == 3)
|
if (scwChildNodes[i].nodeType == 3) {
|
||||||
{var scwDateValue = scwChildNodes[i].nodeValue.replace(/^\s+/,'').replace(/\s+$/,'');
|
var scwDateValue = scwChildNodes[i].nodeValue.replace(/^\s+/, '').replace(/\s+$/, '');
|
||||||
if (scwDateValue.length > 0)
|
if (scwDateValue.length > 0) {
|
||||||
{scwTriggerEle.scwTextNode = scwChildNodes[i];
|
scwTriggerEle.scwTextNode = scwChildNodes[i];
|
||||||
scwTriggerEle.scwLength = scwChildNodes[i].nodeValue.length;
|
scwTriggerEle.scwLength = scwChildNodes[i].nodeValue.length;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else { var scwDateValue = scwEle.value.replace(/^\s+/, '').replace(/\s+$/, ''); }
|
||||||
{var scwDateValue = scwEle.value.replace(/^\s+/,'').replace(/\s+$/,'');}
|
|
||||||
|
|
||||||
// Set the language-dependent elements
|
// Set the language-dependent elements
|
||||||
|
|
||||||
@ -779,22 +772,21 @@
|
|||||||
scwToday + ' ' +
|
scwToday + ' ' +
|
||||||
scwDateNow.scwFormat(scwDateDisplayFormat);
|
scwDateNow.scwFormat(scwDateDisplayFormat);
|
||||||
|
|
||||||
if (scwDateValue.length==0)
|
if (scwDateValue.length == 0) {// If no value is entered and today is within the range,
|
||||||
{// If no value is entered and today is within the range,
|
|
||||||
// use today's date, otherwise use the middle of the valid range.
|
// use today's date, otherwise use the middle of the valid range.
|
||||||
|
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
|
|
||||||
if ((new Date(scwBaseYear + scwDropDownYears, 0, 0)) < scwSeedDate ||
|
if ((new Date(scwBaseYear + scwDropDownYears, 0, 0)) < scwSeedDate ||
|
||||||
(new Date(scwBaseYear, 0, 1)) > scwSeedDate
|
(new Date(scwBaseYear, 0, 1)) > scwSeedDate
|
||||||
)
|
) {
|
||||||
{scwSeedDate = new Date(scwBaseYear +
|
scwSeedDate = new Date(scwBaseYear +
|
||||||
Math.floor(scwDropDownYears / 2), 5, 1);
|
Math.floor(scwDropDownYears / 2), 5, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{function scwInputFormat()
|
function scwInputFormat() {
|
||||||
{var scwArrSeed = new Array(),
|
var scwArrSeed = new Array(),
|
||||||
scwArrInput = scwDateValue.
|
scwArrInput = scwDateValue.
|
||||||
split(new RegExp('[\\' + scwArrDelimiters.
|
split(new RegExp('[\\' + scwArrDelimiters.
|
||||||
join('\\') + ']+', 'g'));
|
join('\\') + ']+', 'g'));
|
||||||
@ -808,8 +800,8 @@
|
|||||||
// still appear in the output string if in the output
|
// still appear in the output string if in the output
|
||||||
// format.
|
// format.
|
||||||
|
|
||||||
if (scwArrInput[0]!=null)
|
if (scwArrInput[0] != null) {
|
||||||
{if (scwArrInput[0].length==0) scwArrInput.splice(0,1);
|
if (scwArrInput[0].length == 0) scwArrInput.splice(0, 1);
|
||||||
|
|
||||||
if (scwArrInput[scwArrInput.length - 1].length == 0)
|
if (scwArrInput[scwArrInput.length - 1].length == 0)
|
||||||
scwArrInput.splice(scwArrInput.length - 1, 1);
|
scwArrInput.splice(scwArrInput.length - 1, 1);
|
||||||
@ -817,8 +809,8 @@
|
|||||||
|
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
|
|
||||||
switch (scwArrInput.length)
|
switch (scwArrInput.length) {
|
||||||
{case 1:
|
case 1:
|
||||||
{// Year only entry
|
{// Year only entry
|
||||||
scwArrSeed[0] = parseInt(scwArrInput[0], 10); // Year
|
scwArrSeed[0] = parseInt(scwArrInput[0], 10); // Year
|
||||||
scwArrSeed[1] = '6'; // Month
|
scwArrSeed[1] = '6'; // Month
|
||||||
@ -882,8 +874,8 @@
|
|||||||
if (scwExpValYear.exec(scwArrSeed[0]) == null ||
|
if (scwExpValYear.exec(scwArrSeed[0]) == null ||
|
||||||
scwExpValMonth.exec(scwArrSeed[1]) == null ||
|
scwExpValMonth.exec(scwArrSeed[1]) == null ||
|
||||||
scwExpValDay.exec(scwArrSeed[2]) == null
|
scwExpValDay.exec(scwArrSeed[2]) == null
|
||||||
)
|
) {
|
||||||
{if (scwShowInvalidDateMsg)
|
if (scwShowInvalidDateMsg)
|
||||||
alert(scwInvalidDateMsg +
|
alert(scwInvalidDateMsg +
|
||||||
scwInvalidAlert[0] + scwDateValue +
|
scwInvalidAlert[0] + scwDateValue +
|
||||||
scwInvalidAlert[1]);
|
scwInvalidAlert[1]);
|
||||||
@ -916,8 +908,8 @@
|
|||||||
|
|
||||||
// Check whether the month is in digits or an abbreviation
|
// Check whether the month is in digits or an abbreviation
|
||||||
|
|
||||||
if (scwArrSeedDate[1].search(/\d+/)!=0)
|
if (scwArrSeedDate[1].search(/\d+/) != 0) {
|
||||||
{month = scwArrMonthNames.join('|').toUpperCase().
|
month = scwArrMonthNames.join('|').toUpperCase().
|
||||||
search(scwArrSeedDate[1].substr(0, 3).
|
search(scwArrSeedDate[1].substr(0, 3).
|
||||||
toUpperCase());
|
toUpperCase());
|
||||||
scwArrSeedDate[1] = Math.floor(month / 4) + 1;
|
scwArrSeedDate[1] = Math.floor(month / 4) + 1;
|
||||||
@ -930,8 +922,8 @@
|
|||||||
|
|
||||||
// Test that we have arrived at a valid date
|
// Test that we have arrived at a valid date
|
||||||
|
|
||||||
if (isNaN(scwSeedDate))
|
if (isNaN(scwSeedDate)) {
|
||||||
{if (scwShowInvalidDateMsg)
|
if (scwShowInvalidDateMsg)
|
||||||
alert(scwInvalidDateMsg +
|
alert(scwInvalidDateMsg +
|
||||||
scwInvalidAlert[0] + scwDateValue +
|
scwInvalidAlert[0] + scwDateValue +
|
||||||
scwInvalidAlert[1]);
|
scwInvalidAlert[1]);
|
||||||
@ -939,34 +931,33 @@
|
|||||||
Math.floor(scwDropDownYears / 2), 5, 1);
|
Math.floor(scwDropDownYears / 2), 5, 1);
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
}
|
}
|
||||||
else
|
else {// Test that the date is within range,
|
||||||
{// Test that the date is within range,
|
|
||||||
// if not then set date to a sensible date in range.
|
// if not then set date to a sensible date in range.
|
||||||
|
|
||||||
if ((new Date(scwBaseYear,0,1)) > scwSeedDate)
|
if ((new Date(scwBaseYear, 0, 1)) > scwSeedDate) {
|
||||||
{if (scwBlnStrict && scwShowOutOfRangeMsg)
|
if (scwBlnStrict && scwShowOutOfRangeMsg)
|
||||||
alert(scwOutOfRangeMsg);
|
alert(scwOutOfRangeMsg);
|
||||||
scwSeedDate = new Date(scwBaseYear, 0, 1);
|
scwSeedDate = new Date(scwBaseYear, 0, 1);
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{if ((new Date(scwBaseYear+scwDropDownYears,0,0))<
|
if ((new Date(scwBaseYear + scwDropDownYears, 0, 0)) <
|
||||||
scwSeedDate)
|
scwSeedDate) {
|
||||||
{if (scwBlnStrict && scwShowOutOfRangeMsg)
|
if (scwBlnStrict && scwShowOutOfRangeMsg)
|
||||||
alert(scwOutOfRangeMsg);
|
alert(scwOutOfRangeMsg);
|
||||||
scwSeedDate = new Date(scwBaseYear +
|
scwSeedDate = new Date(scwBaseYear +
|
||||||
Math.floor(scwDropDownYears) - 1,
|
Math.floor(scwDropDownYears) - 1,
|
||||||
11, 1);
|
11, 1);
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{if (scwBlnStrict && scwBlnFullInputDate &&
|
if (scwBlnStrict && scwBlnFullInputDate &&
|
||||||
(scwSeedDate.getDate() != scwArrSeedDate[2] ||
|
(scwSeedDate.getDate() != scwArrSeedDate[2] ||
|
||||||
(scwSeedDate.getMonth() + 1) != scwArrSeedDate[1] ||
|
(scwSeedDate.getMonth() + 1) != scwArrSeedDate[1] ||
|
||||||
scwSeedDate.getFullYear() != scwArrSeedDate[0]
|
scwSeedDate.getFullYear() != scwArrSeedDate[0]
|
||||||
)
|
)
|
||||||
)
|
) {
|
||||||
{if (scwShowDoesNotExistMsg) alert(scwDoesNotExistMsg);
|
if (scwShowDoesNotExistMsg) alert(scwDoesNotExistMsg);
|
||||||
scwSeedDate = new Date(scwSeedDate.getFullYear(),
|
scwSeedDate = new Date(scwSeedDate.getFullYear(),
|
||||||
scwSeedDate.getMonth() - 1, 1);
|
scwSeedDate.getMonth() - 1, 1);
|
||||||
scwBlnFullInputDate = false;
|
scwBlnFullInputDate = false;
|
||||||
@ -978,27 +969,27 @@
|
|||||||
// Test the disabled dates for validity
|
// Test the disabled dates for validity
|
||||||
// Give error message if not valid.
|
// Give error message if not valid.
|
||||||
|
|
||||||
for (var i=0;i<scwDisabledDates.length;i++)
|
for (var i = 0; i < scwDisabledDates.length; i++) {
|
||||||
{if (!((typeof scwDisabledDates[i] == 'object') &&
|
if (!((typeof scwDisabledDates[i] == 'object') &&
|
||||||
(scwDisabledDates[i].constructor == Date)))
|
(scwDisabledDates[i].constructor == Date))) {
|
||||||
{if ((typeof scwDisabledDates[i] == 'object') &&
|
if ((typeof scwDisabledDates[i] == 'object') &&
|
||||||
(scwDisabledDates[i].constructor == Array))
|
(scwDisabledDates[i].constructor == Array)) {
|
||||||
{var scwPass = true;
|
var scwPass = true;
|
||||||
|
|
||||||
if (scwDisabledDates[i].length !=2)
|
if (scwDisabledDates[i].length != 2) {
|
||||||
{if (scwShowRangeDisablingError)
|
if (scwShowRangeDisablingError)
|
||||||
alert(scwRangeDisablingError[0] +
|
alert(scwRangeDisablingError[0] +
|
||||||
scwDisabledDates[i] +
|
scwDisabledDates[i] +
|
||||||
scwRangeDisablingError[1]);
|
scwRangeDisablingError[1]);
|
||||||
scwPass = false;
|
scwPass = false;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{for (var j=0;j<scwDisabledDates[i].length;j++)
|
for (var j = 0; j < scwDisabledDates[i].length; j++) {
|
||||||
{if (!((typeof scwDisabledDates[i][j]
|
if (!((typeof scwDisabledDates[i][j]
|
||||||
== 'object') &&
|
== 'object') &&
|
||||||
(scwDisabledDates[i][j].constructor
|
(scwDisabledDates[i][j].constructor
|
||||||
== Date)))
|
== Date))) {
|
||||||
{if (scwShowRangeDisablingError)
|
if (scwShowRangeDisablingError)
|
||||||
alert(scwDateDisablingError[0] +
|
alert(scwDateDisablingError[0] +
|
||||||
scwDisabledDates[i][j] +
|
scwDisabledDates[i][j] +
|
||||||
scwDateDisablingError[1]);
|
scwDateDisablingError[1]);
|
||||||
@ -1009,11 +1000,10 @@
|
|||||||
|
|
||||||
if (scwPass &&
|
if (scwPass &&
|
||||||
(scwDisabledDates[i][0] > scwDisabledDates[i][1])
|
(scwDisabledDates[i][0] > scwDisabledDates[i][1])
|
||||||
)
|
) { scwDisabledDates[i].reverse(); }
|
||||||
{scwDisabledDates[i].reverse();}
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{if (scwShowRangeDisablingError)
|
if (scwShowRangeDisablingError)
|
||||||
alert(scwDateDisablingError[0] +
|
alert(scwDateDisablingError[0] +
|
||||||
scwDisabledDates[i] +
|
scwDisabledDates[i] +
|
||||||
scwDateDisablingError[1]);
|
scwDateDisablingError[1]);
|
||||||
@ -1037,8 +1027,8 @@
|
|||||||
// It requires the following work-around to force SELECTs to display
|
// It requires the following work-around to force SELECTs to display
|
||||||
// correctly.
|
// correctly.
|
||||||
|
|
||||||
if (window.opera)
|
if (window.opera) {
|
||||||
{scwID('scwMonths').style.display = 'none';
|
scwID('scwMonths').style.display = 'none';
|
||||||
scwID('scwMonths').style.display = 'block';
|
scwID('scwMonths').style.display = 'block';
|
||||||
scwID('scwYears').style.display = 'none';
|
scwID('scwYears').style.display = 'none';
|
||||||
scwID('scwYears').style.display = 'block';
|
scwID('scwYears').style.display = 'block';
|
||||||
@ -1073,16 +1063,17 @@
|
|||||||
parseInt(scwEle.offsetHeight, 10),
|
parseInt(scwEle.offsetHeight, 10),
|
||||||
offsetLeft = parseInt(scwEle.offsetLeft, 10);
|
offsetLeft = parseInt(scwEle.offsetLeft, 10);
|
||||||
|
|
||||||
if (!window.opera)
|
if (!window.opera) {
|
||||||
{while (scwEle.tagName!='BODY' && scwEle.tagName!='HTML')
|
while (scwEle.tagName != 'BODY' && scwEle.tagName != 'HTML') {
|
||||||
{offsetTop -=parseInt(scwEle.scrollTop, 10);
|
offsetTop -= parseInt(scwEle.scrollTop, 10);
|
||||||
offsetLeft -= parseInt(scwEle.scrollLeft, 10);
|
offsetLeft -= parseInt(scwEle.scrollLeft, 10);
|
||||||
scwEle = scwEle.parentNode;
|
scwEle = scwEle.parentNode;
|
||||||
}
|
}
|
||||||
scwEle = scwTargetEle;
|
scwEle = scwTargetEle;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {scwEle=scwEle.offsetParent;
|
do {
|
||||||
|
scwEle = scwEle.offsetParent;
|
||||||
offsetTop += parseInt(scwEle.offsetTop, 10);
|
offsetTop += parseInt(scwEle.offsetTop, 10);
|
||||||
offsetLeft += parseInt(scwEle.offsetLeft, 10);
|
offsetLeft += parseInt(scwEle.offsetLeft, 10);
|
||||||
}
|
}
|
||||||
@ -1091,8 +1082,8 @@
|
|||||||
scwID('scw').style.top = offsetTop + 'px';
|
scwID('scw').style.top = offsetTop + 'px';
|
||||||
scwID('scw').style.left = offsetLeft + 'px';
|
scwID('scw').style.left = offsetLeft + 'px';
|
||||||
|
|
||||||
if (scwID('scwIframe'))
|
if (scwID('scwIframe')) {
|
||||||
{scwID('scwIframe').style.top=offsetTop +'px';
|
scwID('scwIframe').style.top = offsetTop + 'px';
|
||||||
scwID('scwIframe').style.left = offsetLeft + 'px';
|
scwID('scwIframe').style.left = offsetLeft + 'px';
|
||||||
scwID('scwIframe').style.width = (scwID('scw').offsetWidth - 2) + 'px';
|
scwID('scwIframe').style.width = (scwID('scw').offsetWidth - 2) + 'px';
|
||||||
scwID('scwIframe').style.height = (scwID('scw').offsetHeight - 2) + 'px';
|
scwID('scwIframe').style.height = (scwID('scw').offsetHeight - 2) + 'px';
|
||||||
@ -1112,63 +1103,64 @@
|
|||||||
? scwSourceEle.parentNode
|
? scwSourceEle.parentNode
|
||||||
: scwSourceEle;
|
: scwSourceEle;
|
||||||
|
|
||||||
if (typeof event=='undefined')
|
if (typeof event == 'undefined') {
|
||||||
{el.addEventListener('click',
|
el.addEventListener('click',
|
||||||
scwStopPropagation,
|
scwStopPropagation,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else {if (el.attachEvent)
|
else {
|
||||||
{el.attachEvent('onclick',scwStopPropagation);}
|
if (el.attachEvent) { el.attachEvent('onclick', scwStopPropagation); }
|
||||||
else { event.cancelBubble = true; }
|
else { event.cancelBubble = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwHide()
|
function scwHide() {
|
||||||
{scwID('scw').style.visibility='hidden';
|
scwID('scw').style.visibility = 'hidden';
|
||||||
if (scwID('scwIframe'))
|
if (scwID('scwIframe')) { scwID('scwIframe').style.visibility = 'hidden'; }
|
||||||
{scwID('scwIframe').style.visibility='hidden';}
|
|
||||||
|
|
||||||
if (typeof scwNextAction!='undefined' && scwNextAction!=null)
|
if (typeof scwNextAction != 'undefined' && scwNextAction != null) {
|
||||||
{scwNextActionReturn = scwNextAction();
|
scwNextActionReturn = scwNextAction();
|
||||||
// Explicit null set to prevent closure causing memory leak
|
// Explicit null set to prevent closure causing memory leak
|
||||||
scwNextAction = null;
|
scwNextAction = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwCancel(scwEvt)
|
function scwCancel(scwEvt) {
|
||||||
{if (scwClickToHide) scwHide();
|
if (scwClickToHide) scwHide();
|
||||||
scwStopPropagation(scwEvt);
|
scwStopPropagation(scwEvt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwStopPropagation(scwEvt)
|
function scwStopPropagation(scwEvt) {
|
||||||
{if (scwEvt.stopPropagation)
|
if (scwEvt.stopPropagation)
|
||||||
scwEvt.stopPropagation(); // Capture phase
|
scwEvt.stopPropagation(); // Capture phase
|
||||||
else scwEvt.cancelBubble = true; // Bubbling phase
|
else scwEvt.cancelBubble = true; // Bubbling phase
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwBeginDrag(event)
|
function scwBeginDrag(event) {
|
||||||
{var elementToDrag = scwID('scw');
|
var elementToDrag = scwID('scw');
|
||||||
|
|
||||||
var deltaX = event.clientX,
|
var deltaX = event.clientX,
|
||||||
deltaY = event.clientY,
|
deltaY = event.clientY,
|
||||||
offsetEle = elementToDrag;
|
offsetEle = elementToDrag;
|
||||||
|
|
||||||
do {deltaX -= parseInt(offsetEle.offsetLeft,10);
|
do {
|
||||||
|
deltaX -= parseInt(offsetEle.offsetLeft, 10);
|
||||||
deltaY -= parseInt(offsetEle.offsetTop, 10);
|
deltaY -= parseInt(offsetEle.offsetTop, 10);
|
||||||
offsetEle = offsetEle.offsetParent;
|
offsetEle = offsetEle.offsetParent;
|
||||||
}
|
}
|
||||||
while (offsetEle.tagName != 'BODY' &&
|
while (offsetEle.tagName != 'BODY' &&
|
||||||
offsetEle.tagName != 'HTML');
|
offsetEle.tagName != 'HTML');
|
||||||
|
|
||||||
if (document.addEventListener)
|
if (document.addEventListener) {
|
||||||
{document.addEventListener('mousemove',
|
document.addEventListener('mousemove',
|
||||||
moveHandler,
|
moveHandler,
|
||||||
true); // Capture phase
|
true); // Capture phase
|
||||||
document.addEventListener('mouseup',
|
document.addEventListener('mouseup',
|
||||||
upHandler,
|
upHandler,
|
||||||
true); // Capture phase
|
true); // Capture phase
|
||||||
}
|
}
|
||||||
else {elementToDrag.attachEvent('onmousemove',
|
else {
|
||||||
|
elementToDrag.attachEvent('onmousemove',
|
||||||
moveHandler); // Bubbling phase
|
moveHandler); // Bubbling phase
|
||||||
elementToDrag.attachEvent('onmouseup',
|
elementToDrag.attachEvent('onmouseup',
|
||||||
upHandler); // Bubbling phase
|
upHandler); // Bubbling phase
|
||||||
@ -1177,14 +1169,14 @@
|
|||||||
|
|
||||||
scwStopPropagation(event);
|
scwStopPropagation(event);
|
||||||
|
|
||||||
function moveHandler(scwEvt)
|
function moveHandler(scwEvt) {
|
||||||
{if (!scwEvt) scwEvt = window.event;
|
if (!scwEvt) scwEvt = window.event;
|
||||||
|
|
||||||
elementToDrag.style.left = (scwEvt.clientX - deltaX) + 'px';
|
elementToDrag.style.left = (scwEvt.clientX - deltaX) + 'px';
|
||||||
elementToDrag.style.top = (scwEvt.clientY - deltaY) + 'px';
|
elementToDrag.style.top = (scwEvt.clientY - deltaY) + 'px';
|
||||||
|
|
||||||
if (scwID('scwIframe'))
|
if (scwID('scwIframe')) {
|
||||||
{scwID('scwIframe').style.left =
|
scwID('scwIframe').style.left =
|
||||||
(scwEvt.clientX - deltaX) + 'px';
|
(scwEvt.clientX - deltaX) + 'px';
|
||||||
scwID('scwIframe').style.top =
|
scwID('scwIframe').style.top =
|
||||||
(scwEvt.clientY - deltaY) + 'px';
|
(scwEvt.clientY - deltaY) + 'px';
|
||||||
@ -1193,18 +1185,19 @@
|
|||||||
scwStopPropagation(scwEvt);
|
scwStopPropagation(scwEvt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function upHandler(scwEvt)
|
function upHandler(scwEvt) {
|
||||||
{if (!scwEvt) scwEvt = window.event;
|
if (!scwEvt) scwEvt = window.event;
|
||||||
|
|
||||||
if (document.removeEventListener)
|
if (document.removeEventListener) {
|
||||||
{document.removeEventListener('mousemove',
|
document.removeEventListener('mousemove',
|
||||||
moveHandler,
|
moveHandler,
|
||||||
true); // Capture phase
|
true); // Capture phase
|
||||||
document.removeEventListener('mouseup',
|
document.removeEventListener('mouseup',
|
||||||
upHandler,
|
upHandler,
|
||||||
true); // Capture phase
|
true); // Capture phase
|
||||||
}
|
}
|
||||||
else {elementToDrag.detachEvent('onmouseup',
|
else {
|
||||||
|
elementToDrag.detachEvent('onmouseup',
|
||||||
upHandler); // Bubbling phase
|
upHandler); // Bubbling phase
|
||||||
elementToDrag.detachEvent('onmousemove',
|
elementToDrag.detachEvent('onmousemove',
|
||||||
moveHandler); // Bubbling phase
|
moveHandler); // Bubbling phase
|
||||||
@ -1215,8 +1208,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwShowMonth(scwBias)
|
function scwShowMonth(scwBias) {// Set the selectable Month and Year
|
||||||
{// Set the selectable Month and Year
|
|
||||||
// May be called: from the left and right arrows
|
// May be called: from the left and right arrows
|
||||||
// (shift month -1 and +1 respectively)
|
// (shift month -1 and +1 respectively)
|
||||||
// from the month selection list
|
// from the month selection list
|
||||||
@ -1237,14 +1229,12 @@
|
|||||||
scwSelYears = scwID('scwYears');
|
scwSelYears = scwID('scwYears');
|
||||||
scwSelMonths = scwID('scwMonths');
|
scwSelMonths = scwID('scwMonths');
|
||||||
|
|
||||||
if (scwSelYears.options.selectedIndex>-1)
|
if (scwSelYears.options.selectedIndex > -1) {
|
||||||
{scwMonthSum=12*(scwSelYears.options.selectedIndex)+scwBias;
|
scwMonthSum = 12 * (scwSelYears.options.selectedIndex) + scwBias;
|
||||||
if (scwSelMonths.options.selectedIndex>-1)
|
if (scwSelMonths.options.selectedIndex > -1) { scwMonthSum += scwSelMonths.options.selectedIndex; }
|
||||||
{scwMonthSum+=scwSelMonths.options.selectedIndex;}
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{if (scwSelMonths.options.selectedIndex>-1)
|
if (scwSelMonths.options.selectedIndex > -1) { scwMonthSum += scwSelMonths.options.selectedIndex; }
|
||||||
{scwMonthSum+=scwSelMonths.options.selectedIndex;}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scwShowDate.setFullYear(scwBaseYear + Math.floor(scwMonthSum / 12),
|
scwShowDate.setFullYear(scwBaseYear + Math.floor(scwMonthSum / 12),
|
||||||
@ -1261,8 +1251,8 @@
|
|||||||
if ((12 * parseInt((scwShowDate.getFullYear() - scwBaseYear), 10)) +
|
if ((12 * parseInt((scwShowDate.getFullYear() - scwBaseYear), 10)) +
|
||||||
parseInt(scwShowDate.getMonth(), 10) < (12 * scwDropDownYears) &&
|
parseInt(scwShowDate.getMonth(), 10) < (12 * scwDropDownYears) &&
|
||||||
(12 * parseInt((scwShowDate.getFullYear() - scwBaseYear), 10)) +
|
(12 * parseInt((scwShowDate.getFullYear() - scwBaseYear), 10)) +
|
||||||
parseInt(scwShowDate.getMonth(),10) > -1)
|
parseInt(scwShowDate.getMonth(), 10) > -1) {
|
||||||
{scwSelYears.options.selectedIndex=Math.floor(scwMonthSum/12);
|
scwSelYears.options.selectedIndex = Math.floor(scwMonthSum / 12);
|
||||||
scwSelMonths.options.selectedIndex = (scwMonthSum % 12);
|
scwSelMonths.options.selectedIndex = (scwMonthSum % 12);
|
||||||
|
|
||||||
scwCurMonth = scwShowDate.getMonth();
|
scwCurMonth = scwShowDate.getMonth();
|
||||||
@ -1278,43 +1268,45 @@
|
|||||||
|
|
||||||
scwStartDate = new Date(scwShowDate);
|
scwStartDate = new Date(scwShowDate);
|
||||||
|
|
||||||
if (scwID('scwFoot'))
|
if (scwID('scwFoot')) {
|
||||||
{var scwFoot = scwID('scwFoot');
|
var scwFoot = scwID('scwFoot');
|
||||||
|
|
||||||
function scwFootOutput() { scwSetOutput(scwDateNow); }
|
function scwFootOutput() { scwSetOutput(scwDateNow); }
|
||||||
|
|
||||||
if (scwDisabledDates.length==0)
|
if (scwDisabledDates.length == 0) {
|
||||||
{if (scwActiveToday && scwParmActiveToday)
|
if (scwActiveToday && scwParmActiveToday) {
|
||||||
{scwFoot.onclick = scwFootOutput;
|
scwFoot.onclick = scwFootOutput;
|
||||||
scwFoot.className = 'scwFoot';
|
scwFoot.className = 'scwFoot';
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwFoot.onmouseover = scwChangeClass;
|
scwFoot.onmouseover = scwChangeClass;
|
||||||
scwFoot.onmouseout = scwChangeClass;
|
scwFoot.onmouseout = scwChangeClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{scwFoot.onclick = null;
|
scwFoot.onclick = null;
|
||||||
scwFoot.className = 'scwFootDisabled';
|
scwFoot.className = 'scwFootDisabled';
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwFoot.onmouseover = null;
|
scwFoot.onmouseover = null;
|
||||||
scwFoot.onmouseout = null;
|
scwFoot.onmouseout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.addEventListener)
|
if (document.addEventListener) {
|
||||||
{scwFoot.addEventListener('click',
|
scwFoot.addEventListener('click',
|
||||||
scwStopPropagation,
|
scwStopPropagation,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else {scwFoot.attachEvent('onclick',
|
else {
|
||||||
scwStopPropagation);}
|
scwFoot.attachEvent('onclick',
|
||||||
|
scwStopPropagation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{for (var k=0;k<scwDisabledDates.length;k++)
|
else {
|
||||||
{if (!scwActiveToday || !scwParmActiveToday ||
|
for (var k = 0; k < scwDisabledDates.length; k++) {
|
||||||
|
if (!scwActiveToday || !scwParmActiveToday ||
|
||||||
((typeof scwDisabledDates[k] == 'object') &&
|
((typeof scwDisabledDates[k] == 'object') &&
|
||||||
(((scwDisabledDates[k].constructor == Date) &&
|
(((scwDisabledDates[k].constructor == Date) &&
|
||||||
scwDateNow.valueOf() == scwDisabledDates[k].
|
scwDateNow.valueOf() == scwDisabledDates[k].
|
||||||
@ -1328,31 +1320,32 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
) {
|
||||||
{scwFoot.onclick = null;
|
scwFoot.onclick = null;
|
||||||
scwFoot.className = 'scwFootDisabled';
|
scwFoot.className = 'scwFootDisabled';
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwFoot.onmouseover = null;
|
scwFoot.onmouseover = null;
|
||||||
scwFoot.onmouseout = null;
|
scwFoot.onmouseout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.addEventListener)
|
if (document.addEventListener) {
|
||||||
{scwFoot.addEventListener('click',
|
scwFoot.addEventListener('click',
|
||||||
scwStopPropagation,
|
scwStopPropagation,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else {scwFoot.attachEvent('onclick',
|
else {
|
||||||
|
scwFoot.attachEvent('onclick',
|
||||||
scwStopPropagation);
|
scwStopPropagation);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{scwFoot.onclick=scwFootOutput;
|
scwFoot.onclick = scwFootOutput;
|
||||||
scwFoot.className = 'scwFoot';
|
scwFoot.className = 'scwFoot';
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwFoot.onmouseover = scwChangeClass;
|
scwFoot.onmouseover = scwChangeClass;
|
||||||
scwFoot.onmouseout = scwChangeClass;
|
scwFoot.onmouseout = scwChangeClass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1360,21 +1353,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwSetOutput(scwOutputDate)
|
function scwSetOutput(scwOutputDate) {
|
||||||
{if (typeof scwTargetEle.value == 'undefined')
|
if (typeof scwTargetEle.value == 'undefined') {
|
||||||
{scwTriggerEle.scwTextNode.
|
scwTriggerEle.scwTextNode.
|
||||||
replaceData(0, scwTriggerEle.scwLength,
|
replaceData(0, scwTriggerEle.scwLength,
|
||||||
scwOutputDate.scwFormat(scwDateOutputFormat));
|
scwOutputDate.scwFormat(scwDateOutputFormat));
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{scwTargetEle.value =
|
scwTargetEle.value =
|
||||||
scwOutputDate.scwFormat(scwDateOutputFormat);
|
scwOutputDate.scwFormat(scwDateOutputFormat);
|
||||||
}
|
}
|
||||||
scwHide();
|
scwHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwCellOutput(scwEvt)
|
function scwCellOutput(scwEvt) {
|
||||||
{var scwEle = scwEventTrigger(scwEvt),
|
var scwEle = scwEventTrigger(scwEvt),
|
||||||
scwOutputDate = new Date(scwStartDate);
|
scwOutputDate = new Date(scwStartDate);
|
||||||
|
|
||||||
if (scwEle.nodeType == 3) scwEle = scwEle.parentNode;
|
if (scwEle.nodeType == 3) scwEle = scwEle.parentNode;
|
||||||
@ -1385,13 +1378,13 @@
|
|||||||
scwSetOutput(scwOutputDate);
|
scwSetOutput(scwOutputDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwChangeClass(scwEvt)
|
function scwChangeClass(scwEvt) {
|
||||||
{var scwEle = scwEventTrigger(scwEvt);
|
var scwEle = scwEventTrigger(scwEvt);
|
||||||
|
|
||||||
if (scwEle.nodeType == 3) scwEle = scwEle.parentNode;
|
if (scwEle.nodeType == 3) scwEle = scwEle.parentNode;
|
||||||
|
|
||||||
switch (scwEle.className)
|
switch (scwEle.className) {
|
||||||
{case 'scwCells':
|
case 'scwCells':
|
||||||
scwEle.className = 'scwCellsHover';
|
scwEle.className = 'scwCellsHover';
|
||||||
break;
|
break;
|
||||||
case 'scwCellsHover':
|
case 'scwCellsHover':
|
||||||
@ -1425,13 +1418,12 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwEventTrigger(scwEvt)
|
function scwEventTrigger(scwEvt) {
|
||||||
{if (!scwEvt) scwEvt = event;
|
if (!scwEvt) scwEvt = event;
|
||||||
return scwEvt.target || scwEvt.srcElement;
|
return scwEvt.target || scwEvt.srcElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
function scwWeekNumber(scwInDate)
|
function scwWeekNumber(scwInDate) {// The base day in the week of the input date
|
||||||
{// The base day in the week of the input date
|
|
||||||
var scwInDateWeekBase = new Date(scwInDate);
|
var scwInDateWeekBase = new Date(scwInDate);
|
||||||
|
|
||||||
scwInDateWeekBase.setDate(scwInDateWeekBase.getDate()
|
scwInDateWeekBase.setDate(scwInDateWeekBase.getDate()
|
||||||
@ -1450,16 +1442,14 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (scwFirstBaseDay <
|
if (scwFirstBaseDay <
|
||||||
new Date(scwInDateWeekBase.getFullYear(),0,1))
|
new Date(scwInDateWeekBase.getFullYear(), 0, 1)) { scwFirstBaseDay.setDate(scwFirstBaseDay.getDate() + 7); }
|
||||||
{scwFirstBaseDay.setDate(scwFirstBaseDay.getDate()+7);}
|
|
||||||
|
|
||||||
// Start of Week 01
|
// Start of Week 01
|
||||||
var scwStartWeekOne = new Date(scwFirstBaseDay
|
var scwStartWeekOne = new Date(scwFirstBaseDay
|
||||||
- scwWeekNumberBaseDay
|
- scwWeekNumberBaseDay
|
||||||
+ scwInDate.getDay());
|
+ scwInDate.getDay());
|
||||||
|
|
||||||
if (scwStartWeekOne > scwFirstBaseDay)
|
if (scwStartWeekOne > scwFirstBaseDay) { scwStartWeekOne.setDate(scwStartWeekOne.getDate() - 7); }
|
||||||
{scwStartWeekOne.setDate(scwStartWeekOne.getDate()-7);}
|
|
||||||
|
|
||||||
// Subtract the date of the current week from the date of the
|
// Subtract the date of the current week from the date of the
|
||||||
// first week of the year to get the number of weeks in
|
// first week of the year to get the number of weeks in
|
||||||
@ -1486,11 +1476,10 @@
|
|||||||
|
|
||||||
var scwCells = scwID('scwCells');
|
var scwCells = scwID('scwCells');
|
||||||
|
|
||||||
for (i=0;i<scwCells.childNodes.length;i++)
|
for (i = 0; i < scwCells.childNodes.length; i++) {
|
||||||
{var scwRows = scwCells.childNodes[i];
|
var scwRows = scwCells.childNodes[i];
|
||||||
if (scwRows.nodeType==1 && scwRows.tagName=='TR')
|
if (scwRows.nodeType == 1 && scwRows.tagName == 'TR') {
|
||||||
{if (scwWeekNumberDisplay)
|
if (scwWeekNumberDisplay) {//Calculate the week number using scwShowDate
|
||||||
{//Calculate the week number using scwShowDate
|
|
||||||
scwTmpEl = scwRows.childNodes[0];
|
scwTmpEl = scwRows.childNodes[0];
|
||||||
scwTmpEl.innerHTML = scwWeekNumber(scwShowDate);
|
scwTmpEl.innerHTML = scwWeekNumber(scwShowDate);
|
||||||
scwTmpEl.style.borderColor =
|
scwTmpEl.style.borderColor =
|
||||||
@ -1501,13 +1490,12 @@
|
|||||||
: '';
|
: '';
|
||||||
scwTmpEl.style.display = '';
|
scwTmpEl.style.display = '';
|
||||||
}
|
}
|
||||||
else
|
else { scwRows.childNodes[0].style.display = 'none'; }
|
||||||
{scwRows.childNodes[0].style.display='none';}
|
|
||||||
|
|
||||||
for (j=1;j<scwRows.childNodes.length;j++)
|
for (j = 1; j < scwRows.childNodes.length; j++) {
|
||||||
{var scwCols = scwRows.childNodes[j];
|
var scwCols = scwRows.childNodes[j];
|
||||||
if (scwCols.nodeType==1 && scwCols.tagName=='TD')
|
if (scwCols.nodeType == 1 && scwCols.tagName == 'TD') {
|
||||||
{scwRows.childNodes[j].innerHTML=
|
scwRows.childNodes[j].innerHTML =
|
||||||
scwShowDate.getDate();
|
scwShowDate.getDate();
|
||||||
var scwCell = scwRows.childNodes[j],
|
var scwCell = scwRows.childNodes[j],
|
||||||
scwDisabled =
|
scwDisabled =
|
||||||
@ -1550,8 +1538,8 @@
|
|||||||
)
|
)
|
||||||
) ? 'hidden' : '';
|
) ? 'hidden' : '';
|
||||||
|
|
||||||
for (var k=0;k<scwDisabledDates.length;k++)
|
for (var k = 0; k < scwDisabledDates.length; k++) {
|
||||||
{if ((typeof scwDisabledDates[k]=='object')
|
if ((typeof scwDisabledDates[k] == 'object')
|
||||||
&&
|
&&
|
||||||
(scwDisabledDates[k].constructor ==
|
(scwDisabledDates[k].constructor ==
|
||||||
Date
|
Date
|
||||||
@ -1559,10 +1547,9 @@
|
|||||||
&&
|
&&
|
||||||
scwCompareDateValue ==
|
scwCompareDateValue ==
|
||||||
scwDisabledDates[k].valueOf()
|
scwDisabledDates[k].valueOf()
|
||||||
)
|
) { scwDisabled = true; }
|
||||||
{scwDisabled = true;}
|
else {
|
||||||
else
|
if ((typeof scwDisabledDates[k] == 'object')
|
||||||
{if ((typeof scwDisabledDates[k]=='object')
|
|
||||||
&&
|
&&
|
||||||
(scwDisabledDates[k].constructor ==
|
(scwDisabledDates[k].constructor ==
|
||||||
Array
|
Array
|
||||||
@ -1573,8 +1560,7 @@
|
|||||||
&&
|
&&
|
||||||
scwCompareDateValue <=
|
scwCompareDateValue <=
|
||||||
scwDisabledDates[k][1].valueOf()
|
scwDisabledDates[k][1].valueOf()
|
||||||
)
|
) { scwDisabled = true; }
|
||||||
{scwDisabled = true;}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1585,11 +1571,11 @@
|
|||||||
!scwPassEnabledDay[(j - 1 + (7 * (i * scwCells.
|
!scwPassEnabledDay[(j - 1 + (7 * (i * scwCells.
|
||||||
childNodes.
|
childNodes.
|
||||||
length / 6))) % 7]
|
length / 6))) % 7]
|
||||||
)
|
) {
|
||||||
{scwRows.childNodes[j].onclick = null;
|
scwRows.childNodes[j].onclick = null;
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwRows.childNodes[j].onmouseover = null;
|
scwRows.childNodes[j].onmouseover = null;
|
||||||
scwRows.childNodes[j].onmouseout = null;
|
scwRows.childNodes[j].onmouseout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1613,11 +1599,11 @@
|
|||||||
? document.defaultView.getComputedStyle(scwCell, null).getPropertyValue('background-color')
|
? document.defaultView.getComputedStyle(scwCell, null).getPropertyValue('background-color')
|
||||||
: '';
|
: '';
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{scwRows.childNodes[j].onclick=scwCellOutput;
|
scwRows.childNodes[j].onclick = scwCellOutput;
|
||||||
|
|
||||||
if (scwID('scwIFrame'))
|
if (scwID('scwIFrame')) {
|
||||||
{scwRows.childNodes[j].onmouseover =
|
scwRows.childNodes[j].onmouseover =
|
||||||
scwChangeClass;
|
scwChangeClass;
|
||||||
scwRows.childNodes[j].onmouseout =
|
scwRows.childNodes[j].onmouseout =
|
||||||
scwChangeClass;
|
scwChangeClass;
|
||||||
@ -1720,12 +1706,12 @@
|
|||||||
"<tbody id='scwCells' " +
|
"<tbody id='scwCells' " +
|
||||||
"onClick='scwStopPropagation(event);'>");
|
"onClick='scwStopPropagation(event);'>");
|
||||||
|
|
||||||
for (i=0;i<6;i++)
|
for (i = 0; i < 6; i++) {
|
||||||
{document.write(
|
document.write(
|
||||||
"<tr>" +
|
"<tr>" +
|
||||||
"<td class='scwWeekNo' id='scwWeek_" + i + "'></td>");
|
"<td class='scwWeekNo' id='scwWeek_" + i + "'></td>");
|
||||||
for (j=0;j<7;j++)
|
for (j = 0; j < 7; j++) {
|
||||||
{document.write(
|
document.write(
|
||||||
"<td class='scwCells' id='scwCell_" + (j + (i * 7)) +
|
"<td class='scwCells' id='scwCell_" + (j + (i * 7)) +
|
||||||
"'></td>");
|
"'></td>");
|
||||||
}
|
}
|
||||||
@ -1738,8 +1724,8 @@
|
|||||||
"</tbody>");
|
"</tbody>");
|
||||||
|
|
||||||
if ((new Date(scwBaseYear + scwDropDownYears, 0, 0)) > scwDateNow &&
|
if ((new Date(scwBaseYear + scwDropDownYears, 0, 0)) > scwDateNow &&
|
||||||
(new Date(scwBaseYear, 0, 0)) < scwDateNow)
|
(new Date(scwBaseYear, 0, 0)) < scwDateNow) {
|
||||||
{document.write(
|
document.write(
|
||||||
"<tfoot class='scwFoot'>" +
|
"<tfoot class='scwFoot'>" +
|
||||||
"<tr class='scwFoot'>" +
|
"<tr class='scwFoot'>" +
|
||||||
"<td class='scwFoot' id='scwFoot' colspan='8'>" +
|
"<td class='scwFoot' id='scwFoot' colspan='8'>" +
|
||||||
@ -1754,8 +1740,8 @@
|
|||||||
"</tr>" +
|
"</tr>" +
|
||||||
"</table>");
|
"</table>");
|
||||||
|
|
||||||
if (document.addEventListener)
|
if (document.addEventListener) {
|
||||||
{scwID('scw' ).addEventListener('click',scwCancel,false);
|
scwID('scw').addEventListener('click', scwCancel, false);
|
||||||
scwID('scwHeadLeft').addEventListener('click', scwStopPropagation, false);
|
scwID('scwHeadLeft').addEventListener('click', scwStopPropagation, false);
|
||||||
scwID('scwMonths').addEventListener('click', scwStopPropagation, false);
|
scwID('scwMonths').addEventListener('click', scwStopPropagation, false);
|
||||||
scwID('scwMonths').addEventListener('change', scwStopPropagation, false);
|
scwID('scwMonths').addEventListener('change', scwStopPropagation, false);
|
||||||
@ -1763,7 +1749,8 @@
|
|||||||
scwID('scwYears').addEventListener('change', scwStopPropagation, false);
|
scwID('scwYears').addEventListener('change', scwStopPropagation, false);
|
||||||
scwID('scwHeadRight').addEventListener('click', scwStopPropagation, false);
|
scwID('scwHeadRight').addEventListener('click', scwStopPropagation, false);
|
||||||
}
|
}
|
||||||
else {scwID('scw' ).attachEvent('onclick',scwCancel);
|
else {
|
||||||
|
scwID('scw').attachEvent('onclick', scwCancel);
|
||||||
scwID('scwHeadLeft').attachEvent('onclick', scwStopPropagation);
|
scwID('scwHeadLeft').attachEvent('onclick', scwStopPropagation);
|
||||||
scwID('scwMonths').attachEvent('onclick', scwStopPropagation);
|
scwID('scwMonths').attachEvent('onclick', scwStopPropagation);
|
||||||
scwID('scwMonths').attachEvent('onchange', scwStopPropagation);
|
scwID('scwMonths').attachEvent('onchange', scwStopPropagation);
|
||||||
@ -1779,8 +1766,7 @@
|
|||||||
// Start of document level event definition
|
// Start of document level event definition
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
|
||||||
if (document.addEventListener)
|
if (document.addEventListener) { document.addEventListener('click', scwHide, false); }
|
||||||
{document.addEventListener('click',scwHide, false);}
|
|
||||||
else { document.attachEvent('onclick', scwHide); }
|
else { document.attachEvent('onclick', scwHide); }
|
||||||
|
|
||||||
// ****************************************
|
// ****************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user