id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
42,900 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, field, amount) {
var d = new Date(date.getTime());
switch (field) {
case this.MONTH:
var newMonth = date.getMonth() + amount;
var years = 0;
if (newMonth < 0) {
while (newMonth < 0) {
newMonth += 12;
years -= 1;
}
} else if (newMonth > 11) {
while (newMonth > 11) {
newMonth -= 12;
years += 1;
}
}
d.setMonth(newMonth);
d.setFullYear(date.getFullYear() + years);
break;
case this.DAY:
this._addDays(d, amount);
// d.setDate(date.getDate() + amount);
break;
case this.YEAR:
d.setFullYear(date.getFullYear() + amount);
break;
case this.WEEK:
this._addDays(d, (amount * 7));
// d.setDate(date.getDate() + (amount * 7));
break;
}
return d;
} | javascript | function(date, field, amount) {
var d = new Date(date.getTime());
switch (field) {
case this.MONTH:
var newMonth = date.getMonth() + amount;
var years = 0;
if (newMonth < 0) {
while (newMonth < 0) {
newMonth += 12;
years -= 1;
}
} else if (newMonth > 11) {
while (newMonth > 11) {
newMonth -= 12;
years += 1;
}
}
d.setMonth(newMonth);
d.setFullYear(date.getFullYear() + years);
break;
case this.DAY:
this._addDays(d, amount);
// d.setDate(date.getDate() + amount);
break;
case this.YEAR:
d.setFullYear(date.getFullYear() + amount);
break;
case this.WEEK:
this._addDays(d, (amount * 7));
// d.setDate(date.getDate() + (amount * 7));
break;
}
return d;
} | [
"function",
"(",
"date",
",",
"field",
",",
"amount",
")",
"{",
"var",
"d",
"=",
"new",
"Date",
"(",
"date",
".",
"getTime",
"(",
")",
")",
";",
"switch",
"(",
"field",
")",
"{",
"case",
"this",
".",
"MONTH",
":",
"var",
"newMonth",
"=",
"date",
... | Adds the specified amount of time to the this instance.
@method add
@param {Date} date The JavaScript Date object to perform addition on
@param {String} field The field constant to be used for performing addition.
@param {Number} amount The number of units (measured in the field constant) to add to the date.
@return {Date} The resulting Date object | [
"Adds",
"the",
"specified",
"amount",
"of",
"time",
"to",
"the",
"this",
"instance",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L773-L808 | |
42,901 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, compareTo) {
var ms = compareTo.getTime();
if (date.getTime() < ms) {
return true;
} else {
return false;
}
} | javascript | function(date, compareTo) {
var ms = compareTo.getTime();
if (date.getTime() < ms) {
return true;
} else {
return false;
}
} | [
"function",
"(",
"date",
",",
"compareTo",
")",
"{",
"var",
"ms",
"=",
"compareTo",
".",
"getTime",
"(",
")",
";",
"if",
"(",
"date",
".",
"getTime",
"(",
")",
"<",
"ms",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"false",
";",
... | Determines whether a given date is before another date on the calendar.
@method before
@param {Date} date The Date object to compare with the compare argument
@param {Date} compareTo The Date object to use for the comparison
@return {Boolean} true if the date occurs before the compared date; false if not. | [
"Determines",
"whether",
"a",
"given",
"date",
"is",
"before",
"another",
"date",
"on",
"the",
"calendar",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L859-L866 | |
42,902 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, dateBegin, dateEnd) {
if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
return true;
} else {
return false;
}
} | javascript | function(date, dateBegin, dateEnd) {
if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
return true;
} else {
return false;
}
} | [
"function",
"(",
"date",
",",
"dateBegin",
",",
"dateEnd",
")",
"{",
"if",
"(",
"this",
".",
"after",
"(",
"date",
",",
"dateBegin",
")",
"&&",
"this",
".",
"before",
"(",
"date",
",",
"dateEnd",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
... | Determines whether a given date is between two other dates on the calendar.
@method between
@param {Date} date The date to check for
@param {Date} dateBegin The start of the range
@param {Date} dateEnd The end of the range
@return {Boolean} true if the date occurs between the compared dates; false if not. | [
"Determines",
"whether",
"a",
"given",
"date",
"is",
"between",
"two",
"other",
"dates",
"on",
"the",
"calendar",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L892-L898 | |
42,903 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, calendarYear) {
var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
// Find the number of days the passed in date is away from the calendar year start
var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
return dayOffset;
} | javascript | function(date, calendarYear) {
var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
// Find the number of days the passed in date is away from the calendar year start
var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
return dayOffset;
} | [
"function",
"(",
"date",
",",
"calendarYear",
")",
"{",
"var",
"beginYear",
"=",
"this",
".",
"getJan1",
"(",
"calendarYear",
")",
";",
"// Find the start of the year. This will be in week 1.",
"// Find the number of days the passed in date is away from the calendar year start",
... | Calculates the number of days the specified date is from January 1 of the specified calendar year.
Passing January 1 to this function would return an offset value of zero.
@method getDayOffset
@param {Date} date The JavaScript date for which to find the offset
@param {Number} calendarYear The calendar year to use for determining the offset
@return {Number} The number of days since January 1 of the given year | [
"Calculates",
"the",
"number",
"of",
"days",
"the",
"specified",
"date",
"is",
"from",
"January",
"1",
"of",
"the",
"specified",
"calendar",
"year",
".",
"Passing",
"January",
"1",
"to",
"this",
"function",
"would",
"return",
"an",
"offset",
"value",
"of",
... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L918-L924 | |
42,904 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, firstDayOfWeek, janDate) {
// Setup Defaults
firstDayOfWeek = firstDayOfWeek || 0;
janDate = janDate || this.WEEK_ONE_JAN_DATE;
var targetDate = this.clearTime(date),
startOfWeek,
endOfWeek;
if (targetDate.getDay() === firstDayOfWeek) {
startOfWeek = targetDate;
} else {
startOfWeek = this.getFirstDayOfWeek(targetDate, firstDayOfWeek);
}
var startYear = startOfWeek.getFullYear();
// DST shouldn't be a problem here, math is quicker than setDate();
endOfWeek = new Date(startOfWeek.getTime() + 6*this.ONE_DAY_MS);
var weekNum;
if (startYear !== endOfWeek.getFullYear() && endOfWeek.getDate() >= janDate) {
// If years don't match, endOfWeek is in Jan. and if the
// week has WEEK_ONE_JAN_DATE in it, it's week one by definition.
weekNum = 1;
} else {
// Get the 1st day of the 1st week, and
// find how many days away we are from it.
var weekOne = this.clearTime(this.getDate(startYear, 0, janDate)),
weekOneDayOne = this.getFirstDayOfWeek(weekOne, firstDayOfWeek);
// Round days to smoothen out 1 hr DST diff
var daysDiff = Math.round((targetDate.getTime() - weekOneDayOne.getTime())/this.ONE_DAY_MS);
// Calc. Full Weeks
var rem = daysDiff % 7;
var weeksDiff = (daysDiff - rem)/7;
weekNum = weeksDiff + 1;
}
return weekNum;
} | javascript | function(date, firstDayOfWeek, janDate) {
// Setup Defaults
firstDayOfWeek = firstDayOfWeek || 0;
janDate = janDate || this.WEEK_ONE_JAN_DATE;
var targetDate = this.clearTime(date),
startOfWeek,
endOfWeek;
if (targetDate.getDay() === firstDayOfWeek) {
startOfWeek = targetDate;
} else {
startOfWeek = this.getFirstDayOfWeek(targetDate, firstDayOfWeek);
}
var startYear = startOfWeek.getFullYear();
// DST shouldn't be a problem here, math is quicker than setDate();
endOfWeek = new Date(startOfWeek.getTime() + 6*this.ONE_DAY_MS);
var weekNum;
if (startYear !== endOfWeek.getFullYear() && endOfWeek.getDate() >= janDate) {
// If years don't match, endOfWeek is in Jan. and if the
// week has WEEK_ONE_JAN_DATE in it, it's week one by definition.
weekNum = 1;
} else {
// Get the 1st day of the 1st week, and
// find how many days away we are from it.
var weekOne = this.clearTime(this.getDate(startYear, 0, janDate)),
weekOneDayOne = this.getFirstDayOfWeek(weekOne, firstDayOfWeek);
// Round days to smoothen out 1 hr DST diff
var daysDiff = Math.round((targetDate.getTime() - weekOneDayOne.getTime())/this.ONE_DAY_MS);
// Calc. Full Weeks
var rem = daysDiff % 7;
var weeksDiff = (daysDiff - rem)/7;
weekNum = weeksDiff + 1;
}
return weekNum;
} | [
"function",
"(",
"date",
",",
"firstDayOfWeek",
",",
"janDate",
")",
"{",
"// Setup Defaults",
"firstDayOfWeek",
"=",
"firstDayOfWeek",
"||",
"0",
";",
"janDate",
"=",
"janDate",
"||",
"this",
".",
"WEEK_ONE_JAN_DATE",
";",
"var",
"targetDate",
"=",
"this",
".... | Calculates the week number for the given date. Can currently support standard
U.S. week numbers, based on Jan 1st defining the 1st week of the year, and
ISO8601 week numbers, based on Jan 4th defining the 1st week of the year.
@method getWeekNumber
@param {Date} date The JavaScript date for which to find the week number
@param {Number} firstDayOfWeek The index of the first day of the week (0 = Sun, 1 = Mon ... 6 = Sat).
Defaults to 0
@param {Number} janDate The date in the first week of January which defines week one for the year
Defaults to the value of YAHOO.widget.DateMath.WEEK_ONE_JAN_DATE, which is 1 (Jan 1st).
For the U.S, this is normally Jan 1st. ISO8601 uses Jan 4th to define the first week of the year.
@return {Number} The number of the week containing the given date. | [
"Calculates",
"the",
"week",
"number",
"for",
"the",
"given",
"date",
".",
"Can",
"currently",
"support",
"standard",
"U",
".",
"S",
".",
"week",
"numbers",
"based",
"on",
"Jan",
"1st",
"defining",
"the",
"1st",
"week",
"of",
"the",
"year",
"and",
"ISO86... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L941-L982 | |
42,905 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function (dt, startOfWeek) {
startOfWeek = startOfWeek || 0;
var dayOfWeekIndex = dt.getDay(),
dayOfWeek = (dayOfWeekIndex - startOfWeek + 7) % 7;
return this.subtract(dt, this.DAY, dayOfWeek);
} | javascript | function (dt, startOfWeek) {
startOfWeek = startOfWeek || 0;
var dayOfWeekIndex = dt.getDay(),
dayOfWeek = (dayOfWeekIndex - startOfWeek + 7) % 7;
return this.subtract(dt, this.DAY, dayOfWeek);
} | [
"function",
"(",
"dt",
",",
"startOfWeek",
")",
"{",
"startOfWeek",
"=",
"startOfWeek",
"||",
"0",
";",
"var",
"dayOfWeekIndex",
"=",
"dt",
".",
"getDay",
"(",
")",
",",
"dayOfWeek",
"=",
"(",
"dayOfWeekIndex",
"-",
"startOfWeek",
"+",
"7",
")",
"%",
"... | Get the first day of the week, for the give date.
@param {Date} dt The date in the week for which the first day is required.
@param {Number} startOfWeek The index for the first day of the week, 0 = Sun, 1 = Mon ... 6 = Sat (defaults to 0)
@return {Date} The first day of the week | [
"Get",
"the",
"first",
"day",
"of",
"the",
"week",
"for",
"the",
"give",
"date",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L990-L996 | |
42,906 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(weekBeginDate) {
var overlaps = false;
var nextWeek = this.add(weekBeginDate, this.DAY, 6);
if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
overlaps = true;
}
return overlaps;
} | javascript | function(weekBeginDate) {
var overlaps = false;
var nextWeek = this.add(weekBeginDate, this.DAY, 6);
if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
overlaps = true;
}
return overlaps;
} | [
"function",
"(",
"weekBeginDate",
")",
"{",
"var",
"overlaps",
"=",
"false",
";",
"var",
"nextWeek",
"=",
"this",
".",
"add",
"(",
"weekBeginDate",
",",
"this",
".",
"DAY",
",",
"6",
")",
";",
"if",
"(",
"nextWeek",
".",
"getFullYear",
"(",
")",
"!="... | Determines if a given week overlaps two different years.
@method isYearOverlapWeek
@param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
@return {Boolean} true if the date overlaps two different years. | [
"Determines",
"if",
"a",
"given",
"week",
"overlaps",
"two",
"different",
"years",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1004-L1011 | |
42,907 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(weekBeginDate) {
var overlaps = false;
var nextWeek = this.add(weekBeginDate, this.DAY, 6);
if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
overlaps = true;
}
return overlaps;
} | javascript | function(weekBeginDate) {
var overlaps = false;
var nextWeek = this.add(weekBeginDate, this.DAY, 6);
if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
overlaps = true;
}
return overlaps;
} | [
"function",
"(",
"weekBeginDate",
")",
"{",
"var",
"overlaps",
"=",
"false",
";",
"var",
"nextWeek",
"=",
"this",
".",
"add",
"(",
"weekBeginDate",
",",
"this",
".",
"DAY",
",",
"6",
")",
";",
"if",
"(",
"nextWeek",
".",
"getMonth",
"(",
")",
"!=",
... | Determines if a given week overlaps two different months.
@method isMonthOverlapWeek
@param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
@return {Boolean} true if the date overlaps two different months. | [
"Determines",
"if",
"a",
"given",
"week",
"overlaps",
"two",
"different",
"months",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1019-L1026 | |
42,908 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date) {
var start = this.findMonthStart(date);
var nextMonth = this.add(start, this.MONTH, 1);
var end = this.subtract(nextMonth, this.DAY, 1);
return end;
} | javascript | function(date) {
var start = this.findMonthStart(date);
var nextMonth = this.add(start, this.MONTH, 1);
var end = this.subtract(nextMonth, this.DAY, 1);
return end;
} | [
"function",
"(",
"date",
")",
"{",
"var",
"start",
"=",
"this",
".",
"findMonthStart",
"(",
"date",
")",
";",
"var",
"nextMonth",
"=",
"this",
".",
"add",
"(",
"start",
",",
"this",
".",
"MONTH",
",",
"1",
")",
";",
"var",
"end",
"=",
"this",
"."... | Gets the last day of a month containing a given date.
@method findMonthEnd
@param {Date} date The JavaScript Date used to calculate the month end
@return {Date} The JavaScript Date representing the last day of the month | [
"Gets",
"the",
"last",
"day",
"of",
"a",
"month",
"containing",
"a",
"given",
"date",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1045-L1050 | |
42,909 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var useIframe = args[0];
if (!this.parent) {
if (Dom.inDocument(this.oDomContainer)) {
if (useIframe) {
var pos = Dom.getStyle(this.oDomContainer, "position");
if (pos == "absolute" || pos == "relative") {
if (!Dom.inDocument(this.iframe)) {
this.iframe = document.createElement("iframe");
this.iframe.src = "javascript:false;";
Dom.setStyle(this.iframe, "opacity", "0");
if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
Dom.addClass(this.iframe, this.Style.CSS_FIXED_SIZE);
}
this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
}
}
} else {
if (this.iframe) {
if (this.iframe.parentNode) {
this.iframe.parentNode.removeChild(this.iframe);
}
this.iframe = null;
}
}
}
}
} | javascript | function(type, args, obj) {
var useIframe = args[0];
if (!this.parent) {
if (Dom.inDocument(this.oDomContainer)) {
if (useIframe) {
var pos = Dom.getStyle(this.oDomContainer, "position");
if (pos == "absolute" || pos == "relative") {
if (!Dom.inDocument(this.iframe)) {
this.iframe = document.createElement("iframe");
this.iframe.src = "javascript:false;";
Dom.setStyle(this.iframe, "opacity", "0");
if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
Dom.addClass(this.iframe, this.Style.CSS_FIXED_SIZE);
}
this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
}
}
} else {
if (this.iframe) {
if (this.iframe.parentNode) {
this.iframe.parentNode.removeChild(this.iframe);
}
this.iframe = null;
}
}
}
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"useIframe",
"=",
"args",
"[",
"0",
"]",
";",
"if",
"(",
"!",
"this",
".",
"parent",
")",
"{",
"if",
"(",
"Dom",
".",
"inDocument",
"(",
"this",
".",
"oDomContainer",
")",
")",
... | Default Config listener for the iframe property. If the iframe config property is set to true,
renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
@method configIframe | [
"Default",
"Config",
"listener",
"for",
"the",
"iframe",
"property",
".",
"If",
"the",
"iframe",
"config",
"property",
"is",
"set",
"to",
"true",
"renders",
"the",
"built",
"-",
"in",
"IFRAME",
"shim",
"if",
"the",
"container",
"is",
"relatively",
"or",
"a... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1677-L1710 | |
42,910 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var title = args[0];
// "" disables title bar
if (title) {
this.createTitleBar(title);
} else {
var close = this.cfg.getProperty(DEF_CFG.CLOSE.key);
if (!close) {
this.removeTitleBar();
} else {
this.createTitleBar(" ");
}
}
} | javascript | function(type, args, obj) {
var title = args[0];
// "" disables title bar
if (title) {
this.createTitleBar(title);
} else {
var close = this.cfg.getProperty(DEF_CFG.CLOSE.key);
if (!close) {
this.removeTitleBar();
} else {
this.createTitleBar(" ");
}
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"title",
"=",
"args",
"[",
"0",
"]",
";",
"// \"\" disables title bar",
"if",
"(",
"title",
")",
"{",
"this",
".",
"createTitleBar",
"(",
"title",
")",
";",
"}",
"else",
"{",
"var",
... | Default handler for the "title" property
@method configTitle | [
"Default",
"handler",
"for",
"the",
"title",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1716-L1730 | |
42,911 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var close = args[0],
title = this.cfg.getProperty(DEF_CFG.TITLE.key);
if (close) {
if (!title) {
this.createTitleBar(" ");
}
this.createCloseButton();
} else {
this.removeCloseButton();
if (!title) {
this.removeTitleBar();
}
}
} | javascript | function(type, args, obj) {
var close = args[0],
title = this.cfg.getProperty(DEF_CFG.TITLE.key);
if (close) {
if (!title) {
this.createTitleBar(" ");
}
this.createCloseButton();
} else {
this.removeCloseButton();
if (!title) {
this.removeTitleBar();
}
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"close",
"=",
"args",
"[",
"0",
"]",
",",
"title",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"DEF_CFG",
".",
"TITLE",
".",
"key",
")",
";",
"if",
"(",
"close",
")",
"{",... | Default handler for the "close" property
@method configClose | [
"Default",
"handler",
"for",
"the",
"close",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1736-L1751 | |
42,912 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var defEvents = Calendar._EVENT_TYPES,
CE = YAHOO.util.CustomEvent,
cal = this; // To help with minification
/**
* Fired before a date selection is made
* @event beforeSelectEvent
*/
cal.beforeSelectEvent = new CE(defEvents.BEFORE_SELECT);
/**
* Fired when a date selection is made
* @event selectEvent
* @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
*/
cal.selectEvent = new CE(defEvents.SELECT);
/**
* Fired before a date or set of dates is deselected
* @event beforeDeselectEvent
*/
cal.beforeDeselectEvent = new CE(defEvents.BEFORE_DESELECT);
/**
* Fired when a date or set of dates is deselected
* @event deselectEvent
* @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
*/
cal.deselectEvent = new CE(defEvents.DESELECT);
/**
* Fired when the Calendar page is changed
* @event changePageEvent
* @param {Date} prevDate The date before the page was changed
* @param {Date} newDate The date after the page was changed
*/
cal.changePageEvent = new CE(defEvents.CHANGE_PAGE);
/**
* Fired before the Calendar is rendered
* @event beforeRenderEvent
*/
cal.beforeRenderEvent = new CE(defEvents.BEFORE_RENDER);
/**
* Fired when the Calendar is rendered
* @event renderEvent
*/
cal.renderEvent = new CE(defEvents.RENDER);
/**
* Fired just before the Calendar is to be destroyed
* @event beforeDestroyEvent
*/
cal.beforeDestroyEvent = new CE(defEvents.BEFORE_DESTROY);
/**
* Fired after the Calendar is destroyed. This event should be used
* for notification only. When this event is fired, important Calendar instance
* properties, dom references and event listeners have already been
* removed/dereferenced, and hence the Calendar instance is not in a usable
* state.
*
* @event destroyEvent
*/
cal.destroyEvent = new CE(defEvents.DESTROY);
/**
* Fired when the Calendar is reset
* @event resetEvent
*/
cal.resetEvent = new CE(defEvents.RESET);
/**
* Fired when the Calendar is cleared
* @event clearEvent
*/
cal.clearEvent = new CE(defEvents.CLEAR);
/**
* Fired just before the Calendar is to be shown
* @event beforeShowEvent
*/
cal.beforeShowEvent = new CE(defEvents.BEFORE_SHOW);
/**
* Fired after the Calendar is shown
* @event showEvent
*/
cal.showEvent = new CE(defEvents.SHOW);
/**
* Fired just before the Calendar is to be hidden
* @event beforeHideEvent
*/
cal.beforeHideEvent = new CE(defEvents.BEFORE_HIDE);
/**
* Fired after the Calendar is hidden
* @event hideEvent
*/
cal.hideEvent = new CE(defEvents.HIDE);
/**
* Fired just before the CalendarNavigator is to be shown
* @event beforeShowNavEvent
*/
cal.beforeShowNavEvent = new CE(defEvents.BEFORE_SHOW_NAV);
/**
* Fired after the CalendarNavigator is shown
* @event showNavEvent
*/
cal.showNavEvent = new CE(defEvents.SHOW_NAV);
/**
* Fired just before the CalendarNavigator is to be hidden
* @event beforeHideNavEvent
*/
cal.beforeHideNavEvent = new CE(defEvents.BEFORE_HIDE_NAV);
/**
* Fired after the CalendarNavigator is hidden
* @event hideNavEvent
*/
cal.hideNavEvent = new CE(defEvents.HIDE_NAV);
/**
* Fired just before the CalendarNavigator is to be rendered
* @event beforeRenderNavEvent
*/
cal.beforeRenderNavEvent = new CE(defEvents.BEFORE_RENDER_NAV);
/**
* Fired after the CalendarNavigator is rendered
* @event renderNavEvent
*/
cal.renderNavEvent = new CE(defEvents.RENDER_NAV);
cal.beforeSelectEvent.subscribe(cal.onBeforeSelect, this, true);
cal.selectEvent.subscribe(cal.onSelect, this, true);
cal.beforeDeselectEvent.subscribe(cal.onBeforeDeselect, this, true);
cal.deselectEvent.subscribe(cal.onDeselect, this, true);
cal.changePageEvent.subscribe(cal.onChangePage, this, true);
cal.renderEvent.subscribe(cal.onRender, this, true);
cal.resetEvent.subscribe(cal.onReset, this, true);
cal.clearEvent.subscribe(cal.onClear, this, true);
} | javascript | function() {
var defEvents = Calendar._EVENT_TYPES,
CE = YAHOO.util.CustomEvent,
cal = this; // To help with minification
/**
* Fired before a date selection is made
* @event beforeSelectEvent
*/
cal.beforeSelectEvent = new CE(defEvents.BEFORE_SELECT);
/**
* Fired when a date selection is made
* @event selectEvent
* @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
*/
cal.selectEvent = new CE(defEvents.SELECT);
/**
* Fired before a date or set of dates is deselected
* @event beforeDeselectEvent
*/
cal.beforeDeselectEvent = new CE(defEvents.BEFORE_DESELECT);
/**
* Fired when a date or set of dates is deselected
* @event deselectEvent
* @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
*/
cal.deselectEvent = new CE(defEvents.DESELECT);
/**
* Fired when the Calendar page is changed
* @event changePageEvent
* @param {Date} prevDate The date before the page was changed
* @param {Date} newDate The date after the page was changed
*/
cal.changePageEvent = new CE(defEvents.CHANGE_PAGE);
/**
* Fired before the Calendar is rendered
* @event beforeRenderEvent
*/
cal.beforeRenderEvent = new CE(defEvents.BEFORE_RENDER);
/**
* Fired when the Calendar is rendered
* @event renderEvent
*/
cal.renderEvent = new CE(defEvents.RENDER);
/**
* Fired just before the Calendar is to be destroyed
* @event beforeDestroyEvent
*/
cal.beforeDestroyEvent = new CE(defEvents.BEFORE_DESTROY);
/**
* Fired after the Calendar is destroyed. This event should be used
* for notification only. When this event is fired, important Calendar instance
* properties, dom references and event listeners have already been
* removed/dereferenced, and hence the Calendar instance is not in a usable
* state.
*
* @event destroyEvent
*/
cal.destroyEvent = new CE(defEvents.DESTROY);
/**
* Fired when the Calendar is reset
* @event resetEvent
*/
cal.resetEvent = new CE(defEvents.RESET);
/**
* Fired when the Calendar is cleared
* @event clearEvent
*/
cal.clearEvent = new CE(defEvents.CLEAR);
/**
* Fired just before the Calendar is to be shown
* @event beforeShowEvent
*/
cal.beforeShowEvent = new CE(defEvents.BEFORE_SHOW);
/**
* Fired after the Calendar is shown
* @event showEvent
*/
cal.showEvent = new CE(defEvents.SHOW);
/**
* Fired just before the Calendar is to be hidden
* @event beforeHideEvent
*/
cal.beforeHideEvent = new CE(defEvents.BEFORE_HIDE);
/**
* Fired after the Calendar is hidden
* @event hideEvent
*/
cal.hideEvent = new CE(defEvents.HIDE);
/**
* Fired just before the CalendarNavigator is to be shown
* @event beforeShowNavEvent
*/
cal.beforeShowNavEvent = new CE(defEvents.BEFORE_SHOW_NAV);
/**
* Fired after the CalendarNavigator is shown
* @event showNavEvent
*/
cal.showNavEvent = new CE(defEvents.SHOW_NAV);
/**
* Fired just before the CalendarNavigator is to be hidden
* @event beforeHideNavEvent
*/
cal.beforeHideNavEvent = new CE(defEvents.BEFORE_HIDE_NAV);
/**
* Fired after the CalendarNavigator is hidden
* @event hideNavEvent
*/
cal.hideNavEvent = new CE(defEvents.HIDE_NAV);
/**
* Fired just before the CalendarNavigator is to be rendered
* @event beforeRenderNavEvent
*/
cal.beforeRenderNavEvent = new CE(defEvents.BEFORE_RENDER_NAV);
/**
* Fired after the CalendarNavigator is rendered
* @event renderNavEvent
*/
cal.renderNavEvent = new CE(defEvents.RENDER_NAV);
cal.beforeSelectEvent.subscribe(cal.onBeforeSelect, this, true);
cal.selectEvent.subscribe(cal.onSelect, this, true);
cal.beforeDeselectEvent.subscribe(cal.onBeforeDeselect, this, true);
cal.deselectEvent.subscribe(cal.onDeselect, this, true);
cal.changePageEvent.subscribe(cal.onChangePage, this, true);
cal.renderEvent.subscribe(cal.onRender, this, true);
cal.resetEvent.subscribe(cal.onReset, this, true);
cal.clearEvent.subscribe(cal.onClear, this, true);
} | [
"function",
"(",
")",
"{",
"var",
"defEvents",
"=",
"Calendar",
".",
"_EVENT_TYPES",
",",
"CE",
"=",
"YAHOO",
".",
"util",
".",
"CustomEvent",
",",
"cal",
"=",
"this",
";",
"// To help with minification",
"/**\n * Fired before a date selection is made\n ... | Initializes Calendar's built-in CustomEvents
@method initEvents | [
"Initializes",
"Calendar",
"s",
"built",
"-",
"in",
"CustomEvents"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1757-L1906 | |
42,913 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(e, cal) {
Event.preventDefault(e);
// previousMonth invoked in a timeout, to allow
// event to bubble up, with correct target. Calling
// previousMonth, will call render which will remove
// HTML which generated the event, resulting in an
// invalid event target in certain browsers.
setTimeout(function() {
cal.previousMonth();
var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_LEFT, "a", cal.oDomContainer);
if (navs && navs[0]) {
try {
navs[0].focus();
} catch (ex) {
// ignore
}
}
}, 0);
} | javascript | function(e, cal) {
Event.preventDefault(e);
// previousMonth invoked in a timeout, to allow
// event to bubble up, with correct target. Calling
// previousMonth, will call render which will remove
// HTML which generated the event, resulting in an
// invalid event target in certain browsers.
setTimeout(function() {
cal.previousMonth();
var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_LEFT, "a", cal.oDomContainer);
if (navs && navs[0]) {
try {
navs[0].focus();
} catch (ex) {
// ignore
}
}
}, 0);
} | [
"function",
"(",
"e",
",",
"cal",
")",
"{",
"Event",
".",
"preventDefault",
"(",
"e",
")",
";",
"// previousMonth invoked in a timeout, to allow",
"// event to bubble up, with correct target. Calling",
"// previousMonth, will call render which will remove ",
"// HTML which generate... | The default event handler for clicks on the "Previous Month" navigation UI
@method doPreviousMonthNav
@param {DOMEvent} e The DOM event
@param {Calendar} cal A reference to the calendar | [
"The",
"default",
"event",
"handler",
"for",
"clicks",
"on",
"the",
"Previous",
"Month",
"navigation",
"UI"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1915-L1933 | |
42,914 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(e, cal) {
Event.preventDefault(e);
setTimeout(function() {
cal.nextMonth();
var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_RIGHT, "a", cal.oDomContainer);
if (navs && navs[0]) {
try {
navs[0].focus();
} catch (ex) {
// ignore
}
}
}, 0);
} | javascript | function(e, cal) {
Event.preventDefault(e);
setTimeout(function() {
cal.nextMonth();
var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_RIGHT, "a", cal.oDomContainer);
if (navs && navs[0]) {
try {
navs[0].focus();
} catch (ex) {
// ignore
}
}
}, 0);
} | [
"function",
"(",
"e",
",",
"cal",
")",
"{",
"Event",
".",
"preventDefault",
"(",
"e",
")",
";",
"setTimeout",
"(",
"function",
"(",
")",
"{",
"cal",
".",
"nextMonth",
"(",
")",
";",
"var",
"navs",
"=",
"Dom",
".",
"getElementsByClassName",
"(",
"cal"... | The default event handler for clicks on the "Next Month" navigation UI
@method doNextMonthNav
@param {DOMEvent} e The DOM event
@param {Calendar} cal A reference to the calendar | [
"The",
"default",
"event",
"handler",
"for",
"clicks",
"on",
"the",
"Next",
"Month",
"navigation",
"UI"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L1942-L1955 | |
42,915 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(e, cal) {
var target;
if (e) {
target = Event.getTarget(e);
} else {
target = this;
}
while (target.tagName && target.tagName.toLowerCase() != "td") {
target = target.parentNode;
if (!target.tagName || target.tagName.toLowerCase() == "html") {
return;
}
}
if (Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
}
} | javascript | function(e, cal) {
var target;
if (e) {
target = Event.getTarget(e);
} else {
target = this;
}
while (target.tagName && target.tagName.toLowerCase() != "td") {
target = target.parentNode;
if (!target.tagName || target.tagName.toLowerCase() == "html") {
return;
}
}
if (Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
}
} | [
"function",
"(",
"e",
",",
"cal",
")",
"{",
"var",
"target",
";",
"if",
"(",
"e",
")",
"{",
"target",
"=",
"Event",
".",
"getTarget",
"(",
"e",
")",
";",
"}",
"else",
"{",
"target",
"=",
"this",
";",
"}",
"while",
"(",
"target",
".",
"tagName",... | The event that is executed when the user hovers over a cell
@method doCellMouseOver
@param {DOMEvent} e The event
@param {Calendar} cal A reference to the calendar passed by the Event utility | [
"The",
"event",
"that",
"is",
"executed",
"when",
"the",
"user",
"hovers",
"over",
"a",
"cell"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2035-L2053 | |
42,916 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
cfg.refireEvent(DEF_CFG.LOCALE_MONTHS.key);
cfg.refireEvent(DEF_CFG.LOCALE_WEEKDAYS.key);
} | javascript | function() {
cfg.refireEvent(DEF_CFG.LOCALE_MONTHS.key);
cfg.refireEvent(DEF_CFG.LOCALE_WEEKDAYS.key);
} | [
"function",
"(",
")",
"{",
"cfg",
".",
"refireEvent",
"(",
"DEF_CFG",
".",
"LOCALE_MONTHS",
".",
"key",
")",
";",
"cfg",
".",
"refireEvent",
"(",
"DEF_CFG",
".",
"LOCALE_WEEKDAYS",
".",
"key",
")",
";",
"}"
] | Refreshes the locale values used to build the Calendar.
@method refreshLocale
@private | [
"Refreshes",
"the",
"locale",
"values",
"used",
"to",
"build",
"the",
"Calendar",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2276-L2279 | |
42,917 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, this._parsePageDate(args[0]), true);
} | javascript | function(type, args, obj) {
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, this._parsePageDate(args[0]), true);
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"this",
".",
"cfg",
".",
"setProperty",
"(",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
",",
"this",
".",
"_parsePageDate",
"(",
"args",
"[",
"0",
"]",
")",
",",
"true",
")",
";",
"}"
] | The default handler for the "pagedate" property
@method configPageDate | [
"The",
"default",
"handler",
"for",
"the",
"pagedate",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2511-L2513 | |
42,918 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var val = args[0];
if (Lang.isString(val)) {
val = this._parseDate(val);
this.cfg.setProperty(DEF_CFG.MINDATE.key, DateMath.getDate(val[0],(val[1]-1),val[2]));
}
} | javascript | function(type, args, obj) {
var val = args[0];
if (Lang.isString(val)) {
val = this._parseDate(val);
this.cfg.setProperty(DEF_CFG.MINDATE.key, DateMath.getDate(val[0],(val[1]-1),val[2]));
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
";",
"if",
"(",
"Lang",
".",
"isString",
"(",
"val",
")",
")",
"{",
"val",
"=",
"this",
".",
"_parseDate",
"(",
"val",
")",
";",
"this",
"."... | The default handler for the "mindate" property
@method configMinDate | [
"The",
"default",
"handler",
"for",
"the",
"mindate",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2519-L2525 | |
42,919 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
// Only do this for initial set. Changing the today property after the initial
// set, doesn't affect pagedate
var val = args[0];
if (Lang.isString(val)) {
val = this._parseDate(val);
}
var today = DateMath.clearTime(val);
if (!this.cfg.initialConfig[DEF_CFG.PAGEDATE.key]) {
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, today);
}
this.today = today;
this.cfg.setProperty(DEF_CFG.TODAY.key, today, true);
} | javascript | function(type, args, obj) {
// Only do this for initial set. Changing the today property after the initial
// set, doesn't affect pagedate
var val = args[0];
if (Lang.isString(val)) {
val = this._parseDate(val);
}
var today = DateMath.clearTime(val);
if (!this.cfg.initialConfig[DEF_CFG.PAGEDATE.key]) {
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, today);
}
this.today = today;
this.cfg.setProperty(DEF_CFG.TODAY.key, today, true);
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"// Only do this for initial set. Changing the today property after the initial",
"// set, doesn't affect pagedate",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
";",
"if",
"(",
"Lang",
".",
"isString",
"(",
"... | The default handler for the "today" property
@method configToday | [
"The",
"default",
"handler",
"for",
"the",
"today",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2543-L2556 | |
42,920 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var selected = args[0],
cfgSelected = DEF_CFG.SELECTED.key;
if (selected) {
if (Lang.isString(selected)) {
this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
}
}
if (! this._selectedDates) {
this._selectedDates = this.cfg.getProperty(cfgSelected);
}
} | javascript | function(type, args, obj) {
var selected = args[0],
cfgSelected = DEF_CFG.SELECTED.key;
if (selected) {
if (Lang.isString(selected)) {
this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
}
}
if (! this._selectedDates) {
this._selectedDates = this.cfg.getProperty(cfgSelected);
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"selected",
"=",
"args",
"[",
"0",
"]",
",",
"cfgSelected",
"=",
"DEF_CFG",
".",
"SELECTED",
".",
"key",
";",
"if",
"(",
"selected",
")",
"{",
"if",
"(",
"Lang",
".",
"isString",
... | The default handler for the "selected" property
@method configSelected | [
"The",
"default",
"handler",
"for",
"the",
"selected",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2562-L2574 | |
42,921 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
this.Locale[type.toUpperCase()] = args[0];
this.cfg.refireEvent(DEF_CFG.LOCALE_MONTHS.key);
this.cfg.refireEvent(DEF_CFG.LOCALE_WEEKDAYS.key);
} | javascript | function(type, args, obj) {
this.Locale[type.toUpperCase()] = args[0];
this.cfg.refireEvent(DEF_CFG.LOCALE_MONTHS.key);
this.cfg.refireEvent(DEF_CFG.LOCALE_WEEKDAYS.key);
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"this",
".",
"Locale",
"[",
"type",
".",
"toUpperCase",
"(",
")",
"]",
"=",
"args",
"[",
"0",
"]",
";",
"this",
".",
"cfg",
".",
"refireEvent",
"(",
"DEF_CFG",
".",
"LOCALE_MONTHS",
".",
... | The default handler for all configuration locale properties
@method configLocale | [
"The",
"default",
"handler",
"for",
"all",
"configuration",
"locale",
"properties"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2588-L2593 | |
42,922 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
type = type.toLowerCase();
var val = args[0],
cfg = this.cfg,
Locale = this.Locale;
switch (type) {
case DEF_CFG.LOCALE_MONTHS.key:
switch (val) {
case Calendar.SHORT:
Locale.LOCALE_MONTHS = cfg.getProperty(DEF_CFG.MONTHS_SHORT.key).concat();
break;
case Calendar.LONG:
Locale.LOCALE_MONTHS = cfg.getProperty(DEF_CFG.MONTHS_LONG.key).concat();
break;
}
break;
case DEF_CFG.LOCALE_WEEKDAYS.key:
switch (val) {
case Calendar.ONE_CHAR:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_1CHAR.key).concat();
break;
case Calendar.SHORT:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_SHORT.key).concat();
break;
case Calendar.MEDIUM:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_MEDIUM.key).concat();
break;
case Calendar.LONG:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_LONG.key).concat();
break;
}
var START_WEEKDAY = cfg.getProperty(DEF_CFG.START_WEEKDAY.key);
if (START_WEEKDAY > 0) {
for (var w=0; w < START_WEEKDAY; ++w) {
Locale.LOCALE_WEEKDAYS.push(Locale.LOCALE_WEEKDAYS.shift());
}
}
break;
}
} | javascript | function(type, args, obj) {
type = type.toLowerCase();
var val = args[0],
cfg = this.cfg,
Locale = this.Locale;
switch (type) {
case DEF_CFG.LOCALE_MONTHS.key:
switch (val) {
case Calendar.SHORT:
Locale.LOCALE_MONTHS = cfg.getProperty(DEF_CFG.MONTHS_SHORT.key).concat();
break;
case Calendar.LONG:
Locale.LOCALE_MONTHS = cfg.getProperty(DEF_CFG.MONTHS_LONG.key).concat();
break;
}
break;
case DEF_CFG.LOCALE_WEEKDAYS.key:
switch (val) {
case Calendar.ONE_CHAR:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_1CHAR.key).concat();
break;
case Calendar.SHORT:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_SHORT.key).concat();
break;
case Calendar.MEDIUM:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_MEDIUM.key).concat();
break;
case Calendar.LONG:
Locale.LOCALE_WEEKDAYS = cfg.getProperty(DEF_CFG.WEEKDAYS_LONG.key).concat();
break;
}
var START_WEEKDAY = cfg.getProperty(DEF_CFG.START_WEEKDAY.key);
if (START_WEEKDAY > 0) {
for (var w=0; w < START_WEEKDAY; ++w) {
Locale.LOCALE_WEEKDAYS.push(Locale.LOCALE_WEEKDAYS.shift());
}
}
break;
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"type",
"=",
"type",
".",
"toLowerCase",
"(",
")",
";",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
",",
"cfg",
"=",
"this",
".",
"cfg",
",",
"Locale",
"=",
"this",
".",
"Locale",
";",
... | The default handler for all configuration locale field length properties
@method configLocaleValues | [
"The",
"default",
"handler",
"for",
"all",
"configuration",
"locale",
"field",
"length",
"properties"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2599-L2643 | |
42,923 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var val = args[0];
if (YAHOO.widget.CalendarNavigator && (val === true || Lang.isObject(val))) {
if (!this.oNavigator) {
this.oNavigator = new YAHOO.widget.CalendarNavigator(this);
// Cleanup DOM Refs/Events before innerHTML is removed.
this.beforeRenderEvent.subscribe(function () {
if (!this.pages) {
this.oNavigator.erase();
}
}, this, true);
}
} else {
if (this.oNavigator) {
this.oNavigator.destroy();
this.oNavigator = null;
}
}
} | javascript | function(type, args, obj) {
var val = args[0];
if (YAHOO.widget.CalendarNavigator && (val === true || Lang.isObject(val))) {
if (!this.oNavigator) {
this.oNavigator = new YAHOO.widget.CalendarNavigator(this);
// Cleanup DOM Refs/Events before innerHTML is removed.
this.beforeRenderEvent.subscribe(function () {
if (!this.pages) {
this.oNavigator.erase();
}
}, this, true);
}
} else {
if (this.oNavigator) {
this.oNavigator.destroy();
this.oNavigator = null;
}
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
";",
"if",
"(",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
"&&",
"(",
"val",
"===",
"true",
"||",
"Lang",
".",
"isObject",
"(",
"val",
")... | The default handler for the "navigator" property
@method configNavigator | [
"The",
"default",
"handler",
"for",
"the",
"navigator",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2649-L2667 | |
42,924 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var defStyle = Calendar.STYLES;
this.Style = {
/**
* @property Style.CSS_ROW_HEADER
*/
CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
/**
* @property Style.CSS_ROW_FOOTER
*/
CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
/**
* @property Style.CSS_CELL
*/
CSS_CELL : defStyle.CSS_CELL,
/**
* @property Style.CSS_CELL_SELECTOR
*/
CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
/**
* @property Style.CSS_CELL_SELECTED
*/
CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
/**
* @property Style.CSS_CELL_SELECTABLE
*/
CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
/**
* @property Style.CSS_CELL_RESTRICTED
*/
CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
/**
* @property Style.CSS_CELL_TODAY
*/
CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
/**
* @property Style.CSS_CELL_OOM
*/
CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
/**
* @property Style.CSS_CELL_OOB
*/
CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
/**
* @property Style.CSS_HEADER
*/
CSS_HEADER : defStyle.CSS_HEADER,
/**
* @property Style.CSS_HEADER_TEXT
*/
CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
/**
* @property Style.CSS_BODY
*/
CSS_BODY : defStyle.CSS_BODY,
/**
* @property Style.CSS_WEEKDAY_CELL
*/
CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
/**
* @property Style.CSS_WEEKDAY_ROW
*/
CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
/**
* @property Style.CSS_FOOTER
*/
CSS_FOOTER : defStyle.CSS_FOOTER,
/**
* @property Style.CSS_CALENDAR
*/
CSS_CALENDAR : defStyle.CSS_CALENDAR,
/**
* @property Style.CSS_SINGLE
*/
CSS_SINGLE : defStyle.CSS_SINGLE,
/**
* @property Style.CSS_CONTAINER
*/
CSS_CONTAINER : defStyle.CSS_CONTAINER,
/**
* @property Style.CSS_NAV_LEFT
*/
CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
/**
* @property Style.CSS_NAV_RIGHT
*/
CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
/**
* @property Style.CSS_NAV
*/
CSS_NAV : defStyle.CSS_NAV,
/**
* @property Style.CSS_CLOSE
*/
CSS_CLOSE : defStyle.CSS_CLOSE,
/**
* @property Style.CSS_CELL_TOP
*/
CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
/**
* @property Style.CSS_CELL_LEFT
*/
CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
/**
* @property Style.CSS_CELL_RIGHT
*/
CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
/**
* @property Style.CSS_CELL_BOTTOM
*/
CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
/**
* @property Style.CSS_CELL_HOVER
*/
CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
/**
* @property Style.CSS_CELL_HIGHLIGHT1
*/
CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
/**
* @property Style.CSS_CELL_HIGHLIGHT2
*/
CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
/**
* @property Style.CSS_CELL_HIGHLIGHT3
*/
CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
/**
* @property Style.CSS_CELL_HIGHLIGHT4
*/
CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4,
/**
* @property Style.CSS_WITH_TITLE
*/
CSS_WITH_TITLE : defStyle.CSS_WITH_TITLE,
/**
* @property Style.CSS_FIXED_SIZE
*/
CSS_FIXED_SIZE : defStyle.CSS_FIXED_SIZE,
/**
* @property Style.CSS_LINK_CLOSE
*/
CSS_LINK_CLOSE : defStyle.CSS_LINK_CLOSE
};
} | javascript | function() {
var defStyle = Calendar.STYLES;
this.Style = {
/**
* @property Style.CSS_ROW_HEADER
*/
CSS_ROW_HEADER: defStyle.CSS_ROW_HEADER,
/**
* @property Style.CSS_ROW_FOOTER
*/
CSS_ROW_FOOTER: defStyle.CSS_ROW_FOOTER,
/**
* @property Style.CSS_CELL
*/
CSS_CELL : defStyle.CSS_CELL,
/**
* @property Style.CSS_CELL_SELECTOR
*/
CSS_CELL_SELECTOR : defStyle.CSS_CELL_SELECTOR,
/**
* @property Style.CSS_CELL_SELECTED
*/
CSS_CELL_SELECTED : defStyle.CSS_CELL_SELECTED,
/**
* @property Style.CSS_CELL_SELECTABLE
*/
CSS_CELL_SELECTABLE : defStyle.CSS_CELL_SELECTABLE,
/**
* @property Style.CSS_CELL_RESTRICTED
*/
CSS_CELL_RESTRICTED : defStyle.CSS_CELL_RESTRICTED,
/**
* @property Style.CSS_CELL_TODAY
*/
CSS_CELL_TODAY : defStyle.CSS_CELL_TODAY,
/**
* @property Style.CSS_CELL_OOM
*/
CSS_CELL_OOM : defStyle.CSS_CELL_OOM,
/**
* @property Style.CSS_CELL_OOB
*/
CSS_CELL_OOB : defStyle.CSS_CELL_OOB,
/**
* @property Style.CSS_HEADER
*/
CSS_HEADER : defStyle.CSS_HEADER,
/**
* @property Style.CSS_HEADER_TEXT
*/
CSS_HEADER_TEXT : defStyle.CSS_HEADER_TEXT,
/**
* @property Style.CSS_BODY
*/
CSS_BODY : defStyle.CSS_BODY,
/**
* @property Style.CSS_WEEKDAY_CELL
*/
CSS_WEEKDAY_CELL : defStyle.CSS_WEEKDAY_CELL,
/**
* @property Style.CSS_WEEKDAY_ROW
*/
CSS_WEEKDAY_ROW : defStyle.CSS_WEEKDAY_ROW,
/**
* @property Style.CSS_FOOTER
*/
CSS_FOOTER : defStyle.CSS_FOOTER,
/**
* @property Style.CSS_CALENDAR
*/
CSS_CALENDAR : defStyle.CSS_CALENDAR,
/**
* @property Style.CSS_SINGLE
*/
CSS_SINGLE : defStyle.CSS_SINGLE,
/**
* @property Style.CSS_CONTAINER
*/
CSS_CONTAINER : defStyle.CSS_CONTAINER,
/**
* @property Style.CSS_NAV_LEFT
*/
CSS_NAV_LEFT : defStyle.CSS_NAV_LEFT,
/**
* @property Style.CSS_NAV_RIGHT
*/
CSS_NAV_RIGHT : defStyle.CSS_NAV_RIGHT,
/**
* @property Style.CSS_NAV
*/
CSS_NAV : defStyle.CSS_NAV,
/**
* @property Style.CSS_CLOSE
*/
CSS_CLOSE : defStyle.CSS_CLOSE,
/**
* @property Style.CSS_CELL_TOP
*/
CSS_CELL_TOP : defStyle.CSS_CELL_TOP,
/**
* @property Style.CSS_CELL_LEFT
*/
CSS_CELL_LEFT : defStyle.CSS_CELL_LEFT,
/**
* @property Style.CSS_CELL_RIGHT
*/
CSS_CELL_RIGHT : defStyle.CSS_CELL_RIGHT,
/**
* @property Style.CSS_CELL_BOTTOM
*/
CSS_CELL_BOTTOM : defStyle.CSS_CELL_BOTTOM,
/**
* @property Style.CSS_CELL_HOVER
*/
CSS_CELL_HOVER : defStyle.CSS_CELL_HOVER,
/**
* @property Style.CSS_CELL_HIGHLIGHT1
*/
CSS_CELL_HIGHLIGHT1 : defStyle.CSS_CELL_HIGHLIGHT1,
/**
* @property Style.CSS_CELL_HIGHLIGHT2
*/
CSS_CELL_HIGHLIGHT2 : defStyle.CSS_CELL_HIGHLIGHT2,
/**
* @property Style.CSS_CELL_HIGHLIGHT3
*/
CSS_CELL_HIGHLIGHT3 : defStyle.CSS_CELL_HIGHLIGHT3,
/**
* @property Style.CSS_CELL_HIGHLIGHT4
*/
CSS_CELL_HIGHLIGHT4 : defStyle.CSS_CELL_HIGHLIGHT4,
/**
* @property Style.CSS_WITH_TITLE
*/
CSS_WITH_TITLE : defStyle.CSS_WITH_TITLE,
/**
* @property Style.CSS_FIXED_SIZE
*/
CSS_FIXED_SIZE : defStyle.CSS_FIXED_SIZE,
/**
* @property Style.CSS_LINK_CLOSE
*/
CSS_LINK_CLOSE : defStyle.CSS_LINK_CLOSE
};
} | [
"function",
"(",
")",
"{",
"var",
"defStyle",
"=",
"Calendar",
".",
"STYLES",
";",
"this",
".",
"Style",
"=",
"{",
"/**\n * @property Style.CSS_ROW_HEADER\n */",
"CSS_ROW_HEADER",
":",
"defStyle",
".",
"CSS_ROW_HEADER",
",",
"/**\n * @pr... | Defines the style constants for the Calendar
@method initStyles | [
"Defines",
"the",
"style",
"constants",
"for",
"the",
"Calendar"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2673-L2819 | |
42,925 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date) {
var monthLabel = this.Locale.LOCALE_MONTHS[date.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX,
yearLabel = (date.getFullYear() + this.Locale.YEAR_OFFSET) + this.Locale.MY_LABEL_YEAR_SUFFIX;
if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
return yearLabel + monthLabel;
} else {
return monthLabel + yearLabel;
}
} | javascript | function(date) {
var monthLabel = this.Locale.LOCALE_MONTHS[date.getMonth()] + this.Locale.MY_LABEL_MONTH_SUFFIX,
yearLabel = (date.getFullYear() + this.Locale.YEAR_OFFSET) + this.Locale.MY_LABEL_YEAR_SUFFIX;
if (this.Locale.MY_LABEL_MONTH_POSITION == 2 || this.Locale.MY_LABEL_YEAR_POSITION == 1) {
return yearLabel + monthLabel;
} else {
return monthLabel + yearLabel;
}
} | [
"function",
"(",
"date",
")",
"{",
"var",
"monthLabel",
"=",
"this",
".",
"Locale",
".",
"LOCALE_MONTHS",
"[",
"date",
".",
"getMonth",
"(",
")",
"]",
"+",
"this",
".",
"Locale",
".",
"MY_LABEL_MONTH_SUFFIX",
",",
"yearLabel",
"=",
"(",
"date",
".",
"g... | Helper method, to format a Month Year string, given a JavaScript Date, based on the
Calendar localization settings
@method _buildMonthLabel
@private
@param {Date} date
@return {String} Formated month, year string | [
"Helper",
"method",
"to",
"format",
"a",
"Month",
"Year",
"string",
"given",
"a",
"JavaScript",
"Date",
"based",
"on",
"the",
"Calendar",
"localization",
"settings"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2840-L2849 | |
42,926 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(strTitle) {
var tDiv = Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
tDiv.innerHTML = strTitle;
this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
Dom.addClass(this.oDomContainer, this.Style.CSS_WITH_TITLE);
return tDiv;
} | javascript | function(strTitle) {
var tDiv = Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || document.createElement("div");
tDiv.className = YAHOO.widget.CalendarGroup.CSS_2UPTITLE;
tDiv.innerHTML = strTitle;
this.oDomContainer.insertBefore(tDiv, this.oDomContainer.firstChild);
Dom.addClass(this.oDomContainer, this.Style.CSS_WITH_TITLE);
return tDiv;
} | [
"function",
"(",
"strTitle",
")",
"{",
"var",
"tDiv",
"=",
"Dom",
".",
"getElementsByClassName",
"(",
"YAHOO",
".",
"widget",
".",
"CalendarGroup",
".",
"CSS_2UPTITLE",
",",
"\"div\"",
",",
"this",
".",
"oDomContainer",
")",
"[",
"0",
"]",
"||",
"document"... | Creates the title bar element and adds it to Calendar container DIV
@method createTitleBar
@param {String} strTitle The title to display in the title bar
@return The title bar element | [
"Creates",
"the",
"title",
"bar",
"element",
"and",
"adds",
"it",
"to",
"Calendar",
"container",
"DIV"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2868-L2877 | |
42,927 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var tDiv = Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
if (tDiv) {
Event.purgeElement(tDiv);
this.oDomContainer.removeChild(tDiv);
}
Dom.removeClass(this.oDomContainer, this.Style.CSS_WITH_TITLE);
} | javascript | function() {
var tDiv = Dom.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE, "div", this.oDomContainer)[0] || null;
if (tDiv) {
Event.purgeElement(tDiv);
this.oDomContainer.removeChild(tDiv);
}
Dom.removeClass(this.oDomContainer, this.Style.CSS_WITH_TITLE);
} | [
"function",
"(",
")",
"{",
"var",
"tDiv",
"=",
"Dom",
".",
"getElementsByClassName",
"(",
"YAHOO",
".",
"widget",
".",
"CalendarGroup",
".",
"CSS_2UPTITLE",
",",
"\"div\"",
",",
"this",
".",
"oDomContainer",
")",
"[",
"0",
"]",
"||",
"null",
";",
"if",
... | Removes the title bar element from the DOM
@method removeTitleBar | [
"Removes",
"the",
"title",
"bar",
"element",
"from",
"the",
"DOM"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2884-L2891 | |
42,928 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
cssLinkClose = this.Style.CSS_LINK_CLOSE,
DEPR_CLOSE_PATH = "us/my/bn/x_d.gif",
lnk = Dom.getElementsByClassName(cssLinkClose, "a", this.oDomContainer)[0],
strings = this.cfg.getProperty(DEF_CFG.STRINGS.key),
closeStr = (strings && strings.close) ? strings.close : "";
if (!lnk) {
lnk = document.createElement("a");
Event.addListener(lnk, "click", function(e, cal) {
cal.hide();
Event.preventDefault(e);
}, this);
}
lnk.href = "#";
lnk.className = cssLinkClose;
if (Calendar.IMG_ROOT !== null) {
var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
img.src = Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
img.className = cssClose;
lnk.appendChild(img);
} else {
lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '">' + closeStr + '</span>';
}
this.oDomContainer.appendChild(lnk);
return lnk;
} | javascript | function() {
var cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
cssLinkClose = this.Style.CSS_LINK_CLOSE,
DEPR_CLOSE_PATH = "us/my/bn/x_d.gif",
lnk = Dom.getElementsByClassName(cssLinkClose, "a", this.oDomContainer)[0],
strings = this.cfg.getProperty(DEF_CFG.STRINGS.key),
closeStr = (strings && strings.close) ? strings.close : "";
if (!lnk) {
lnk = document.createElement("a");
Event.addListener(lnk, "click", function(e, cal) {
cal.hide();
Event.preventDefault(e);
}, this);
}
lnk.href = "#";
lnk.className = cssLinkClose;
if (Calendar.IMG_ROOT !== null) {
var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
img.src = Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
img.className = cssClose;
lnk.appendChild(img);
} else {
lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '">' + closeStr + '</span>';
}
this.oDomContainer.appendChild(lnk);
return lnk;
} | [
"function",
"(",
")",
"{",
"var",
"cssClose",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarGroup",
".",
"CSS_2UPCLOSE",
",",
"cssLinkClose",
"=",
"this",
".",
"Style",
".",
"CSS_LINK_CLOSE",
",",
"DEPR_CLOSE_PATH",
"=",
"\"us/my/bn/x_d.gif\"",
",",
"lnk",
"=",
... | Creates the close button HTML element and adds it to Calendar container DIV
@method createCloseButton
@return The close HTML element created | [
"Creates",
"the",
"close",
"button",
"HTML",
"element",
"and",
"adds",
"it",
"to",
"Calendar",
"container",
"DIV"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2899-L2930 | |
42,929 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var btn = Dom.getElementsByClassName(this.Style.CSS_LINK_CLOSE, "a", this.oDomContainer)[0] || null;
if (btn) {
Event.purgeElement(btn);
this.oDomContainer.removeChild(btn);
}
} | javascript | function() {
var btn = Dom.getElementsByClassName(this.Style.CSS_LINK_CLOSE, "a", this.oDomContainer)[0] || null;
if (btn) {
Event.purgeElement(btn);
this.oDomContainer.removeChild(btn);
}
} | [
"function",
"(",
")",
"{",
"var",
"btn",
"=",
"Dom",
".",
"getElementsByClassName",
"(",
"this",
".",
"Style",
".",
"CSS_LINK_CLOSE",
",",
"\"a\"",
",",
"this",
".",
"oDomContainer",
")",
"[",
"0",
"]",
"||",
"null",
";",
"if",
"(",
"btn",
")",
"{",
... | Removes the close button HTML element from the DOM
@method removeCloseButton | [
"Removes",
"the",
"close",
"button",
"HTML",
"element",
"from",
"the",
"DOM"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L2937-L2943 | |
42,930 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(html) {
html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_HEADER.key)) {
html[html.length] = '<th> </th>';
}
for(var i=0;i < this.Locale.LOCALE_WEEKDAYS.length; ++i) {
html[html.length] = '<th class="' + this.Style.CSS_WEEKDAY_CELL + '">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
}
if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_FOOTER.key)) {
html[html.length] = '<th> </th>';
}
html[html.length] = '</tr>';
return html;
} | javascript | function(html) {
html[html.length] = '<tr class="' + this.Style.CSS_WEEKDAY_ROW + '">';
if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_HEADER.key)) {
html[html.length] = '<th> </th>';
}
for(var i=0;i < this.Locale.LOCALE_WEEKDAYS.length; ++i) {
html[html.length] = '<th class="' + this.Style.CSS_WEEKDAY_CELL + '">' + this.Locale.LOCALE_WEEKDAYS[i] + '</th>';
}
if (this.cfg.getProperty(DEF_CFG.SHOW_WEEK_FOOTER.key)) {
html[html.length] = '<th> </th>';
}
html[html.length] = '</tr>';
return html;
} | [
"function",
"(",
"html",
")",
"{",
"html",
"[",
"html",
".",
"length",
"]",
"=",
"'<tr class=\"'",
"+",
"this",
".",
"Style",
".",
"CSS_WEEKDAY_ROW",
"+",
"'\">'",
";",
"if",
"(",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"DEF_CFG",
".",
"SHOW_WEEK_... | Renders the Calendar's weekday headers.
@method buildWeekdays
@param {Array} html The current working HTML array
@return {Array} The current working HTML array | [
"Renders",
"the",
"Calendar",
"s",
"weekday",
"headers",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3038-L3057 | |
42,931 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var root = this.oDomContainer,
cal = this.parent || this,
anchor = "a",
click = "click";
var linkLeft = Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root),
linkRight = Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
if (linkLeft && linkLeft.length > 0) {
this.linkLeft = linkLeft[0];
Event.addListener(this.linkLeft, click, this.doPreviousMonthNav, cal, true);
}
if (linkRight && linkRight.length > 0) {
this.linkRight = linkRight[0];
Event.addListener(this.linkRight, click, this.doNextMonthNav, cal, true);
}
if (cal.cfg.getProperty("navigator") !== null) {
this.applyNavListeners();
}
if (this.domEventMap) {
var el,elements;
for (var cls in this.domEventMap) {
if (Lang.hasOwnProperty(this.domEventMap, cls)) {
var items = this.domEventMap[cls];
if (! (items instanceof Array)) {
items = [items];
}
for (var i=0;i<items.length;i++) {
var item = items[i];
elements = Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
for (var c=0;c<elements.length;c++) {
el = elements[c];
Event.addListener(el, item.event, item.handler, item.scope, item.correct );
}
}
}
}
}
Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
} | javascript | function() {
var root = this.oDomContainer,
cal = this.parent || this,
anchor = "a",
click = "click";
var linkLeft = Dom.getElementsByClassName(this.Style.CSS_NAV_LEFT, anchor, root),
linkRight = Dom.getElementsByClassName(this.Style.CSS_NAV_RIGHT, anchor, root);
if (linkLeft && linkLeft.length > 0) {
this.linkLeft = linkLeft[0];
Event.addListener(this.linkLeft, click, this.doPreviousMonthNav, cal, true);
}
if (linkRight && linkRight.length > 0) {
this.linkRight = linkRight[0];
Event.addListener(this.linkRight, click, this.doNextMonthNav, cal, true);
}
if (cal.cfg.getProperty("navigator") !== null) {
this.applyNavListeners();
}
if (this.domEventMap) {
var el,elements;
for (var cls in this.domEventMap) {
if (Lang.hasOwnProperty(this.domEventMap, cls)) {
var items = this.domEventMap[cls];
if (! (items instanceof Array)) {
items = [items];
}
for (var i=0;i<items.length;i++) {
var item = items[i];
elements = Dom.getElementsByClassName(cls, item.tag, this.oDomContainer);
for (var c=0;c<elements.length;c++) {
el = elements[c];
Event.addListener(el, item.event, item.handler, item.scope, item.correct );
}
}
}
}
}
Event.addListener(this.oDomContainer, "click", this.doSelectCell, this);
Event.addListener(this.oDomContainer, "mouseover", this.doCellMouseOver, this);
Event.addListener(this.oDomContainer, "mouseout", this.doCellMouseOut, this);
} | [
"function",
"(",
")",
"{",
"var",
"root",
"=",
"this",
".",
"oDomContainer",
",",
"cal",
"=",
"this",
".",
"parent",
"||",
"this",
",",
"anchor",
"=",
"\"a\"",
",",
"click",
"=",
"\"click\"",
";",
"var",
"linkLeft",
"=",
"Dom",
".",
"getElementsByClass... | Applies the Calendar's DOM listeners to applicable elements.
@method applyListeners | [
"Applies",
"the",
"Calendar",
"s",
"DOM",
"listeners",
"to",
"applicable",
"elements",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3340-L3389 | |
42,932 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(id) {
var date = this.getDateFieldsByCellId(id);
return (date) ? DateMath.getDate(date[0],date[1]-1,date[2]) : null;
} | javascript | function(id) {
var date = this.getDateFieldsByCellId(id);
return (date) ? DateMath.getDate(date[0],date[1]-1,date[2]) : null;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"date",
"=",
"this",
".",
"getDateFieldsByCellId",
"(",
"id",
")",
";",
"return",
"(",
"date",
")",
"?",
"DateMath",
".",
"getDate",
"(",
"date",
"[",
"0",
"]",
",",
"date",
"[",
"1",
"]",
"-",
"1",
",",
... | Retrieves the Date object for the specified Calendar cell
@method getDateByCellId
@param {String} id The id of the cell
@return {Date} The Date object for the specified Calendar cell | [
"Retrieves",
"the",
"Date",
"object",
"for",
"the",
"specified",
"Calendar",
"cell"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3421-L3424 | |
42,933 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(strId) {
var idx = -1,
li = strId.lastIndexOf("_cell");
if (li > -1) {
idx = parseInt(strId.substring(li + 5), 10);
}
return idx;
} | javascript | function(strId) {
var idx = -1,
li = strId.lastIndexOf("_cell");
if (li > -1) {
idx = parseInt(strId.substring(li + 5), 10);
}
return idx;
} | [
"function",
"(",
"strId",
")",
"{",
"var",
"idx",
"=",
"-",
"1",
",",
"li",
"=",
"strId",
".",
"lastIndexOf",
"(",
"\"_cell\"",
")",
";",
"if",
"(",
"li",
">",
"-",
"1",
")",
"{",
"idx",
"=",
"parseInt",
"(",
"strId",
".",
"substring",
"(",
"li... | Given the id used to mark each Calendar cell, this method
extracts the index number from the id.
@param {String} strId The cell id
@return {Number} The index of the cell, or -1 if id does not contain an index number | [
"Given",
"the",
"id",
"used",
"to",
"mark",
"each",
"Calendar",
"cell",
"this",
"method",
"extracts",
"the",
"index",
"number",
"from",
"the",
"id",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3479-L3488 | |
42,934 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(workingDate, cell) {
Dom.addClass(cell, this.Style.CSS_CELL_OOB);
cell.innerHTML = workingDate.getDate();
return Calendar.STOP_RENDER;
} | javascript | function(workingDate, cell) {
Dom.addClass(cell, this.Style.CSS_CELL_OOB);
cell.innerHTML = workingDate.getDate();
return Calendar.STOP_RENDER;
} | [
"function",
"(",
"workingDate",
",",
"cell",
")",
"{",
"Dom",
".",
"addClass",
"(",
"cell",
",",
"this",
".",
"Style",
".",
"CSS_CELL_OOB",
")",
";",
"cell",
".",
"innerHTML",
"=",
"workingDate",
".",
"getDate",
"(",
")",
";",
"return",
"Calendar",
"."... | BEGIN BUILT-IN TABLE CELL RENDERERS
Renders a cell that falls before the minimum date or after the maximum date.
widget class.
@method renderOutOfBoundsDate
@param {Date} workingDate The current working Date object being used to generate the calendar
@param {HTMLTableCellElement} cell The current working cell in the calendar
@return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
should not be terminated | [
"BEGIN",
"BUILT",
"-",
"IN",
"TABLE",
"CELL",
"RENDERERS",
"Renders",
"a",
"cell",
"that",
"falls",
"before",
"the",
"minimum",
"date",
"or",
"after",
"the",
"maximum",
"date",
".",
"widget",
"class",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3501-L3505 | |
42,935 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(workingDate, cell) {
Dom.addClass(cell, this.Style.CSS_CELL);
Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
cell.innerHTML=workingDate.getDate();
return Calendar.STOP_RENDER;
} | javascript | function(workingDate, cell) {
Dom.addClass(cell, this.Style.CSS_CELL);
Dom.addClass(cell, this.Style.CSS_CELL_RESTRICTED);
cell.innerHTML=workingDate.getDate();
return Calendar.STOP_RENDER;
} | [
"function",
"(",
"workingDate",
",",
"cell",
")",
"{",
"Dom",
".",
"addClass",
"(",
"cell",
",",
"this",
".",
"Style",
".",
"CSS_CELL",
")",
";",
"Dom",
".",
"addClass",
"(",
"cell",
",",
"this",
".",
"Style",
".",
"CSS_CELL_RESTRICTED",
")",
";",
"c... | Renders the current calendar cell as a non-selectable "black-out" date using the default
restricted style.
@method renderBodyCellRestricted
@param {Date} workingDate The current working Date object being used to generate the calendar
@param {HTMLTableCellElement} cell The current working cell in the calendar
@return {String} YAHOO.widget.Calendar.STOP_RENDER if rendering should stop with this style, null or nothing if rendering
should not be terminated | [
"Renders",
"the",
"current",
"calendar",
"cell",
"as",
"a",
"non",
"-",
"selectable",
"black",
"-",
"out",
"date",
"using",
"the",
"default",
"restricted",
"style",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3639-L3644 | |
42,936 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(count) {
var cfgPageDate = DEF_CFG.PAGEDATE.key,
prevDate = this.cfg.getProperty(cfgPageDate),
newDate = DateMath.add(prevDate, DateMath.YEAR, count);
this.cfg.setProperty(cfgPageDate, newDate);
this.resetRenderers();
this.changePageEvent.fire(prevDate, newDate);
} | javascript | function(count) {
var cfgPageDate = DEF_CFG.PAGEDATE.key,
prevDate = this.cfg.getProperty(cfgPageDate),
newDate = DateMath.add(prevDate, DateMath.YEAR, count);
this.cfg.setProperty(cfgPageDate, newDate);
this.resetRenderers();
this.changePageEvent.fire(prevDate, newDate);
} | [
"function",
"(",
"count",
")",
"{",
"var",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
",",
"prevDate",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"cfgPageDate",
")",
",",
"newDate",
"=",
"DateMath",
".",
"add",
"(",
"prevDate",
... | Adds the designated number of years to the current calendar, and sets the current
calendar page date to the new month.
@method addYears
@param {Number} count The number of years to add to the current calendar | [
"Adds",
"the",
"designated",
"number",
"of",
"years",
"to",
"the",
"current",
"calendar",
"and",
"sets",
"the",
"current",
"calendar",
"page",
"date",
"to",
"the",
"new",
"month",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L3683-L3692 | |
42,937 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(array1, array2) {
var match = false;
if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
match=true;
}
return match;
} | javascript | function(array1, array2) {
var match = false;
if (array1[0]==array2[0]&&array1[1]==array2[1]&&array1[2]==array2[2]) {
match=true;
}
return match;
} | [
"function",
"(",
"array1",
",",
"array2",
")",
"{",
"var",
"match",
"=",
"false",
";",
"if",
"(",
"array1",
"[",
"0",
"]",
"==",
"array2",
"[",
"0",
"]",
"&&",
"array1",
"[",
"1",
"]",
"==",
"array2",
"[",
"1",
"]",
"&&",
"array1",
"[",
"2",
... | BEGIN UTILITY METHODS
Determines if 2 field arrays are equal.
@method _fieldArraysAreEqual
@private
@param {Number[]} array1 The first date field array to compare
@param {Number[]} array2 The first date field array to compare
@return {Boolean} The boolean that represents the equality of the two arrays | [
"BEGIN",
"UTILITY",
"METHODS",
"Determines",
"if",
"2",
"field",
"arrays",
"are",
"equal",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4069-L4077 | |
42,938 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(sDate) {
var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER),
rArray;
if (aDate.length == 2) {
rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
rArray.type = Calendar.MONTH_DAY;
} else {
rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1] - this.Locale.YEAR_OFFSET, aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
rArray.type = Calendar.DATE;
}
for (var i=0;i<rArray.length;i++) {
rArray[i] = parseInt(rArray[i], 10);
}
return rArray;
} | javascript | function(sDate) {
var aDate = sDate.split(this.Locale.DATE_FIELD_DELIMITER),
rArray;
if (aDate.length == 2) {
rArray = [aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.Locale.MD_DAY_POSITION-1]];
rArray.type = Calendar.MONTH_DAY;
} else {
rArray = [aDate[this.Locale.MDY_YEAR_POSITION-1] - this.Locale.YEAR_OFFSET, aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.Locale.MDY_DAY_POSITION-1]];
rArray.type = Calendar.DATE;
}
for (var i=0;i<rArray.length;i++) {
rArray[i] = parseInt(rArray[i], 10);
}
return rArray;
} | [
"function",
"(",
"sDate",
")",
"{",
"var",
"aDate",
"=",
"sDate",
".",
"split",
"(",
"this",
".",
"Locale",
".",
"DATE_FIELD_DELIMITER",
")",
",",
"rArray",
";",
"if",
"(",
"aDate",
".",
"length",
"==",
"2",
")",
"{",
"rArray",
"=",
"[",
"aDate",
"... | BEGIN DATE PARSE METHODS
Converts a date string to a date field array
@private
@param {String} sDate Date string. Valid formats are mm/dd and mm/dd/yyyy.
@return A date field array representing the string passed to the method
@type Array[](Number[]) | [
"BEGIN",
"DATE",
"PARSE",
"METHODS",
"Converts",
"a",
"date",
"string",
"to",
"a",
"date",
"field",
"array"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4251-L4268 | |
42,939 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(sDates) {
var aReturn = [],
aDates = sDates.split(this.Locale.DATE_DELIMITER);
for (var d=0;d<aDates.length;++d) {
var sDate = aDates[d];
if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
// This is a range
var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER),
dateStart = this._parseDate(aRange[0]),
dateEnd = this._parseDate(aRange[1]),
fullRange = this._parseRange(dateStart, dateEnd);
aReturn = aReturn.concat(fullRange);
} else {
// This is not a range
var aDate = this._parseDate(sDate);
aReturn.push(aDate);
}
}
return aReturn;
} | javascript | function(sDates) {
var aReturn = [],
aDates = sDates.split(this.Locale.DATE_DELIMITER);
for (var d=0;d<aDates.length;++d) {
var sDate = aDates[d];
if (sDate.indexOf(this.Locale.DATE_RANGE_DELIMITER) != -1) {
// This is a range
var aRange = sDate.split(this.Locale.DATE_RANGE_DELIMITER),
dateStart = this._parseDate(aRange[0]),
dateEnd = this._parseDate(aRange[1]),
fullRange = this._parseRange(dateStart, dateEnd);
aReturn = aReturn.concat(fullRange);
} else {
// This is not a range
var aDate = this._parseDate(sDate);
aReturn.push(aDate);
}
}
return aReturn;
} | [
"function",
"(",
"sDates",
")",
"{",
"var",
"aReturn",
"=",
"[",
"]",
",",
"aDates",
"=",
"sDates",
".",
"split",
"(",
"this",
".",
"Locale",
".",
"DATE_DELIMITER",
")",
";",
"for",
"(",
"var",
"d",
"=",
"0",
";",
"d",
"<",
"aDates",
".",
"length... | Converts a multi or single-date string to an array of date field arrays
@private
@param {String} sDates Date string with one or more comma-delimited dates. Valid formats are mm/dd, mm/dd/yyyy, mm/dd/yyyy-mm/dd/yyyy
@return An array of date field arrays
@type Array[](Number[]) | [
"Converts",
"a",
"multi",
"or",
"single",
"-",
"date",
"string",
"to",
"an",
"array",
"of",
"date",
"field",
"arrays"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4277-L4299 | |
42,940 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(startDate, endDate) {
var dCurrent = DateMath.add(DateMath.getDate(startDate[0],startDate[1]-1,startDate[2]),DateMath.DAY,1),
dEnd = DateMath.getDate(endDate[0], endDate[1]-1, endDate[2]),
results = [];
results.push(startDate);
while (dCurrent.getTime() <= dEnd.getTime()) {
results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
dCurrent = DateMath.add(dCurrent,DateMath.DAY,1);
}
return results;
} | javascript | function(startDate, endDate) {
var dCurrent = DateMath.add(DateMath.getDate(startDate[0],startDate[1]-1,startDate[2]),DateMath.DAY,1),
dEnd = DateMath.getDate(endDate[0], endDate[1]-1, endDate[2]),
results = [];
results.push(startDate);
while (dCurrent.getTime() <= dEnd.getTime()) {
results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,dCurrent.getDate()]);
dCurrent = DateMath.add(dCurrent,DateMath.DAY,1);
}
return results;
} | [
"function",
"(",
"startDate",
",",
"endDate",
")",
"{",
"var",
"dCurrent",
"=",
"DateMath",
".",
"add",
"(",
"DateMath",
".",
"getDate",
"(",
"startDate",
"[",
"0",
"]",
",",
"startDate",
"[",
"1",
"]",
"-",
"1",
",",
"startDate",
"[",
"2",
"]",
")... | Converts a date range to the full list of included dates
@private
@param {Number[]} startDate Date field array representing the first date in the range
@param {Number[]} endDate Date field array representing the last date in the range
@return An array of date field arrays
@type Array[](Number[]) | [
"Converts",
"a",
"date",
"range",
"to",
"the",
"full",
"list",
"of",
"included",
"dates"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4309-L4320 | |
42,941 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, aDates, fnRender) {
var add = [type,aDates,fnRender];
this.renderStack.unshift(add);
this._renderStack = this.renderStack.concat();
} | javascript | function(type, aDates, fnRender) {
var add = [type,aDates,fnRender];
this.renderStack.unshift(add);
this._renderStack = this.renderStack.concat();
} | [
"function",
"(",
"type",
",",
"aDates",
",",
"fnRender",
")",
"{",
"var",
"add",
"=",
"[",
"type",
",",
"aDates",
",",
"fnRender",
"]",
";",
"this",
".",
"renderStack",
".",
"unshift",
"(",
"add",
")",
";",
"this",
".",
"_renderStack",
"=",
"this",
... | The private method used for adding cell renderers to the local render stack.
This method is called by other methods that set the renderer type prior to the method call.
@method _addRenderer
@private
@param {String} type The type string that indicates the type of date renderer being added.
Values are YAHOO.widget.Calendar.DATE, YAHOO.widget.Calendar.MONTH_DAY, YAHOO.widget.Calendar.WEEKDAY,
YAHOO.widget.Calendar.RANGE, YAHOO.widget.Calendar.MONTH
@param {Array} aDates An array of dates used to construct the renderer. The format varies based
on the renderer type
@param {Function} fnRender The function executed to render cells that match the render rules for this renderer. | [
"The",
"private",
"method",
"used",
"for",
"adding",
"cell",
"renderers",
"to",
"the",
"local",
"render",
"stack",
".",
"This",
"method",
"is",
"called",
"by",
"other",
"methods",
"that",
"set",
"the",
"renderer",
"type",
"prior",
"to",
"the",
"method",
"c... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4390-L4394 | |
42,942 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(style) {
for (var c=0;c<this.cells.length;++c) {
Dom.removeClass(this.cells[c],style);
}
} | javascript | function(style) {
for (var c=0;c<this.cells.length;++c) {
Dom.removeClass(this.cells[c],style);
}
} | [
"function",
"(",
"style",
")",
"{",
"for",
"(",
"var",
"c",
"=",
"0",
";",
"c",
"<",
"this",
".",
"cells",
".",
"length",
";",
"++",
"c",
")",
"{",
"Dom",
".",
"removeClass",
"(",
"this",
".",
"cells",
"[",
"c",
"]",
",",
"style",
")",
";",
... | BEGIN CSS METHODS
Removes all styles from all body cells in the current calendar table.
@method clearAllBodyCellStyles
@param {style} style The CSS class name to remove from all calendar body cells | [
"BEGIN",
"CSS",
"METHODS",
"Removes",
"all",
"styles",
"from",
"all",
"body",
"cells",
"in",
"the",
"current",
"calendar",
"table",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4427-L4431 | |
42,943 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(year) {
var cfgPageDate = DEF_CFG.PAGEDATE.key,
current = this.cfg.getProperty(cfgPageDate);
current.setFullYear(parseInt(year, 10) - this.Locale.YEAR_OFFSET);
this.cfg.setProperty(cfgPageDate, current);
} | javascript | function(year) {
var cfgPageDate = DEF_CFG.PAGEDATE.key,
current = this.cfg.getProperty(cfgPageDate);
current.setFullYear(parseInt(year, 10) - this.Locale.YEAR_OFFSET);
this.cfg.setProperty(cfgPageDate, current);
} | [
"function",
"(",
"year",
")",
"{",
"var",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
",",
"current",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"cfgPageDate",
")",
";",
"current",
".",
"setFullYear",
"(",
"parseInt",
"(",
"year",
... | Sets the calendar's year explicitly.
@method setYear
@param {Number} year The numeric 4-digit year | [
"Sets",
"the",
"calendar",
"s",
"year",
"explicitly",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4453-L4459 | |
42,944 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var returnDates = [],
selected = this.cfg.getProperty(DEF_CFG.SELECTED.key);
for (var d=0;d<selected.length;++d) {
var dateArray = selected[d];
var date = DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
returnDates.push(date);
}
returnDates.sort( function(a,b) { return a-b; } );
return returnDates;
} | javascript | function() {
var returnDates = [],
selected = this.cfg.getProperty(DEF_CFG.SELECTED.key);
for (var d=0;d<selected.length;++d) {
var dateArray = selected[d];
var date = DateMath.getDate(dateArray[0],dateArray[1]-1,dateArray[2]);
returnDates.push(date);
}
returnDates.sort( function(a,b) { return a-b; } );
return returnDates;
} | [
"function",
"(",
")",
"{",
"var",
"returnDates",
"=",
"[",
"]",
",",
"selected",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"DEF_CFG",
".",
"SELECTED",
".",
"key",
")",
";",
"for",
"(",
"var",
"d",
"=",
"0",
";",
"d",
"<",
"selected",
".",... | Gets the list of currently selected dates from the calendar.
@method getSelectedDates
@return {Date[]} An array of currently selected JavaScript Date objects. | [
"Gets",
"the",
"list",
"of",
"currently",
"selected",
"dates",
"from",
"the",
"calendar",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4466-L4479 | |
42,945 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
if (this.beforeDestroyEvent.fire()) {
var cal = this;
// Child objects
if (cal.navigator) {
cal.navigator.destroy();
}
if (cal.cfg) {
cal.cfg.destroy();
}
// DOM event listeners
Event.purgeElement(cal.oDomContainer, true);
// Generated markup/DOM - Not removing the container DIV since we didn't create it.
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_WITH_TITLE);
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_CONTAINER);
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_SINGLE);
cal.oDomContainer.innerHTML = "";
// JS-to-DOM references
cal.oDomContainer = null;
cal.cells = null;
this.destroyEvent.fire();
}
} | javascript | function() {
if (this.beforeDestroyEvent.fire()) {
var cal = this;
// Child objects
if (cal.navigator) {
cal.navigator.destroy();
}
if (cal.cfg) {
cal.cfg.destroy();
}
// DOM event listeners
Event.purgeElement(cal.oDomContainer, true);
// Generated markup/DOM - Not removing the container DIV since we didn't create it.
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_WITH_TITLE);
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_CONTAINER);
Dom.removeClass(cal.oDomContainer, cal.Style.CSS_SINGLE);
cal.oDomContainer.innerHTML = "";
// JS-to-DOM references
cal.oDomContainer = null;
cal.cells = null;
this.destroyEvent.fire();
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"beforeDestroyEvent",
".",
"fire",
"(",
")",
")",
"{",
"var",
"cal",
"=",
"this",
";",
"// Child objects",
"if",
"(",
"cal",
".",
"navigator",
")",
"{",
"cal",
".",
"navigator",
".",
"destroy",
"(",
... | Destroys the Calendar instance. The method will remove references
to HTML elements, remove any event listeners added by the Calendar,
and destroy the Config and CalendarNavigator instances it has created.
@method destroy | [
"Destroys",
"the",
"Calendar",
"instance",
".",
"The",
"method",
"will",
"remove",
"references",
"to",
"HTML",
"elements",
"remove",
"any",
"event",
"listeners",
"added",
"by",
"the",
"Calendar",
"and",
"destroy",
"the",
"Config",
"and",
"CalendarNavigator",
"in... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L4544-L4573 | |
42,946 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(fn, obj, bOverride) {
for (var p=0;p<me.pages.length;++p) {
var cal = me.pages[p];
cal[this.type + strEvent].subscribe(fn, obj, bOverride);
}
} | javascript | function(fn, obj, bOverride) {
for (var p=0;p<me.pages.length;++p) {
var cal = me.pages[p];
cal[this.type + strEvent].subscribe(fn, obj, bOverride);
}
} | [
"function",
"(",
"fn",
",",
"obj",
",",
"bOverride",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"me",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"me",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
... | Proxy subscriber to subscribe to the CalendarGroup's child Calendars' CustomEvents
@method sub
@private
@param {Function} fn The function to subscribe to this CustomEvent
@param {Object} obj The CustomEvent's scope object
@param {Boolean} bOverride Whether or not to apply scope correction | [
"Proxy",
"subscriber",
"to",
"subscribe",
"to",
"the",
"CalendarGroup",
"s",
"child",
"Calendars",
"CustomEvents"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5153-L5158 | |
42,947 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(fn, obj) {
for (var p=0;p<me.pages.length;++p) {
var cal = me.pages[p];
cal[this.type + strEvent].unsubscribe(fn, obj);
}
} | javascript | function(fn, obj) {
for (var p=0;p<me.pages.length;++p) {
var cal = me.pages[p];
cal[this.type + strEvent].unsubscribe(fn, obj);
}
} | [
"function",
"(",
"fn",
",",
"obj",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"me",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"me",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
"[",
"this",
".",... | Proxy unsubscriber to unsubscribe from the CalendarGroup's child Calendars' CustomEvents
@method unsub
@private
@param {Function} fn The function to subscribe to this CustomEvent
@param {Object} obj The CustomEvent's scope object | [
"Proxy",
"unsubscriber",
"to",
"unsubscribe",
"from",
"the",
"CalendarGroup",
"s",
"child",
"Calendars",
"CustomEvents"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5167-L5172 | |
42,948 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var pageCount = args[0],
cfgPageDate = DEF_CFG.PAGEDATE.key,
sep = "_",
caldate,
firstPageDate = null,
groupCalClass = "groupcal",
firstClass = "first-of-type",
lastClass = "last-of-type";
for (var p=0;p<pageCount;++p) {
var calId = this.id + sep + p,
calContainerId = this.containerId + sep + p,
childConfig = this.cfg.getConfig();
childConfig.close = false;
childConfig.title = false;
childConfig.navigator = null;
if (p > 0) {
caldate = new Date(firstPageDate);
this._setMonthOnDate(caldate, caldate.getMonth() + p);
childConfig.pageDate = caldate;
}
var cal = this.constructChild(calId, calContainerId, childConfig);
Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
Dom.addClass(cal.oDomContainer, groupCalClass);
if (p===0) {
firstPageDate = cal.cfg.getProperty(cfgPageDate);
Dom.addClass(cal.oDomContainer, firstClass);
}
if (p==(pageCount-1)) {
Dom.addClass(cal.oDomContainer, lastClass);
}
cal.parent = this;
cal.index = p;
this.pages[this.pages.length] = cal;
}
} | javascript | function(type, args, obj) {
var pageCount = args[0],
cfgPageDate = DEF_CFG.PAGEDATE.key,
sep = "_",
caldate,
firstPageDate = null,
groupCalClass = "groupcal",
firstClass = "first-of-type",
lastClass = "last-of-type";
for (var p=0;p<pageCount;++p) {
var calId = this.id + sep + p,
calContainerId = this.containerId + sep + p,
childConfig = this.cfg.getConfig();
childConfig.close = false;
childConfig.title = false;
childConfig.navigator = null;
if (p > 0) {
caldate = new Date(firstPageDate);
this._setMonthOnDate(caldate, caldate.getMonth() + p);
childConfig.pageDate = caldate;
}
var cal = this.constructChild(calId, calContainerId, childConfig);
Dom.removeClass(cal.oDomContainer, this.Style.CSS_SINGLE);
Dom.addClass(cal.oDomContainer, groupCalClass);
if (p===0) {
firstPageDate = cal.cfg.getProperty(cfgPageDate);
Dom.addClass(cal.oDomContainer, firstClass);
}
if (p==(pageCount-1)) {
Dom.addClass(cal.oDomContainer, lastClass);
}
cal.parent = this;
cal.index = p;
this.pages[this.pages.length] = cal;
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"pageCount",
"=",
"args",
"[",
"0",
"]",
",",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
",",
"sep",
"=",
"\"_\"",
",",
"caldate",
",",
"firstPageDate",
"=",
"null",
... | The default Config handler for the "pages" property
@method configPages
@param {String} type The CustomEvent type (usually the property name)
@param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
@param {Object} obj The scope object. For configuration handlers, this will usually equal the owner. | [
"The",
"default",
"Config",
"handler",
"for",
"the",
"pages",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5326-L5370 | |
42,949 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var val = args[0],
firstPageDate;
var cfgPageDate = DEF_CFG.PAGEDATE.key;
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
if (p === 0) {
firstPageDate = cal._parsePageDate(val);
cal.cfg.setProperty(cfgPageDate, firstPageDate);
} else {
var pageDate = new Date(firstPageDate);
this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
cal.cfg.setProperty(cfgPageDate, pageDate);
}
}
} | javascript | function(type, args, obj) {
var val = args[0],
firstPageDate;
var cfgPageDate = DEF_CFG.PAGEDATE.key;
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
if (p === 0) {
firstPageDate = cal._parsePageDate(val);
cal.cfg.setProperty(cfgPageDate, firstPageDate);
} else {
var pageDate = new Date(firstPageDate);
this._setMonthOnDate(pageDate, pageDate.getMonth() + p);
cal.cfg.setProperty(cfgPageDate, pageDate);
}
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
",",
"firstPageDate",
";",
"var",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
... | The default Config handler for the "pagedate" property
@method configPageDate
@param {String} type The CustomEvent type (usually the property name)
@param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
@param {Object} obj The scope object. For configuration handlers, this will usually equal the owner. | [
"The",
"default",
"Config",
"handler",
"for",
"the",
"pagedate",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5379-L5396 | |
42,950 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var cfgSelected = DEF_CFG.SELECTED.key;
this.delegateConfig(type, args, obj);
var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : [];
this.cfg.setProperty(cfgSelected, selected, true);
} | javascript | function(type, args, obj) {
var cfgSelected = DEF_CFG.SELECTED.key;
this.delegateConfig(type, args, obj);
var selected = (this.pages.length > 0) ? this.pages[0].cfg.getProperty(cfgSelected) : [];
this.cfg.setProperty(cfgSelected, selected, true);
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"cfgSelected",
"=",
"DEF_CFG",
".",
"SELECTED",
".",
"key",
";",
"this",
".",
"delegateConfig",
"(",
"type",
",",
"args",
",",
"obj",
")",
";",
"var",
"selected",
"=",
"(",
"this",
... | The default Config handler for the CalendarGroup "selected" property
@method configSelected
@param {String} type The CustomEvent type (usually the property name)
@param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
@param {Object} obj The scope object. For configuration handlers, this will usually equal the owner. | [
"The",
"default",
"Config",
"handler",
"for",
"the",
"CalendarGroup",
"selected",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5405-L5410 | |
42,951 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(type, args, obj) {
var val = args[0];
var cal;
for (var p=0;p<this.pages.length;p++) {
cal = this.pages[p];
cal.cfg.setProperty(type, val);
}
} | javascript | function(type, args, obj) {
var val = args[0];
var cal;
for (var p=0;p<this.pages.length;p++) {
cal = this.pages[p];
cal.cfg.setProperty(type, val);
}
} | [
"function",
"(",
"type",
",",
"args",
",",
"obj",
")",
"{",
"var",
"val",
"=",
"args",
"[",
"0",
"]",
";",
"var",
"cal",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"p",
"++",
")",
"{",
... | Delegates a configuration property to the CustomEvents associated with the CalendarGroup's children
@method delegateConfig
@param {String} type The CustomEvent type (usually the property name)
@param {Object[]} args The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
@param {Object} obj The scope object. For configuration handlers, this will usually equal the owner. | [
"Delegates",
"a",
"configuration",
"property",
"to",
"the",
"CustomEvents",
"associated",
"with",
"the",
"CalendarGroup",
"s",
"children"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5420-L5428 | |
42,952 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(fnName, fn) {
var pageCount = this.cfg.getProperty(DEF_CFG.PAGES.key);
for (var p=0;p<pageCount;++p) {
this.pages[p][fnName] = fn;
}
} | javascript | function(fnName, fn) {
var pageCount = this.cfg.getProperty(DEF_CFG.PAGES.key);
for (var p=0;p<pageCount;++p) {
this.pages[p][fnName] = fn;
}
} | [
"function",
"(",
"fnName",
",",
"fn",
")",
"{",
"var",
"pageCount",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"DEF_CFG",
".",
"PAGES",
".",
"key",
")",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"pageCount",
";",
"++",
"p",
"... | Adds a function to all child Calendars within this CalendarGroup.
@method setChildFunction
@param {String} fnName The name of the function
@param {Function} fn The function to apply to each Calendar page object | [
"Adds",
"a",
"function",
"to",
"all",
"child",
"Calendars",
"within",
"this",
"CalendarGroup",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5436-L5442 | |
42,953 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(fnName, args) {
var pageCount = this.cfg.getProperty(DEF_CFG.PAGES.key);
for (var p=0;p<pageCount;++p) {
var page = this.pages[p];
if (page[fnName]) {
var fn = page[fnName];
fn.call(page, args);
}
}
} | javascript | function(fnName, args) {
var pageCount = this.cfg.getProperty(DEF_CFG.PAGES.key);
for (var p=0;p<pageCount;++p) {
var page = this.pages[p];
if (page[fnName]) {
var fn = page[fnName];
fn.call(page, args);
}
}
} | [
"function",
"(",
"fnName",
",",
"args",
")",
"{",
"var",
"pageCount",
"=",
"this",
".",
"cfg",
".",
"getProperty",
"(",
"DEF_CFG",
".",
"PAGES",
".",
"key",
")",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"pageCount",
";",
"++",
"p",
... | Calls a function within all child Calendars within this CalendarGroup.
@method callChildFunction
@param {String} fnName The name of the function
@param {Array} args The arguments to pass to the function | [
"Calls",
"a",
"function",
"within",
"all",
"child",
"Calendars",
"within",
"this",
"CalendarGroup",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5450-L5460 | |
42,954 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(id,containerId,config) {
var container = document.getElementById(containerId);
if (! container) {
container = document.createElement("div");
container.id = containerId;
this.oDomContainer.appendChild(container);
}
return new Calendar(id,containerId,config);
} | javascript | function(id,containerId,config) {
var container = document.getElementById(containerId);
if (! container) {
container = document.createElement("div");
container.id = containerId;
this.oDomContainer.appendChild(container);
}
return new Calendar(id,containerId,config);
} | [
"function",
"(",
"id",
",",
"containerId",
",",
"config",
")",
"{",
"var",
"container",
"=",
"document",
".",
"getElementById",
"(",
"containerId",
")",
";",
"if",
"(",
"!",
"container",
")",
"{",
"container",
"=",
"document",
".",
"createElement",
"(",
... | Constructs a child calendar. This method can be overridden if a subclassed version of the default
calendar is to be used.
@method constructChild
@param {String} id The id of the table element that will represent the calendar widget
@param {String} containerId The id of the container div element that will wrap the calendar table
@param {Object} config The configuration object containing the Calendar's arguments
@return {YAHOO.widget.Calendar} The YAHOO.widget.Calendar instance that is constructed | [
"Constructs",
"a",
"child",
"calendar",
".",
"This",
"method",
"can",
"be",
"overridden",
"if",
"a",
"subclassed",
"version",
"of",
"the",
"default",
"calendar",
"is",
"to",
"be",
"used",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5471-L5479 | |
42,955 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(month) {
month = parseInt(month, 10);
var currYear;
var cfgPageDate = DEF_CFG.PAGEDATE.key;
for (var p=0; p<this.pages.length; ++p) {
var cal = this.pages[p];
var pageDate = cal.cfg.getProperty(cfgPageDate);
if (p === 0) {
currYear = pageDate.getFullYear();
} else {
pageDate.setFullYear(currYear);
}
this._setMonthOnDate(pageDate, month+p);
cal.cfg.setProperty(cfgPageDate, pageDate);
}
} | javascript | function(month) {
month = parseInt(month, 10);
var currYear;
var cfgPageDate = DEF_CFG.PAGEDATE.key;
for (var p=0; p<this.pages.length; ++p) {
var cal = this.pages[p];
var pageDate = cal.cfg.getProperty(cfgPageDate);
if (p === 0) {
currYear = pageDate.getFullYear();
} else {
pageDate.setFullYear(currYear);
}
this._setMonthOnDate(pageDate, month+p);
cal.cfg.setProperty(cfgPageDate, pageDate);
}
} | [
"function",
"(",
"month",
")",
"{",
"month",
"=",
"parseInt",
"(",
"month",
",",
"10",
")",
";",
"var",
"currYear",
";",
"var",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"thi... | Sets the calendar group's month explicitly. This month will be set into the first
page of the multi-page calendar, and all other months will be iterated appropriately.
@method setMonth
@param {Number} month The numeric month, from 0 (January) to 11 (December) | [
"Sets",
"the",
"calendar",
"group",
"s",
"month",
"explicitly",
".",
"This",
"month",
"will",
"be",
"set",
"into",
"the",
"first",
"page",
"of",
"the",
"multi",
"-",
"page",
"calendar",
"and",
"all",
"other",
"months",
"will",
"be",
"iterated",
"appropriat... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5487-L5504 | |
42,956 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(year) {
var cfgPageDate = DEF_CFG.PAGEDATE.key;
year = parseInt(year, 10);
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
var pageDate = cal.cfg.getProperty(cfgPageDate);
if ((pageDate.getMonth()+1) == 1 && p>0) {
year+=1;
}
cal.setYear(year);
}
} | javascript | function(year) {
var cfgPageDate = DEF_CFG.PAGEDATE.key;
year = parseInt(year, 10);
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
var pageDate = cal.cfg.getProperty(cfgPageDate);
if ((pageDate.getMonth()+1) == 1 && p>0) {
year+=1;
}
cal.setYear(year);
}
} | [
"function",
"(",
"year",
")",
"{",
"var",
"cfgPageDate",
"=",
"DEF_CFG",
".",
"PAGEDATE",
".",
"key",
";",
"year",
"=",
"parseInt",
"(",
"year",
",",
"10",
")",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"l... | Sets the calendar group's year explicitly. This year will be set into the first
page of the multi-page calendar, and all other months will be iterated appropriately.
@method setYear
@param {Number} year The numeric 4-digit year | [
"Sets",
"the",
"calendar",
"group",
"s",
"year",
"explicitly",
".",
"This",
"year",
"will",
"be",
"set",
"into",
"the",
"first",
"page",
"of",
"the",
"multi",
"-",
"page",
"calendar",
"and",
"all",
"other",
"months",
"will",
"be",
"iterated",
"appropriatel... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5512-L5526 | |
42,957 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
this.renderHeader();
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.render();
}
this.renderFooter();
} | javascript | function() {
this.renderHeader();
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.render();
}
this.renderFooter();
} | [
"function",
"(",
")",
"{",
"this",
".",
"renderHeader",
"(",
")",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
"... | Calls the render function of all child calendars within the group.
@method render | [
"Calls",
"the",
"render",
"function",
"of",
"all",
"child",
"calendars",
"within",
"the",
"group",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5532-L5539 | |
42,958 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(cellIndex) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.deselectCell(cellIndex);
}
return this.getSelectedDates();
} | javascript | function(cellIndex) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.deselectCell(cellIndex);
}
return this.getSelectedDates();
} | [
"function",
"(",
"cellIndex",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"deselectCell",
"... | Deselects dates in the CalendarGroup based on the cell index provided. This method is used to select cells without having to do a full render. The selected style is applied to the cells directly.
deselectCell will deselect the cell at the specified index on each displayed Calendar page.
@method deselectCell
@param {Number} cellIndex The index of the cell to deselect.
@return {Date[]} Array of JavaScript Date objects representing all individual dates that are currently selected. | [
"Deselects",
"dates",
"in",
"the",
"CalendarGroup",
"based",
"on",
"the",
"cell",
"index",
"provided",
".",
"This",
"method",
"is",
"used",
"to",
"select",
"cells",
"without",
"having",
"to",
"do",
"a",
"full",
"render",
".",
"The",
"selected",
"style",
"i... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5622-L5628 | |
42,959 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.clear();
}
this.cfg.setProperty(DEF_CFG.SELECTED.key, []);
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, new Date(this.pages[0].today.getTime()));
this.render();
} | javascript | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.clear();
}
this.cfg.setProperty(DEF_CFG.SELECTED.key, []);
this.cfg.setProperty(DEF_CFG.PAGEDATE.key, new Date(this.pages[0].today.getTime()));
this.render();
} | [
"function",
"(",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"clear",
"(",
")",
";",
"}... | Clears the selected dates in the current calendar widget and sets the calendar
to the current month and year.
@method clear | [
"Clears",
"the",
"selected",
"dates",
"in",
"the",
"current",
"calendar",
"widget",
"and",
"sets",
"the",
"calendar",
"to",
"the",
"current",
"month",
"and",
"year",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5647-L5656 | |
42,960 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.nextMonth();
}
} | javascript | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.nextMonth();
}
} | [
"function",
"(",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"nextMonth",
"(",
")",
";",
... | Navigates to the next month page in the calendar widget.
@method nextMonth | [
"Navigates",
"to",
"the",
"next",
"month",
"page",
"in",
"the",
"calendar",
"widget",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5662-L5667 | |
42,961 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
for (var p=this.pages.length-1;p>=0;--p) {
var cal = this.pages[p];
cal.previousMonth();
}
} | javascript | function() {
for (var p=this.pages.length-1;p>=0;--p) {
var cal = this.pages[p];
cal.previousMonth();
}
} | [
"function",
"(",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"this",
".",
"pages",
".",
"length",
"-",
"1",
";",
"p",
">=",
"0",
";",
"--",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"previousMonth",
... | Navigates to the previous month page in the calendar widget.
@method previousMonth | [
"Navigates",
"to",
"the",
"previous",
"month",
"page",
"in",
"the",
"calendar",
"widget",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5673-L5678 | |
42,962 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.nextYear();
}
} | javascript | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.nextYear();
}
} | [
"function",
"(",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"nextYear",
"(",
")",
";",
... | Navigates to the next year in the currently selected month in the calendar widget.
@method nextYear | [
"Navigates",
"to",
"the",
"next",
"year",
"in",
"the",
"currently",
"selected",
"month",
"in",
"the",
"calendar",
"widget",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5684-L5689 | |
42,963 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.previousYear();
}
} | javascript | function() {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.previousYear();
}
} | [
"function",
"(",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"previousYear",
"(",
")",
";... | Navigates to the previous year in the currently selected month in the calendar widget.
@method previousYear | [
"Navigates",
"to",
"the",
"previous",
"year",
"in",
"the",
"currently",
"selected",
"month",
"in",
"the",
"calendar",
"widget",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5695-L5700 | |
42,964 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(month, fnRender) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.addMonthRenderer(month, fnRender);
}
} | javascript | function(month, fnRender) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.addMonthRenderer(month, fnRender);
}
} | [
"function",
"(",
"month",
",",
"fnRender",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
"a... | Adds a month to the render stack. The function reference passed to this method will be executed
when a date cell matches the month passed to this method.
@method addMonthRenderer
@param {Number} month The month (1-12) to associate with this renderer
@param {Function} fnRender The function executed to render cells that match the render rules for this renderer. | [
"Adds",
"a",
"month",
"to",
"the",
"render",
"stack",
".",
"The",
"function",
"reference",
"passed",
"to",
"this",
"method",
"will",
"be",
"executed",
"when",
"a",
"date",
"cell",
"matches",
"the",
"month",
"passed",
"to",
"this",
"method",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5743-L5748 | |
42,965 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(weekday, fnRender) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.addWeekdayRenderer(weekday, fnRender);
}
} | javascript | function(weekday, fnRender) {
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
cal.addWeekdayRenderer(weekday, fnRender);
}
} | [
"function",
"(",
"weekday",
",",
"fnRender",
")",
"{",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"cal",
".",
... | Adds a weekday to the render stack. The function reference passed to this method will be executed
when a date cell matches the weekday passed to this method.
@method addWeekdayRenderer
@param {Number} weekday The weekday (1-7) to associate with this renderer. 1=Sunday, 2=Monday etc.
@param {Function} fnRender The function executed to render cells that match the render rules for this renderer. | [
"Adds",
"a",
"weekday",
"to",
"the",
"render",
"stack",
".",
"The",
"function",
"reference",
"passed",
"to",
"this",
"method",
"will",
"be",
"executed",
"when",
"a",
"date",
"cell",
"matches",
"the",
"weekday",
"passed",
"to",
"this",
"method",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5757-L5762 | |
42,966 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(date, iMonth) {
// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
var newDate = DateMath.add(date, DateMath.MONTH, iMonth-date.getMonth());
date.setTime(newDate.getTime());
} else {
date.setMonth(iMonth);
}
} | javascript | function(date, iMonth) {
// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11
if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420 && (iMonth < 0 || iMonth > 11)) {
var newDate = DateMath.add(date, DateMath.MONTH, iMonth-date.getMonth());
date.setTime(newDate.getTime());
} else {
date.setMonth(iMonth);
}
} | [
"function",
"(",
"date",
",",
"iMonth",
")",
"{",
"// Bug in Safari 1.3, 2.0 (WebKit build < 420), Date.setMonth does not work consistently if iMonth is not 0-11",
"if",
"(",
"YAHOO",
".",
"env",
".",
"ua",
".",
"webkit",
"&&",
"YAHOO",
".",
"env",
".",
"ua",
".",
"we... | Sets the month on a Date object, taking into account year rollover if the month is less than 0 or greater than 11.
The Date object passed in is modified. It should be cloned before passing it into this method if the original value needs to be maintained
@method _setMonthOnDate
@private
@param {Date} date The Date object on which to set the month index
@param {Number} iMonth The month index to set | [
"Sets",
"the",
"month",
"on",
"a",
"Date",
"object",
"taking",
"into",
"account",
"year",
"rollover",
"if",
"the",
"month",
"is",
"less",
"than",
"0",
"or",
"greater",
"than",
"11",
".",
"The",
"Date",
"object",
"passed",
"in",
"is",
"modified",
".",
"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5867-L5875 | |
42,967 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var w = 0;
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
w += cal.oDomContainer.offsetWidth;
}
if (w > 0) {
this.oDomContainer.style.width = w + "px";
}
} | javascript | function() {
var w = 0;
for (var p=0;p<this.pages.length;++p) {
var cal = this.pages[p];
w += cal.oDomContainer.offsetWidth;
}
if (w > 0) {
this.oDomContainer.style.width = w + "px";
}
} | [
"function",
"(",
")",
"{",
"var",
"w",
"=",
"0",
";",
"for",
"(",
"var",
"p",
"=",
"0",
";",
"p",
"<",
"this",
".",
"pages",
".",
"length",
";",
"++",
"p",
")",
"{",
"var",
"cal",
"=",
"this",
".",
"pages",
"[",
"p",
"]",
";",
"w",
"+=",
... | Fixes the width of the CalendarGroup container element, to account for miswrapped floats
@method _fixWidth
@private | [
"Fixes",
"the",
"width",
"of",
"the",
"CalendarGroup",
"container",
"element",
"to",
"account",
"for",
"miswrapped",
"floats"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5882-L5891 | |
42,968 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
if (this.beforeDestroyEvent.fire()) {
var cal = this;
// Child objects
if (cal.navigator) {
cal.navigator.destroy();
}
if (cal.cfg) {
cal.cfg.destroy();
}
// DOM event listeners
Event.purgeElement(cal.oDomContainer, true);
// Generated markup/DOM - Not removing the container DIV since we didn't create it.
Dom.removeClass(cal.oDomContainer, CalendarGroup.CSS_CONTAINER);
Dom.removeClass(cal.oDomContainer, CalendarGroup.CSS_MULTI_UP);
for (var i = 0, l = cal.pages.length; i < l; i++) {
cal.pages[i].destroy();
cal.pages[i] = null;
}
cal.oDomContainer.innerHTML = "";
// JS-to-DOM references
cal.oDomContainer = null;
this.destroyEvent.fire();
}
} | javascript | function() {
if (this.beforeDestroyEvent.fire()) {
var cal = this;
// Child objects
if (cal.navigator) {
cal.navigator.destroy();
}
if (cal.cfg) {
cal.cfg.destroy();
}
// DOM event listeners
Event.purgeElement(cal.oDomContainer, true);
// Generated markup/DOM - Not removing the container DIV since we didn't create it.
Dom.removeClass(cal.oDomContainer, CalendarGroup.CSS_CONTAINER);
Dom.removeClass(cal.oDomContainer, CalendarGroup.CSS_MULTI_UP);
for (var i = 0, l = cal.pages.length; i < l; i++) {
cal.pages[i].destroy();
cal.pages[i] = null;
}
cal.oDomContainer.innerHTML = "";
// JS-to-DOM references
cal.oDomContainer = null;
this.destroyEvent.fire();
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"beforeDestroyEvent",
".",
"fire",
"(",
")",
")",
"{",
"var",
"cal",
"=",
"this",
";",
"// Child objects",
"if",
"(",
"cal",
".",
"navigator",
")",
"{",
"cal",
".",
"navigator",
".",
"destroy",
"(",
... | Destroys the CalendarGroup instance. The method will remove references
to HTML elements, remove any event listeners added by the CalendarGroup.
It will also destroy the Config and CalendarNavigator instances created by the
CalendarGroup and the individual Calendar instances created for each page.
@method destroy | [
"Destroys",
"the",
"CalendarGroup",
"instance",
".",
"The",
"method",
"will",
"remove",
"references",
"to",
"HTML",
"elements",
"remove",
"any",
"event",
"listeners",
"added",
"by",
"the",
"CalendarGroup",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L5911-L5945 | |
42,969 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(cal) {
var calBox = cal.oDomContainer;
this.cal = cal;
this.id = calBox.id + YAHOO.widget.CalendarNavigator.ID_SUFFIX;
this._doc = calBox.ownerDocument;
/**
* Private flag, to identify IE Quirks
* @private
* @property __isIEQuirks
*/
var ie = YAHOO.env.ua.ie;
this.__isIEQuirks = (ie && ((ie <= 6) || (this._doc.compatMode == "BackCompat")));
} | javascript | function(cal) {
var calBox = cal.oDomContainer;
this.cal = cal;
this.id = calBox.id + YAHOO.widget.CalendarNavigator.ID_SUFFIX;
this._doc = calBox.ownerDocument;
/**
* Private flag, to identify IE Quirks
* @private
* @property __isIEQuirks
*/
var ie = YAHOO.env.ua.ie;
this.__isIEQuirks = (ie && ((ie <= 6) || (this._doc.compatMode == "BackCompat")));
} | [
"function",
"(",
"cal",
")",
"{",
"var",
"calBox",
"=",
"cal",
".",
"oDomContainer",
";",
"this",
".",
"cal",
"=",
"cal",
";",
"this",
".",
"id",
"=",
"calBox",
".",
"id",
"+",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
".",
"ID_SUFFIX",
";",
... | Init lifecycle method called as part of construction
@method init
@param {Calendar} cal The instance of the Calendar or CalendarGroup to which this CalendarNavigator should be attached | [
"Init",
"lifecycle",
"method",
"called",
"as",
"part",
"of",
"construction"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6427-L6441 | |
42,970 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(nYear) {
var yrPattern = YAHOO.widget.CalendarNavigator.YR_PATTERN;
if (YAHOO.lang.isNumber(nYear) && yrPattern.test(nYear+"")) {
this._year = nYear;
}
this._updateYearUI();
} | javascript | function(nYear) {
var yrPattern = YAHOO.widget.CalendarNavigator.YR_PATTERN;
if (YAHOO.lang.isNumber(nYear) && yrPattern.test(nYear+"")) {
this._year = nYear;
}
this._updateYearUI();
} | [
"function",
"(",
"nYear",
")",
"{",
"var",
"yrPattern",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
".",
"YR_PATTERN",
";",
"if",
"(",
"YAHOO",
".",
"lang",
".",
"isNumber",
"(",
"nYear",
")",
"&&",
"yrPattern",
".",
"test",
"(",
"nYear",
"+... | Sets the current year on the Navigator, and updates the UI. If the
provided year is invalid, it will not be set.
@method setYear
@param {Number} nYear The full year value to set the Navigator to. | [
"Sets",
"the",
"current",
"year",
"on",
"the",
"Navigator",
"and",
"updates",
"the",
"UI",
".",
"If",
"the",
"provided",
"year",
"is",
"invalid",
"it",
"will",
"not",
"be",
"set",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6559-L6565 | |
42,971 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
this.cal.beforeRenderNavEvent.fire();
if (!this.__rendered) {
this.createNav();
this.createMask();
this.applyListeners();
this.__rendered = true;
}
this.cal.renderNavEvent.fire();
} | javascript | function() {
this.cal.beforeRenderNavEvent.fire();
if (!this.__rendered) {
this.createNav();
this.createMask();
this.applyListeners();
this.__rendered = true;
}
this.cal.renderNavEvent.fire();
} | [
"function",
"(",
")",
"{",
"this",
".",
"cal",
".",
"beforeRenderNavEvent",
".",
"fire",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"__rendered",
")",
"{",
"this",
".",
"createNav",
"(",
")",
";",
"this",
".",
"createMask",
"(",
")",
";",
"this",
... | Renders the HTML for the navigator, adding it to the
document and attaches event listeners if it has not
already been rendered.
@method render | [
"Renders",
"the",
"HTML",
"for",
"the",
"navigator",
"adding",
"it",
"to",
"the",
"document",
"and",
"attaches",
"event",
"listeners",
"if",
"it",
"has",
"not",
"already",
"been",
"rendered",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6574-L6583 | |
42,972 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES,
h = html; // just to use a shorter name
h[h.length] = '<div class="' + C.MONTH + '">';
this.renderMonth(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.YEAR + '">';
this.renderYear(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.BUTTONS + '">';
this.renderButtons(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.ERROR + '" id="' + this.id + NAV.ERROR_SUFFIX + '"></div>';
return h;
} | javascript | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES,
h = html; // just to use a shorter name
h[h.length] = '<div class="' + C.MONTH + '">';
this.renderMonth(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.YEAR + '">';
this.renderYear(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.BUTTONS + '">';
this.renderButtons(h);
h[h.length] = '</div>';
h[h.length] = '<div class="' + C.ERROR + '" id="' + this.id + NAV.ERROR_SUFFIX + '"></div>';
return h;
} | [
"function",
"(",
"html",
")",
"{",
"var",
"NAV",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
",",
"C",
"=",
"NAV",
".",
"CLASSES",
",",
"h",
"=",
"html",
";",
"// just to use a shorter name",
"h",
"[",
"h",
".",
"length",
"]",
"=",
"'<div cl... | Renders the contents of the navigator
@method renderNavContents
@param {Array} html The HTML buffer to append the HTML to.
@return {Array} A reference to the buffer passed in. | [
"Renders",
"the",
"contents",
"of",
"the",
"navigator"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6662-L6679 | |
42,973 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES;
var id = this.id + NAV.MONTH_SUFFIX,
mf = this.__getCfg("monthFormat"),
months = this.cal.cfg.getProperty((mf == YAHOO.widget.Calendar.SHORT) ? "MONTHS_SHORT" : "MONTHS_LONG"),
h = html;
if (months && months.length > 0) {
h[h.length] = '<label for="' + id + '">';
h[h.length] = this.__getCfg("month", true);
h[h.length] = '</label>';
h[h.length] = '<select name="' + id + '" id="' + id + '" class="' + C.MONTH_CTRL + '">';
for (var i = 0; i < months.length; i++) {
h[h.length] = '<option value="' + i + '">';
h[h.length] = months[i];
h[h.length] = '</option>';
}
h[h.length] = '</select>';
}
return h;
} | javascript | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES;
var id = this.id + NAV.MONTH_SUFFIX,
mf = this.__getCfg("monthFormat"),
months = this.cal.cfg.getProperty((mf == YAHOO.widget.Calendar.SHORT) ? "MONTHS_SHORT" : "MONTHS_LONG"),
h = html;
if (months && months.length > 0) {
h[h.length] = '<label for="' + id + '">';
h[h.length] = this.__getCfg("month", true);
h[h.length] = '</label>';
h[h.length] = '<select name="' + id + '" id="' + id + '" class="' + C.MONTH_CTRL + '">';
for (var i = 0; i < months.length; i++) {
h[h.length] = '<option value="' + i + '">';
h[h.length] = months[i];
h[h.length] = '</option>';
}
h[h.length] = '</select>';
}
return h;
} | [
"function",
"(",
"html",
")",
"{",
"var",
"NAV",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
",",
"C",
"=",
"NAV",
".",
"CLASSES",
";",
"var",
"id",
"=",
"this",
".",
"id",
"+",
"NAV",
".",
"MONTH_SUFFIX",
",",
"mf",
"=",
"this",
".",
... | Renders the month label and control for the navigator
@method renderNavContents
@param {Array} html The HTML buffer to append the HTML to.
@return {Array} A reference to the buffer passed in. | [
"Renders",
"the",
"month",
"label",
"and",
"control",
"for",
"the",
"navigator"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6688-L6710 | |
42,974 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES;
var id = this.id + NAV.YEAR_SUFFIX,
size = NAV.YR_MAX_DIGITS,
h = html;
h[h.length] = '<label for="' + id + '">';
h[h.length] = this.__getCfg("year", true);
h[h.length] = '</label>';
h[h.length] = '<input type="text" name="' + id + '" id="' + id + '" class="' + C.YEAR_CTRL + '" maxlength="' + size + '"/>';
return h;
} | javascript | function(html) {
var NAV = YAHOO.widget.CalendarNavigator,
C = NAV.CLASSES;
var id = this.id + NAV.YEAR_SUFFIX,
size = NAV.YR_MAX_DIGITS,
h = html;
h[h.length] = '<label for="' + id + '">';
h[h.length] = this.__getCfg("year", true);
h[h.length] = '</label>';
h[h.length] = '<input type="text" name="' + id + '" id="' + id + '" class="' + C.YEAR_CTRL + '" maxlength="' + size + '"/>';
return h;
} | [
"function",
"(",
"html",
")",
"{",
"var",
"NAV",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
",",
"C",
"=",
"NAV",
".",
"CLASSES",
";",
"var",
"id",
"=",
"this",
".",
"id",
"+",
"NAV",
".",
"YEAR_SUFFIX",
",",
"size",
"=",
"NAV",
".",
... | Renders the year label and control for the navigator
@method renderYear
@param {Array} html The HTML buffer to append the HTML to.
@return {Array} A reference to the buffer passed in. | [
"Renders",
"the",
"year",
"label",
"and",
"control",
"for",
"the",
"navigator"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6719-L6732 | |
42,975 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function(cal) {
var date = YAHOO.widget.DateMath.getDate(this.getYear() - cal.cfg.getProperty("YEAR_OFFSET"), this.getMonth(), 1);
cal.cfg.setProperty("pagedate", date);
cal.render();
} | javascript | function(cal) {
var date = YAHOO.widget.DateMath.getDate(this.getYear() - cal.cfg.getProperty("YEAR_OFFSET"), this.getMonth(), 1);
cal.cfg.setProperty("pagedate", date);
cal.render();
} | [
"function",
"(",
"cal",
")",
"{",
"var",
"date",
"=",
"YAHOO",
".",
"widget",
".",
"DateMath",
".",
"getDate",
"(",
"this",
".",
"getYear",
"(",
")",
"-",
"cal",
".",
"cfg",
".",
"getProperty",
"(",
"\"YEAR_OFFSET\"",
")",
",",
"this",
".",
"getMonth... | Updates the Calendar rendered state, based on the state of the CalendarNavigator
@method _update
@param cal The Calendar instance to update
@protected | [
"Updates",
"the",
"Calendar",
"rendered",
"state",
"based",
"on",
"the",
"state",
"of",
"the",
"CalendarNavigator"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6893-L6897 | |
42,976 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
YAHOO.util.Dom.addClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
} | javascript | function() {
YAHOO.util.Dom.addClass(this.yearEl, YAHOO.widget.CalendarNavigator.CLASSES.INVALID);
} | [
"function",
"(",
")",
"{",
"YAHOO",
".",
"util",
".",
"Dom",
".",
"addClass",
"(",
"this",
".",
"yearEl",
",",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
".",
"CLASSES",
".",
"INVALID",
")",
";",
"}"
] | Displays the validation error UI for the year control
@method setYearError | [
"Displays",
"the",
"validation",
"error",
"UI",
"for",
"the",
"year",
"control"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6952-L6954 | |
42,977 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var el = this.submitEl,
f = this.__getCfg("initialFocus");
if (f && f.toLowerCase) {
f = f.toLowerCase();
if (f == "year") {
el = this.yearEl;
try {
this.yearEl.select();
} catch (selErr) {
// Ignore;
}
} else if (f == "month") {
el = this.monthEl;
}
}
if (el && YAHOO.lang.isFunction(el.focus)) {
try {
el.focus();
} catch (focusErr) {
// TODO: Fall back if focus fails?
}
}
} | javascript | function() {
var el = this.submitEl,
f = this.__getCfg("initialFocus");
if (f && f.toLowerCase) {
f = f.toLowerCase();
if (f == "year") {
el = this.yearEl;
try {
this.yearEl.select();
} catch (selErr) {
// Ignore;
}
} else if (f == "month") {
el = this.monthEl;
}
}
if (el && YAHOO.lang.isFunction(el.focus)) {
try {
el.focus();
} catch (focusErr) {
// TODO: Fall back if focus fails?
}
}
} | [
"function",
"(",
")",
"{",
"var",
"el",
"=",
"this",
".",
"submitEl",
",",
"f",
"=",
"this",
".",
"__getCfg",
"(",
"\"initialFocus\"",
")",
";",
"if",
"(",
"f",
"&&",
"f",
".",
"toLowerCase",
")",
"{",
"f",
"=",
"f",
".",
"toLowerCase",
"(",
")",... | Sets the initial focus, based on the configured value
@method setInitialFocus | [
"Sets",
"the",
"initial",
"focus",
"based",
"on",
"the",
"configured",
"value"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L6977-L7002 | |
42,978 | neyric/webhookit | public/javascripts/yui/calendar/calendar.js | function() {
var NAV = YAHOO.widget.CalendarNavigator;
var yr = null;
if (this.yearEl) {
var value = this.yearEl.value;
value = value.replace(NAV.TRIM, "$1");
if (NAV.YR_PATTERN.test(value)) {
yr = parseInt(value, 10);
}
}
return yr;
} | javascript | function() {
var NAV = YAHOO.widget.CalendarNavigator;
var yr = null;
if (this.yearEl) {
var value = this.yearEl.value;
value = value.replace(NAV.TRIM, "$1");
if (NAV.YR_PATTERN.test(value)) {
yr = parseInt(value, 10);
}
}
return yr;
} | [
"function",
"(",
")",
"{",
"var",
"NAV",
"=",
"YAHOO",
".",
"widget",
".",
"CalendarNavigator",
";",
"var",
"yr",
"=",
"null",
";",
"if",
"(",
"this",
".",
"yearEl",
")",
"{",
"var",
"value",
"=",
"this",
".",
"yearEl",
".",
"value",
";",
"value",
... | Returns the year value, from the Navitator's year UI element
@protected
@method _getYearFromUI
@return {Number} The year value set in the UI, if valid. null is returned if
the UI does not contain a valid year value. | [
"Returns",
"the",
"year",
"value",
"from",
"the",
"Navitator",
"s",
"year",
"UI",
"element"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar.js#L7087-L7100 | |
42,979 | neyric/webhookit | public/javascripts/codemirror/js/select.js | topLevelNodeBefore | function topLevelNodeBefore(node, top) {
while (!node.previousSibling && node.parentNode != top)
node = node.parentNode;
return topLevelNodeAt(node.previousSibling, top);
} | javascript | function topLevelNodeBefore(node, top) {
while (!node.previousSibling && node.parentNode != top)
node = node.parentNode;
return topLevelNodeAt(node.previousSibling, top);
} | [
"function",
"topLevelNodeBefore",
"(",
"node",
",",
"top",
")",
"{",
"while",
"(",
"!",
"node",
".",
"previousSibling",
"&&",
"node",
".",
"parentNode",
"!=",
"top",
")",
"node",
"=",
"node",
".",
"parentNode",
";",
"return",
"topLevelNodeAt",
"(",
"node",... | Find the top-level node that contains the node before this one. | [
"Find",
"the",
"top",
"-",
"level",
"node",
"that",
"contains",
"the",
"node",
"before",
"this",
"one",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/select.js#L24-L28 |
42,980 | neyric/webhookit | public/javascripts/codemirror/js/select.js | moveToNodeStart | function moveToNodeStart(range, node) {
if (node.nodeType == 3) {
var count = 0, cur = node.previousSibling;
while (cur && cur.nodeType == 3) {
count += cur.nodeValue.length;
cur = cur.previousSibling;
}
if (cur) {
try{range.moveToElementText(cur);}
catch(e){return false;}
range.collapse(false);
}
else range.moveToElementText(node.parentNode);
if (count) range.move("character", count);
}
else {
try{range.moveToElementText(node);}
catch(e){return false;}
}
return true;
} | javascript | function moveToNodeStart(range, node) {
if (node.nodeType == 3) {
var count = 0, cur = node.previousSibling;
while (cur && cur.nodeType == 3) {
count += cur.nodeValue.length;
cur = cur.previousSibling;
}
if (cur) {
try{range.moveToElementText(cur);}
catch(e){return false;}
range.collapse(false);
}
else range.moveToElementText(node.parentNode);
if (count) range.move("character", count);
}
else {
try{range.moveToElementText(node);}
catch(e){return false;}
}
return true;
} | [
"function",
"moveToNodeStart",
"(",
"range",
",",
"node",
")",
"{",
"if",
"(",
"node",
".",
"nodeType",
"==",
"3",
")",
"{",
"var",
"count",
"=",
"0",
",",
"cur",
"=",
"node",
".",
"previousSibling",
";",
"while",
"(",
"cur",
"&&",
"cur",
".",
"nod... | Move the start of a range to the start of a node, compensating for the fact that you can't call moveToElementText with text nodes. | [
"Move",
"the",
"start",
"of",
"a",
"range",
"to",
"the",
"start",
"of",
"a",
"node",
"compensating",
"for",
"the",
"fact",
"that",
"you",
"can",
"t",
"call",
"moveToElementText",
"with",
"text",
"nodes",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/select.js#L241-L261 |
42,981 | neyric/webhookit | public/javascripts/codemirror/js/select.js | focusIssue | function focusIssue() {
return cs.start.node == cs.end.node && cs.start.offset == 0 && cs.end.offset == 0;
} | javascript | function focusIssue() {
return cs.start.node == cs.end.node && cs.start.offset == 0 && cs.end.offset == 0;
} | [
"function",
"focusIssue",
"(",
")",
"{",
"return",
"cs",
".",
"start",
".",
"node",
"==",
"cs",
".",
"end",
".",
"node",
"&&",
"cs",
".",
"start",
".",
"offset",
"==",
"0",
"&&",
"cs",
".",
"end",
".",
"offset",
"==",
"0",
";",
"}"
] | on webkit-based browsers, it is apparently possible that the selection gets reset even when a node that is not one of the endpoints get messed with. the most common situation where this occurs is when a selection is deleted or overwitten. we check for that here. | [
"on",
"webkit",
"-",
"based",
"browsers",
"it",
"is",
"apparently",
"possible",
"that",
"the",
"selection",
"gets",
"reset",
"even",
"when",
"a",
"node",
"that",
"is",
"not",
"one",
"of",
"the",
"endpoints",
"get",
"messed",
"with",
".",
"the",
"most",
"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/select.js#L421-L423 |
42,982 | neyric/webhookit | public/javascripts/codemirror/js/select.js | selectRange | function selectRange(range, window) {
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
} | javascript | function selectRange(range, window) {
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
} | [
"function",
"selectRange",
"(",
"range",
",",
"window",
")",
"{",
"var",
"selection",
"=",
"window",
".",
"getSelection",
"(",
")",
";",
"selection",
".",
"removeAllRanges",
"(",
")",
";",
"selection",
".",
"addRange",
"(",
"range",
")",
";",
"}"
] | Helper for selecting a range object. | [
"Helper",
"for",
"selecting",
"a",
"range",
"object",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/select.js#L447-L451 |
42,983 | neyric/webhookit | public/javascripts/yui/button/button.js | function (p_bDisabled) {
var nButtons = this.getCount(),
i;
if (nButtons > 0) {
i = nButtons - 1;
do {
this._buttons[i].set("disabled", p_bDisabled);
}
while (i--);
}
} | javascript | function (p_bDisabled) {
var nButtons = this.getCount(),
i;
if (nButtons > 0) {
i = nButtons - 1;
do {
this._buttons[i].set("disabled", p_bDisabled);
}
while (i--);
}
} | [
"function",
"(",
"p_bDisabled",
")",
"{",
"var",
"nButtons",
"=",
"this",
".",
"getCount",
"(",
")",
",",
"i",
";",
"if",
"(",
"nButtons",
">",
"0",
")",
"{",
"i",
"=",
"nButtons",
"-",
"1",
";",
"do",
"{",
"this",
".",
"_buttons",
"[",
"i",
"]... | Protected attribute setter methods
@method _setDisabled
@description Sets the value of the button groups's
"disabled" attribute.
@protected
@param {Boolean} p_bDisabled Boolean indicating the value for
the button group's "disabled" attribute. | [
"Protected",
"attribute",
"setter",
"methods"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/button/button.js#L3973-L3991 | |
42,984 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function() {
var columndefs = this.setColumnDefs();
/**
* YUI's datatable instance
*/
this.datatable = new YAHOO.widget.DataTable(this.element, columndefs, this.options.datasource, this.options.datatableOpts);
this.datatable.subscribe('cellClickEvent', this._onCellClick, this, true);
// Automatically set up the paginator
if(this.options.datatableOpts && this.options.datatableOpts.paginator) {
this.datatable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
if(oPayload) {
oPayload.totalRecords = oResponse.meta.totalRecords;
}
return oPayload;
};
}
// Insert button
if ( this.options.allowInsert ){
this.insertButton = inputEx.cn('input', {type:'button', value:msgs.insertItemText}, null, null);
Event.addListener(this.insertButton, 'click', this.onInsertButton, this, true);
this.options.parentEl.appendChild(this.insertButton);
}
// Set up editing flow
var highlightEditableCell = function(oArgs) {
var elCell = oArgs.target;
if(Dom.hasClass(elCell, "yui-dt-editable") || Dom.hasClass(elCell,"yui-dt-col-delete") || Dom.hasClass(elCell,"yui-dt-col-modify") ) {
this.highlightCell(elCell);
}
};
// Locals
this.datatable.set("MSG_LOADING", msgs.loadingText );
this.datatable.set("MSG_EMPTY", msgs.emptyDataText );
this.datatable.set("MSG_ERROR", msgs.errorDataText );
this.datatable.subscribe("cellMouseoverEvent", highlightEditableCell);
this.datatable.subscribe("cellMouseoutEvent", this.datatable.onEventUnhighlightCell);
} | javascript | function() {
var columndefs = this.setColumnDefs();
/**
* YUI's datatable instance
*/
this.datatable = new YAHOO.widget.DataTable(this.element, columndefs, this.options.datasource, this.options.datatableOpts);
this.datatable.subscribe('cellClickEvent', this._onCellClick, this, true);
// Automatically set up the paginator
if(this.options.datatableOpts && this.options.datatableOpts.paginator) {
this.datatable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) {
if(oPayload) {
oPayload.totalRecords = oResponse.meta.totalRecords;
}
return oPayload;
};
}
// Insert button
if ( this.options.allowInsert ){
this.insertButton = inputEx.cn('input', {type:'button', value:msgs.insertItemText}, null, null);
Event.addListener(this.insertButton, 'click', this.onInsertButton, this, true);
this.options.parentEl.appendChild(this.insertButton);
}
// Set up editing flow
var highlightEditableCell = function(oArgs) {
var elCell = oArgs.target;
if(Dom.hasClass(elCell, "yui-dt-editable") || Dom.hasClass(elCell,"yui-dt-col-delete") || Dom.hasClass(elCell,"yui-dt-col-modify") ) {
this.highlightCell(elCell);
}
};
// Locals
this.datatable.set("MSG_LOADING", msgs.loadingText );
this.datatable.set("MSG_EMPTY", msgs.emptyDataText );
this.datatable.set("MSG_ERROR", msgs.errorDataText );
this.datatable.subscribe("cellMouseoverEvent", highlightEditableCell);
this.datatable.subscribe("cellMouseoutEvent", this.datatable.onEventUnhighlightCell);
} | [
"function",
"(",
")",
"{",
"var",
"columndefs",
"=",
"this",
".",
"setColumnDefs",
"(",
")",
";",
"/**\n\t\t * YUI's datatable instance\n\t\t */",
"this",
".",
"datatable",
"=",
"new",
"YAHOO",
".",
"widget",
".",
"DataTable",
"(",
"this",
".",
"element",
",",... | Render the datatable | [
"Render",
"the",
"datatable"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L148-L192 | |
42,985 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function(oArgs) {
var elCell = oArgs.target;
if(Dom.hasClass(elCell, "yui-dt-editable") || Dom.hasClass(elCell,"yui-dt-col-delete") || Dom.hasClass(elCell,"yui-dt-col-modify") ) {
this.highlightCell(elCell);
}
} | javascript | function(oArgs) {
var elCell = oArgs.target;
if(Dom.hasClass(elCell, "yui-dt-editable") || Dom.hasClass(elCell,"yui-dt-col-delete") || Dom.hasClass(elCell,"yui-dt-col-modify") ) {
this.highlightCell(elCell);
}
} | [
"function",
"(",
"oArgs",
")",
"{",
"var",
"elCell",
"=",
"oArgs",
".",
"target",
";",
"if",
"(",
"Dom",
".",
"hasClass",
"(",
"elCell",
",",
"\"yui-dt-editable\"",
")",
"||",
"Dom",
".",
"hasClass",
"(",
"elCell",
",",
"\"yui-dt-col-delete\"",
")",
"||"... | Set up editing flow | [
"Set",
"up",
"editing",
"flow"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L177-L182 | |
42,986 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function() {
var columndefs = this.options.columnDefs || this.fieldsToColumndefs(this.options.fields);
// Adding modify column if we use form editing and if allowModify is true
if(this.options.allowModify ) {
columndefs = columndefs.concat([{
key:'modify',
label:' ',
formatter:function(elCell) {
elCell.innerHTML = msgs.modifyText;
elCell.style.cursor = 'pointer';
}
}]);
}
// Adding delete column
if(this.options.allowDelete) {
columndefs = columndefs.concat([{
key:'delete',
label:' ',
formatter:function(elCell) {
elCell.innerHTML = msgs.deleteText;
elCell.style.cursor = 'pointer';
}
}]);
}
return columndefs;
} | javascript | function() {
var columndefs = this.options.columnDefs || this.fieldsToColumndefs(this.options.fields);
// Adding modify column if we use form editing and if allowModify is true
if(this.options.allowModify ) {
columndefs = columndefs.concat([{
key:'modify',
label:' ',
formatter:function(elCell) {
elCell.innerHTML = msgs.modifyText;
elCell.style.cursor = 'pointer';
}
}]);
}
// Adding delete column
if(this.options.allowDelete) {
columndefs = columndefs.concat([{
key:'delete',
label:' ',
formatter:function(elCell) {
elCell.innerHTML = msgs.deleteText;
elCell.style.cursor = 'pointer';
}
}]);
}
return columndefs;
} | [
"function",
"(",
")",
"{",
"var",
"columndefs",
"=",
"this",
".",
"options",
".",
"columnDefs",
"||",
"this",
".",
"fieldsToColumndefs",
"(",
"this",
".",
"options",
".",
"fields",
")",
";",
"// Adding modify column if we use form editing and if allowModify is true",
... | Set the column definitions, create them if none from the fields, adds the modify and delete buttons | [
"Set",
"the",
"column",
"definitions",
"create",
"them",
"if",
"none",
"from",
"the",
"fields",
"adds",
"the",
"modify",
"and",
"delete",
"buttons"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L197-L226 | |
42,987 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function() {
var that = this;
this.dialog = new inputEx.widget.Dialog({
id: this.options.dialogId,
inputExDef: {
type: 'form',
fields: this.options.fields,
buttons: [
{type: 'submit', value: msgs.saveText, onClick: function() { that.onDialogSave(); return false; /* prevent form submit */} },
{type: 'link', value: msgs.cancelText, onClick: function() { that.onDialogCancel(); } }
]
},
title: this.options.dialogLabel,
panelConfig: this.options.panelConfig
});
// Add a listener on the closing button and hook it to onDialogCancel()
YAHOO.util.Event.addListener(that.dialog.close,"click",function(){
that.onDialogCancel();
},that);
} | javascript | function() {
var that = this;
this.dialog = new inputEx.widget.Dialog({
id: this.options.dialogId,
inputExDef: {
type: 'form',
fields: this.options.fields,
buttons: [
{type: 'submit', value: msgs.saveText, onClick: function() { that.onDialogSave(); return false; /* prevent form submit */} },
{type: 'link', value: msgs.cancelText, onClick: function() { that.onDialogCancel(); } }
]
},
title: this.options.dialogLabel,
panelConfig: this.options.panelConfig
});
// Add a listener on the closing button and hook it to onDialogCancel()
YAHOO.util.Event.addListener(that.dialog.close,"click",function(){
that.onDialogCancel();
},that);
} | [
"function",
"(",
")",
"{",
"var",
"that",
"=",
"this",
";",
"this",
".",
"dialog",
"=",
"new",
"inputEx",
".",
"widget",
".",
"Dialog",
"(",
"{",
"id",
":",
"this",
".",
"options",
".",
"dialogId",
",",
"inputExDef",
":",
"{",
"type",
":",
"'form'"... | Render the dialog for row edition | [
"Render",
"the",
"dialog",
"for",
"row",
"edition"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L231-L254 | |
42,988 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function() {
var newvalues, record;
//Validate the Form
if ( !this.dialog.getForm().validate() ) return ;
// Update the record
if(!this.insertNewRecord){
// Update the row
newvalues = this.dialog.getValue();
this.datatable.updateRow( this.selectedRecord , newvalues );
// Get the new record
record = this.datatable.getRecord(this.selectedRecord);
// Fire the modify event
this.itemModifiedEvt.fire(record);
}
// Adding new record
else{
// Insert a new row
this.datatable.addRow({});
// Set the Selected Record
var rowIndex = this.datatable.getRecordSet().getLength() - 1;
this.selectedRecord = rowIndex;
// Update the row
newvalues = this.dialog.getValue();
this.datatable.updateRow( this.selectedRecord , newvalues );
// Get the new record
record = this.datatable.getRecord(this.selectedRecord);
// Fire the add event
this.itemAddedEvt.fire(record);
}
this.dialog.hide();
} | javascript | function() {
var newvalues, record;
//Validate the Form
if ( !this.dialog.getForm().validate() ) return ;
// Update the record
if(!this.insertNewRecord){
// Update the row
newvalues = this.dialog.getValue();
this.datatable.updateRow( this.selectedRecord , newvalues );
// Get the new record
record = this.datatable.getRecord(this.selectedRecord);
// Fire the modify event
this.itemModifiedEvt.fire(record);
}
// Adding new record
else{
// Insert a new row
this.datatable.addRow({});
// Set the Selected Record
var rowIndex = this.datatable.getRecordSet().getLength() - 1;
this.selectedRecord = rowIndex;
// Update the row
newvalues = this.dialog.getValue();
this.datatable.updateRow( this.selectedRecord , newvalues );
// Get the new record
record = this.datatable.getRecord(this.selectedRecord);
// Fire the add event
this.itemAddedEvt.fire(record);
}
this.dialog.hide();
} | [
"function",
"(",
")",
"{",
"var",
"newvalues",
",",
"record",
";",
"//Validate the Form",
"if",
"(",
"!",
"this",
".",
"dialog",
".",
"getForm",
"(",
")",
".",
"validate",
"(",
")",
")",
"return",
";",
"// Update the record",
"if",
"(",
"!",
"this",
".... | When saving the Dialog | [
"When",
"saving",
"the",
"Dialog"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L259-L301 | |
42,989 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function(rowIndex) {
if(!this.dialog) {
this.renderDialog();
}
// NOT Inserting new record
this.insertNewRecord = false;
// Set the selected Record
this.selectedRecord = rowIndex;
// Get the selected Record
var record = this.datatable.getRecord(this.selectedRecord);
this.dialog.whenFormAvailable({
fn: function() {
this.dialog.setValue(record.getData());
this.dialog.show();
},
scope: this
});
} | javascript | function(rowIndex) {
if(!this.dialog) {
this.renderDialog();
}
// NOT Inserting new record
this.insertNewRecord = false;
// Set the selected Record
this.selectedRecord = rowIndex;
// Get the selected Record
var record = this.datatable.getRecord(this.selectedRecord);
this.dialog.whenFormAvailable({
fn: function() {
this.dialog.setValue(record.getData());
this.dialog.show();
},
scope: this
});
} | [
"function",
"(",
"rowIndex",
")",
"{",
"if",
"(",
"!",
"this",
".",
"dialog",
")",
"{",
"this",
".",
"renderDialog",
"(",
")",
";",
"}",
"// NOT Inserting new record",
"this",
".",
"insertNewRecord",
"=",
"false",
";",
"// Set the selected Record",
"this",
"... | Opens the Dialog to edit the row
Called when the user clicked on modify button | [
"Opens",
"the",
"Dialog",
"to",
"edit",
"the",
"row",
"Called",
"when",
"the",
"user",
"clicked",
"on",
"modify",
"button"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L351-L374 | |
42,990 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function(e) {
if(!this.dialog) {
this.renderDialog();
}
// Inserting new record
this.insertNewRecord = true;
this.dialog.whenFormAvailable({
fn: function() {
this.dialog.getForm().clear();
this.dialog.show();
},
scope: this
});
} | javascript | function(e) {
if(!this.dialog) {
this.renderDialog();
}
// Inserting new record
this.insertNewRecord = true;
this.dialog.whenFormAvailable({
fn: function() {
this.dialog.getForm().clear();
this.dialog.show();
},
scope: this
});
} | [
"function",
"(",
"e",
")",
"{",
"if",
"(",
"!",
"this",
".",
"dialog",
")",
"{",
"this",
".",
"renderDialog",
"(",
")",
";",
"}",
"// Inserting new record",
"this",
".",
"insertNewRecord",
"=",
"true",
";",
"this",
".",
"dialog",
".",
"whenFormAvailable"... | Insert button event handler | [
"Insert",
"button",
"event",
"handler"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L379-L396 | |
42,991 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function(fields) {
var columndefs = [];
for(var i = 0 ; i < fields.length ; i++) {
columndefs.push( this.fieldToColumndef(fields[i]) );
}
return columndefs;
} | javascript | function(fields) {
var columndefs = [];
for(var i = 0 ; i < fields.length ; i++) {
columndefs.push( this.fieldToColumndef(fields[i]) );
}
return columndefs;
} | [
"function",
"(",
"fields",
")",
"{",
"var",
"columndefs",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"fields",
".",
"length",
";",
"i",
"++",
")",
"{",
"columndefs",
".",
"push",
"(",
"this",
".",
"fieldToColumndef",
"("... | Convert an inputEx fields definition to a DataTable columns definition | [
"Convert",
"an",
"inputEx",
"fields",
"definition",
"to",
"a",
"DataTable",
"columns",
"definition"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L422-L428 | |
42,992 | neyric/webhookit | public/javascripts/inputex/js/widgets/DataTable.js | function(field) {
var key, label, colmunDef;
// Retro-compatibility with inputParms
if (lang.isObject(field.inputParams)) {
key = field.inputParams.name;
label = field.inputParams.label;
// New prefered way to set options of a field
} else {
key = field.name;
label = field.label;
}
columnDef = {
key: key,
label: label,
sortable: true,
resizeable: true
};
// Field formatter
if(field.type == "date") {
columnDef.formatter = YAHOO.widget.DataTable.formatDate;
}
else if(field.type == "integer" || field.type == "number") {
columnDef.formatter = YAHOO.widget.DataTable.formatNumber;
/*columnDef.sortOptions = {
defaultDir: "asc",
sortFunction: // TODO: sort numbers !!!
}*/
}
// TODO: other formatters
return columnDef;
} | javascript | function(field) {
var key, label, colmunDef;
// Retro-compatibility with inputParms
if (lang.isObject(field.inputParams)) {
key = field.inputParams.name;
label = field.inputParams.label;
// New prefered way to set options of a field
} else {
key = field.name;
label = field.label;
}
columnDef = {
key: key,
label: label,
sortable: true,
resizeable: true
};
// Field formatter
if(field.type == "date") {
columnDef.formatter = YAHOO.widget.DataTable.formatDate;
}
else if(field.type == "integer" || field.type == "number") {
columnDef.formatter = YAHOO.widget.DataTable.formatNumber;
/*columnDef.sortOptions = {
defaultDir: "asc",
sortFunction: // TODO: sort numbers !!!
}*/
}
// TODO: other formatters
return columnDef;
} | [
"function",
"(",
"field",
")",
"{",
"var",
"key",
",",
"label",
",",
"colmunDef",
";",
"// Retro-compatibility with inputParms",
"if",
"(",
"lang",
".",
"isObject",
"(",
"field",
".",
"inputParams",
")",
")",
"{",
"key",
"=",
"field",
".",
"inputParams",
"... | Convert a single inputEx field definition to a DataTable column definition | [
"Convert",
"a",
"single",
"inputEx",
"field",
"definition",
"to",
"a",
"DataTable",
"column",
"definition"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/DataTable.js#L433-L468 | |
42,993 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
async.waterfall([
// 1. Resolve loose package versions.
function(done) {
var master = this.master;
var packageToVersions = this.packageToVersions;
Package.versions(master, packageToVersions, function(err, result) {
this.packageToVersions = result;
done(err, result);
}.bind(this));
}.bind(this),
// 2. Dependency search.
this.dependencySearch.bind(this),
// 3. Make sure we have package and package version dirs.
this.makedirs.bind(this),
// 4. Download the world.
this.download.bind(this),
// 5. Commit the downloads to our package repository.
this.commit.bind(this)
], callback);
} | javascript | function(callback) {
async.waterfall([
// 1. Resolve loose package versions.
function(done) {
var master = this.master;
var packageToVersions = this.packageToVersions;
Package.versions(master, packageToVersions, function(err, result) {
this.packageToVersions = result;
done(err, result);
}.bind(this));
}.bind(this),
// 2. Dependency search.
this.dependencySearch.bind(this),
// 3. Make sure we have package and package version dirs.
this.makedirs.bind(this),
// 4. Download the world.
this.download.bind(this),
// 5. Commit the downloads to our package repository.
this.commit.bind(this)
], callback);
} | [
"function",
"(",
"callback",
")",
"{",
"async",
".",
"waterfall",
"(",
"[",
"// 1. Resolve loose package versions.",
"function",
"(",
"done",
")",
"{",
"var",
"master",
"=",
"this",
".",
"master",
";",
"var",
"packageToVersions",
"=",
"this",
".",
"packageToVe... | Sync the packages we're watching from the master registry.
@param {Function} callback invoke when done. | [
"Sync",
"the",
"packages",
"we",
"re",
"watching",
"from",
"the",
"master",
"registry",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L64-L88 | |
42,994 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(parent, depToVersions) {
var newdeps = {};
var packages = Object.keys(depToVersions);
packages.forEach(function(package) {
var currVersions = this.packageToVersions[package];
var depVersions = depToVersions[package];
newdeps[package] = {};
// Check if we are watching this package.
if (!currVersions) {
// Add all of the versions.
debug(parent + ' needs ' + package + '@' +
Object.keys(depVersions).join(', '));
this.packageToVersions[package] = depVersions;
newdeps[package] = depVersions;
return;
}
// Check which versions we are watching.
var versions = Object.keys(depVersions);
versions
.filter(function(version) {
return !(version in currVersions);
})
.forEach(function(version) {
// Add this version.
debug(parent + ' needs ' + package + '@' + version);
this.packageToVersions[package][version] = true;
newdeps[package][version] = true;
}.bind(this));
}.bind(this));
return newdeps;
} | javascript | function(parent, depToVersions) {
var newdeps = {};
var packages = Object.keys(depToVersions);
packages.forEach(function(package) {
var currVersions = this.packageToVersions[package];
var depVersions = depToVersions[package];
newdeps[package] = {};
// Check if we are watching this package.
if (!currVersions) {
// Add all of the versions.
debug(parent + ' needs ' + package + '@' +
Object.keys(depVersions).join(', '));
this.packageToVersions[package] = depVersions;
newdeps[package] = depVersions;
return;
}
// Check which versions we are watching.
var versions = Object.keys(depVersions);
versions
.filter(function(version) {
return !(version in currVersions);
})
.forEach(function(version) {
// Add this version.
debug(parent + ' needs ' + package + '@' + version);
this.packageToVersions[package][version] = true;
newdeps[package][version] = true;
}.bind(this));
}.bind(this));
return newdeps;
} | [
"function",
"(",
"parent",
",",
"depToVersions",
")",
"{",
"var",
"newdeps",
"=",
"{",
"}",
";",
"var",
"packages",
"=",
"Object",
".",
"keys",
"(",
"depToVersions",
")",
";",
"packages",
".",
"forEach",
"(",
"function",
"(",
"package",
")",
"{",
"var"... | Add dependencies to our in-memory map from packages to versions.
@param {string} parent package that needs these dependencies.
@param {Object} depToVersions map from package name to object with key list
of versions we need for the dep package.
@return {Object} new deps. | [
"Add",
"dependencies",
"to",
"our",
"in",
"-",
"memory",
"map",
"from",
"packages",
"to",
"versions",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L171-L204 | |
42,995 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
async.waterfall([
// Make root directory.
maybeMkdir.bind(null, this.root),
// Make tmp directory.
function(done) {
this.tempdir = path.join(this.root, '.tmp');
maybeMkdir(this.tempdir, { purge: true }, done);
}.bind(this),
// Make directories for each package, package version.
function(done) {
var dirs = [];
for (var package in this.packageToVersions) {
dirs.push(path.resolve(this.tempdir, package));
var versions = this.packageToVersions[package];
for (var version in versions) {
dirs.push(path.resolve(this.tempdir, package, version));
}
}
async.parallel(dirs.map(function(dir) {
return maybeMkdir.bind(null, dir);
}), function(err) {
return done && done(err);
});
}.bind(this)
], callback);
} | javascript | function(callback) {
async.waterfall([
// Make root directory.
maybeMkdir.bind(null, this.root),
// Make tmp directory.
function(done) {
this.tempdir = path.join(this.root, '.tmp');
maybeMkdir(this.tempdir, { purge: true }, done);
}.bind(this),
// Make directories for each package, package version.
function(done) {
var dirs = [];
for (var package in this.packageToVersions) {
dirs.push(path.resolve(this.tempdir, package));
var versions = this.packageToVersions[package];
for (var version in versions) {
dirs.push(path.resolve(this.tempdir, package, version));
}
}
async.parallel(dirs.map(function(dir) {
return maybeMkdir.bind(null, dir);
}), function(err) {
return done && done(err);
});
}.bind(this)
], callback);
} | [
"function",
"(",
"callback",
")",
"{",
"async",
".",
"waterfall",
"(",
"[",
"// Make root directory.",
"maybeMkdir",
".",
"bind",
"(",
"null",
",",
"this",
".",
"root",
")",
",",
"// Make tmp directory.",
"function",
"(",
"done",
")",
"{",
"this",
".",
"te... | Make directories for all of the packages and package versions.
@param {Function} callback [err] invoke when done. | [
"Make",
"directories",
"for",
"all",
"of",
"the",
"packages",
"and",
"package",
"versions",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L211-L240 | |
42,996 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
async.series([
this.downloadPackageRootObjects.bind(this),
this.downloadPackageVersions.bind(this)
], function(err) {
return callback && callback(err);
});
} | javascript | function(callback) {
async.series([
this.downloadPackageRootObjects.bind(this),
this.downloadPackageVersions.bind(this)
], function(err) {
return callback && callback(err);
});
} | [
"function",
"(",
"callback",
")",
"{",
"async",
".",
"series",
"(",
"[",
"this",
".",
"downloadPackageRootObjects",
".",
"bind",
"(",
"this",
")",
",",
"this",
".",
"downloadPackageVersions",
".",
"bind",
"(",
"this",
")",
"]",
",",
"function",
"(",
"err... | Download all the package root objects, package version objects,
and tarballs.
@param {Function} callback invoke when done. | [
"Download",
"all",
"the",
"package",
"root",
"objects",
"package",
"version",
"objects",
"and",
"tarballs",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L248-L255 | |
42,997 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
var packages = Object.keys(this.packageToVersions);
async.parallel(packages.map(function(package) {
var packageRootUrl = url.resolve(this.master, package);
return this.downloadPackageRootObject.bind(this, package, packageRootUrl);
}.bind(this)), function(err) {
return callback && callback(err);
});
} | javascript | function(callback) {
var packages = Object.keys(this.packageToVersions);
async.parallel(packages.map(function(package) {
var packageRootUrl = url.resolve(this.master, package);
return this.downloadPackageRootObject.bind(this, package, packageRootUrl);
}.bind(this)), function(err) {
return callback && callback(err);
});
} | [
"function",
"(",
"callback",
")",
"{",
"var",
"packages",
"=",
"Object",
".",
"keys",
"(",
"this",
".",
"packageToVersions",
")",
";",
"async",
".",
"parallel",
"(",
"packages",
".",
"map",
"(",
"function",
"(",
"package",
")",
"{",
"var",
"packageRootUr... | Download a package root object for each package.
@param {Function} callback invoke when done. | [
"Download",
"a",
"package",
"root",
"object",
"for",
"each",
"package",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L262-L270 | |
42,998 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
var packageToVersions = this.packageToVersions;
var count = Package.versionCount(packageToVersions);
if (count === 0) {
return callback && callback();
}
var packages = Object.keys(packageToVersions);
async.parallel(
packages
.map(function(package) {
var versions = Object.keys(packageToVersions[package]);
return versions.map(function(version) {
return this.downloadPackageVersion.bind(this, package, version);
}.bind(this));
}.bind(this))
.reduce(function(prev, curr) {
return prev.concat(curr);
}),
function(err) {
return callback && callback(err);
}
);
} | javascript | function(callback) {
var packageToVersions = this.packageToVersions;
var count = Package.versionCount(packageToVersions);
if (count === 0) {
return callback && callback();
}
var packages = Object.keys(packageToVersions);
async.parallel(
packages
.map(function(package) {
var versions = Object.keys(packageToVersions[package]);
return versions.map(function(version) {
return this.downloadPackageVersion.bind(this, package, version);
}.bind(this));
}.bind(this))
.reduce(function(prev, curr) {
return prev.concat(curr);
}),
function(err) {
return callback && callback(err);
}
);
} | [
"function",
"(",
"callback",
")",
"{",
"var",
"packageToVersions",
"=",
"this",
".",
"packageToVersions",
";",
"var",
"count",
"=",
"Package",
".",
"versionCount",
"(",
"packageToVersions",
")",
";",
"if",
"(",
"count",
"===",
"0",
")",
"{",
"return",
"cal... | Download a package version object and tarball for each package version.
@param {Function} callback invoke when done. | [
"Download",
"a",
"package",
"version",
"object",
"and",
"tarball",
"for",
"each",
"package",
"version",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L331-L354 | |
42,999 | mozilla-b2g/npm-mirror | lib/syncmanager.js | function(callback) {
var packageToVersions = this.packageToVersions;
var count = Package.versionCount(packageToVersions);
if (count === 0) {
return callback && callback();
}
// For each package version, check shasum and copy to server root.
var packages = Object.keys(packageToVersions);
async.parallel(
packages
.map(function(package) {
var versions = Object.keys(packageToVersions[package]);
return versions.map(function(version) {
return this.verifyPackageVersion.bind(this, package, version);
}.bind(this));
}.bind(this))
.reduce(function(prev, curr) {
return prev.concat(curr);
}),
function(err) {
if (err) {
return callback && callback(err);
}
ncp(this.tempdir, this.root, callback);
}.bind(this)
);
} | javascript | function(callback) {
var packageToVersions = this.packageToVersions;
var count = Package.versionCount(packageToVersions);
if (count === 0) {
return callback && callback();
}
// For each package version, check shasum and copy to server root.
var packages = Object.keys(packageToVersions);
async.parallel(
packages
.map(function(package) {
var versions = Object.keys(packageToVersions[package]);
return versions.map(function(version) {
return this.verifyPackageVersion.bind(this, package, version);
}.bind(this));
}.bind(this))
.reduce(function(prev, curr) {
return prev.concat(curr);
}),
function(err) {
if (err) {
return callback && callback(err);
}
ncp(this.tempdir, this.root, callback);
}.bind(this)
);
} | [
"function",
"(",
"callback",
")",
"{",
"var",
"packageToVersions",
"=",
"this",
".",
"packageToVersions",
";",
"var",
"count",
"=",
"Package",
".",
"versionCount",
"(",
"packageToVersions",
")",
";",
"if",
"(",
"count",
"===",
"0",
")",
"{",
"return",
"cal... | Check the shasums of all of the downloaded packages and then
copy the downloaded data to our server root if there are no issues.
@param {Function} callback invoke when done. | [
"Check",
"the",
"shasums",
"of",
"all",
"of",
"the",
"downloaded",
"packages",
"and",
"then",
"copy",
"the",
"downloaded",
"data",
"to",
"our",
"server",
"root",
"if",
"there",
"are",
"no",
"issues",
"."
] | b405e97d369d916db163c2fe9139955a37e9fad8 | https://github.com/mozilla-b2g/npm-mirror/blob/b405e97d369d916db163c2fe9139955a37e9fad8/lib/syncmanager.js#L421-L449 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.