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
partition
stringclasses
1 value
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
train
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
train
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
train
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
train
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...
[ "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
train
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 func...
[ "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
train
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...
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...
[ "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 objec...
[ "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
train
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
train
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 even...
javascript
function() { if (this.beforeDestroyEvent.fire()) { var cal = this; // Child objects if (cal.navigator) { cal.navigator.destroy(); } if (cal.cfg) { cal.cfg.destroy(); } // DOM even...
[ "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
train
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 */...
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 */...
[ "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
train
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
train
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
train
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 + '">'; ...
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 + '">'; ...
[ "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
train
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 ...
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 ...
[ "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
train
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.lengt...
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.lengt...
[ "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
train
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
train
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
train
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...
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...
[ "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
train
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); } }...
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); } }...
[ "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
train
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
train
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.moveToEleme...
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.moveToEleme...
[ "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
train
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
train
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
train
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); ...
javascript
function (p_bDisabled) { var nButtons = this.getCount(), i; if (nButtons > 0) { i = nButtons - 1; do { this._buttons[i].set("disabled", p_bDisabled); ...
[ "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
train
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); ...
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); ...
[ "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
train
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
train
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:' ', ...
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:' ', ...
[ "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
train
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() {...
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() {...
[ "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
train
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...
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...
[ "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
train
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); thi...
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); thi...
[ "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
train
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
train
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
train
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 { ...
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 { ...
[ "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
train
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; ...
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; ...
[ "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
train
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 p...
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 p...
[ "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
train
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 directori...
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 directori...
[ "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
train
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
train
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 ...
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 ...
[ "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
train
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) { ...
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) { ...
[ "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
train
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); ...
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); ...
[ "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
train
neyric/webhookit
public/javascripts/yui/event-delegate/event-delegate.js
function (container, type, fn) { var sType = type, returnVal = false, index, cacheItem; // Look up the real event--either mouseover or mouseout if (type == "mouseenter" || type == "mouseleave") { sType = Event._getType(type); } index = Event._getCacheIndex(delegates, container, sType, ...
javascript
function (container, type, fn) { var sType = type, returnVal = false, index, cacheItem; // Look up the real event--either mouseover or mouseout if (type == "mouseenter" || type == "mouseleave") { sType = Event._getType(type); } index = Event._getCacheIndex(delegates, container, sType, ...
[ "function", "(", "container", ",", "type", ",", "fn", ")", "{", "var", "sType", "=", "type", ",", "returnVal", "=", "false", ",", "index", ",", "cacheItem", ";", "//\tLook up the real event--either mouseover or mouseout", "if", "(", "type", "==", "\"mouseenter\"...
Removes a delegated event listener. @method removeDelegate @param {String|HTMLElement|Array|NodeList} container An id, an element reference, or a collection of ids and/or elements to remove the listener from. @param {String} type The type of event to remove. @param {Function} fn The method the event invokes. If fn i...
[ "Removes", "a", "delegated", "event", "listener", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event-delegate/event-delegate.js#L243-L276
train
neyric/webhookit
public/javascripts/yui/element/element.js
function() { var val = this.value; if (this.getter) { val = this.getter.call(this.owner, this.name, val); } return val; }
javascript
function() { var val = this.value; if (this.getter) { val = this.getter.call(this.owner, this.name, val); } return val; }
[ "function", "(", ")", "{", "var", "val", "=", "this", ".", "value", ";", "if", "(", "this", ".", "getter", ")", "{", "val", "=", "this", ".", "getter", ".", "call", "(", "this", ".", "owner", ",", "this", ".", "name", ",", "val", ")", ";", "}...
Retrieves the current value of the attribute. @method getValue @return {any} The current value of the attribute.
[ "Retrieves", "the", "current", "value", "of", "the", "attribute", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L114-L122
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(value, silent) { var beforeRetVal, owner = this.owner, name = this.name; var event = { type: name, prevValue: this.getValue(), newValue: value }; if (this.readOnly || ( this.writeOnce && this._written...
javascript
function(value, silent) { var beforeRetVal, owner = this.owner, name = this.name; var event = { type: name, prevValue: this.getValue(), newValue: value }; if (this.readOnly || ( this.writeOnce && this._written...
[ "function", "(", "value", ",", "silent", ")", "{", "var", "beforeRetVal", ",", "owner", "=", "this", ".", "owner", ",", "name", "=", "this", ".", "name", ";", "var", "event", "=", "{", "type", ":", "name", ",", "prevValue", ":", "this", ".", "getVa...
Sets the value of the attribute and fires beforeChange and change events. @method setValue @param {Any} value The value to apply to the attribute. @param {Boolean} silent If true the change events will not be fired. @return {Boolean} Whether or not the value was set.
[ "Sets", "the", "value", "of", "the", "attribute", "and", "fires", "beforeChange", "and", "change", "events", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L131-L177
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(map, init) { map = map || {}; if (init) { this._written = false; // reset writeOnce } this._initialConfig = this._initialConfig || {}; for (var key in map) { if ( map.hasOwnProperty(key) ) { this[key] = map[key]; ...
javascript
function(map, init) { map = map || {}; if (init) { this._written = false; // reset writeOnce } this._initialConfig = this._initialConfig || {}; for (var key in map) { if ( map.hasOwnProperty(key) ) { this[key] = map[key]; ...
[ "function", "(", "map", ",", "init", ")", "{", "map", "=", "map", "||", "{", "}", ";", "if", "(", "init", ")", "{", "this", ".", "_written", "=", "false", ";", "// reset writeOnce", "}", "this", ".", "_initialConfig", "=", "this", ".", "_initialConfi...
Allows for configuring the Attribute's properties. @method configure @param {Object} map A key-value map of Attribute properties. @param {Boolean} init Whether or not this should become the initial config.
[ "Allows", "for", "configuring", "the", "Attribute", "s", "properties", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L185-L202
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key){ this._configs = this._configs || {}; var config = this._configs[key]; if (!config || !this._configs.hasOwnProperty(key)) { return null; } return config.getValue(); }
javascript
function(key){ this._configs = this._configs || {}; var config = this._configs[key]; if (!config || !this._configs.hasOwnProperty(key)) { return null; } return config.getValue(); }
[ "function", "(", "key", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "var", "config", "=", "this", ".", "_configs", "[", "key", "]", ";", "if", "(", "!", "config", "||", "!", "this", ".", "_configs", ".", ...
Returns the current value of the attribute. @method get @param {String} key The attribute whose value will be returned. @return {Any} The current value of the attribute.
[ "Returns", "the", "current", "value", "of", "the", "attribute", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L265-L274
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key, value, silent){ this._configs = this._configs || {}; var config = this._configs[key]; if (!config) { return false; } return config.setValue(value, silent); }
javascript
function(key, value, silent){ this._configs = this._configs || {}; var config = this._configs[key]; if (!config) { return false; } return config.setValue(value, silent); }
[ "function", "(", "key", ",", "value", ",", "silent", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "var", "config", "=", "this", ".", "_configs", "[", "key", "]", ";", "if", "(", "!", "config", ")", "{", ...
Sets the value of a config. @method set @param {String} key The name of the attribute @param {Any} value The value to apply to the attribute @param {Boolean} silent Whether or not to suppress change events @return {Boolean} Whether or not the value was set.
[ "Sets", "the", "value", "of", "a", "config", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L284-L293
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(){ this._configs = this._configs; var keys = [], key; for (key in this._configs) { if ( Lang.hasOwnProperty(this._configs, key) && !Lang.isUndefined(this._configs[key]) ) { keys[keys.length] = key; ...
javascript
function(){ this._configs = this._configs; var keys = [], key; for (key in this._configs) { if ( Lang.hasOwnProperty(this._configs, key) && !Lang.isUndefined(this._configs[key]) ) { keys[keys.length] = key; ...
[ "function", "(", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", ";", "var", "keys", "=", "[", "]", ",", "key", ";", "for", "(", "key", "in", "this", ".", "_configs", ")", "{", "if", "(", "Lang", ".", "hasOwnProperty", "(", "this...
Returns an array of attribute names. @method getAttributeKeys @return {Array} An array of attribute names.
[ "Returns", "an", "array", "of", "attribute", "names", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L300-L312
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(map, silent){ for (var key in map) { if ( Lang.hasOwnProperty(map, key) ) { this.set(key, map[key], silent); } } }
javascript
function(map, silent){ for (var key in map) { if ( Lang.hasOwnProperty(map, key) ) { this.set(key, map[key], silent); } } }
[ "function", "(", "map", ",", "silent", ")", "{", "for", "(", "var", "key", "in", "map", ")", "{", "if", "(", "Lang", ".", "hasOwnProperty", "(", "map", ",", "key", ")", ")", "{", "this", ".", "set", "(", "key", ",", "map", "[", "key", "]", ",...
Sets multiple attribute values. @method setAttributes @param {Object} map A key-value map of attributes @param {Boolean} silent Whether or not to suppress change events
[ "Sets", "multiple", "attribute", "values", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L320-L326
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key, silent){ this._configs = this._configs || {}; if (this._configs[key]) { this.set(key, this._configs[key]._initialConfig.value, silent); return true; } return false; }
javascript
function(key, silent){ this._configs = this._configs || {}; if (this._configs[key]) { this.set(key, this._configs[key]._initialConfig.value, silent); return true; } return false; }
[ "function", "(", "key", ",", "silent", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "if", "(", "this", ".", "_configs", "[", "key", "]", ")", "{", "this", ".", "set", "(", "key", ",", "this", ".", "_conf...
Resets the specified attribute's value to its initial value. @method resetValue @param {String} key The name of the attribute @param {Boolean} silent Whether or not to suppress change events @return {Boolean} Whether or not the value was set
[ "Resets", "the", "specified", "attribute", "s", "value", "to", "its", "initial", "value", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L335-L342
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key, silent) { this._configs = this._configs || {}; var configs = this._configs; key = ( ( Lang.isString(key) ) ? [key] : key ) || this.getAttributeKeys(); for (var i = 0, len = key.length; i < len; ++i) { ...
javascript
function(key, silent) { this._configs = this._configs || {}; var configs = this._configs; key = ( ( Lang.isString(key) ) ? [key] : key ) || this.getAttributeKeys(); for (var i = 0, len = key.length; i < len; ++i) { ...
[ "function", "(", "key", ",", "silent", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "var", "configs", "=", "this", ".", "_configs", ";", "key", "=", "(", "(", "Lang", ".", "isString", "(", "key", ")", ")",...
Sets the attribute's value to its current value. @method refresh @param {String | Array} key The attribute(s) to refresh @param {Boolean} silent Whether or not to suppress change events
[ "Sets", "the", "attribute", "s", "value", "to", "its", "current", "value", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L350-L362
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key) { this._configs = this._configs || {}; var config = this._configs[key] || {}; var map = {}; // returning a copy to prevent overrides for (key in config) { if ( Lang.hasOwnProperty(config, key) ) { map[key] = c...
javascript
function(key) { this._configs = this._configs || {}; var config = this._configs[key] || {}; var map = {}; // returning a copy to prevent overrides for (key in config) { if ( Lang.hasOwnProperty(config, key) ) { map[key] = c...
[ "function", "(", "key", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "var", "config", "=", "this", ".", "_configs", "[", "key", "]", "||", "{", "}", ";", "var", "map", "=", "{", "}", ";", "// returning a c...
Returns the attribute's properties. @method getAttributeConfig @param {String} key The attribute's name @private @return {object} A key-value map containing all of the attribute's properties.
[ "Returns", "the", "attribute", "s", "properties", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L385-L397
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key, map, init) { this._configs = this._configs || {}; map = map || {}; if (!this._configs[key]) { map.name = key; this._configs[key] = this.createAttribute(map); } else { this._configs[key].configure(map, init); ...
javascript
function(key, map, init) { this._configs = this._configs || {}; map = map || {}; if (!this._configs[key]) { map.name = key; this._configs[key] = this.createAttribute(map); } else { this._configs[key].configure(map, init); ...
[ "function", "(", "key", ",", "map", ",", "init", ")", "{", "this", ".", "_configs", "=", "this", ".", "_configs", "||", "{", "}", ";", "map", "=", "map", "||", "{", "}", ";", "if", "(", "!", "this", ".", "_configs", "[", "key", "]", ")", "{",...
Sets or updates an Attribute instance's properties. @method setAttributeConfig @param {String} key The attribute's name. @param {Object} map A key-value map of attribute properties @param {Boolean} init Whether or not this should become the intial config.
[ "Sets", "or", "updates", "an", "Attribute", "instance", "s", "properties", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L406-L415
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(type, callback) { this._events = this._events || {}; if ( !(type in this._events) ) { this._events[type] = this.createEvent(type); } YAHOO.util.EventProvider.prototype.subscribe.apply(this, arguments); }
javascript
function(type, callback) { this._events = this._events || {}; if ( !(type in this._events) ) { this._events[type] = this.createEvent(type); } YAHOO.util.EventProvider.prototype.subscribe.apply(this, arguments); }
[ "function", "(", "type", ",", "callback", ")", "{", "this", ".", "_events", "=", "this", ".", "_events", "||", "{", "}", ";", "if", "(", "!", "(", "type", "in", "this", ".", "_events", ")", ")", "{", "this", ".", "_events", "[", "type", "]", "=...
wrapper for EventProvider.subscribe to create events on the fly
[ "wrapper", "for", "EventProvider", ".", "subscribe", "to", "create", "events", "on", "the", "fly" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L442-L450
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(e) { var type = 'before'; type += e.type.charAt(0).toUpperCase() + e.type.substr(1) + 'Change'; e.type = type; return this.fireEvent(e.type, e); }
javascript
function(e) { var type = 'before'; type += e.type.charAt(0).toUpperCase() + e.type.substr(1) + 'Change'; e.type = type; return this.fireEvent(e.type, e); }
[ "function", "(", "e", ")", "{", "var", "type", "=", "'before'", ";", "type", "+=", "e", ".", "type", ".", "charAt", "(", "0", ")", ".", "toUpperCase", "(", ")", "+", "e", ".", "type", ".", "substr", "(", "1", ")", "+", "'Change'", ";", "e", "...
Fires the attribute's beforeChange event. @method fireBeforeChangeEvent @param {String} key The attribute's name. @param {Obj} e The event object to pass to handlers.
[ "Fires", "the", "attribute", "s", "beforeChange", "event", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L466-L471
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(type, fn, obj, scope) { scope = scope || this; var Event = YAHOO.util.Event, el = this.get('element') || this.get('id'), self = this; if (specialTypes[type] && !Event._createMouseDelegate) { return false; } if (!this._events[type]) { // create on the fly ...
javascript
function(type, fn, obj, scope) { scope = scope || this; var Event = YAHOO.util.Event, el = this.get('element') || this.get('id'), self = this; if (specialTypes[type] && !Event._createMouseDelegate) { return false; } if (!this._events[type]) { // create on the fly ...
[ "function", "(", "type", ",", "fn", ",", "obj", ",", "scope", ")", "{", "scope", "=", "scope", "||", "this", ";", "var", "Event", "=", "YAHOO", ".", "util", ".", "Event", ",", "el", "=", "this", ".", "get", "(", "'element'", ")", "||", "this", ...
Adds a listener for the given event. These may be DOM or customEvent listeners. Any event that is fired via fireEvent can be listened for. All handlers receive an event object. @method addListener @param {String} type The name of the event to listen for @param {Function} fn The handler to call when the event fires @...
[ "Adds", "a", "listener", "for", "the", "given", "event", ".", "These", "may", "be", "DOM", "or", "customEvent", "listeners", ".", "Any", "event", "that", "is", "fired", "via", "fireEvent", "can", "be", "listened", "for", ".", "All", "handlers", "receive", ...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L660-L702
train
neyric/webhookit
public/javascripts/yui/element/element.js
function() { var queue = this._queue; for (var i = 0, len = queue.length; i < len; ++i) { this[queue[i][0]].apply(this, queue[i][1]); } }
javascript
function() { var queue = this._queue; for (var i = 0, len = queue.length; i < len; ++i) { this[queue[i][0]].apply(this, queue[i][1]); } }
[ "function", "(", ")", "{", "var", "queue", "=", "this", ".", "_queue", ";", "for", "(", "var", "i", "=", "0", ",", "len", "=", "queue", ".", "length", ";", "i", "<", "len", ";", "++", "i", ")", "{", "this", "[", "queue", "[", "i", "]", "[",...
Apply any queued set calls. @method fireQueue
[ "Apply", "any", "queued", "set", "calls", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L815-L820
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(parent, before) { parent = (parent.get) ? parent.get('element') : Dom.get(parent); this.fireEvent('beforeAppendTo', { type: 'beforeAppendTo', target: parent }); before = (before && before.get) ? before.get('ele...
javascript
function(parent, before) { parent = (parent.get) ? parent.get('element') : Dom.get(parent); this.fireEvent('beforeAppendTo', { type: 'beforeAppendTo', target: parent }); before = (before && before.get) ? before.get('ele...
[ "function", "(", "parent", ",", "before", ")", "{", "parent", "=", "(", "parent", ".", "get", ")", "?", "parent", ".", "get", "(", "'element'", ")", ":", "Dom", ".", "get", "(", "parent", ")", ";", "this", ".", "fireEvent", "(", "'beforeAppendTo'", ...
Appends the HTMLElement into either the supplied parentNode. @method appendTo @param {HTMLElement | Element} parentNode The node to append to @param {HTMLElement | Element} before An optional node to insert before @return {HTMLElement} The appended DOM element.
[ "Appends", "the", "HTMLElement", "into", "either", "the", "supplied", "parentNode", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L829-L865
train
neyric/webhookit
public/javascripts/yui/element/element.js
function(key, map) { var el = this.get('element'); map = map || {}; map.name = key; map.setter = map.setter || this.DEFAULT_HTML_SETTER; map.getter = map.getter || this.DEFAULT_HTML_GETTER; map.value = map.value || el[key]; this._configs[key] = new YAHOO.util.At...
javascript
function(key, map) { var el = this.get('element'); map = map || {}; map.name = key; map.setter = map.setter || this.DEFAULT_HTML_SETTER; map.getter = map.getter || this.DEFAULT_HTML_GETTER; map.value = map.value || el[key]; this._configs[key] = new YAHOO.util.At...
[ "function", "(", "key", ",", "map", ")", "{", "var", "el", "=", "this", ".", "get", "(", "'element'", ")", ";", "map", "=", "map", "||", "{", "}", ";", "map", ".", "name", "=", "key", ";", "map", ".", "setter", "=", "map", ".", "setter", "||"...
Sets the value of the property and fires beforeChange and change events. @private @method _setHTMLAttrConfig @param {YAHOO.util.Element} element The Element instance to register the config to. @param {String} key The name of the config to register @param {Object} map A key-value map of the config's params
[ "Sets", "the", "value", "of", "the", "property", "and", "fires", "beforeChange", "and", "change", "events", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/element/element.js#L1021-L1031
train
neyric/webhookit
public/javascripts/WireIt/plugins/composable/js/ComposableWiringEditor.js
function(wirings) { // Reset the internal structure this.pipes = wirings; this.pipesByName = {}; // Build the "pipesByName" index for(var i = 0 ; i < this.pipes.length ; i++) { this.pipesByName[ this.pipes[i].name] = this.pipes[i]; } // Customize to display composed module in the lef...
javascript
function(wirings) { // Reset the internal structure this.pipes = wirings; this.pipesByName = {}; // Build the "pipesByName" index for(var i = 0 ; i < this.pipes.length ; i++) { this.pipesByName[ this.pipes[i].name] = this.pipes[i]; } // Customize to display composed module in the lef...
[ "function", "(", "wirings", ")", "{", "// Reset the internal structure", "this", ".", "pipes", "=", "wirings", ";", "this", ".", "pipesByName", "=", "{", "}", ";", "// Build the \"pipesByName\" index", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this",...
Customize the load success handler for the composed module list
[ "Customize", "the", "load", "success", "handler", "for", "the", "composed", "module", "list" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/composable/js/ComposableWiringEditor.js#L75-L97
train
neyric/webhookit
public/javascripts/inputex/js/fields/StringAvailability.js
function(string) { // TODO split params ? & YAHOO.util.Connect.asyncRequest('GET', this.options.uri+'?availabilityRequest='+string, { success: function(o) { var obj = lang.JSON.parse(o.responseText); if(obj === "true" || !!obj){ this.onAvailable(); } else if(obj === "false" || !obj){ th...
javascript
function(string) { // TODO split params ? & YAHOO.util.Connect.asyncRequest('GET', this.options.uri+'?availabilityRequest='+string, { success: function(o) { var obj = lang.JSON.parse(o.responseText); if(obj === "true" || !!obj){ this.onAvailable(); } else if(obj === "false" || !obj){ th...
[ "function", "(", "string", ")", "{", "// TODO split params ? &", "YAHOO", ".", "util", ".", "Connect", ".", "asyncRequest", "(", "'GET'", ",", "this", ".", "options", ".", "uri", "+", "'?availabilityRequest='", "+", "string", ",", "{", "success", ":", "funct...
Perform the Ajax request
[ "Perform", "the", "Ajax", "request" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/StringAvailability.js#L157-L177
train
neyric/webhookit
public/javascripts/WireIt/plugins/editor/js/WiringEditor.js
function() { if(!this.checkAutoLoadOnce) { var p = window.location.search.substr(1).split('&'); var oP = {}; for(var i = 0 ; i < p.length ; i++) { var v = p[i].split('='); oP[v[0]]=window.decodeURIComponent(v[1]); } this.checkAutoLoadOnce = true; if(oP.autoload) { this.loadPipe(oP.autolo...
javascript
function() { if(!this.checkAutoLoadOnce) { var p = window.location.search.substr(1).split('&'); var oP = {}; for(var i = 0 ; i < p.length ; i++) { var v = p[i].split('='); oP[v[0]]=window.decodeURIComponent(v[1]); } this.checkAutoLoadOnce = true; if(oP.autoload) { this.loadPipe(oP.autolo...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "checkAutoLoadOnce", ")", "{", "var", "p", "=", "window", ".", "location", ".", "search", ".", "substr", "(", "1", ")", ".", "split", "(", "'&'", ")", ";", "var", "oP", "=", "{", "}", ";",...
checkAutoLoad looks for the "autoload" URL parameter and open the pipe. returns true if it loads a Pipe @method checkAutoLoad
[ "checkAutoLoad", "looks", "for", "the", "autoload", "URL", "parameter", "and", "open", "the", "pipe", ".", "returns", "true", "if", "it", "loads", "a", "Pipe" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/editor/js/WiringEditor.js#L420-L435
train
takuhii/PhantomJS-25_Beta
lib/util.js
checkPhantomjsVersion
function checkPhantomjsVersion(phantomPath) { console.log('Found PhantomJS at', phantomPath, '...verifying') return kew.nfcall(cp.execFile, phantomPath, ['--version']).then(function (stdout) { var version = stdout.trim() if (helper.version == version) { return true } else { console.log('Phan...
javascript
function checkPhantomjsVersion(phantomPath) { console.log('Found PhantomJS at', phantomPath, '...verifying') return kew.nfcall(cp.execFile, phantomPath, ['--version']).then(function (stdout) { var version = stdout.trim() if (helper.version == version) { return true } else { console.log('Phan...
[ "function", "checkPhantomjsVersion", "(", "phantomPath", ")", "{", "console", ".", "log", "(", "'Found PhantomJS at'", ",", "phantomPath", ",", "'...verifying'", ")", "return", "kew", ".", "nfcall", "(", "cp", ".", "execFile", ",", "phantomPath", ",", "[", "'-...
Check to make sure a given binary is the right version. @return {kew.Promise.<boolean>}
[ "Check", "to", "make", "sure", "a", "given", "binary", "is", "the", "right", "version", "." ]
5629951fa99aa54fd0b52102679a254108c3e182
https://github.com/takuhii/PhantomJS-25_Beta/blob/5629951fa99aa54fd0b52102679a254108c3e182/lib/util.js#L46-L60
train
takuhii/PhantomJS-25_Beta
lib/util.js
verifyChecksum
function verifyChecksum(fileName, checksum) { return kew.resolve(hasha.fromFile(fileName, {algorithm: 'sha256'})).then(function (hash) { var result = checksum == hash if (result) { console.log('Verified checksum of previously downloaded file') } else { console.log('Checksum did not match') ...
javascript
function verifyChecksum(fileName, checksum) { return kew.resolve(hasha.fromFile(fileName, {algorithm: 'sha256'})).then(function (hash) { var result = checksum == hash if (result) { console.log('Verified checksum of previously downloaded file') } else { console.log('Checksum did not match') ...
[ "function", "verifyChecksum", "(", "fileName", ",", "checksum", ")", "{", "return", "kew", ".", "resolve", "(", "hasha", ".", "fromFile", "(", "fileName", ",", "{", "algorithm", ":", "'sha256'", "}", ")", ")", ".", "then", "(", "function", "(", "hash", ...
Check to make sure that the file matches the checksum. @param {string} fileName @param {string} checksum @return {Promise.<boolean>}
[ "Check", "to", "make", "sure", "that", "the", "file", "matches", "the", "checksum", "." ]
5629951fa99aa54fd0b52102679a254108c3e182
https://github.com/takuhii/PhantomJS-25_Beta/blob/5629951fa99aa54fd0b52102679a254108c3e182/lib/util.js#L120-L133
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
_storeStates
function _storeStates() { var moduleName, moduleObj, initialStates = [], currentStates = []; for (moduleName in _modules) { if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) { moduleObj = _modules[moduleName]; initialStates.push(moduleName + "=" + moduleO...
javascript
function _storeStates() { var moduleName, moduleObj, initialStates = [], currentStates = []; for (moduleName in _modules) { if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) { moduleObj = _modules[moduleName]; initialStates.push(moduleName + "=" + moduleO...
[ "function", "_storeStates", "(", ")", "{", "var", "moduleName", ",", "moduleObj", ",", "initialStates", "=", "[", "]", ",", "currentStates", "=", "[", "]", ";", "for", "(", "moduleName", "in", "_modules", ")", "{", "if", "(", "YAHOO", ".", "lang", ".",...
Stores all the registered modules' initial state and current state. On Safari, we also store all the fully qualified states visited by the application within a single browser session. The storage takes place in the form field specified during initialization. @method _storeStates @private
[ "Stores", "all", "the", "registered", "modules", "initial", "state", "and", "current", "state", ".", "On", "Safari", "we", "also", "store", "all", "the", "fully", "qualified", "states", "visited", "by", "the", "application", "within", "a", "single", "browser",...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L111-L128
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
_handleFQStateChange
function _handleFQStateChange(fqstate) { var i, len, moduleName, moduleObj, modules, states, tokens, currentState; if (!fqstate) { // Notifies all modules for (moduleName in _modules) { if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) { m...
javascript
function _handleFQStateChange(fqstate) { var i, len, moduleName, moduleObj, modules, states, tokens, currentState; if (!fqstate) { // Notifies all modules for (moduleName in _modules) { if (YAHOO.lang.hasOwnProperty(_modules, moduleName)) { m...
[ "function", "_handleFQStateChange", "(", "fqstate", ")", "{", "var", "i", ",", "len", ",", "moduleName", ",", "moduleObj", ",", "modules", ",", "states", ",", "tokens", ",", "currentState", ";", "if", "(", "!", "fqstate", ")", "{", "// Notifies all modules",...
Sets the new currentState attribute of all modules depending on the new fully qualified state. Also notifies the modules which current state has changed. @method _handleFQStateChange @param {string} fqstate Fully qualified state @private
[ "Sets", "the", "new", "currentState", "attribute", "of", "all", "modules", "depending", "on", "the", "new", "fully", "qualified", "state", ".", "Also", "notifies", "the", "modules", "which", "current", "state", "has", "changed", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L139-L176
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
_updateIFrame
function _updateIFrame (fqstate) { var html, doc; html = '<html><body><div id="state">' + fqstate.replace(/&/g,'&amp;'). replace(/</g,'&lt;'). replace(/>/g,'&gt;'). replace(/"/g,'&quot;') + ...
javascript
function _updateIFrame (fqstate) { var html, doc; html = '<html><body><div id="state">' + fqstate.replace(/&/g,'&amp;'). replace(/</g,'&lt;'). replace(/>/g,'&gt;'). replace(/"/g,'&quot;') + ...
[ "function", "_updateIFrame", "(", "fqstate", ")", "{", "var", "html", ",", "doc", ";", "html", "=", "'<html><body><div id=\"state\">'", "+", "fqstate", ".", "replace", "(", "/", "&", "/", "g", ",", "'&amp;'", ")", ".", "replace", "(", "/", "<", "/", "g...
Update the IFrame with our new state. @method _updateIFrame @private @return {boolean} true if successful. false otherwise.
[ "Update", "the", "IFrame", "with", "our", "new", "state", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L185-L205
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
_checkIframeLoaded
function _checkIframeLoaded() { var doc, elem, fqstate, hash; if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) { // Check again in 10 msec... setTimeout(_checkIframeLoaded, 10); return; } // Start the thread that will have the re...
javascript
function _checkIframeLoaded() { var doc, elem, fqstate, hash; if (!_histFrame.contentWindow || !_histFrame.contentWindow.document) { // Check again in 10 msec... setTimeout(_checkIframeLoaded, 10); return; } // Start the thread that will have the re...
[ "function", "_checkIframeLoaded", "(", ")", "{", "var", "doc", ",", "elem", ",", "fqstate", ",", "hash", ";", "if", "(", "!", "_histFrame", ".", "contentWindow", "||", "!", "_histFrame", ".", "contentWindow", ".", "document", ")", "{", "// Check again in 10 ...
Periodically checks whether our internal IFrame is ready to be used. @method _checkIframeLoaded @private
[ "Periodically", "checks", "whether", "our", "internal", "IFrame", "is", "ready", "to", "be", "used", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L213-L303
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
_initialize
function _initialize() { var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash; // Decode the content of our storage field... parts = _stateField.value.split("|"); if (parts.length > 1) { initialStates = ...
javascript
function _initialize() { var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash; // Decode the content of our storage field... parts = _stateField.value.split("|"); if (parts.length > 1) { initialStates = ...
[ "function", "_initialize", "(", ")", "{", "var", "i", ",", "len", ",", "parts", ",", "tokens", ",", "moduleName", ",", "moduleObj", ",", "initialStates", ",", "initialState", ",", "currentStates", ",", "currentState", ",", "counter", ",", "hash", ";", "// ...
Finish up the initialization of the Browser History Manager. @method _initialize @private
[ "Finish", "up", "the", "initialization", "of", "the", "Browser", "History", "Manager", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L311-L418
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (fn, obj, overrideContext) { if (_initialized) { setTimeout(function () { var ctx = window; if (overrideContext) { if (overrideContext === true) { ctx = obj; } else ...
javascript
function (fn, obj, overrideContext) { if (_initialized) { setTimeout(function () { var ctx = window; if (overrideContext) { if (overrideContext === true) { ctx = obj; } else ...
[ "function", "(", "fn", ",", "obj", ",", "overrideContext", ")", "{", "if", "(", "_initialized", ")", "{", "setTimeout", "(", "function", "(", ")", "{", "var", "ctx", "=", "window", ";", "if", "(", "overrideContext", ")", "{", "if", "(", "overrideContex...
Executes the supplied callback when the Browser History Manager is ready. This will execute immediately if called after the Browser History Manager onLoad event has fired. @method onReady @param {function} fn what to execute when the Browser History Manager is ready. @param {object} obj an optional object to be passed...
[ "Executes", "the", "supplied", "callback", "when", "the", "Browser", "History", "Manager", "is", "ready", ".", "This", "will", "execute", "immediately", "if", "called", "after", "the", "Browser", "History", "Manager", "onLoad", "event", "has", "fired", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L444-L465
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (module, initialState, onStateChange, obj, overrideContext) { var scope, wrappedFn; if (typeof module !== "string" || YAHOO.lang.trim(module) === "" || typeof initialState !== "string" || typeof onStateChange !== "function") { throw new ...
javascript
function (module, initialState, onStateChange, obj, overrideContext) { var scope, wrappedFn; if (typeof module !== "string" || YAHOO.lang.trim(module) === "" || typeof initialState !== "string" || typeof onStateChange !== "function") { throw new ...
[ "function", "(", "module", ",", "initialState", ",", "onStateChange", ",", "obj", ",", "overrideContext", ")", "{", "var", "scope", ",", "wrappedFn", ";", "if", "(", "typeof", "module", "!==", "\"string\"", "||", "YAHOO", ".", "lang", ".", "trim", "(", "...
Registers a new module. @method register @param {string} module Non-empty string uniquely identifying the module you wish to register. @param {string} initialState The initial state of the specified module corresponding to its earliest history entry. @param {function} onStateChange Callback called when the state of th...
[ "Registers", "a", "new", "module", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L482-L532
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (stateField, histFrame) { if (_initialized) { // The browser history manager has already been initialized. return; } if (YAHOO.env.ua.opera && typeof history.navigationMode !== "undefined") { // Disable Opera's fast back/forw...
javascript
function (stateField, histFrame) { if (_initialized) { // The browser history manager has already been initialized. return; } if (YAHOO.env.ua.opera && typeof history.navigationMode !== "undefined") { // Disable Opera's fast back/forw...
[ "function", "(", "stateField", ",", "histFrame", ")", "{", "if", "(", "_initialized", ")", "{", "// The browser history manager has already been initialized.", "return", ";", "}", "if", "(", "YAHOO", ".", "env", ".", "ua", ".", "opera", "&&", "typeof", "history"...
Initializes the Browser History Manager. Call this method from a script block located right after the opening body tag. @method initialize @param {string|HTML Element} stateField <input type="hidden"> used to store application states. Must be in the static markup. @param {string|HTML Element} histFrame IFrame used to ...
[ "Initializes", "the", "Browser", "History", "Manager", ".", "Call", "this", "method", "from", "a", "script", "block", "located", "right", "after", "the", "opening", "body", "tag", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L545-L594
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (module) { var moduleObj; if (typeof module !== "string") { throw new Error("Missing or invalid argument"); } if (!_initialized) { throw new Error("The Browser History Manager is not initialized"); } mod...
javascript
function (module) { var moduleObj; if (typeof module !== "string") { throw new Error("Missing or invalid argument"); } if (!_initialized) { throw new Error("The Browser History Manager is not initialized"); } mod...
[ "function", "(", "module", ")", "{", "var", "moduleObj", ";", "if", "(", "typeof", "module", "!==", "\"string\"", ")", "{", "throw", "new", "Error", "(", "\"Missing or invalid argument\"", ")", ";", "}", "if", "(", "!", "_initialized", ")", "{", "throw", ...
Returns the current state of the specified module. @method getCurrentState @param {string} module Non-empty string representing your module. @return {string} The current state of the specified module. @public
[ "Returns", "the", "current", "state", "of", "the", "specified", "module", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L705-L723
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (module) { var i, len, idx, hash, states, tokens, moduleName; if (typeof module !== "string") { throw new Error("Missing or invalid argument"); } // Use location.href instead of location.hash which is already // URL-decoded, which c...
javascript
function (module) { var i, len, idx, hash, states, tokens, moduleName; if (typeof module !== "string") { throw new Error("Missing or invalid argument"); } // Use location.href instead of location.hash which is already // URL-decoded, which c...
[ "function", "(", "module", ")", "{", "var", "i", ",", "len", ",", "idx", ",", "hash", ",", "states", ",", "tokens", ",", "moduleName", ";", "if", "(", "typeof", "module", "!==", "\"string\"", ")", "{", "throw", "new", "Error", "(", "\"Missing or invali...
Returns the state of a module according to the URL fragment identifier. This method is useful to initialize your modules if your application was bookmarked from a particular state. @method getBookmarkedState @param {string} module Non-empty string representing your module. @return {string} The bookmarked state of the ...
[ "Returns", "the", "state", "of", "a", "module", "according", "to", "the", "URL", "fragment", "identifier", ".", "This", "method", "is", "useful", "to", "initialize", "your", "modules", "if", "your", "application", "was", "bookmarked", "from", "a", "particular"...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L735-L762
train
neyric/webhookit
public/javascripts/yui/history/history-debug.js
function (paramName, url) { var i, len, idx, queryString, params, tokens; url = url || top.location.href; idx = url.indexOf("?"); queryString = idx >= 0 ? url.substr(idx + 1) : url; // Remove the hash if any idx = queryString.lastIndexOf("#"); ...
javascript
function (paramName, url) { var i, len, idx, queryString, params, tokens; url = url || top.location.href; idx = url.indexOf("?"); queryString = idx >= 0 ? url.substr(idx + 1) : url; // Remove the hash if any idx = queryString.lastIndexOf("#"); ...
[ "function", "(", "paramName", ",", "url", ")", "{", "var", "i", ",", "len", ",", "idx", ",", "queryString", ",", "params", ",", "tokens", ";", "url", "=", "url", "||", "top", ".", "location", ".", "href", ";", "idx", "=", "url", ".", "indexOf", "...
Returns the value of the specified query string parameter. This method is not used internally by the Browser History Manager. However, it is provided here as a helper since many applications using the Browser History Manager will want to read the value of url parameters to initialize themselves. @method getQueryString...
[ "Returns", "the", "value", "of", "the", "specified", "query", "string", "parameter", ".", "This", "method", "is", "not", "used", "internally", "by", "the", "Browser", "History", "Manager", ".", "However", "it", "is", "provided", "here", "as", "a", "helper", ...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/history/history-debug.js#L778-L803
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function () { var ui = Paginator.ui, name,UIComp; for (name in ui) { if (ui.hasOwnProperty(name)) { UIComp = ui[name]; if (isObject(UIComp) && isFunction(UIComp.init)) { UIComp.init(this); } } ...
javascript
function () { var ui = Paginator.ui, name,UIComp; for (name in ui) { if (ui.hasOwnProperty(name)) { UIComp = ui[name]; if (isObject(UIComp) && isFunction(UIComp.init)) { UIComp.init(this); } } ...
[ "function", "(", ")", "{", "var", "ui", "=", "Paginator", ".", "ui", ",", "name", ",", "UIComp", ";", "for", "(", "name", "in", "ui", ")", "{", "if", "(", "ui", ".", "hasOwnProperty", "(", "name", ")", ")", "{", "UIComp", "=", "ui", "[", "name"...
Initialize registered ui components onto this instance. @method initUIComponents @private
[ "Initialize", "registered", "ui", "components", "onto", "this", "instance", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L390-L401
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { var v = e.newValue,rpp,state; if (e.prevValue !== v) { if (v !== Paginator.VALUE_UNLIMITED) { rpp = this.get('rowsPerPage'); if (rpp && this.get('recordOffset') >= v) { state = this.getState({ totalRe...
javascript
function (e) { var v = e.newValue,rpp,state; if (e.prevValue !== v) { if (v !== Paginator.VALUE_UNLIMITED) { rpp = this.get('rowsPerPage'); if (rpp && this.get('recordOffset') >= v) { state = this.getState({ totalRe...
[ "function", "(", "e", ")", "{", "var", "v", "=", "e", ".", "newValue", ",", "rpp", ",", "state", ";", "if", "(", "e", ".", "prevValue", "!==", "v", ")", "{", "if", "(", "v", "!==", "Paginator", ".", "VALUE_UNLIMITED", ")", "{", "rpp", "=", "thi...
Sets recordOffset to the starting index of the previous page when totalRecords is reduced below the current recordOffset. @method _syncRecordOffset @param e {Event} totalRecordsChange event @protected
[ "Sets", "recordOffset", "to", "the", "starting", "index", "of", "the", "previous", "page", "when", "totalRecords", "is", "reduced", "below", "the", "current", "recordOffset", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L490-L507
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e.prevValue !== e.newValue) { var change = this._state || {}, state; change[e.type.replace(/Change$/,'')] = e.prevValue; state = this.getState(change); if (state.page !== state.before.page) { if (this._batch) { ...
javascript
function (e) { if (e.prevValue !== e.newValue) { var change = this._state || {}, state; change[e.type.replace(/Change$/,'')] = e.prevValue; state = this.getState(change); if (state.page !== state.before.page) { if (this._batch) { ...
[ "function", "(", "e", ")", "{", "if", "(", "e", ".", "prevValue", "!==", "e", ".", "newValue", ")", "{", "var", "change", "=", "this", ".", "_state", "||", "{", "}", ",", "state", ";", "change", "[", "e", ".", "type", ".", "replace", "(", "/", ...
Fires the pageChange event when the state attributes have changed in such a way as to locate the current recordOffset on a new page. @method _handleStateChange @param e {Event} the attribute change event @protected
[ "Fires", "the", "pageChange", "event", "when", "the", "state", "attributes", "have", "changed", "in", "such", "a", "way", "as", "to", "locate", "the", "current", "recordOffset", "on", "a", "new", "page", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L516-L532
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (state) { if (isObject(state)) { var current = state.before; delete state.before; this.fireEvent('pageChange',{ type : 'pageChange', prevValue : state.page, newValue : current.page, prevState : sta...
javascript
function (state) { if (isObject(state)) { var current = state.before; delete state.before; this.fireEvent('pageChange',{ type : 'pageChange', prevValue : state.page, newValue : current.page, prevState : sta...
[ "function", "(", "state", ")", "{", "if", "(", "isObject", "(", "state", ")", ")", "{", "var", "current", "=", "state", ".", "before", ";", "delete", "state", ".", "before", ";", "this", ".", "fireEvent", "(", "'pageChange'", ",", "{", "type", ":", ...
Fires a pageChange event in the form of a standard attribute change event with additional properties prevState and newState. @method _firePageChange @param state {Object} the result of getState(oldState) @protected
[ "Fires", "a", "pageChange", "event", "in", "the", "form", "of", "a", "standard", "attribute", "change", "event", "with", "additional", "properties", "prevState", "and", "newState", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L541-L553
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function () { if (this.get('rendered')) { return this; } var template = this.get('template'), state = this.getState(), // ex. yui-pg0-1 (first paginator, second container) id_base = Paginator.ID_BASE + this.get('id') + '-', i, len;...
javascript
function () { if (this.get('rendered')) { return this; } var template = this.get('template'), state = this.getState(), // ex. yui-pg0-1 (first paginator, second container) id_base = Paginator.ID_BASE + this.get('id') + '-', i, len;...
[ "function", "(", ")", "{", "if", "(", "this", ".", "get", "(", "'rendered'", ")", ")", "{", "return", "this", ";", "}", "var", "template", "=", "this", ".", "get", "(", "'template'", ")", ",", "state", "=", "this", ".", "getState", "(", ")", ",",...
Render the pagination controls per the format attribute into the specified container nodes. @method render @return the Paginator instance @chainable
[ "Render", "the", "pagination", "controls", "per", "the", "format", "attribute", "into", "the", "specified", "container", "nodes", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L562-L591
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (container, template, id_base, hide) { var containerClass = this.get('containerClass'), markers, i, len; if (!container) { return; } // Hide the container while its contents are rendered Dom.setStyle(container,'display','none'); Dom.add...
javascript
function (container, template, id_base, hide) { var containerClass = this.get('containerClass'), markers, i, len; if (!container) { return; } // Hide the container while its contents are rendered Dom.setStyle(container,'display','none'); Dom.add...
[ "function", "(", "container", ",", "template", ",", "id_base", ",", "hide", ")", "{", "var", "containerClass", "=", "this", ".", "get", "(", "'containerClass'", ")", ",", "markers", ",", "i", ",", "len", ";", "if", "(", "!", "container", ")", "{", "r...
Creates the individual ui components and renders them into a container. @method _renderTemplate @param container {HTMLElement} where to add the ui components @param template {String} the template to use as a guide for rendering @param id_base {String} id base for the container's ui components @param hide {Boolean} lea...
[ "Creates", "the", "individual", "ui", "components", "and", "renders", "them", "into", "a", "container", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L603-L632
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { var alwaysVisible = this.get('alwaysVisible'), totalRecords,visible,rpp,rppOptions,i,len; if (!e || e.type === 'alwaysVisibleChange' || !alwaysVisible) { totalRecords = this.get('totalRecords'); visible = true; rpp = this.get(...
javascript
function (e) { var alwaysVisible = this.get('alwaysVisible'), totalRecords,visible,rpp,rppOptions,i,len; if (!e || e.type === 'alwaysVisibleChange' || !alwaysVisible) { totalRecords = this.get('totalRecords'); visible = true; rpp = this.get(...
[ "function", "(", "e", ")", "{", "var", "alwaysVisible", "=", "this", ".", "get", "(", "'alwaysVisible'", ")", ",", "totalRecords", ",", "visible", ",", "rpp", ",", "rppOptions", ",", "i", ",", "len", ";", "if", "(", "!", "e", "||", "e", ".", "type"...
Hides the containers if there is only one page of data and attribute alwaysVisible is false. Conversely, it displays the containers if either there is more than one page worth of data or alwaysVisible is turned on. @method updateVisibility
[ "Hides", "the", "containers", "if", "there", "is", "only", "one", "page", "of", "data", "and", "attribute", "alwaysVisible", "is", "false", ".", "Conversely", "it", "displays", "the", "containers", "if", "either", "there", "is", "more", "than", "one", "page"...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L675-L703
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function () { var records = this.get('totalRecords'), perPage = this.get('rowsPerPage'); // rowsPerPage not set. Can't calculate if (!perPage) { return null; } if (records === Paginator.VALUE_UNLIMITED) { return Paginator.VALUE_UNLIMITED; ...
javascript
function () { var records = this.get('totalRecords'), perPage = this.get('rowsPerPage'); // rowsPerPage not set. Can't calculate if (!perPage) { return null; } if (records === Paginator.VALUE_UNLIMITED) { return Paginator.VALUE_UNLIMITED; ...
[ "function", "(", ")", "{", "var", "records", "=", "this", ".", "get", "(", "'totalRecords'", ")", ",", "perPage", "=", "this", ".", "get", "(", "'rowsPerPage'", ")", ";", "// rowsPerPage not set. Can't calculate", "if", "(", "!", "perPage", ")", "{", "ret...
Get the total number of pages in the data set according to the current rowsPerPage and totalRecords values. If totalRecords is not set, or set to YAHOO.widget.Paginator.VALUE_UNLIMITED, returns YAHOO.widget.Paginator.VALUE_UNLIMITED. @method getTotalPages @return {number}
[ "Get", "the", "total", "number", "of", "pages", "in", "the", "data", "set", "according", "to", "the", "current", "rowsPerPage", "and", "totalRecords", "values", ".", "If", "totalRecords", "is", "not", "set", "or", "set", "to", "YAHOO", ".", "widget", ".", ...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L725-L739
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (page) { if (!lang.isNumber(page) || page < 1) { return false; } var totalPages = this.getTotalPages(); return (totalPages === Paginator.VALUE_UNLIMITED || totalPages >= page); }
javascript
function (page) { if (!lang.isNumber(page) || page < 1) { return false; } var totalPages = this.getTotalPages(); return (totalPages === Paginator.VALUE_UNLIMITED || totalPages >= page); }
[ "function", "(", "page", ")", "{", "if", "(", "!", "lang", ".", "isNumber", "(", "page", ")", "||", "page", "<", "1", ")", "{", "return", "false", ";", "}", "var", "totalPages", "=", "this", ".", "getTotalPages", "(", ")", ";", "return", "(", "to...
Does the requested page have any records? @method hasPage @param page {number} the page in question @return {boolean}
[ "Does", "the", "requested", "page", "have", "any", "records?" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L747-L755
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function () { var currentPage = this.getCurrentPage(), totalPages = this.getTotalPages(); return currentPage && (totalPages === Paginator.VALUE_UNLIMITED || currentPage < totalPages); }
javascript
function () { var currentPage = this.getCurrentPage(), totalPages = this.getTotalPages(); return currentPage && (totalPages === Paginator.VALUE_UNLIMITED || currentPage < totalPages); }
[ "function", "(", ")", "{", "var", "currentPage", "=", "this", ".", "getCurrentPage", "(", ")", ",", "totalPages", "=", "this", ".", "getTotalPages", "(", ")", ";", "return", "currentPage", "&&", "(", "totalPages", "===", "Paginator", ".", "VALUE_UNLIMITED", ...
Are there records on the next page? @method hasNextPage @return {boolean}
[ "Are", "there", "records", "on", "the", "next", "page?" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L775-L780
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (page) { if (!lang.isNumber(page)) { page = this.getCurrentPage(); } var perPage = this.get('rowsPerPage'), records = this.get('totalRecords'), start, end; if (!page || !perPage) { return null; } start = (page - ...
javascript
function (page) { if (!lang.isNumber(page)) { page = this.getCurrentPage(); } var perPage = this.get('rowsPerPage'), records = this.get('totalRecords'), start, end; if (!page || !perPage) { return null; } start = (page - ...
[ "function", "(", "page", ")", "{", "if", "(", "!", "lang", ".", "isNumber", "(", "page", ")", ")", "{", "page", "=", "this", ".", "getCurrentPage", "(", ")", ";", "}", "var", "perPage", "=", "this", ".", "get", "(", "'rowsPerPage'", ")", ",", "re...
Get the start and end record indexes of the specified page. @method getPageRecords @param page {number} (optional) The page (current page if not specified) @return {Array} [start_index, end_index]
[ "Get", "the", "start", "and", "end", "record", "indexes", "of", "the", "specified", "page", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L817-L841
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (page,silent) { if (this.hasPage(page) && page !== this.getCurrentPage()) { if (this.get('updateOnChange') || silent) { this.set('recordOffset', (page - 1) * this.get('rowsPerPage')); } else { this.fireEvent('changeRequest',this.getState({'page':p...
javascript
function (page,silent) { if (this.hasPage(page) && page !== this.getCurrentPage()) { if (this.get('updateOnChange') || silent) { this.set('recordOffset', (page - 1) * this.get('rowsPerPage')); } else { this.fireEvent('changeRequest',this.getState({'page':p...
[ "function", "(", "page", ",", "silent", ")", "{", "if", "(", "this", ".", "hasPage", "(", "page", ")", "&&", "page", "!==", "this", ".", "getCurrentPage", "(", ")", ")", "{", "if", "(", "this", ".", "get", "(", "'updateOnChange'", ")", "||", "silen...
Set the current page to the provided page number if possible. @method setPage @param newPage {number} the new page number @param silent {boolean} whether to forcibly avoid firing the changeRequest event
[ "Set", "the", "current", "page", "to", "the", "provided", "page", "number", "if", "possible", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L850-L858
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (rpp,silent) { if (Paginator.isNumeric(rpp) && +rpp > 0 && +rpp !== this.get('rowsPerPage')) { if (this.get('updateOnChange') || silent) { this.set('rowsPerPage',rpp); } else { this.fireEvent('changeRequest', this.g...
javascript
function (rpp,silent) { if (Paginator.isNumeric(rpp) && +rpp > 0 && +rpp !== this.get('rowsPerPage')) { if (this.get('updateOnChange') || silent) { this.set('rowsPerPage',rpp); } else { this.fireEvent('changeRequest', this.g...
[ "function", "(", "rpp", ",", "silent", ")", "{", "if", "(", "Paginator", ".", "isNumeric", "(", "rpp", ")", "&&", "+", "rpp", ">", "0", "&&", "+", "rpp", "!==", "this", ".", "get", "(", "'rowsPerPage'", ")", ")", "{", "if", "(", "this", ".", "g...
Set the number of rows per page. @method setRowsPerPage @param rpp {number} the new number of rows per page @param silent {boolean} whether to forcibly avoid firing the changeRequest event
[ "Set", "the", "number", "of", "rows", "per", "page", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L876-L886
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (total,silent) { if (Paginator.isNumeric(total) && +total >= 0 && +total !== this.get('totalRecords')) { if (this.get('updateOnChange') || silent) { this.set('totalRecords',total); } else { this.fireEvent('changeRequest', ...
javascript
function (total,silent) { if (Paginator.isNumeric(total) && +total >= 0 && +total !== this.get('totalRecords')) { if (this.get('updateOnChange') || silent) { this.set('totalRecords',total); } else { this.fireEvent('changeRequest', ...
[ "function", "(", "total", ",", "silent", ")", "{", "if", "(", "Paginator", ".", "isNumeric", "(", "total", ")", "&&", "+", "total", ">=", "0", "&&", "+", "total", "!==", "this", ".", "get", "(", "'totalRecords'", ")", ")", "{", "if", "(", "this", ...
Set the total number of records. @method setTotalRecords @param total {number} the new total number of records @param silent {boolean} whether to forcibly avoid firing the changeRequest event
[ "Set", "the", "total", "number", "of", "records", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L903-L913
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (offset,silent) { if (Paginator.isNumeric(offset) && +offset >= 0 && +offset !== this.get('recordOffset')) { if (this.get('updateOnChange') || silent) { this.set('recordOffset',offset); } else { this.fireEvent('changeRequest', ...
javascript
function (offset,silent) { if (Paginator.isNumeric(offset) && +offset >= 0 && +offset !== this.get('recordOffset')) { if (this.get('updateOnChange') || silent) { this.set('recordOffset',offset); } else { this.fireEvent('changeRequest', ...
[ "function", "(", "offset", ",", "silent", ")", "{", "if", "(", "Paginator", ".", "isNumeric", "(", "offset", ")", "&&", "+", "offset", ">=", "0", "&&", "+", "offset", "!==", "this", ".", "get", "(", "'recordOffset'", ")", ")", "{", "if", "(", "this...
Move the record offset to a new starting index. This will likely cause the calculated current page to change. You should probably use setPage. @method setStartIndex @param offset {number} the new record offset @param silent {boolean} whether to forcibly avoid firing the changeRequest event
[ "Move", "the", "record", "offset", "to", "a", "new", "starting", "index", ".", "This", "will", "likely", "cause", "the", "calculated", "current", "page", "to", "change", ".", "You", "should", "probably", "use", "setPage", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L931-L941
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (state) { if (isObject(state)) { // get flux state based on current state with before state as well this._state = this.getState({}); // use just the state props from the input obj state = { page : state.page, rowsP...
javascript
function (state) { if (isObject(state)) { // get flux state based on current state with before state as well this._state = this.getState({}); // use just the state props from the input obj state = { page : state.page, rowsP...
[ "function", "(", "state", ")", "{", "if", "(", "isObject", "(", "state", ")", ")", "{", "// get flux state based on current state with before state as well", "this", ".", "_state", "=", "this", ".", "getState", "(", "{", "}", ")", ";", "// use just the state props...
Convenience method to facilitate setting state attributes rowsPerPage, totalRecords, recordOffset in batch. Also supports calculating recordOffset from state.page if state.recordOffset is not provided. Fires only a single pageChange event, if appropriate. This will not fire a changeRequest event. @method setState @par...
[ "Convenience", "method", "to", "facilitate", "setting", "state", "attributes", "rowsPerPage", "totalRecords", "recordOffset", "in", "batch", ".", "Also", "supports", "calculating", "recordOffset", "from", "state", ".", "page", "if", "state", ".", "recordOffset", "is...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1048-L1085
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (id_base) { this.span = document.createElement('span'); this.span.id = id_base + '-page-report'; this.span.className = this.paginator.get('pageReportClass'); this.update(); return this.span; }
javascript
function (id_base) { this.span = document.createElement('span'); this.span.id = id_base + '-page-report'; this.span.className = this.paginator.get('pageReportClass'); this.update(); return this.span; }
[ "function", "(", "id_base", ")", "{", "this", ".", "span", "=", "document", ".", "createElement", "(", "'span'", ")", ";", "this", ".", "span", ".", "id", "=", "id_base", "+", "'-page-report'", ";", "this", ".", "span", ".", "className", "=", "this", ...
Generate the span containing info formatted per the pageReportTemplate attribute. @method render @param id_base {string} used to create unique ids for generated nodes @return {HTMLElement}
[ "Generate", "the", "span", "containing", "info", "formatted", "per", "the", "pageReportTemplate", "attribute", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1220-L1227
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e && e.prevValue === e.newValue) { return; } this.span.innerHTML = Paginator.ui.CurrentPageReport.sprintf( this.paginator.get('pageReportTemplate'), this.paginator.get('pageReportValueGenerator')(this.paginator)); }
javascript
function (e) { if (e && e.prevValue === e.newValue) { return; } this.span.innerHTML = Paginator.ui.CurrentPageReport.sprintf( this.paginator.get('pageReportTemplate'), this.paginator.get('pageReportValueGenerator')(this.paginator)); }
[ "function", "(", "e", ")", "{", "if", "(", "e", "&&", "e", ".", "prevValue", "===", "e", ".", "newValue", ")", "{", "return", ";", "}", "this", ".", "span", ".", "innerHTML", "=", "Paginator", ".", "ui", ".", "CurrentPageReport", ".", "sprintf", "(...
Regenerate the content of the span if appropriate. Calls CurrentPageReport.sprintf with the value of the pageReportTemplate attribute and the value map returned from pageReportValueGenerator function. @method update @param e {CustomEvent} The calling change event
[ "Regenerate", "the", "content", "of", "the", "span", "if", "appropriate", ".", "Calls", "CurrentPageReport", ".", "sprintf", "with", "the", "value", "of", "the", "pageReportTemplate", "attribute", "and", "the", "value", "map", "returned", "from", "pageReportValueG...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1237-L1245
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (id_base) { var p = this.paginator; // Set up container this.container = document.createElement('span'); this.container.id = id_base + '-pages'; this.container.className = p.get('pageLinksContainerClass'); YAHOO.util.Event.on(this.container,'click',this.o...
javascript
function (id_base) { var p = this.paginator; // Set up container this.container = document.createElement('span'); this.container.id = id_base + '-pages'; this.container.className = p.get('pageLinksContainerClass'); YAHOO.util.Event.on(this.container,'click',this.o...
[ "function", "(", "id_base", ")", "{", "var", "p", "=", "this", ".", "paginator", ";", "// Set up container", "this", ".", "container", "=", "document", ".", "createElement", "(", "'span'", ")", ";", "this", ".", "container", ".", "id", "=", "id_base", "+...
Generate the nodes and return the container node containing page links appropriate to the current pagination state. @method render @param id_base {string} used to create unique ids for generated nodes @return {HTMLElement}
[ "Generate", "the", "nodes", "and", "return", "the", "container", "node", "containing", "page", "links", "appropriate", "to", "the", "current", "pagination", "state", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1422-L1435
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e && e.prevValue === e.newValue) { return; } var p = this.paginator, currentPage = p.getCurrentPage(); // Replace content if there's been a change if (this.current !== currentPage || !currentPage || e.rebuild) { v...
javascript
function (e) { if (e && e.prevValue === e.newValue) { return; } var p = this.paginator, currentPage = p.getCurrentPage(); // Replace content if there's been a change if (this.current !== currentPage || !currentPage || e.rebuild) { v...
[ "function", "(", "e", ")", "{", "if", "(", "e", "&&", "e", ".", "prevValue", "===", "e", ".", "newValue", ")", "{", "return", ";", "}", "var", "p", "=", "this", ".", "paginator", ",", "currentPage", "=", "p", ".", "getCurrentPage", "(", ")", ";",...
Update the links if appropriate @method update @param e {CustomEvent} The calling change event
[ "Update", "the", "links", "if", "appropriate" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1442-L1478
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function () { YAHOO.util.Event.purgeElement(this.container,true); this.container.parentNode.removeChild(this.container); this.container = null; }
javascript
function () { YAHOO.util.Event.purgeElement(this.container,true); this.container.parentNode.removeChild(this.container); this.container = null; }
[ "function", "(", ")", "{", "YAHOO", ".", "util", ".", "Event", ".", "purgeElement", "(", "this", ".", "container", ",", "true", ")", ";", "this", ".", "container", ".", "parentNode", ".", "removeChild", "(", "this", ".", "container", ")", ";", "this", ...
Removes the page links container node and clears event listeners @method destroy @private
[ "Removes", "the", "page", "links", "container", "node", "and", "clears", "event", "listeners" ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1495-L1499
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { var t = YAHOO.util.Event.getTarget(e); if (t && YAHOO.util.Dom.hasClass(t, this.paginator.get('pageLinkClass'))) { YAHOO.util.Event.stopEvent(e); this.paginator.setPage(parseInt(t.getAttribute('page'),10)); } }
javascript
function (e) { var t = YAHOO.util.Event.getTarget(e); if (t && YAHOO.util.Dom.hasClass(t, this.paginator.get('pageLinkClass'))) { YAHOO.util.Event.stopEvent(e); this.paginator.setPage(parseInt(t.getAttribute('page'),10)); } }
[ "function", "(", "e", ")", "{", "var", "t", "=", "YAHOO", ".", "util", ".", "Event", ".", "getTarget", "(", "e", ")", ";", "if", "(", "t", "&&", "YAHOO", ".", "util", ".", "Dom", ".", "hasClass", "(", "t", ",", "this", ".", "paginator", ".", ...
Listener for the container's onclick event. Looks for qualifying link clicks, and pulls the page number from the link's page attribute. Sends link's page attribute to the Paginator's setPage method. @method onClick @param e {DOMEvent} The click event
[ "Listener", "for", "the", "container", "s", "onclick", "event", ".", "Looks", "for", "qualifying", "link", "clicks", "and", "pulls", "the", "page", "number", "from", "the", "link", "s", "page", "attribute", ".", "Sends", "link", "s", "page", "attribute", "...
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1508-L1517
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e && e.prevValue === e.newValue) { return; } var par = this.current ? this.current.parentNode : null, after = this.link; if (par) { switch (this.paginator.getTotalPages()) { case Paginator.VALUE_UNLIMITED : ...
javascript
function (e) { if (e && e.prevValue === e.newValue) { return; } var par = this.current ? this.current.parentNode : null, after = this.link; if (par) { switch (this.paginator.getTotalPages()) { case Paginator.VALUE_UNLIMITED : ...
[ "function", "(", "e", ")", "{", "if", "(", "e", "&&", "e", ".", "prevValue", "===", "e", ".", "newValue", ")", "{", "return", ";", "}", "var", "par", "=", "this", ".", "current", "?", "this", ".", "current", ".", "parentNode", ":", "null", ",", ...
Swap the link, span, and na nodes if appropriate. @method update @param e {CustomEvent} The calling change event (ignored)
[ "Swap", "the", "link", "span", "and", "na", "nodes", "if", "appropriate", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1824-L1845
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (id_base) { var p = this.paginator, c = p.get('nextPageLinkClass'), label = p.get('nextPageLinkLabel'), last = p.getTotalPages(); this.link = document.createElement('a'); this.span = document.createElement('span'); this.link...
javascript
function (id_base) { var p = this.paginator, c = p.get('nextPageLinkClass'), label = p.get('nextPageLinkLabel'), last = p.getTotalPages(); this.link = document.createElement('a'); this.span = document.createElement('span'); this.link...
[ "function", "(", "id_base", ")", "{", "var", "p", "=", "this", ".", "paginator", ",", "c", "=", "p", ".", "get", "(", "'nextPageLinkClass'", ")", ",", "label", "=", "p", ".", "get", "(", "'nextPageLinkLabel'", ")", ",", "last", "=", "p", ".", "getT...
Generate the nodes and return the appropriate node given the current pagination state. @method render @param id_base {string} used to create unique ids for generated nodes @return {HTMLElement}
[ "Generate", "the", "nodes", "and", "return", "the", "appropriate", "node", "given", "the", "current", "pagination", "state", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1962-L1984
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e && e.prevValue === e.newValue) { return; } var last = this.paginator.getTotalPages(), par = this.current ? this.current.parentNode : null; if (this.paginator.getCurrentPage() !== last) { if (par && this.current === this.span) { ...
javascript
function (e) { if (e && e.prevValue === e.newValue) { return; } var last = this.paginator.getTotalPages(), par = this.current ? this.current.parentNode : null; if (this.paginator.getCurrentPage() !== last) { if (par && this.current === this.span) { ...
[ "function", "(", "e", ")", "{", "if", "(", "e", "&&", "e", ".", "prevValue", "===", "e", ".", "newValue", ")", "{", "return", ";", "}", "var", "last", "=", "this", ".", "paginator", ".", "getTotalPages", "(", ")", ",", "par", "=", "this", ".", ...
Swap the link and span nodes if appropriate. @method update @param e {CustomEvent} The calling change event
[ "Swap", "the", "link", "and", "span", "nodes", "if", "appropriate", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L1991-L2010
train
neyric/webhookit
public/javascripts/yui/paginator/paginator-debug.js
function (e) { if (e && e.prevValue === e.newValue) { return; } var rpp = this.paginator.get('rowsPerPage')+'', options = this.select.options, i,len; for (i = 0, len = options.length; i < len; ++i) { if (options[i].value === rpp) { ...
javascript
function (e) { if (e && e.prevValue === e.newValue) { return; } var rpp = this.paginator.get('rowsPerPage')+'', options = this.select.options, i,len; for (i = 0, len = options.length; i < len; ++i) { if (options[i].value === rpp) { ...
[ "function", "(", "e", ")", "{", "if", "(", "e", "&&", "e", ".", "prevValue", "===", "e", ".", "newValue", ")", "{", "return", ";", "}", "var", "rpp", "=", "this", ".", "paginator", ".", "get", "(", "'rowsPerPage'", ")", "+", "''", ",", "options",...
Select the appropriate option if changed. @method update @param e {CustomEvent} The calling change event
[ "Select", "the", "appropriate", "option", "if", "changed", "." ]
13abf6f072e23d536432235da78fd3e4e5d742b6
https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/paginator/paginator-debug.js#L2334-L2349
train