##// END OF EJS Templates
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment

File last commit:

r367:9e304f85f976
r367:9e304f85f976
Show More
core.js
170 lines | 5.6 KiB | application/javascript | JavascriptLexer
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 // Core JavaScript helper functions
'use strict';
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338
// quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]);
function quickElement() {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 const obj = document.createElement(arguments[0]);
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 if (arguments[2]) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 const textNode = document.createTextNode(arguments[2]);
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 obj.appendChild(textNode);
}
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 const len = arguments.length;
for (let i = 3; i < len; i += 2) {
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 obj.setAttribute(arguments[i], arguments[i + 1]);
}
arguments[1].appendChild(obj);
return obj;
}
// "a" is reference to an object
function removeChildren(a) {
while (a.hasChildNodes()) {
a.removeChild(a.lastChild);
}
}
// ----------------------------------------------------------------------------
// Find-position functions by PPK
// See https://www.quirksmode.org/js/findpos.html
// ----------------------------------------------------------------------------
function findPosX(obj) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 let curleft = 0;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft - obj.scrollLeft;
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 obj = obj.offsetParent;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 }
} else if (obj.x) {
curleft += obj.x;
}
return curleft;
}
function findPosY(obj) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 let curtop = 0;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 if (obj.offsetParent) {
while (obj.offsetParent) {
curtop += obj.offsetTop - obj.scrollTop;
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 obj = obj.offsetParent;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 }
} else if (obj.y) {
curtop += obj.y;
}
return curtop;
}
//-----------------------------------------------------------------------------
// Date object extensions
// ----------------------------------------------------------------------------
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 {
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 Date.prototype.getTwelveHours = function() {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 return this.getHours() % 12 || 12;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 };
Date.prototype.getTwoDigitMonth = function() {
return (this.getMonth() < 9) ? '0' + (this.getMonth() + 1) : (this.getMonth() + 1);
};
Date.prototype.getTwoDigitDate = function() {
return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate();
};
Date.prototype.getTwoDigitTwelveHour = function() {
return (this.getTwelveHours() < 10) ? '0' + this.getTwelveHours() : this.getTwelveHours();
};
Date.prototype.getTwoDigitHour = function() {
return (this.getHours() < 10) ? '0' + this.getHours() : this.getHours();
};
Date.prototype.getTwoDigitMinute = function() {
return (this.getMinutes() < 10) ? '0' + this.getMinutes() : this.getMinutes();
};
Date.prototype.getTwoDigitSecond = function() {
return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds();
};
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 Date.prototype.getAbbrevMonthName = function() {
return typeof window.CalendarNamespace === "undefined"
? this.getTwoDigitMonth()
: window.CalendarNamespace.monthsOfYearAbbrev[this.getMonth()];
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 };
Date.prototype.getFullMonthName = function() {
return typeof window.CalendarNamespace === "undefined"
? this.getTwoDigitMonth()
: window.CalendarNamespace.monthsOfYear[this.getMonth()];
};
Date.prototype.strftime = function(format) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 const fields = {
b: this.getAbbrevMonthName(),
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 B: this.getFullMonthName(),
c: this.toString(),
d: this.getTwoDigitDate(),
H: this.getTwoDigitHour(),
I: this.getTwoDigitTwelveHour(),
m: this.getTwoDigitMonth(),
M: this.getTwoDigitMinute(),
p: (this.getHours() >= 12) ? 'PM' : 'AM',
S: this.getTwoDigitSecond(),
w: '0' + this.getDay(),
x: this.toLocaleDateString(),
X: this.toLocaleTimeString(),
y: ('' + this.getFullYear()).substr(2, 4),
Y: '' + this.getFullYear(),
'%': '%'
};
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 let result = '', i = 0;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 while (i < format.length) {
if (format.charAt(i) === '%') {
result = result + fields[format.charAt(i + 1)];
++i;
}
else {
result = result + format.charAt(i);
}
++i;
}
return result;
};
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 // ----------------------------------------------------------------------------
// String object extensions
// ----------------------------------------------------------------------------
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 String.prototype.strptime = function(format) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 const split_format = format.split(/[.\-/]/);
const date = this.split(/[.\-/]/);
let i = 0;
let day, month, year;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 while (i < split_format.length) {
switch (split_format[i]) {
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 case "%d":
day = date[i];
break;
case "%m":
month = date[i] - 1;
break;
case "%Y":
year = date[i];
break;
case "%y":
// A %y value in the range of [00, 68] is in the current
// century, while [69, 99] is in the previous century,
// according to the Open Group Specification.
if (parseInt(date[i], 10) >= 69) {
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 year = date[i];
Renato-TUF
Se logró solucionar el problema del ID replicado al momento de crear un campaña con template experiment
r367 } else {
year = (new Date(Date.UTC(date[i], 0))).getUTCFullYear() + 100;
}
break;
Nueva plantilla, prueba comunicacion y nuevos campos ddsrest
r338 }
++i;
}
// Create Date object from UTC since the parsed value is supposed to be
// in UTC, not local time. Also, the calendar uses UTC functions for
// date extraction.
return new Date(Date.UTC(year, month, day));
};
}