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/WireIt/build/wireit-inputex-editor-grouping.js | function() {
// Awful Hack to work in IE6 and below (the checkbox doesn't fire the change event)
// It seems IE 8 removed this behavior from IE7 so it only works with IE 7 ??
/*if( YAHOO.env.ua.ie && parseInt(YAHOO.env.ua.ie,10) != 7 ) {
Event.addListener(this.el, "click", function() { this.fire... | javascript | function() {
// Awful Hack to work in IE6 and below (the checkbox doesn't fire the change event)
// It seems IE 8 removed this behavior from IE7 so it only works with IE 7 ??
/*if( YAHOO.env.ua.ie && parseInt(YAHOO.env.ua.ie,10) != 7 ) {
Event.addListener(this.el, "click", function() { this.fire... | [
"function",
"(",
")",
"{",
"// Awful Hack to work in IE6 and below (the checkbox doesn't fire the change event)",
"// It seems IE 8 removed this behavior from IE7 so it only works with IE 7 ??",
"/*if( YAHOO.env.ua.ie && parseInt(YAHOO.env.ua.ie,10) != 7 ) {\n\t Event.addListener(this.el, \"click\"... | Clear the previous events and listen for the "change" event | [
"Clear",
"the",
"previous",
"events",
"and",
"listen",
"for",
"the",
"change",
"event"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7120-L7135 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(value, sendUpdatedEvt) {
if (value===this.checkedValue || (typeof(value) == 'string' && typeof(this.checkedValue) == 'boolean' &&
value === String(this.checkedValue))) {
this.hiddenEl.value = this.checkedValue;
// check checkbox (all browsers)
this.el.checked = true;
// hacks for IE6,... | javascript | function(value, sendUpdatedEvt) {
if (value===this.checkedValue || (typeof(value) == 'string' && typeof(this.checkedValue) == 'boolean' &&
value === String(this.checkedValue))) {
this.hiddenEl.value = this.checkedValue;
// check checkbox (all browsers)
this.el.checked = true;
// hacks for IE6,... | [
"function",
"(",
"value",
",",
"sendUpdatedEvt",
")",
"{",
"if",
"(",
"value",
"===",
"this",
".",
"checkedValue",
"||",
"(",
"typeof",
"(",
"value",
")",
"==",
"'string'",
"&&",
"typeof",
"(",
"this",
".",
"checkedValue",
")",
"==",
"'boolean'",
"&&",
... | Set the value of the checkedbox
@param {Any} value The value schould be one of [checkedValue,uncheckedValue]
@param {boolean} [sendUpdatedEvt] (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event) | [
"Set",
"the",
"value",
"of",
"the",
"checkedbox"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7160-L7195 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(text) {
var sel, startPos, endPos;
//IE support
if (document.selection) {
this.el.focus();
sel = document.selection.createRange();
sel.text = text;
}
//Mozilla/Firefox/Netscape 7+ support
else if (this.el.selectionStart || this.el.selectionStart == '0') {
startPos = this.el.select... | javascript | function(text) {
var sel, startPos, endPos;
//IE support
if (document.selection) {
this.el.focus();
sel = document.selection.createRange();
sel.text = text;
}
//Mozilla/Firefox/Netscape 7+ support
else if (this.el.selectionStart || this.el.selectionStart == '0') {
startPos = this.el.select... | [
"function",
"(",
"text",
")",
"{",
"var",
"sel",
",",
"startPos",
",",
"endPos",
";",
"//IE support",
"if",
"(",
"document",
".",
"selection",
")",
"{",
"this",
".",
"el",
".",
"focus",
"(",
")",
";",
"sel",
"=",
"document",
".",
"selection",
".",
... | Insert text at the current cursor position
@param {String} text Text to insert | [
"Insert",
"text",
"at",
"the",
"current",
"cursor",
"position"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7311-L7330 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
this.editorContainer = inputEx.cn('div', {className: CSS_PREFIX+'editor'}, {display: 'none'});
// Render the editor field
this.editorField = inputEx(this.options.editorField,this);
var editorFieldEl = this.editorField.getEl();
this.editorContainer.appendCh... | javascript | function() {
this.editorContainer = inputEx.cn('div', {className: CSS_PREFIX+'editor'}, {display: 'none'});
// Render the editor field
this.editorField = inputEx(this.options.editorField,this);
var editorFieldEl = this.editorField.getEl();
this.editorContainer.appendCh... | [
"function",
"(",
")",
"{",
"this",
".",
"editorContainer",
"=",
"inputEx",
".",
"cn",
"(",
"'div'",
",",
"{",
"className",
":",
"CSS_PREFIX",
"+",
"'editor'",
"}",
",",
"{",
"display",
":",
"'none'",
"}",
")",
";",
"// Render the editor field",
"this",
"... | Render the editor | [
"Render",
"the",
"editor"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7390-L7422 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(e) {
if(this.colorAnim) {
this.colorAnim.stop(true);
}
inputEx.sn(this.formattedContainer, null, {backgroundColor: this.options.animColors.from });
} | javascript | function(e) {
if(this.colorAnim) {
this.colorAnim.stop(true);
}
inputEx.sn(this.formattedContainer, null, {backgroundColor: this.options.animColors.from });
} | [
"function",
"(",
"e",
")",
"{",
"if",
"(",
"this",
".",
"colorAnim",
")",
"{",
"this",
".",
"colorAnim",
".",
"stop",
"(",
"true",
")",
";",
"}",
"inputEx",
".",
"sn",
"(",
"this",
".",
"formattedContainer",
",",
"null",
",",
"{",
"backgroundColor",
... | Set the color when hovering the field
@param {Event} e The original mouseover event | [
"Set",
"the",
"color",
"when",
"hovering",
"the",
"field"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7428-L7433 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(e) {
// Start animation
if(this.colorAnim) {
this.colorAnim.stop(true);
}
this.colorAnim = new YAHOO.util.ColorAnim(this.formattedContainer, {backgroundColor: this.options.animColors}, 1);
this.colorAnim.onComplete.subscribe(function() { Dom.setStyle(this.formattedContain... | javascript | function(e) {
// Start animation
if(this.colorAnim) {
this.colorAnim.stop(true);
}
this.colorAnim = new YAHOO.util.ColorAnim(this.formattedContainer, {backgroundColor: this.options.animColors}, 1);
this.colorAnim.onComplete.subscribe(function() { Dom.setStyle(this.formattedContain... | [
"function",
"(",
"e",
")",
"{",
"// Start animation",
"if",
"(",
"this",
".",
"colorAnim",
")",
"{",
"this",
".",
"colorAnim",
".",
"stop",
"(",
"true",
")",
";",
"}",
"this",
".",
"colorAnim",
"=",
"new",
"YAHOO",
".",
"util",
".",
"ColorAnim",
"(",... | Start the color animation when hovering the field
@param {Event} e The original mouseout event | [
"Start",
"the",
"color",
"animation",
"when",
"hovering",
"the",
"field"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7439-L7447 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
this.formattedContainer = inputEx.cn('div', {className: 'inputEx-InPlaceEdit-visu'});
if( lang.isFunction(this.options.formatDom) ) {
this.formattedContainer.appendChild( this.options.formatDom(this.options.value) );
}
else if( lang.isFunction(this.options.formatValu... | javascript | function() {
this.formattedContainer = inputEx.cn('div', {className: 'inputEx-InPlaceEdit-visu'});
if( lang.isFunction(this.options.formatDom) ) {
this.formattedContainer.appendChild( this.options.formatDom(this.options.value) );
}
else if( lang.isFunction(this.options.formatValu... | [
"function",
"(",
")",
"{",
"this",
".",
"formattedContainer",
"=",
"inputEx",
".",
"cn",
"(",
"'div'",
",",
"{",
"className",
":",
"'inputEx-InPlaceEdit-visu'",
"}",
")",
";",
"if",
"(",
"lang",
".",
"isFunction",
"(",
"this",
".",
"options",
".",
"forma... | Create the div that will contain the visualization of the value | [
"Create",
"the",
"div",
"that",
"will",
"contain",
"the",
"visualization",
"of",
"the",
"value"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7452-L7467 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
Event.addListener(this.formattedContainer, "click", this.openEditor, this, true);
// For color animation (if specified)
if (this.options.animColors) {
Event.addListener(this.formattedContainer, 'mouseover', this.onVisuMouseOver, this, true);
Event.addListe... | javascript | function() {
Event.addListener(this.formattedContainer, "click", this.openEditor, this, true);
// For color animation (if specified)
if (this.options.animColors) {
Event.addListener(this.formattedContainer, 'mouseover', this.onVisuMouseOver, this, true);
Event.addListe... | [
"function",
"(",
")",
"{",
"Event",
".",
"addListener",
"(",
"this",
".",
"formattedContainer",
",",
"\"click\"",
",",
"this",
".",
"openEditor",
",",
"this",
",",
"true",
")",
";",
"// For color animation (if specified)",
"if",
"(",
"this",
".",
"options",
... | Adds the events for the editor and color animations | [
"Adds",
"the",
"events",
"for",
"the",
"editor",
"and",
"color",
"animations"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7472-L7486 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
var value = this.getValue();
this.editorContainer.style.display = '';
this.formattedContainer.style.display = 'none';
if(!lang.isUndefined(value)) {
this.editorField.setValue(value);
}
// Set focus in the element !
this.editorField.focus();
... | javascript | function() {
var value = this.getValue();
this.editorContainer.style.display = '';
this.formattedContainer.style.display = 'none';
if(!lang.isUndefined(value)) {
this.editorField.setValue(value);
}
// Set focus in the element !
this.editorField.focus();
... | [
"function",
"(",
")",
"{",
"var",
"value",
"=",
"this",
".",
"getValue",
"(",
")",
";",
"this",
".",
"editorContainer",
".",
"style",
".",
"display",
"=",
"''",
";",
"this",
".",
"formattedContainer",
".",
"style",
".",
"display",
"=",
"'none'",
";",
... | Display the editor | [
"Display",
"the",
"editor"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7544-L7561 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(value, sendUpdatedEvt) {
// Store the value
this.value = value;
if(lang.isUndefined(value) || value == "") {
inputEx.renderVisu(this.options.visu, inputEx.messages.emptyInPlaceEdit, this.formattedContainer);
}
else {
inputEx.renderVisu(this.options.visu, thi... | javascript | function(value, sendUpdatedEvt) {
// Store the value
this.value = value;
if(lang.isUndefined(value) || value == "") {
inputEx.renderVisu(this.options.visu, inputEx.messages.emptyInPlaceEdit, this.formattedContainer);
}
else {
inputEx.renderVisu(this.options.visu, thi... | [
"function",
"(",
"value",
",",
"sendUpdatedEvt",
")",
"{",
"// Store the value",
"this",
".",
"value",
"=",
"value",
";",
"if",
"(",
"lang",
".",
"isUndefined",
"(",
"value",
")",
"||",
"value",
"==",
"\"\"",
")",
"{",
"inputEx",
".",
"renderVisu",
"(",
... | Set the value and update the display
@param {Any} value The value to set
@param {boolean} [sendUpdatedEvt] (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event) | [
"Set",
"the",
"value",
"and",
"update",
"the",
"display"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7577-L7594 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
try {
// Save the previous value:
var previousVal = null;
// Close a previously created group
if(this.group) {
previousVal = this.group.getValue();
this.group.close();
this.group.destroy();
this.gr... | javascript | function() {
try {
// Save the previous value:
var previousVal = null;
// Close a previously created group
if(this.group) {
previousVal = this.group.getValue();
this.group.close();
this.group.destroy();
this.gr... | [
"function",
"(",
")",
"{",
"try",
"{",
"// Save the previous value:",
"var",
"previousVal",
"=",
"null",
";",
"// Close a previously created group",
"if",
"(",
"this",
".",
"group",
")",
"{",
"previousVal",
"=",
"this",
".",
"group",
".",
"getValue",
"(",
")",... | Regenerate the property form | [
"Regenerate",
"the",
"property",
"form"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7689-L7730 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
if (this.propertyPanel.style.display == 'none') {
this.propertyPanel.style.display = '';
Dom.addClass(this.button, "opened");
} else {
this.propertyPanel.style.display = 'none';
Dom.removeClass(this.button, "opened");
}
} | javascript | function() {
if (this.propertyPanel.style.display == 'none') {
this.propertyPanel.style.display = '';
Dom.addClass(this.button, "opened");
} else {
this.propertyPanel.style.display = 'none';
Dom.removeClass(this.button, "opened");
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"propertyPanel",
".",
"style",
".",
"display",
"==",
"'none'",
")",
"{",
"this",
".",
"propertyPanel",
".",
"style",
".",
"display",
"=",
"''",
";",
"Dom",
".",
"addClass",
"(",
"this",
".",
"button"... | Toggle the property panel | [
"Toggle",
"the",
"property",
"panel"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7735-L7743 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
try {
// Close previous field
if(this.fieldValue) {
this.fieldValue.close();
this.fieldValue.destroy();
delete this.fieldValue;
this.fieldValueWrapper.innerHTML = '';
}
// Re-build the fieldValue
var f... | javascript | function() {
try {
// Close previous field
if(this.fieldValue) {
this.fieldValue.close();
this.fieldValue.destroy();
delete this.fieldValue;
this.fieldValueWrapper.innerHTML = '';
}
// Re-build the fieldValue
var f... | [
"function",
"(",
")",
"{",
"try",
"{",
"// Close previous field",
"if",
"(",
"this",
".",
"fieldValue",
")",
"{",
"this",
".",
"fieldValue",
".",
"close",
"(",
")",
";",
"this",
".",
"fieldValue",
".",
"destroy",
"(",
")",
";",
"delete",
"this",
".",
... | Update the fieldValue | [
"Update",
"the",
"fieldValue"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7760-L7784 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(value, sendUpdatedEvt) {
// Set type in property panel
this.typeSelect.setValue(value.type, false);
// Rebuild the panel propertues
this.rebuildGroupOptions();
// Set the parameters value
// Retro-compatibility with deprecated inputParams Object
i... | javascript | function(value, sendUpdatedEvt) {
// Set type in property panel
this.typeSelect.setValue(value.type, false);
// Rebuild the panel propertues
this.rebuildGroupOptions();
// Set the parameters value
// Retro-compatibility with deprecated inputParams Object
i... | [
"function",
"(",
"value",
",",
"sendUpdatedEvt",
")",
"{",
"// Set type in property panel",
"this",
".",
"typeSelect",
".",
"setValue",
"(",
"value",
".",
"type",
",",
"false",
")",
";",
"// Rebuild the panel propertues",
"this",
".",
"rebuildGroupOptions",
"(",
"... | Set the value of the label, typeProperties and group
@param {Object} value Type object configuration
@param {boolean} [sendUpdatedEvt] (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event) | [
"Set",
"the",
"value",
"of",
"the",
"label",
"typeProperties",
"and",
"group"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7792-L7829 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
var getDefaultValueForField = function (classObj, paramName) {
var i, length = classObj.groupOptions.length, f;
for(i = 0 ; i < length ; i++) {
f = classObj.groupOptions[i];
// Retro-compatibility with deprecated inputParams Obje... | javascript | function() {
var getDefaultValueForField = function (classObj, paramName) {
var i, length = classObj.groupOptions.length, f;
for(i = 0 ; i < length ; i++) {
f = classObj.groupOptions[i];
// Retro-compatibility with deprecated inputParams Obje... | [
"function",
"(",
")",
"{",
"var",
"getDefaultValueForField",
"=",
"function",
"(",
"classObj",
",",
"paramName",
")",
"{",
"var",
"i",
",",
"length",
"=",
"classObj",
".",
"groupOptions",
".",
"length",
",",
"f",
";",
"for",
"(",
"i",
"=",
"0",
";",
... | Return the config for a entry in an Group
@return {Object} Type object configuration | [
"Return",
"the",
"config",
"for",
"a",
"entry",
"in",
"an",
"Group"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7835-L7878 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
// Render the help panel
this.renderHelpPanel();
/**
* @property layout
* @type {YAHOO.widget.Layout}
*/
this.layout = new widget.Layout(this.el, this.options.layoutOptions);
this.layout.render();
// Right accordion
this.renderPropertiesAccordion();
... | javascript | function() {
// Render the help panel
this.renderHelpPanel();
/**
* @property layout
* @type {YAHOO.widget.Layout}
*/
this.layout = new widget.Layout(this.el, this.options.layoutOptions);
this.layout.render();
// Right accordion
this.renderPropertiesAccordion();
... | [
"function",
"(",
")",
"{",
"// Render the help panel",
"this",
".",
"renderHelpPanel",
"(",
")",
";",
"/**\n\t * @property layout\n\t * @type {YAHOO.widget.Layout}\n\t */",
"this",
".",
"layout",
"=",
"new",
"widget",
".",
"Layout",
"(",
"this",
".",
"el",
... | Render the layout & panels | [
"Render",
"the",
"layout",
"&",
"panels"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L7975-L7999 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
/**
* @property helpPanel
* @type {YAHOO.widget.Panel}
*/
this.helpPanel = new widget.Panel('helpPanel', {
fixedcenter: true,
draggable: true,
visible: false,
modal: true
});
this.helpPanel.render();
} | javascript | function() {
/**
* @property helpPanel
* @type {YAHOO.widget.Panel}
*/
this.helpPanel = new widget.Panel('helpPanel', {
fixedcenter: true,
draggable: true,
visible: false,
modal: true
});
this.helpPanel.render();
} | [
"function",
"(",
")",
"{",
"/**\n\t * @property helpPanel\n\t * @type {YAHOO.widget.Panel}\n\t */",
"this",
".",
"helpPanel",
"=",
"new",
"widget",
".",
"Panel",
"(",
"'helpPanel'",
",",
"{",
"fixedcenter",
":",
"true",
",",
"draggable",
":",
"true",
",",
... | Render the help dialog | [
"Render",
"the",
"help",
"dialog"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8004-L8016 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
/**
* @property alertPanel
* @type {YAHOO.widget.Panel}
*/
this.alertPanel = new widget.Panel('WiringEditor-alertPanel', {
fixedcenter: true,
draggable: true,
width: '500px',
visible: false,
modal: true
});
this.alertPanel.setH... | javascript | function() {
/**
* @property alertPanel
* @type {YAHOO.widget.Panel}
*/
this.alertPanel = new widget.Panel('WiringEditor-alertPanel', {
fixedcenter: true,
draggable: true,
width: '500px',
visible: false,
modal: true
});
this.alertPanel.setH... | [
"function",
"(",
")",
"{",
"/**\n * @property alertPanel\n * @type {YAHOO.widget.Panel}\n */",
"this",
".",
"alertPanel",
"=",
"new",
"widget",
".",
"Panel",
"(",
"'WiringEditor-alertPanel'",
",",
"{",
"fixedcenter",
":",
"true",
",",
"draggable",
":",
"true... | Render the alert panel | [
"Render",
"the",
"alert",
"panel"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8021-L8040 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
this.propertiesForm = new inputEx.Group({
parentEl: YAHOO.util.Dom.get('propertiesForm'),
fields: this.options.propertiesFields
});
this.propertiesForm.updatedEvt.subscribe(function() {
this.markUnsaved();
}, this, true);
} | javascript | function() {
this.propertiesForm = new inputEx.Group({
parentEl: YAHOO.util.Dom.get('propertiesForm'),
fields: this.options.propertiesFields
});
this.propertiesForm.updatedEvt.subscribe(function() {
this.markUnsaved();
}, this, true);
} | [
"function",
"(",
")",
"{",
"this",
".",
"propertiesForm",
"=",
"new",
"inputEx",
".",
"Group",
"(",
"{",
"parentEl",
":",
"YAHOO",
".",
"util",
".",
"Dom",
".",
"get",
"(",
"'propertiesForm'",
")",
",",
"fields",
":",
"this",
".",
"options",
".",
"pr... | Render the properties form
@method renderPropertiesForm | [
"Render",
"the",
"properties",
"form"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8117-L8126 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(e) {
WireIt.ModuleProxy.superclass.startDrag.call(this,e);
var del = this.getDragEl(),
lel = this.getEl();
del.innerHTML = lel.innerHTML;
del.className = lel.className;
} | javascript | function(e) {
WireIt.ModuleProxy.superclass.startDrag.call(this,e);
var del = this.getDragEl(),
lel = this.getEl();
del.innerHTML = lel.innerHTML;
del.className = lel.className;
} | [
"function",
"(",
"e",
")",
"{",
"WireIt",
".",
"ModuleProxy",
".",
"superclass",
".",
"startDrag",
".",
"call",
"(",
"this",
",",
"e",
")",
";",
"var",
"del",
"=",
"this",
".",
"getDragEl",
"(",
")",
",",
"lel",
"=",
"this",
".",
"getEl",
"(",
")... | copy the html and apply selected classes
@method startDrag | [
"copy",
"the",
"html",
"and",
"apply",
"selected",
"classes"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8180-L8186 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(e, ddTargets) {
// The layer is the only target :
var layerTarget = ddTargets[0],
layer = ddTargets[0]._layer,
del = this.getDragEl(),
pos = Dom.getXY(del),
layerPos = Dom.getXY(layer.el);
this._WiringEditor.addModule( this._module ,[pos[0]-layerPos[0]+layer.el.scrollLeft, po... | javascript | function(e, ddTargets) {
// The layer is the only target :
var layerTarget = ddTargets[0],
layer = ddTargets[0]._layer,
del = this.getDragEl(),
pos = Dom.getXY(del),
layerPos = Dom.getXY(layer.el);
this._WiringEditor.addModule( this._module ,[pos[0]-layerPos[0]+layer.el.scrollLeft, po... | [
"function",
"(",
"e",
",",
"ddTargets",
")",
"{",
"// The layer is the only target :",
"var",
"layerTarget",
"=",
"ddTargets",
"[",
"0",
"]",
",",
"layer",
"=",
"ddTargets",
"[",
"0",
"]",
".",
"_layer",
",",
"del",
"=",
"this",
".",
"getDragEl",
"(",
")... | Add the module to the WiringEditor on drop on layer
@method onDragDrop | [
"Add",
"the",
"module",
"to",
"the",
"WiringEditor",
"on",
"drop",
"on",
"layer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8198-L8206 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
WireIt.WiringEditor.superclass.render.call(this);
/**
* @property layer
* @type {WireIt.Layer}
*/
this.layer = new WireIt.Layer(this.options.layerOptions);
this.layer.eventChanged.subscribe(this.onLayerChanged, this, true);
// Left Accordion
this.renderModulesAcc... | javascript | function() {
WireIt.WiringEditor.superclass.render.call(this);
/**
* @property layer
* @type {WireIt.Layer}
*/
this.layer = new WireIt.Layer(this.options.layerOptions);
this.layer.eventChanged.subscribe(this.onLayerChanged, this, true);
// Left Accordion
this.renderModulesAcc... | [
"function",
"(",
")",
"{",
"WireIt",
".",
"WiringEditor",
".",
"superclass",
".",
"render",
".",
"call",
"(",
"this",
")",
";",
"/**\n\t * @property layer\n\t * @type {WireIt.Layer}\n\t */",
"this",
".",
"layer",
"=",
"new",
"WireIt",
".",
"Layer",
"("... | Add the rendering of the layer | [
"Add",
"the",
"rendering",
"of",
"the",
"layer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8299-L8315 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
// Create the modules accordion DOM if not found
if(!Dom.get('modulesAccordionView')) {
Dom.get('left').appendChild( WireIt.cn('ul', {id: 'modulesAccordionView'}) );
var li = WireIt.cn('li');
li.appendChild(WireIt.cn('h2',null,null,"Main"));
var d = WireIt.cn('div');
d.appendChild( Wi... | javascript | function() {
// Create the modules accordion DOM if not found
if(!Dom.get('modulesAccordionView')) {
Dom.get('left').appendChild( WireIt.cn('ul', {id: 'modulesAccordionView'}) );
var li = WireIt.cn('li');
li.appendChild(WireIt.cn('h2',null,null,"Main"));
var d = WireIt.cn('div');
d.appendChild( Wi... | [
"function",
"(",
")",
"{",
"// Create the modules accordion DOM if not found",
"if",
"(",
"!",
"Dom",
".",
"get",
"(",
"'modulesAccordionView'",
")",
")",
"{",
"Dom",
".",
"get",
"(",
"'left'",
")",
".",
"appendChild",
"(",
"WireIt",
".",
"cn",
"(",
"'ul'",
... | render the modules accordion in the left panel | [
"render",
"the",
"modules",
"accordion",
"in",
"the",
"left",
"panel"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8320-L8339 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
var modules = this.modules;
for(var i = 0 ; i < modules.length ; i++) {
this.addModuleToList(modules[i]);
}
// Make the layer a drag drop target
if(!this.ddTarget) {
this.ddTarget = new YAHOO.util.DDTarget(this.layer.el, "module");
this.ddTarget._layer =... | javascript | function() {
var modules = this.modules;
for(var i = 0 ; i < modules.length ; i++) {
this.addModuleToList(modules[i]);
}
// Make the layer a drag drop target
if(!this.ddTarget) {
this.ddTarget = new YAHOO.util.DDTarget(this.layer.el, "module");
this.ddTarget._layer =... | [
"function",
"(",
")",
"{",
"var",
"modules",
"=",
"this",
".",
"modules",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"modules",
".",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"addModuleToList",
"(",
"modules",
"[",
"i",
"]",
"... | Build the left menu on the left
@method buildModulesList | [
"Build",
"the",
"left",
"menu",
"on",
"the",
"left"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8346-L8358 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(module) {
try {
var div = WireIt.cn('div', {className: "WiringEditor-module"});
if(module.description) {
div.title = module.description;
}
if(module.container.icon) {
div.appendChild( WireIt.cn('img',{src: module.container.icon}) );
}
div.appendChild( WireIt.cn('span'... | javascript | function(module) {
try {
var div = WireIt.cn('div', {className: "WiringEditor-module"});
if(module.description) {
div.title = module.description;
}
if(module.container.icon) {
div.appendChild( WireIt.cn('img',{src: module.container.icon}) );
}
div.appendChild( WireIt.cn('span'... | [
"function",
"(",
"module",
")",
"{",
"try",
"{",
"var",
"div",
"=",
"WireIt",
".",
"cn",
"(",
"'div'",
",",
"{",
"className",
":",
"\"WiringEditor-module\"",
"}",
")",
";",
"if",
"(",
"module",
".",
"description",
")",
"{",
"div",
".",
"title",
"=",
... | Add a module definition to the left list | [
"Add",
"a",
"module",
"definition",
"to",
"the",
"left",
"list"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8363-L8393 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(module, pos) {
try {
var containerConfig = module.container;
containerConfig.position = pos;
containerConfig.title = module.name;
var temp = this;
containerConfig.getGrouper = function() { return temp.getCurrentGrouper(temp); };
var container = this.layer.ad... | javascript | function(module, pos) {
try {
var containerConfig = module.container;
containerConfig.position = pos;
containerConfig.title = module.name;
var temp = this;
containerConfig.getGrouper = function() { return temp.getCurrentGrouper(temp); };
var container = this.layer.ad... | [
"function",
"(",
"module",
",",
"pos",
")",
"{",
"try",
"{",
"var",
"containerConfig",
"=",
"module",
".",
"container",
";",
"containerConfig",
".",
"position",
"=",
"pos",
";",
"containerConfig",
".",
"title",
"=",
"module",
".",
"name",
";",
"var",
"te... | add a module at the given pos | [
"add",
"a",
"module",
"at",
"the",
"given",
"pos"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8403-L8426 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
if(this.inputFilterTimeout) {
clearTimeout(this.inputFilterTimeout);
this.inputFilterTimeout = null;
}
var that = this;
this.inputFilterTimeout = setTimeout(function() {
that.updateLoadPanelList(Dom.get('loadFilter').value);
}, 500);
} | javascript | function() {
if(this.inputFilterTimeout) {
clearTimeout(this.inputFilterTimeout);
this.inputFilterTimeout = null;
}
var that = this;
this.inputFilterTimeout = setTimeout(function() {
that.updateLoadPanelList(Dom.get('loadFilter').value);
}, 500);
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"inputFilterTimeout",
")",
"{",
"clearTimeout",
"(",
"this",
".",
"inputFilterTimeout",
")",
";",
"this",
".",
"inputFilterTimeout",
"=",
"null",
";",
"}",
"var",
"that",
"=",
"this",
";",
"this",
".",
... | Method called from each keyup on the search filter in load panel.
The real filtering occurs only after 500ms so that the filter process isn't called too often | [
"Method",
"called",
"from",
"each",
"keyup",
"on",
"the",
"search",
"filter",
"in",
"load",
"panel",
".",
"The",
"real",
"filtering",
"occurs",
"only",
"after",
"500ms",
"so",
"that",
"the",
"filter",
"process",
"isn",
"t",
"called",
"too",
"often"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8542-L8551 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
var i;
var obj = {modules: [], wires: [], properties: null};
for( i = 0 ; i < this.layer.containers.length ; i++) {
obj.modules.push( {name: this.layer.containers[i].title, value: this.layer.containers[i].getValue(), config: this.layer.containers[i].getConfig()});
}
for( i = 0 ;... | javascript | function() {
var i;
var obj = {modules: [], wires: [], properties: null};
for( i = 0 ; i < this.layer.containers.length ; i++) {
obj.modules.push( {name: this.layer.containers[i].title, value: this.layer.containers[i].getValue(), config: this.layer.containers[i].getConfig()});
}
for( i = 0 ;... | [
"function",
"(",
")",
"{",
"var",
"i",
";",
"var",
"obj",
"=",
"{",
"modules",
":",
"[",
"]",
",",
"wires",
":",
"[",
"]",
",",
"properties",
":",
"null",
"}",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"layer",
".",
"conta... | This method return a wiring within the given vocabulary described by the modules list
@method getValue | [
"This",
"method",
"return",
"a",
"wiring",
"within",
"the",
"given",
"vocabulary",
"described",
"by",
"the",
"modules",
"list"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L8725-L8748 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(group, deep, func, context)
{
if (!lang.isValue(context))
context = this;
if (lang.isValue(group.groupContainer))
func.call(context, group.groupContainer);
else
{
for (var cI in group.containers)
func.call(context, group.containers[cI].container)
if (deep)
{
... | javascript | function(group, deep, func, context)
{
if (!lang.isValue(context))
context = this;
if (lang.isValue(group.groupContainer))
func.call(context, group.groupContainer);
else
{
for (var cI in group.containers)
func.call(context, group.containers[cI].container)
if (deep)
{
... | [
"function",
"(",
"group",
",",
"deep",
",",
"func",
",",
"context",
")",
"{",
"if",
"(",
"!",
"lang",
".",
"isValue",
"(",
"context",
")",
")",
"context",
"=",
"this",
";",
"if",
"(",
"lang",
".",
"isValue",
"(",
"group",
".",
"groupContainer",
")"... | Applys the given function to all containers in the group.
@method applyToContainers
@param {WireIt.Group} group The group object to work with
@param {boolean} deep Whether to recurse down into sub groups applying to their containers as well
@param {Function} func The function to apply (takes 1 arg, the container)
@para... | [
"Applys",
"the",
"given",
"function",
"to",
"all",
"containers",
"in",
"the",
"group",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L10192-L10210 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(group, layer)
{
group.collapsing = true;
if (lang.isValue(group.groupContainer))
layer.removeContainer(group.groupContainer);
else
{
for (var i in group.containers)
layer.removeContainer(group.containers[i])
for (var i in group.groups)
WireIt.GroupUtils.remov... | javascript | function(group, layer)
{
group.collapsing = true;
if (lang.isValue(group.groupContainer))
layer.removeContainer(group.groupContainer);
else
{
for (var i in group.containers)
layer.removeContainer(group.containers[i])
for (var i in group.groups)
WireIt.GroupUtils.remov... | [
"function",
"(",
"group",
",",
"layer",
")",
"{",
"group",
".",
"collapsing",
"=",
"true",
";",
"if",
"(",
"lang",
".",
"isValue",
"(",
"group",
".",
"groupContainer",
")",
")",
"layer",
".",
"removeContainer",
"(",
"group",
".",
"groupContainer",
")",
... | Removes the group's containers and sub groups from the layer
@param {WireIt.Group} The group to remove
@param {WireIt.Layer} The layer to remove them from | [
"Removes",
"the",
"group",
"s",
"containers",
"and",
"sub",
"groups",
"from",
"the",
"layer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L10228-L10243 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(group, map)
{
if (!lang.isObject(map))
map = WireIt.GroupUtils.getMap(group);
var fieldConfigs = [];
var terminalConfigs = [];
var generateExternal = function(ftMap)
{
for (var cI in ftMap)
{
var c = ftMap[cI];
for (var fName in c.fields)
{
var fMap =... | javascript | function(group, map)
{
if (!lang.isObject(map))
map = WireIt.GroupUtils.getMap(group);
var fieldConfigs = [];
var terminalConfigs = [];
var generateExternal = function(ftMap)
{
for (var cI in ftMap)
{
var c = ftMap[cI];
for (var fName in c.fields)
{
var fMap =... | [
"function",
"(",
"group",
",",
"map",
")",
"{",
"if",
"(",
"!",
"lang",
".",
"isObject",
"(",
"map",
")",
")",
"map",
"=",
"WireIt",
".",
"GroupUtils",
".",
"getMap",
"(",
"group",
")",
";",
"var",
"fieldConfigs",
"=",
"[",
"]",
";",
"var",
"term... | Get the configuration to pass to a group container
@param {WireIt.Group} group The group to get the config for
@param {object} map Optional The group's map (obtained by WireIt.GroupUtils.getMap(group))
@return {object} The collapsed config | [
"Get",
"the",
"configuration",
"to",
"pass",
"to",
"a",
"group",
"container"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L10327-L10386 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(group)
{
var bounds = {};
var setBound = function(position)
{
var left, top;
left = position[0];
top = position[1];
if ((typeof bounds["left"] == "undefined") || bounds["left"] > left)
bounds["left"] = left;
if ((typeof bounds["right"] == "undefine... | javascript | function(group)
{
var bounds = {};
var setBound = function(position)
{
var left, top;
left = position[0];
top = position[1];
if ((typeof bounds["left"] == "undefined") || bounds["left"] > left)
bounds["left"] = left;
if ((typeof bounds["right"] == "undefine... | [
"function",
"(",
"group",
")",
"{",
"var",
"bounds",
"=",
"{",
"}",
";",
"var",
"setBound",
"=",
"function",
"(",
"position",
")",
"{",
"var",
"left",
",",
"top",
";",
"left",
"=",
"position",
"[",
"0",
"]",
";",
"top",
"=",
"position",
"[",
"1",... | Works out the center point of a group
@param {WireIt.Group} group The group to get the center of
@return {Array} the x, y position of the center | [
"Works",
"out",
"the",
"center",
"point",
"of",
"a",
"group"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L10393-L10441 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(event) {
var elem = this.grouper.layer.el;
var rect = elem.getBoundingClientRect();
var xNoScroll = event.clientX-rect.left;
var yNoScroll = event.clientY-rect.top;
if (xNoScroll < elem.clientWidth && yNoScroll < elem.clientHeight) {
this.start();
}
} | javascript | function(event) {
var elem = this.grouper.layer.el;
var rect = elem.getBoundingClientRect();
var xNoScroll = event.clientX-rect.left;
var yNoScroll = event.clientY-rect.top;
if (xNoScroll < elem.clientWidth && yNoScroll < elem.clientHeight) {
this.start();
}
} | [
"function",
"(",
"event",
")",
"{",
"var",
"elem",
"=",
"this",
".",
"grouper",
".",
"layer",
".",
"el",
";",
"var",
"rect",
"=",
"elem",
".",
"getBoundingClientRect",
"(",
")",
";",
"var",
"xNoScroll",
"=",
"event",
".",
"clientX",
"-",
"rect",
".",... | Check if clicked in the layer and start the drawing mode | [
"Check",
"if",
"clicked",
"in",
"the",
"layer",
"and",
"start",
"the",
"drawing",
"mode"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L11487-L11497 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
this.show();
this.SetCanvasRegion(0, 0, this.grouper.layer.el.scrollWidth, this.grouper.layer.el.scrollHeight);
var ctxt = this.getContext();
ctxt.beginPath();
ctxt.moveTo(this.lastX, this.lastY);
this.startX = this.lastX;
this.startY = this.lastY;
this.timer =... | javascript | function() {
this.show();
this.SetCanvasRegion(0, 0, this.grouper.layer.el.scrollWidth, this.grouper.layer.el.scrollHeight);
var ctxt = this.getContext();
ctxt.beginPath();
ctxt.moveTo(this.lastX, this.lastY);
this.startX = this.lastX;
this.startY = this.lastY;
this.timer =... | [
"function",
"(",
")",
"{",
"this",
".",
"show",
"(",
")",
";",
"this",
".",
"SetCanvasRegion",
"(",
"0",
",",
"0",
",",
"this",
".",
"grouper",
".",
"layer",
".",
"el",
".",
"scrollWidth",
",",
"this",
".",
"grouper",
".",
"layer",
".",
"el",
"."... | Start the drawing mode | [
"Start",
"the",
"drawing",
"mode"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L11502-L11515 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(directions) {
var elem = this.grouper.layer.el;
if (directions.left)
elem.scrollLeft = Math.max(0, elem.scrollLeft-this.scrollAmount);
else if (directions.right)
elem.scrollLeft = Math.min(elem.scrollWidth, elem.scrollLeft+this.scrollAmount);
if (directions.up)
elem.scrollTop... | javascript | function(directions) {
var elem = this.grouper.layer.el;
if (directions.left)
elem.scrollLeft = Math.max(0, elem.scrollLeft-this.scrollAmount);
else if (directions.right)
elem.scrollLeft = Math.min(elem.scrollWidth, elem.scrollLeft+this.scrollAmount);
if (directions.up)
elem.scrollTop... | [
"function",
"(",
"directions",
")",
"{",
"var",
"elem",
"=",
"this",
".",
"grouper",
".",
"layer",
".",
"el",
";",
"if",
"(",
"directions",
".",
"left",
")",
"elem",
".",
"scrollLeft",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"elem",
".",
"scrollLef... | Scroll the associated WireIt.Layer | [
"Scroll",
"the",
"associated",
"WireIt",
".",
"Layer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L11520-L11532 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function() {
if (lang.isObject(this.timer)) {
this.timer.cancel();
this.timer = null;
var ctxt = this.getContext();
this.nextPoint(this.startX, this.startY);
YAHOO.lang.later(1000, this, this.hide, 0, false);
}
} | javascript | function() {
if (lang.isObject(this.timer)) {
this.timer.cancel();
this.timer = null;
var ctxt = this.getContext();
this.nextPoint(this.startX, this.startY);
YAHOO.lang.later(1000, this, this.hide, 0, false);
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"lang",
".",
"isObject",
"(",
"this",
".",
"timer",
")",
")",
"{",
"this",
".",
"timer",
".",
"cancel",
"(",
")",
";",
"this",
".",
"timer",
"=",
"null",
";",
"var",
"ctxt",
"=",
"this",
".",
"getContext",
... | End the drawing mode | [
"End",
"the",
"drawing",
"mode"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L11537-L11547 | train | |
neyric/webhookit | public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js | function(x, y) {
if (lang.isValue(x) && lang.isValue(y)) {
var ctxt = this.getContext();
// Draw the inner bezier curve
ctxt.lineCap= "round";
ctxt.strokeStyle="green";
ctxt.lineWidth="3";
ctxt.lineTo(x, y);
ctxt.stroke();
}
} | javascript | function(x, y) {
if (lang.isValue(x) && lang.isValue(y)) {
var ctxt = this.getContext();
// Draw the inner bezier curve
ctxt.lineCap= "round";
ctxt.strokeStyle="green";
ctxt.lineWidth="3";
ctxt.lineTo(x, y);
ctxt.stroke();
}
} | [
"function",
"(",
"x",
",",
"y",
")",
"{",
"if",
"(",
"lang",
".",
"isValue",
"(",
"x",
")",
"&&",
"lang",
".",
"isValue",
"(",
"y",
")",
")",
"{",
"var",
"ctxt",
"=",
"this",
".",
"getContext",
"(",
")",
";",
"// Draw the inner bezier curve",
"ctxt... | Add a point to the RubberBand | [
"Add",
"a",
"point",
"to",
"the",
"RubberBand"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js#L11572-L11584 | train | |
3rd-Eden/licenses | content.js | parse | function parse(data, options, next) {
data = this.get(data);
if ('function' === typeof options) {
next = options;
options = {};
}
//
// We cannot detect a license so we call the callback without any arguments
// which symbolises a failed attempt.
//
if (!data) return next()... | javascript | function parse(data, options, next) {
data = this.get(data);
if ('function' === typeof options) {
next = options;
options = {};
}
//
// We cannot detect a license so we call the callback without any arguments
// which symbolises a failed attempt.
//
if (!data) return next()... | [
"function",
"parse",
"(",
"data",
",",
"options",
",",
"next",
")",
"{",
"data",
"=",
"this",
".",
"get",
"(",
"data",
")",
";",
"if",
"(",
"'function'",
"===",
"typeof",
"options",
")",
"{",
"next",
"=",
"options",
";",
"options",
"=",
"{",
"}",
... | Parse the markdown information from the package.
@param {Object} data The package.json or npm package contents.
@param {Object} options Optional options.
@param {Function} next Continuation.
@api public | [
"Parse",
"the",
"markdown",
"information",
"from",
"the",
"package",
"."
] | 8f58b7700fd03de0e095cc408852fa12d1379c3f | https://github.com/3rd-Eden/licenses/blob/8f58b7700fd03de0e095cc408852fa12d1379c3f/content.js#L22-L68 | train |
3rd-Eden/licenses | content.js | get | function get(data) {
if ('string' === typeof data) return { content: data };
if (data.readme) return { content: data.readme, file: 'readme' };
if (data.content) return data;
} | javascript | function get(data) {
if ('string' === typeof data) return { content: data };
if (data.readme) return { content: data.readme, file: 'readme' };
if (data.content) return data;
} | [
"function",
"get",
"(",
"data",
")",
"{",
"if",
"(",
"'string'",
"===",
"typeof",
"data",
")",
"return",
"{",
"content",
":",
"data",
"}",
";",
"if",
"(",
"data",
".",
"readme",
")",
"return",
"{",
"content",
":",
"data",
".",
"readme",
",",
"file"... | Retrieve the only possible location of data. Which is the `readme` content
but that's only available for packages that are retrieved through npm.
@param {Object} data The package.json or npm package contents. | [
"Retrieve",
"the",
"only",
"possible",
"location",
"of",
"data",
".",
"Which",
"is",
"the",
"readme",
"content",
"but",
"that",
"s",
"only",
"available",
"for",
"packages",
"that",
"are",
"retrieved",
"through",
"npm",
"."
] | 8f58b7700fd03de0e095cc408852fa12d1379c3f | https://github.com/3rd-Eden/licenses/blob/8f58b7700fd03de0e095cc408852fa12d1379c3f/content.js#L87-L91 | train |
neyric/webhookit | public/javascripts/WireIt/plugins/grouping/examples/sawire/util.js | xmlValue | function xmlValue(node) {
if (!node) {
return '';
}
var ret = '';
if (node.nodeType == DOM_TEXT_NODE ||
node.nodeType == DOM_CDATA_SECTION_NODE) {
ret += node.nodeValue;
} else if (node.nodeType == DOM_ATTRIBUTE_NODE) {
if (ajaxsltIsIE6) {
ret += xmlValueIE6Hack(node);
} else {
... | javascript | function xmlValue(node) {
if (!node) {
return '';
}
var ret = '';
if (node.nodeType == DOM_TEXT_NODE ||
node.nodeType == DOM_CDATA_SECTION_NODE) {
ret += node.nodeValue;
} else if (node.nodeType == DOM_ATTRIBUTE_NODE) {
if (ajaxsltIsIE6) {
ret += xmlValueIE6Hack(node);
} else {
... | [
"function",
"xmlValue",
"(",
"node",
")",
"{",
"if",
"(",
"!",
"node",
")",
"{",
"return",
"''",
";",
"}",
"var",
"ret",
"=",
"''",
";",
"if",
"(",
"node",
".",
"nodeType",
"==",
"DOM_TEXT_NODE",
"||",
"node",
".",
"nodeType",
"==",
"DOM_CDATA_SECTIO... | Returns the text value of a node; for nodes without children this is the nodeValue, for nodes with children this is the concatenation of the value of all children. | [
"Returns",
"the",
"text",
"value",
"of",
"a",
"node",
";",
"for",
"nodes",
"without",
"children",
"this",
"is",
"the",
"nodeValue",
"for",
"nodes",
"with",
"children",
"this",
"is",
"the",
"concatenation",
"of",
"the",
"value",
"of",
"all",
"children",
"."... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/grouping/examples/sawire/util.js#L250-L274 | train |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(name, value)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
value = YAHOO.lang.JSON.stringify(value);
this._swf.setStyle(name, value);
} | javascript | function(name, value)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
value = YAHOO.lang.JSON.stringify(value);
this._swf.setStyle(name, value);
} | [
"function",
"(",
"name",
",",
"value",
")",
"{",
"//we must jsonify this because Flash Player versions below 9.0.60 don't handle",
"//complex ExternalInterface parsing correctly",
"value",
"=",
"YAHOO",
".",
"lang",
".",
"JSON",
".",
"stringify",
"(",
"value",
")",
";",
"... | Sets a single style value on the Chart instance.
@method setStyle
@param name {String} Name of the Chart style value to change.
@param value {Object} New value to pass to the Chart style. | [
"Sets",
"a",
"single",
"style",
"value",
"on",
"the",
"Chart",
"instance",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L256-L262 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(styles)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
styles = YAHOO.lang.JSON.stringify(styles);
this._swf.setStyles(styles);
} | javascript | function(styles)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
styles = YAHOO.lang.JSON.stringify(styles);
this._swf.setStyles(styles);
} | [
"function",
"(",
"styles",
")",
"{",
"//we must jsonify this because Flash Player versions below 9.0.60 don't handle",
"//complex ExternalInterface parsing correctly",
"styles",
"=",
"YAHOO",
".",
"lang",
".",
"JSON",
".",
"stringify",
"(",
"styles",
")",
";",
"this",
".",
... | Resets all styles on the Chart instance.
@method setStyles
@param styles {Object} Initializer for all Chart styles. | [
"Resets",
"all",
"styles",
"on",
"the",
"Chart",
"instance",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L270-L276 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(styles)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
for(var i = 0; i < styles.length; i++)
{
styles[i] = YAHOO.lang.JSON.stringify(styles[i]);
}
this._swf.setSeriesStyles(styles);
} | javascript | function(styles)
{
//we must jsonify this because Flash Player versions below 9.0.60 don't handle
//complex ExternalInterface parsing correctly
for(var i = 0; i < styles.length; i++)
{
styles[i] = YAHOO.lang.JSON.stringify(styles[i]);
}
this._swf.setSeriesStyles(styles);
} | [
"function",
"(",
"styles",
")",
"{",
"//we must jsonify this because Flash Player versions below 9.0.60 don't handle",
"//complex ExternalInterface parsing correctly",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"styles",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Sets the styles on all series in the Chart.
@method setSeriesStyles
@param styles {Array} Initializer for all Chart series styles. | [
"Sets",
"the",
"styles",
"on",
"all",
"series",
"in",
"the",
"Chart",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L284-L293 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(request, response, error)
{
if(this._swf)
{
if(error)
{
}
else
{
var i;
if(this._seriesFunctions)
{
var count = this._seriesFunctions.length;
for(i = 0; i < count; i++)
{
YAHOO.widget.Chart.removeProxyFunction(this._seriesFunctions[i]);
}
this._ser... | javascript | function(request, response, error)
{
if(this._swf)
{
if(error)
{
}
else
{
var i;
if(this._seriesFunctions)
{
var count = this._seriesFunctions.length;
for(i = 0; i < count; i++)
{
YAHOO.widget.Chart.removeProxyFunction(this._seriesFunctions[i]);
}
this._ser... | [
"function",
"(",
"request",
",",
"response",
",",
"error",
")",
"{",
"if",
"(",
"this",
".",
"_swf",
")",
"{",
"if",
"(",
"error",
")",
"{",
"}",
"else",
"{",
"var",
"i",
";",
"if",
"(",
"this",
".",
"_seriesFunctions",
")",
"{",
"var",
"count",
... | Called when the DataSource receives new data. The series definitions are used
to build a data provider for the SWF chart.
@method _loadDataHandler
@private | [
"Called",
"when",
"the",
"DataSource",
"receives",
"new",
"data",
".",
"The",
"series",
"definitions",
"are",
"used",
"to",
"build",
"a",
"data",
"provider",
"for",
"the",
"SWF",
"chart",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L565-L674 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
if(this._dataTipFunction)
{
YAHOO.widget.Chart.removeProxyFunction(this._dataTipFunction);
}
if(value)
{
this._dataTipFunction = value = YAHOO.widget.Chart.getFunctionReference(value);
}
this._swf.setDataTipFunction(value);
} | javascript | function(value)
{
if(this._dataTipFunction)
{
YAHOO.widget.Chart.removeProxyFunction(this._dataTipFunction);
}
if(value)
{
this._dataTipFunction = value = YAHOO.widget.Chart.getFunctionReference(value);
}
this._swf.setDataTipFunction(value);
} | [
"function",
"(",
"value",
")",
"{",
"if",
"(",
"this",
".",
"_dataTipFunction",
")",
"{",
"YAHOO",
".",
"widget",
".",
"Chart",
".",
"removeProxyFunction",
"(",
"this",
".",
"_dataTipFunction",
")",
";",
"}",
"if",
"(",
"value",
")",
"{",
"this",
".",
... | Setter for the dataTipFunction attribute.
@method _setDataTipFunction
@private | [
"Setter",
"for",
"the",
"dataTipFunction",
"attribute",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L797-L809 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
if(this._legendLabelFunction)
{
YAHOO.widget.Chart.removeProxyFunction(this._legendLabelFunction);
}
if(value)
{
this._legendLabelFunction = value = YAHOO.widget.Chart.getFunctionReference(value);
}
this._swf.setLegendLabelFunction(value);
} | javascript | function(value)
{
if(this._legendLabelFunction)
{
YAHOO.widget.Chart.removeProxyFunction(this._legendLabelFunction);
}
if(value)
{
this._legendLabelFunction = value = YAHOO.widget.Chart.getFunctionReference(value);
}
this._swf.setLegendLabelFunction(value);
} | [
"function",
"(",
"value",
")",
"{",
"if",
"(",
"this",
".",
"_legendLabelFunction",
")",
"{",
"YAHOO",
".",
"widget",
".",
"Chart",
".",
"removeProxyFunction",
"(",
"this",
".",
"_legendLabelFunction",
")",
";",
"}",
"if",
"(",
"value",
")",
"{",
"this",... | Setter for the legendLabelFunction attribute.
@method _setLegendLabelFunction
@private | [
"Setter",
"for",
"the",
"legendLabelFunction",
"attribute",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L817-L829 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
var clonedAxis = {};
for(var prop in value)
{
if(prop == "labelFunction")
{
if(value.labelFunction && value.labelFunction !== null)
{
clonedAxis.labelFunction = YAHOO.widget.Chart.getFunctionReference(value.labelFunction);
}
}
else
{
clonedAxis[prop] = value[... | javascript | function(value)
{
var clonedAxis = {};
for(var prop in value)
{
if(prop == "labelFunction")
{
if(value.labelFunction && value.labelFunction !== null)
{
clonedAxis.labelFunction = YAHOO.widget.Chart.getFunctionReference(value.labelFunction);
}
}
else
{
clonedAxis[prop] = value[... | [
"function",
"(",
"value",
")",
"{",
"var",
"clonedAxis",
"=",
"{",
"}",
";",
"for",
"(",
"var",
"prop",
"in",
"value",
")",
"{",
"if",
"(",
"prop",
"==",
"\"labelFunction\"",
")",
"{",
"if",
"(",
"value",
".",
"labelFunction",
"&&",
"value",
".",
"... | Receives an axis object, creates a proxy function for
the labelFunction and returns the updated object.
@method _getClonedAxis
@private | [
"Receives",
"an",
"axis",
"object",
"creates",
"a",
"proxy",
"function",
"for",
"the",
"labelFunction",
"and",
"returns",
"the",
"updated",
"object",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1316-L1334 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(axisFunctions)
{
if(axisFunctions && axisFunctions.length > 0)
{
var len = axisFunctions.length;
for(var i = 0; i < len; i++)
{
if(axisFunctions[i] !== null)
{
YAHOO.widget.Chart.removeProxyFunction(axisFunctions[i]);
}
}
axisFunctions = [];
}
} | javascript | function(axisFunctions)
{
if(axisFunctions && axisFunctions.length > 0)
{
var len = axisFunctions.length;
for(var i = 0; i < len; i++)
{
if(axisFunctions[i] !== null)
{
YAHOO.widget.Chart.removeProxyFunction(axisFunctions[i]);
}
}
axisFunctions = [];
}
} | [
"function",
"(",
"axisFunctions",
")",
"{",
"if",
"(",
"axisFunctions",
"&&",
"axisFunctions",
".",
"length",
">",
"0",
")",
"{",
"var",
"len",
"=",
"axisFunctions",
".",
"length",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"... | Removes axis functions contained in an array
@method _removeAxisFunctions
@private | [
"Removes",
"axis",
"functions",
"contained",
"in",
"an",
"array"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1342-L1356 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
if(value.position != "bottom" && value.position != "top") value.position = "bottom";
this._removeAxisFunctions(this._xAxisLabelFunctions);
value = this._getClonedAxis(value);
this._xAxisLabelFunctions.push(value.labelFunction);
this._swf.setHorizontalAxis(value);
} | javascript | function(value)
{
if(value.position != "bottom" && value.position != "top") value.position = "bottom";
this._removeAxisFunctions(this._xAxisLabelFunctions);
value = this._getClonedAxis(value);
this._xAxisLabelFunctions.push(value.labelFunction);
this._swf.setHorizontalAxis(value);
} | [
"function",
"(",
"value",
")",
"{",
"if",
"(",
"value",
".",
"position",
"!=",
"\"bottom\"",
"&&",
"value",
".",
"position",
"!=",
"\"top\"",
")",
"value",
".",
"position",
"=",
"\"bottom\"",
";",
"this",
".",
"_removeAxisFunctions",
"(",
"this",
".",
"_... | Setter for the xAxis attribute.
@method _setXAxis
@private | [
"Setter",
"for",
"the",
"xAxis",
"attribute",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1364-L1371 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
this._removeAxisFunctions(this._xAxisLabelFunctions);
var len = value.length;
for(var i = 0; i < len; i++)
{
if(value[i].position == "left") value[i].position = "bottom";
value[i] = this._getClonedAxis(value[i]);
if(value[i].labelFunction) this._xAxisLabelFunctions.push(value[i].labe... | javascript | function(value)
{
this._removeAxisFunctions(this._xAxisLabelFunctions);
var len = value.length;
for(var i = 0; i < len; i++)
{
if(value[i].position == "left") value[i].position = "bottom";
value[i] = this._getClonedAxis(value[i]);
if(value[i].labelFunction) this._xAxisLabelFunctions.push(value[i].labe... | [
"function",
"(",
"value",
")",
"{",
"this",
".",
"_removeAxisFunctions",
"(",
"this",
".",
"_xAxisLabelFunctions",
")",
";",
"var",
"len",
"=",
"value",
".",
"length",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++",
")"... | Setter for the xAxes attribute
@method _setXAxes
@private | [
"Setter",
"for",
"the",
"xAxes",
"attribute"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1379-L1390 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
this._removeAxisFunctions(this._yAxisLabelFunctions);
value = this._getClonedAxis(value);
this._yAxisLabelFunctions.push(value.labelFunction);
this._swf.setVerticalAxis(value);
} | javascript | function(value)
{
this._removeAxisFunctions(this._yAxisLabelFunctions);
value = this._getClonedAxis(value);
this._yAxisLabelFunctions.push(value.labelFunction);
this._swf.setVerticalAxis(value);
} | [
"function",
"(",
"value",
")",
"{",
"this",
".",
"_removeAxisFunctions",
"(",
"this",
".",
"_yAxisLabelFunctions",
")",
";",
"value",
"=",
"this",
".",
"_getClonedAxis",
"(",
"value",
")",
";",
"this",
".",
"_yAxisLabelFunctions",
".",
"push",
"(",
"value",
... | Setter for the yAxis attribute.
@method _setYAxis
@private | [
"Setter",
"for",
"the",
"yAxis",
"attribute",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1398-L1404 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(value)
{
this._removeAxisFunctions(this._yAxisLabelFunctions);
var len = value.length;
for(var i = 0; i < len; i++)
{
value[i] = this._getClonedAxis(value[i]);
if(value[i].labelFunction) this._yAxisLabelFunctions.push(value[i].labelFunction);
this._swf.setVerticalAxis(value[i]);
}
} | javascript | function(value)
{
this._removeAxisFunctions(this._yAxisLabelFunctions);
var len = value.length;
for(var i = 0; i < len; i++)
{
value[i] = this._getClonedAxis(value[i]);
if(value[i].labelFunction) this._yAxisLabelFunctions.push(value[i].labelFunction);
this._swf.setVerticalAxis(value[i]);
}
} | [
"function",
"(",
"value",
")",
"{",
"this",
".",
"_removeAxisFunctions",
"(",
"this",
".",
"_yAxisLabelFunctions",
")",
";",
"var",
"len",
"=",
"value",
".",
"length",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++",
")"... | Setter for the yAxes attribute.
@method _setYAxes
@private | [
"Setter",
"for",
"the",
"yAxes",
"attribute",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1412-L1422 | train | |
neyric/webhookit | public/javascripts/yui/charts/charts.js | function(index, style)
{
style = YAHOO.lang.JSON.stringify(style);
if(this._swf && this._swf.setSeriesStylesByIndex) this._swf.setSeriesStylesByIndex(index, style);
} | javascript | function(index, style)
{
style = YAHOO.lang.JSON.stringify(style);
if(this._swf && this._swf.setSeriesStylesByIndex) this._swf.setSeriesStylesByIndex(index, style);
} | [
"function",
"(",
"index",
",",
"style",
")",
"{",
"style",
"=",
"YAHOO",
".",
"lang",
".",
"JSON",
".",
"stringify",
"(",
"style",
")",
";",
"if",
"(",
"this",
".",
"_swf",
"&&",
"this",
".",
"_swf",
".",
"setSeriesStylesByIndex",
")",
"this",
".",
... | Sets the style object for a single series based on its index
@method setSeriesStylesByIndex
@param index {Number} The position within the series definition to apply the style
@param style {object} Style object to be applied to the selected series | [
"Sets",
"the",
"style",
"object",
"for",
"a",
"single",
"series",
"based",
"on",
"its",
"index"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/charts/charts.js#L1442-L1446 | train | |
No9/chrome-fs | chrome.js | function (err, length, data) {
if (err) {
if (self.autoClose) {
self.destroy()
}
self.emit('error', err)
}
self.push(data)
// self.once('finish', self.close)
} | javascript | function (err, length, data) {
if (err) {
if (self.autoClose) {
self.destroy()
}
self.emit('error', err)
}
self.push(data)
// self.once('finish', self.close)
} | [
"function",
"(",
"err",
",",
"length",
",",
"data",
")",
"{",
"if",
"(",
"err",
")",
"{",
"if",
"(",
"self",
".",
"autoClose",
")",
"{",
"self",
".",
"destroy",
"(",
")",
"}",
"self",
".",
"emit",
"(",
"'error'",
",",
"err",
")",
"}",
"self",
... | Sketchy implementation that pushes the whole file to the stream But maybe fd has a size that we can iterate to? | [
"Sketchy",
"implementation",
"that",
"pushes",
"the",
"whole",
"file",
"to",
"the",
"stream",
"But",
"maybe",
"fd",
"has",
"a",
"size",
"that",
"we",
"can",
"iterate",
"to?"
] | 8662960c39945a5bdf32a61513bf05a8b51f9daf | https://github.com/No9/chrome-fs/blob/8662960c39945a5bdf32a61513bf05a8b51f9daf/chrome.js#L1047-L1056 | train | |
neyric/webhookit | public/javascripts/yui/progressbar/progressbar.js | function(oConfigs) {
Prog.superclass.constructor.call(this, document.createElement('div') , oConfigs);
this._init(oConfigs);
} | javascript | function(oConfigs) {
Prog.superclass.constructor.call(this, document.createElement('div') , oConfigs);
this._init(oConfigs);
} | [
"function",
"(",
"oConfigs",
")",
"{",
"Prog",
".",
"superclass",
".",
"constructor",
".",
"call",
"(",
"this",
",",
"document",
".",
"createElement",
"(",
"'div'",
")",
",",
"oConfigs",
")",
";",
"this",
".",
"_init",
"(",
"oConfigs",
")",
";",
"}"
] | The ProgressBar widget provides an easy way to draw a bar depicting progress of an operation,
a level meter, rating or any such simple linear measure.
It allows for highly customized styles including animation, vertical or horizontal and forward or reverse.
@namespace YAHOO.widget
@class ProgressBar
@extends YAHOO.util... | [
"The",
"ProgressBar",
"widget",
"provides",
"an",
"easy",
"way",
"to",
"draw",
"a",
"bar",
"depicting",
"progress",
"of",
"an",
"operation",
"a",
"level",
"meter",
"rating",
"or",
"any",
"such",
"simple",
"linear",
"measure",
".",
"It",
"allows",
"for",
"h... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/progressbar/progressbar.js#L59-L64 | train | |
neyric/webhookit | public/javascripts/yui/progressbar/progressbar.js | function(parent,before) {
if (this._rendered) { return; }
this._rendered = true;
var direction = this.get(DIRECTION);
// If the developer set a className attribute on initialization,
// Element would have wiped out my own classNames
// So I need to insist on them, plus add the one for direction... | javascript | function(parent,before) {
if (this._rendered) { return; }
this._rendered = true;
var direction = this.get(DIRECTION);
// If the developer set a className attribute on initialization,
// Element would have wiped out my own classNames
// So I need to insist on them, plus add the one for direction... | [
"function",
"(",
"parent",
",",
"before",
")",
"{",
"if",
"(",
"this",
".",
"_rendered",
")",
"{",
"return",
";",
"}",
"this",
".",
"_rendered",
"=",
"true",
";",
"var",
"direction",
"=",
"this",
".",
"get",
"(",
"DIRECTION",
")",
";",
"// If the dev... | Renders the ProgressBar into the given container.
If the container has other content, the ProgressBar will be appended to it.
If the second argument is provided, the ProgressBar will be inserted before the given child.
The method is chainable since it returns a reference to this instance.
@method render
@param el {HTML... | [
"Renders",
"the",
"ProgressBar",
"into",
"the",
"given",
"container",
".",
"If",
"the",
"container",
"has",
"other",
"content",
"the",
"ProgressBar",
"will",
"be",
"appended",
"to",
"it",
".",
"If",
"the",
"second",
"argument",
"is",
"provided",
"the",
"Prog... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/progressbar/progressbar.js#L334-L370 | train | |
neyric/webhookit | public/javascripts/yui/progressbar/progressbar.js | function() {
this.set(ANIM,false);
this.unsubscribeAll();
var el = this.get('element');
if (el.parentNode) { el.parentNode.removeChild(el); }
} | javascript | function() {
this.set(ANIM,false);
this.unsubscribeAll();
var el = this.get('element');
if (el.parentNode) { el.parentNode.removeChild(el); }
} | [
"function",
"(",
")",
"{",
"this",
".",
"set",
"(",
"ANIM",
",",
"false",
")",
";",
"this",
".",
"unsubscribeAll",
"(",
")",
";",
"var",
"el",
"=",
"this",
".",
"get",
"(",
"'element'",
")",
";",
"if",
"(",
"el",
".",
"parentNode",
")",
"{",
"e... | Destroys the ProgressBar, related objects and unsubscribes from all events
@method destroy
@return void | [
"Destroys",
"the",
"ProgressBar",
"related",
"objects",
"and",
"unsubscribes",
"from",
"all",
"events"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/progressbar/progressbar.js#L387-L392 | train | |
neyric/webhookit | public/javascripts/yui/progressbar/progressbar.js | function() {
var barEl = this.get(BAR_EL);
switch (this.get(DIRECTION)) {
case DIRECTION_LTR:
case DIRECTION_RTL:
this._barSpace = parseInt(this.get(WIDTH),10) -
(parseInt(Dom.getStyle(barEl,'marginLeft'),10) || 0) -
(parseInt(Dom.getStyle(barEl,'marginRight'),10) || 0);
break;
... | javascript | function() {
var barEl = this.get(BAR_EL);
switch (this.get(DIRECTION)) {
case DIRECTION_LTR:
case DIRECTION_RTL:
this._barSpace = parseInt(this.get(WIDTH),10) -
(parseInt(Dom.getStyle(barEl,'marginLeft'),10) || 0) -
(parseInt(Dom.getStyle(barEl,'marginRight'),10) || 0);
break;
... | [
"function",
"(",
")",
"{",
"var",
"barEl",
"=",
"this",
".",
"get",
"(",
"BAR_EL",
")",
";",
"switch",
"(",
"this",
".",
"get",
"(",
"DIRECTION",
")",
")",
"{",
"case",
"DIRECTION_LTR",
":",
"case",
"DIRECTION_RTL",
":",
"this",
".",
"_barSpace",
"="... | Calculates some auxiliary values to make the rendering faster
@method _recalculateConstants
@return void
@private | [
"Calculates",
"some",
"auxiliary",
"values",
"to",
"make",
"the",
"rendering",
"faster"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/progressbar/progressbar.js#L504-L522 | train | |
neyric/webhookit | public/javascripts/yui/progressbar/progressbar.js | function(value) {
var container = this.get('element'),
text = Lang.substitute(this.get(ARIA_TEXT_TEMPLATE),{
value:value,
minValue:this.get(MIN_VALUE),
maxValue:this.get(MAX_VALUE)
});
container.setAttribute('aria-valuenow',value);
container.setAttribute('aria-valuetext',text);
} | javascript | function(value) {
var container = this.get('element'),
text = Lang.substitute(this.get(ARIA_TEXT_TEMPLATE),{
value:value,
minValue:this.get(MIN_VALUE),
maxValue:this.get(MAX_VALUE)
});
container.setAttribute('aria-valuenow',value);
container.setAttribute('aria-valuetext',text);
} | [
"function",
"(",
"value",
")",
"{",
"var",
"container",
"=",
"this",
".",
"get",
"(",
"'element'",
")",
",",
"text",
"=",
"Lang",
".",
"substitute",
"(",
"this",
".",
"get",
"(",
"ARIA_TEXT_TEMPLATE",
")",
",",
"{",
"value",
":",
"value",
",",
"minVa... | Utility method to set the ARIA value attributes
@method _setAriaText
@return void
@private | [
"Utility",
"method",
"to",
"set",
"the",
"ARIA",
"value",
"attributes"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/progressbar/progressbar.js#L616-L626 | train | |
neyric/webhookit | public/javascripts/yui/datasource/datasource.js | function (needle) {
var path = null, keys = [], i = 0;
if (needle) {
// Strip the ["string keys"] and [1] array indexes
needle = needle.
replace(/\[(['"])(.*?)\1\]/g,
function (x,$1,$2) {keys[i]=$2;return '.@'+(i++);}).
... | javascript | function (needle) {
var path = null, keys = [], i = 0;
if (needle) {
// Strip the ["string keys"] and [1] array indexes
needle = needle.
replace(/\[(['"])(.*?)\1\]/g,
function (x,$1,$2) {keys[i]=$2;return '.@'+(i++);}).
... | [
"function",
"(",
"needle",
")",
"{",
"var",
"path",
"=",
"null",
",",
"keys",
"=",
"[",
"]",
",",
"i",
"=",
"0",
";",
"if",
"(",
"needle",
")",
"{",
"// Strip the [\"string keys\"] and [1] array indexes",
"needle",
"=",
"needle",
".",
"replace",
"(",
"/"... | Function to convert the schema's fields into walk paths | [
"Function",
"to",
"convert",
"the",
"schema",
"s",
"fields",
"into",
"walk",
"paths"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datasource/datasource.js#L1551-L1576 | train | |
neyric/webhookit | public/javascripts/yui/datasource/datasource.js | function(oRequest, oFullResponse) {
var bError = false;
var elTable = oFullResponse;
var fields = this.responseSchema.fields;
var oParsedResponse = {results:[]};
if(lang.isArray(fields)) {
// Iterate through each TBODY
for(var i=0; i<elTable.tBodies.length; i++) {
var el... | javascript | function(oRequest, oFullResponse) {
var bError = false;
var elTable = oFullResponse;
var fields = this.responseSchema.fields;
var oParsedResponse = {results:[]};
if(lang.isArray(fields)) {
// Iterate through each TBODY
for(var i=0; i<elTable.tBodies.length; i++) {
var el... | [
"function",
"(",
"oRequest",
",",
"oFullResponse",
")",
"{",
"var",
"bError",
"=",
"false",
";",
"var",
"elTable",
"=",
"oFullResponse",
";",
"var",
"fields",
"=",
"this",
".",
"responseSchema",
".",
"fields",
";",
"var",
"oParsedResponse",
"=",
"{",
"resu... | Overridable method parses an HTML TABLE element reference into a response object.
Data is parsed out of TR elements from all TBODY elements.
@method parseHTMLTableData
@param oRequest {Object} Request object.
@param oFullResponse {Object} The full HTML element reference from the live database.
@return {Object} Parsed ... | [
"Overridable",
"method",
"parses",
"an",
"HTML",
"TABLE",
"element",
"reference",
"into",
"a",
"response",
"object",
".",
"Data",
"is",
"parsed",
"out",
"of",
"TR",
"elements",
"from",
"all",
"TBODY",
"elements",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datasource/datasource.js#L1701-L1752 | train | |
neyric/webhookit | public/javascripts/yui/datasource/datasource.js | function(oRequest, oCallback, oCaller) {
var tId = DS._nTransactionId++;
this.fireEvent("requestEvent", {tId:tId,request:oRequest,callback:oCallback,caller:oCaller});
// If there are no global pending requests, it is safe to purge global callback stack and global counter
if(util.ScriptNodeDataSourc... | javascript | function(oRequest, oCallback, oCaller) {
var tId = DS._nTransactionId++;
this.fireEvent("requestEvent", {tId:tId,request:oRequest,callback:oCallback,caller:oCaller});
// If there are no global pending requests, it is safe to purge global callback stack and global counter
if(util.ScriptNodeDataSourc... | [
"function",
"(",
"oRequest",
",",
"oCallback",
",",
"oCaller",
")",
"{",
"var",
"tId",
"=",
"DS",
".",
"_nTransactionId",
"++",
";",
"this",
".",
"fireEvent",
"(",
"\"requestEvent\"",
",",
"{",
"tId",
":",
"tId",
",",
"request",
":",
"oRequest",
",",
"... | Overriding method passes query to Get Utility. The returned
response is then forwarded to the handleResponse function.
@method makeConnection
@param oRequest {Object} Request object.
@param oCallback {Object} Callback object literal.
@param oCaller {Object} (deprecated) Use oCallback.scope.
@return {Number} Transactio... | [
"Overriding",
"method",
"passes",
"query",
"to",
"Get",
"Utility",
".",
"The",
"returned",
"response",
"is",
"then",
"forwarded",
"to",
"the",
"handleResponse",
"function",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datasource/datasource.js#L2044-L2102 | train | |
neyric/webhookit | public/javascripts/inputex/js/fields/MenuField.js | function() {
// Div to display the invite, then the selected text
this.el = inputEx.cn('div', {className:'inputEx-Result'}, null, this.options.typeInvite);
YAHOO.util.Dom.addClass(this.el, (this.options.menuPosition[1] == "tr") ? "inputEx-RightArrow" : "inputEx-DownArrow");
this.fieldCont... | javascript | function() {
// Div to display the invite, then the selected text
this.el = inputEx.cn('div', {className:'inputEx-Result'}, null, this.options.typeInvite);
YAHOO.util.Dom.addClass(this.el, (this.options.menuPosition[1] == "tr") ? "inputEx-RightArrow" : "inputEx-DownArrow");
this.fieldCont... | [
"function",
"(",
")",
"{",
"// Div to display the invite, then the selected text",
"this",
".",
"el",
"=",
"inputEx",
".",
"cn",
"(",
"'div'",
",",
"{",
"className",
":",
"'inputEx-Result'",
"}",
",",
"null",
",",
"this",
".",
"options",
".",
"typeInvite",
")"... | Build a menu | [
"Build",
"a",
"menu"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MenuField.js#L48-L61 | train | |
neyric/webhookit | public/javascripts/inputex/js/fields/MenuField.js | function() {
// Keep corresponding text for each value selectable in the menu
// -> will be used to display selection after click
this._textFromValue = {};
var that = this;
/*
* Recursive function to edit a level of menuItems
*
* args :
* -> conf : an array of menu... | javascript | function() {
// Keep corresponding text for each value selectable in the menu
// -> will be used to display selection after click
this._textFromValue = {};
var that = this;
/*
* Recursive function to edit a level of menuItems
*
* args :
* -> conf : an array of menu... | [
"function",
"(",
")",
"{",
"// Keep corresponding text for each value selectable in the menu",
"// -> will be used to display selection after click",
"this",
".",
"_textFromValue",
"=",
"{",
"}",
";",
"var",
"that",
"=",
"this",
";",
"/*\n\t * Recursive function to edit a lev... | Parse menuItems option to add ids, listeners, etc. | [
"Parse",
"menuItems",
"option",
"to",
"add",
"ids",
"listeners",
"etc",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MenuField.js#L65-L117 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(fn, obj, overrideContext) {
if (!fn) {
throw new Error("Invalid callback for subscriber to '" + this.type + "'");
}
if (this.subscribeEvent) {
this.subscribeEvent.fire(fn, obj, overrideContext);
}
var s = new YAHOO.util.Subscriber(fn, obj, overrideContext)... | javascript | function(fn, obj, overrideContext) {
if (!fn) {
throw new Error("Invalid callback for subscriber to '" + this.type + "'");
}
if (this.subscribeEvent) {
this.subscribeEvent.fire(fn, obj, overrideContext);
}
var s = new YAHOO.util.Subscriber(fn, obj, overrideContext)... | [
"function",
"(",
"fn",
",",
"obj",
",",
"overrideContext",
")",
"{",
"if",
"(",
"!",
"fn",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Invalid callback for subscriber to '\"",
"+",
"this",
".",
"type",
"+",
"\"'\"",
")",
";",
"}",
"if",
"(",
"this",
"."... | Subscribes the caller to this event
@method subscribe
@param {Function} fn The function to execute
@param {Object} obj An object to be passed along when the event fires.
overrideContext <boolean|Object> If true, the obj passed in becomes the execution
context of the listener. If an object, that object be... | [
"Subscribes",
"the",
"caller",
"to",
"this",
"event"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L184-L201 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(fn, obj) {
if (!fn) {
return this.unsubscribeAll();
}
var found = false;
for (var i=0, len=this.subscribers.length; i<len; ++i) {
var s = this.subscribers[i];
if (s && s.contains(fn, obj)) {
this._delete(i);
f... | javascript | function(fn, obj) {
if (!fn) {
return this.unsubscribeAll();
}
var found = false;
for (var i=0, len=this.subscribers.length; i<len; ++i) {
var s = this.subscribers[i];
if (s && s.contains(fn, obj)) {
this._delete(i);
f... | [
"function",
"(",
"fn",
",",
"obj",
")",
"{",
"if",
"(",
"!",
"fn",
")",
"{",
"return",
"this",
".",
"unsubscribeAll",
"(",
")",
";",
"}",
"var",
"found",
"=",
"false",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"this",
".",
"subs... | Unsubscribes subscribers.
@method unsubscribe
@param {Function} fn The subscribed function to remove, if not supplied
all will be removed
@param {Object} obj The custom object passed to subscribe. This is
optional, but if supplied will be used to
disambiguate multiple listeners that are the same
(e.g., you subscri... | [
"Unsubscribes",
"subscribers",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L215-L231 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function() {
var l = this.subscribers.length, i;
for (i=l-1; i>-1; i--) {
this._delete(i);
}
this.subscribers=[];
return l;
} | javascript | function() {
var l = this.subscribers.length, i;
for (i=l-1; i>-1; i--) {
this._delete(i);
}
this.subscribers=[];
return l;
} | [
"function",
"(",
")",
"{",
"var",
"l",
"=",
"this",
".",
"subscribers",
".",
"length",
",",
"i",
";",
"for",
"(",
"i",
"=",
"l",
"-",
"1",
";",
"i",
">",
"-",
"1",
";",
"i",
"--",
")",
"{",
"this",
".",
"_delete",
"(",
"i",
")",
";",
"}",... | Removes all listeners
@method unsubscribeAll
@return {int} The number of listeners unsubscribed | [
"Removes",
"all",
"listeners"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L352-L361 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(e) {
return fn.call(context, YAHOO.util.Event.getEvent(e, el),
obj);
} | javascript | function(e) {
return fn.call(context, YAHOO.util.Event.getEvent(e, el),
obj);
} | [
"function",
"(",
"e",
")",
"{",
"return",
"fn",
".",
"call",
"(",
"context",
",",
"YAHOO",
".",
"util",
".",
"Event",
".",
"getEvent",
"(",
"e",
",",
"el",
")",
",",
"obj",
")",
";",
"}"
] | wrap the function so we can return the obj object when the event fires; | [
"wrap",
"the",
"function",
"so",
"we",
"can",
"return",
"the",
"obj",
"object",
"when",
"the",
"event",
"fires",
";"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L990-L993 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function (el, fn, obj, overrideContext) {
return this.on(el, FOCUSOUT, fn, obj, overrideContext);
} | javascript | function (el, fn, obj, overrideContext) {
return this.on(el, FOCUSOUT, fn, obj, overrideContext);
} | [
"function",
"(",
"el",
",",
"fn",
",",
"obj",
",",
"overrideContext",
")",
"{",
"return",
"this",
".",
"on",
"(",
"el",
",",
"FOCUSOUT",
",",
"fn",
",",
"obj",
",",
"overrideContext",
")",
";",
"}"
] | Attaches a focusout event listener to the specified element for
the purpose of listening for the blur event on the element's
descendants.
@method addBlurListener
@param {String|HTMLElement|Array|NodeList} el An id, an element
reference, or a collection of ids and/or elements to assign the
listener to.
@param {Functio... | [
"Attaches",
"a",
"focusout",
"event",
"listener",
"to",
"the",
"specified",
"element",
"for",
"the",
"purpose",
"of",
"listening",
"for",
"the",
"blur",
"event",
"on",
"the",
"element",
"s",
"descendants",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1136-L1138 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(ev) {
var x = ev.pageX;
if (!x && 0 !== x) {
x = ev.clientX || 0;
if ( this.isIE ) {
x += this._getScrollLeft();
}
}
return x;
} | javascript | function(ev) {
var x = ev.pageX;
if (!x && 0 !== x) {
x = ev.clientX || 0;
if ( this.isIE ) {
x += this._getScrollLeft();
}
}
return x;
} | [
"function",
"(",
"ev",
")",
"{",
"var",
"x",
"=",
"ev",
".",
"pageX",
";",
"if",
"(",
"!",
"x",
"&&",
"0",
"!==",
"x",
")",
"{",
"x",
"=",
"ev",
".",
"clientX",
"||",
"0",
";",
"if",
"(",
"this",
".",
"isIE",
")",
"{",
"x",
"+=",
"this",
... | Returns the event's pageX
@method getPageX
@param {Event} ev the event
@return {int} the event's pageX
@static | [
"Returns",
"the",
"event",
"s",
"pageX"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1303-L1314 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(ev) {
var y = ev.pageY;
if (!y && 0 !== y) {
y = ev.clientY || 0;
if ( this.isIE ) {
y += this._getScrollTop();
}
}
return y;
} | javascript | function(ev) {
var y = ev.pageY;
if (!y && 0 !== y) {
y = ev.clientY || 0;
if ( this.isIE ) {
y += this._getScrollTop();
}
}
return y;
} | [
"function",
"(",
"ev",
")",
"{",
"var",
"y",
"=",
"ev",
".",
"pageY",
";",
"if",
"(",
"!",
"y",
"&&",
"0",
"!==",
"y",
")",
"{",
"y",
"=",
"ev",
".",
"clientY",
"||",
"0",
";",
"if",
"(",
"this",
".",
"isIE",
")",
"{",
"y",
"+=",
"this",
... | Returns the event's pageY
@method getPageY
@param {Event} ev the event
@return {int} the event's pageY
@static | [
"Returns",
"the",
"event",
"s",
"pageY"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1323-L1335 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(ev) {
var t = ev.relatedTarget;
if (!t) {
if (ev.type == "mouseout") {
t = ev.toElement;
} else if (ev.type == "mouseover") {
t = ev.fromElement;
}
}
... | javascript | function(ev) {
var t = ev.relatedTarget;
if (!t) {
if (ev.type == "mouseout") {
t = ev.toElement;
} else if (ev.type == "mouseover") {
t = ev.fromElement;
}
}
... | [
"function",
"(",
"ev",
")",
"{",
"var",
"t",
"=",
"ev",
".",
"relatedTarget",
";",
"if",
"(",
"!",
"t",
")",
"{",
"if",
"(",
"ev",
".",
"type",
"==",
"\"mouseout\"",
")",
"{",
"t",
"=",
"ev",
".",
"toElement",
";",
"}",
"else",
"if",
"(",
"ev... | Returns the event's related target
@method getRelatedTarget
@param {Event} ev the event
@return {HTMLElement} the event's relatedTarget
@static | [
"Returns",
"the",
"event",
"s",
"related",
"target"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1355-L1366 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(ev) {
if (!ev.time) {
var t = new Date().getTime();
try {
ev.time = t;
} catch(ex) {
this.lastError = ex;
return t;
}
}
... | javascript | function(ev) {
if (!ev.time) {
var t = new Date().getTime();
try {
ev.time = t;
} catch(ex) {
this.lastError = ex;
return t;
}
}
... | [
"function",
"(",
"ev",
")",
"{",
"if",
"(",
"!",
"ev",
".",
"time",
")",
"{",
"var",
"t",
"=",
"new",
"Date",
"(",
")",
".",
"getTime",
"(",
")",
";",
"try",
"{",
"ev",
".",
"time",
"=",
"t",
";",
"}",
"catch",
"(",
"ex",
")",
"{",
"this"... | Returns the time of the event. If the time is not included, the
event is modified using the current time.
@method getTime
@param {Event} ev the event
@return {Date} the time of the event
@static | [
"Returns",
"the",
"time",
"of",
"the",
"event",
".",
"If",
"the",
"time",
"is",
"not",
"included",
"the",
"event",
"is",
"modified",
"using",
"the",
"current",
"time",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1376-L1388 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(ev) {
var code = ev.keyCode || ev.charCode || 0;
// webkit key normalization
if (YAHOO.env.ua.webkit && (code in webkitKeymap)) {
code = webkitKeymap[code];
}
return code;
} | javascript | function(ev) {
var code = ev.keyCode || ev.charCode || 0;
// webkit key normalization
if (YAHOO.env.ua.webkit && (code in webkitKeymap)) {
code = webkitKeymap[code];
}
return code;
} | [
"function",
"(",
"ev",
")",
"{",
"var",
"code",
"=",
"ev",
".",
"keyCode",
"||",
"ev",
".",
"charCode",
"||",
"0",
";",
"// webkit key normalization",
"if",
"(",
"YAHOO",
".",
"env",
".",
"ua",
".",
"webkit",
"&&",
"(",
"code",
"in",
"webkitKeymap",
... | Returns the charcode for an event
@method getCharCode
@param {Event} ev the event
@return {int} the event's charCode
@static | [
"Returns",
"the",
"charcode",
"for",
"an",
"event"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1465-L1473 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(e) {
var EU = YAHOO.util.Event;
if (!EU.DOMReady) {
EU.DOMReady=true;
// Fire the content ready custom event
EU.DOMReadyEvent.fire();
// Remove the DOMContentLoaded (FF/Opera)
E... | javascript | function(e) {
var EU = YAHOO.util.Event;
if (!EU.DOMReady) {
EU.DOMReady=true;
// Fire the content ready custom event
EU.DOMReadyEvent.fire();
// Remove the DOMContentLoaded (FF/Opera)
E... | [
"function",
"(",
"e",
")",
"{",
"var",
"EU",
"=",
"YAHOO",
".",
"util",
".",
"Event",
";",
"if",
"(",
"!",
"EU",
".",
"DOMReady",
")",
"{",
"EU",
".",
"DOMReady",
"=",
"true",
";",
"// Fire the content ready custom event",
"EU",
".",
"DOMReadyEvent",
"... | Fires the DOMReady event listeners the first time the document is
usable.
@method _ready
@static
@private | [
"Fires",
"the",
"DOMReady",
"event",
"listeners",
"the",
"first",
"time",
"the",
"document",
"is",
"usable",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1612-L1623 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function() {
var dd = document.documentElement, db = document.body;
if (dd && (dd.scrollTop || dd.scrollLeft)) {
return [dd.scrollTop, dd.scrollLeft];
} else if (db) {
return [db.scrollTop, db.scrollLeft];
} else {
... | javascript | function() {
var dd = document.documentElement, db = document.body;
if (dd && (dd.scrollTop || dd.scrollLeft)) {
return [dd.scrollTop, dd.scrollLeft];
} else if (db) {
return [db.scrollTop, db.scrollLeft];
} else {
... | [
"function",
"(",
")",
"{",
"var",
"dd",
"=",
"document",
".",
"documentElement",
",",
"db",
"=",
"document",
".",
"body",
";",
"if",
"(",
"dd",
"&&",
"(",
"dd",
".",
"scrollTop",
"||",
"dd",
".",
"scrollLeft",
")",
")",
"{",
"return",
"[",
"dd",
... | Returns the scrollTop and scrollLeft. Used to calculate the
pageX and pageY in Internet Explorer
@method _getScroll
@static
@private | [
"Returns",
"the",
"scrollTop",
"and",
"scrollLeft",
".",
"Used",
"to",
"calculate",
"the",
"pageX",
"and",
"pageY",
"in",
"Internet",
"Explorer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L1900-L1909 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(p_type, p_fn, p_obj, overrideContext) {
this.__yui_events = this.__yui_events || {};
var ce = this.__yui_events[p_type];
if (ce) {
ce.subscribe(p_fn, p_obj, overrideContext);
} else {
this.__yui_subscribers = this.__yui_subscribers || {};
va... | javascript | function(p_type, p_fn, p_obj, overrideContext) {
this.__yui_events = this.__yui_events || {};
var ce = this.__yui_events[p_type];
if (ce) {
ce.subscribe(p_fn, p_obj, overrideContext);
} else {
this.__yui_subscribers = this.__yui_subscribers || {};
va... | [
"function",
"(",
"p_type",
",",
"p_fn",
",",
"p_obj",
",",
"overrideContext",
")",
"{",
"this",
".",
"__yui_events",
"=",
"this",
".",
"__yui_events",
"||",
"{",
"}",
";",
"var",
"ce",
"=",
"this",
".",
"__yui_events",
"[",
"p_type",
"]",
";",
"if",
... | Subscribe to a CustomEvent by event type
@method subscribe
@param p_type {string} the type, or name of the event
@param p_fn {function} the function to exectute when the event fires
@param p_obj {Object} An object to be passed along when the event
fires
@param overrideContext {boolean} If true, the... | [
"Subscribe",
"to",
"a",
"CustomEvent",
"by",
"event",
"type"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L2109-L2125 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | function(p_type, p_fn, p_obj) {
this.__yui_events = this.__yui_events || {};
var evts = this.__yui_events;
if (p_type) {
var ce = evts[p_type];
if (ce) {
return ce.unsubscribe(p_fn, p_obj);
}
} else {
var ret = true;
... | javascript | function(p_type, p_fn, p_obj) {
this.__yui_events = this.__yui_events || {};
var evts = this.__yui_events;
if (p_type) {
var ce = evts[p_type];
if (ce) {
return ce.unsubscribe(p_fn, p_obj);
}
} else {
var ret = true;
... | [
"function",
"(",
"p_type",
",",
"p_fn",
",",
"p_obj",
")",
"{",
"this",
".",
"__yui_events",
"=",
"this",
".",
"__yui_events",
"||",
"{",
"}",
";",
"var",
"evts",
"=",
"this",
".",
"__yui_events",
";",
"if",
"(",
"p_type",
")",
"{",
"var",
"ce",
"=... | Unsubscribes one or more listeners the from the specified event
@method unsubscribe
@param p_type {string} The type, or name of the event. If the type
is not specified, it will attempt to remove
the listener from all hosted events.
@param p_fn {Function} The subscribed function to unsubscribe, if not
supplied, all... | [
"Unsubscribes",
"one",
"or",
"more",
"listeners",
"the",
"from",
"the",
"specified",
"event"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L2142-L2161 | train | |
neyric/webhookit | public/javascripts/yui/event/event-debug.js | handleKeyPress | function handleKeyPress(e, obj) {
if (! keyData.shift) {
keyData.shift = false;
}
if (! keyData.alt) {
keyData.alt = false;
}
if (! keyData.ctrl) {
keyData.ctrl = false;
}
// check held down modifying keys first
... | javascript | function handleKeyPress(e, obj) {
if (! keyData.shift) {
keyData.shift = false;
}
if (! keyData.alt) {
keyData.alt = false;
}
if (! keyData.ctrl) {
keyData.ctrl = false;
}
// check held down modifying keys first
... | [
"function",
"handleKeyPress",
"(",
"e",
",",
"obj",
")",
"{",
"if",
"(",
"!",
"keyData",
".",
"shift",
")",
"{",
"keyData",
".",
"shift",
"=",
"false",
";",
"}",
"if",
"(",
"!",
"keyData",
".",
"alt",
")",
"{",
"keyData",
".",
"alt",
"=",
"false"... | Handles the key event when a key is pressed.
@method handleKeyPress
@param {DOMEvent} e The keypress DOM event
@param {Object} obj The DOM event scope object
@private | [
"Handles",
"the",
"key",
"event",
"when",
"a",
"key",
"is",
"pressed",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/event/event-debug.js#L2391-L2426 | train |
donmccurdy/aframe-proxy-controls | lib/overlay.js | function (pairCode, linkUrl, includeStyles) {
/** @type {string} Pair code. */
this.pairCode = pairCode;
/** @type {string} URL for 'Connect' button. */
this.linkUrl = linkUrl;
/** @type {Element} Overlay element. */
this.el = document.createElement('div');
/** @type {Element} Overlay stylesheet. */
this... | javascript | function (pairCode, linkUrl, includeStyles) {
/** @type {string} Pair code. */
this.pairCode = pairCode;
/** @type {string} URL for 'Connect' button. */
this.linkUrl = linkUrl;
/** @type {Element} Overlay element. */
this.el = document.createElement('div');
/** @type {Element} Overlay stylesheet. */
this... | [
"function",
"(",
"pairCode",
",",
"linkUrl",
",",
"includeStyles",
")",
"{",
"/** @type {string} Pair code. */",
"this",
".",
"pairCode",
"=",
"pairCode",
";",
"/** @type {string} URL for 'Connect' button. */",
"this",
".",
"linkUrl",
"=",
"linkUrl",
";",
"/** @type {El... | Helper class for the canvas overlay, which has to be rendered and styled
in JavaScript, just because.
@param {string} pairCode
* @param {string} linkUrl
@param {boolean} includeStyles | [
"Helper",
"class",
"for",
"the",
"canvas",
"overlay",
"which",
"has",
"to",
"be",
"rendered",
"and",
"styled",
"in",
"JavaScript",
"just",
"because",
"."
] | 82aa99f52e17c8ad179ab0907afdf4135e0762d6 | https://github.com/donmccurdy/aframe-proxy-controls/blob/82aa99f52e17c8ad179ab0907afdf4135e0762d6/lib/overlay.js#L65-L84 | train | |
neyric/webhookit | public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js | function(codeText) {
this.textarea = WireIt.cn('textarea', null, {width: "90%", height: "70px", border: "0", padding: "5px"}, codeText);
this.setBody(this.textarea);
YAHOO.util.Event.addListener(this.textarea, 'change', this.createTerminals, this, true);
} | javascript | function(codeText) {
this.textarea = WireIt.cn('textarea', null, {width: "90%", height: "70px", border: "0", padding: "5px"}, codeText);
this.setBody(this.textarea);
YAHOO.util.Event.addListener(this.textarea, 'change', this.createTerminals, this, true);
} | [
"function",
"(",
"codeText",
")",
"{",
"this",
".",
"textarea",
"=",
"WireIt",
".",
"cn",
"(",
"'textarea'",
",",
"null",
",",
"{",
"width",
":",
"\"90%\"",
",",
"height",
":",
"\"70px\"",
",",
"border",
":",
"\"0\"",
",",
"padding",
":",
"\"5px\"",
... | Create the textarea for the javascript code
@method buildTextArea
@param {String} codeText | [
"Create",
"the",
"textarea",
"for",
"the",
"javascript",
"code"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js#L275-L282 | train | |
neyric/webhookit | public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js | function() {
var width = WireIt.getIntStyle(this.el, "width");
var inputsIntervall = Math.floor(width/(this.nParams+1));
for(var i = 1 ; i < this.terminals.length ; i++) {
var term = this.terminals[i];
YAHOO.util.Dom.setStyle(term.el, "left", (inputsIntervall*(i))-15+"px" );
... | javascript | function() {
var width = WireIt.getIntStyle(this.el, "width");
var inputsIntervall = Math.floor(width/(this.nParams+1));
for(var i = 1 ; i < this.terminals.length ; i++) {
var term = this.terminals[i];
YAHOO.util.Dom.setStyle(term.el, "left", (inputsIntervall*(i))-15+"px" );
... | [
"function",
"(",
")",
"{",
"var",
"width",
"=",
"WireIt",
".",
"getIntStyle",
"(",
"this",
".",
"el",
",",
"\"width\"",
")",
";",
"var",
"inputsIntervall",
"=",
"Math",
".",
"floor",
"(",
"width",
"/",
"(",
"this",
".",
"nParams",
"+",
"1",
")",
")... | Reposition the terminals
@method positionTerminals | [
"Reposition",
"the",
"terminals"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js#L331-L349 | train | |
neyric/webhookit | public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js | function() {
var obj = jsBox.Container.superclass.getConfig.call(this);
obj.codeText = this.textarea.value;
return obj;
} | javascript | function() {
var obj = jsBox.Container.superclass.getConfig.call(this);
obj.codeText = this.textarea.value;
return obj;
} | [
"function",
"(",
")",
"{",
"var",
"obj",
"=",
"jsBox",
".",
"Container",
".",
"superclass",
".",
"getConfig",
".",
"call",
"(",
"this",
")",
";",
"obj",
".",
"codeText",
"=",
"this",
".",
"textarea",
".",
"value",
";",
"return",
"obj",
";",
"}"
] | Extend the getConfig to add the "codeText" property
@method getConfig | [
"Extend",
"the",
"getConfig",
"to",
"add",
"the",
"codeText",
"property"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js#L355-L359 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function () {
// Grab the first callback in the queue
var c = this.q[0],
fn;
// If there is no callback in the queue or the Chain is currently
// in an execution mode, return
if (!c) {
this.fireEvent('end');
return this;
} else if (th... | javascript | function () {
// Grab the first callback in the queue
var c = this.q[0],
fn;
// If there is no callback in the queue or the Chain is currently
// in an execution mode, return
if (!c) {
this.fireEvent('end');
return this;
} else if (th... | [
"function",
"(",
")",
"{",
"// Grab the first callback in the queue",
"var",
"c",
"=",
"this",
".",
"q",
"[",
"0",
"]",
",",
"fn",
";",
"// If there is no callback in the queue or the Chain is currently",
"// in an execution mode, return",
"if",
"(",
"!",
"c",
")",
"{... | Begin executing the chain, or resume execution from the last paused position.
@method run
@return {Chain} the Chain instance | [
"Begin",
"executing",
"the",
"chain",
"or",
"resume",
"execution",
"from",
"the",
"last",
"paused",
"position",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L54-L129 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(tree) {
var maxRowDepth = 1;
var currentRow;
var currentColumn;
// Calculate the max depth of descendants for this row
var countMaxRowDepth = function(row, tmpRowDepth) {
tmpRowDepth = tmpRowDepth || 1;
for(var n=0; n... | javascript | function(tree) {
var maxRowDepth = 1;
var currentRow;
var currentColumn;
// Calculate the max depth of descendants for this row
var countMaxRowDepth = function(row, tmpRowDepth) {
tmpRowDepth = tmpRowDepth || 1;
for(var n=0; n... | [
"function",
"(",
"tree",
")",
"{",
"var",
"maxRowDepth",
"=",
"1",
";",
"var",
"currentRow",
";",
"var",
"currentColumn",
";",
"// Calculate the max depth of descendants for this row",
"var",
"countMaxRowDepth",
"=",
"function",
"(",
"row",
",",
"tmpRowDepth",
")",
... | Determine ROWSPAN value for each Column in the tree | [
"Determine",
"ROWSPAN",
"value",
"for",
"each",
"Column",
"in",
"the",
"tree"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L439-L485 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(row, tmpRowDepth) {
tmpRowDepth = tmpRowDepth || 1;
for(var n=0; n<row.length; n++) {
var col = row[n];
// Column has children, so keep counting
if(YAHOO.lang.isArray(col.children)) {
tmpRowDept... | javascript | function(row, tmpRowDepth) {
tmpRowDepth = tmpRowDepth || 1;
for(var n=0; n<row.length; n++) {
var col = row[n];
// Column has children, so keep counting
if(YAHOO.lang.isArray(col.children)) {
tmpRowDept... | [
"function",
"(",
"row",
",",
"tmpRowDepth",
")",
"{",
"tmpRowDepth",
"=",
"tmpRowDepth",
"||",
"1",
";",
"for",
"(",
"var",
"n",
"=",
"0",
";",
"n",
"<",
"row",
".",
"length",
";",
"n",
"++",
")",
"{",
"var",
"col",
"=",
"row",
"[",
"n",
"]",
... | Calculate the max depth of descendants for this row | [
"Calculate",
"the",
"max",
"depth",
"of",
"descendants",
"for",
"this",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L445-L464 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(i, oColumn) {
headers[i].push(oColumn.getSanitizedKey());
if(oColumn._oParent) {
recurseAncestorsForHeaders(i, oColumn._oParent);
}
} | javascript | function(i, oColumn) {
headers[i].push(oColumn.getSanitizedKey());
if(oColumn._oParent) {
recurseAncestorsForHeaders(i, oColumn._oParent);
}
} | [
"function",
"(",
"i",
",",
"oColumn",
")",
"{",
"headers",
"[",
"i",
"]",
".",
"push",
"(",
"oColumn",
".",
"getSanitizedKey",
"(",
")",
")",
";",
"if",
"(",
"oColumn",
".",
"_oParent",
")",
"{",
"recurseAncestorsForHeaders",
"(",
"i",
",",
"oColumn",
... | Store header relationships in an array for HEADERS attribute | [
"Store",
"header",
"relationships",
"in",
"an",
"array",
"for",
"HEADERS",
"attribute"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L494-L499 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function() {
var aDefinitions = this._aDefinitions;
// Internal recursive function to define Column instances
var parseColumns = function(nodeList, oSelf) {
// Parse each node at this depth for attributes and any children
for(var j=0; j<nodeList.length; j++) {
... | javascript | function() {
var aDefinitions = this._aDefinitions;
// Internal recursive function to define Column instances
var parseColumns = function(nodeList, oSelf) {
// Parse each node at this depth for attributes and any children
for(var j=0; j<nodeList.length; j++) {
... | [
"function",
"(",
")",
"{",
"var",
"aDefinitions",
"=",
"this",
".",
"_aDefinitions",
";",
"// Internal recursive function to define Column instances",
"var",
"parseColumns",
"=",
"function",
"(",
"nodeList",
",",
"oSelf",
")",
"{",
"// Parse each node at this depth for at... | Public accessor to the definitions array.
@method getDefinitions
@return {Object[]} Array of object literal Column definitions. | [
"Public",
"accessor",
"to",
"the",
"definitions",
"array",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L548-L581 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(column) {
if(YAHOO.lang.isString(column)) {
var allColumns = this.flat;
for(var i=allColumns.length-1; i>-1; i--) {
if(allColumns[i]._sId === column) {
return allColumns[i];
}
}
}
return null;
} | javascript | function(column) {
if(YAHOO.lang.isString(column)) {
var allColumns = this.flat;
for(var i=allColumns.length-1; i>-1; i--) {
if(allColumns[i]._sId === column) {
return allColumns[i];
}
}
}
return null;
} | [
"function",
"(",
"column",
")",
"{",
"if",
"(",
"YAHOO",
".",
"lang",
".",
"isString",
"(",
"column",
")",
")",
"{",
"var",
"allColumns",
"=",
"this",
".",
"flat",
";",
"for",
"(",
"var",
"i",
"=",
"allColumns",
".",
"length",
"-",
"1",
";",
"i",... | Returns Column instance with given ID.
@method getColumnById
@param column {String} Column ID.
@return {YAHOO.widget.Column} Column instance. | [
"Returns",
"Column",
"instance",
"with",
"given",
"ID",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L591-L601 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(column) {
if(YAHOO.lang.isNumber(column) && this.keys[column]) {
return this.keys[column];
}
else if(YAHOO.lang.isString(column)) {
var allColumns = this.flat;
var aColumns = [];
for(var i=0; i<allColumns.length; i++) {
if(... | javascript | function(column) {
if(YAHOO.lang.isNumber(column) && this.keys[column]) {
return this.keys[column];
}
else if(YAHOO.lang.isString(column)) {
var allColumns = this.flat;
var aColumns = [];
for(var i=0; i<allColumns.length; i++) {
if(... | [
"function",
"(",
"column",
")",
"{",
"if",
"(",
"YAHOO",
".",
"lang",
".",
"isNumber",
"(",
"column",
")",
"&&",
"this",
".",
"keys",
"[",
"column",
"]",
")",
"{",
"return",
"this",
".",
"keys",
"[",
"column",
"]",
";",
"}",
"else",
"if",
"(",
... | Returns Column instance with given key or ColumnSet key index.
@method getColumn
@param column {String | Number} Column key or ColumnSet key index.
@return {YAHOO.widget.Column} Column instance. | [
"Returns",
"Column",
"instance",
"with",
"given",
"key",
"or",
"ColumnSet",
"key",
"index",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L611-L631 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function() {
var oDefinition = {};
// Update the definition
oDefinition.abbr = this.abbr;
oDefinition.className = this.className;
oDefinition.editor = this.editor;
oDefinition.editorOptions = this.editorOptions; //TODO: deprecated
oDefinition.field = this... | javascript | function() {
var oDefinition = {};
// Update the definition
oDefinition.abbr = this.abbr;
oDefinition.className = this.className;
oDefinition.editor = this.editor;
oDefinition.editorOptions = this.editorOptions; //TODO: deprecated
oDefinition.field = this... | [
"function",
"(",
")",
"{",
"var",
"oDefinition",
"=",
"{",
"}",
";",
"// Update the definition",
"oDefinition",
".",
"abbr",
"=",
"this",
".",
"abbr",
";",
"oDefinition",
".",
"className",
"=",
"this",
".",
"className",
";",
"oDefinition",
".",
"editor",
"... | Returns object literal definition.
@method getDefinition
@return {Object} Object literal definition. | [
"Returns",
"object",
"literal",
"definition",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1115-L1137 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(e) {
this.startWidth = this.headCellLiner.offsetWidth;
this.startX = YAHOO.util.Event.getXY(e)[0];
this.nLinerPadding = (parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"paddingLeft"),10)|0) +
(parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"padd... | javascript | function(e) {
this.startWidth = this.headCellLiner.offsetWidth;
this.startX = YAHOO.util.Event.getXY(e)[0];
this.nLinerPadding = (parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"paddingLeft"),10)|0) +
(parseInt(YAHOO.util.Dom.getStyle(this.headCellLiner,"padd... | [
"function",
"(",
"e",
")",
"{",
"this",
".",
"startWidth",
"=",
"this",
".",
"headCellLiner",
".",
"offsetWidth",
";",
"this",
".",
"startX",
"=",
"YAHOO",
".",
"util",
".",
"Event",
".",
"getXY",
"(",
"e",
")",
"[",
"0",
"]",
";",
"this",
".",
"... | Handles mousedown events on the Column resizer.
@method onMouseDown
@param e {string} The mousedown event | [
"Handles",
"mousedown",
"events",
"on",
"the",
"Column",
"resizer",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1562-L1567 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function() {
// Shrinks height of all resizer els to not hold open TH els
var allKeys = this.datatable.getColumnSet().keys,
thisKey = this.column.getKeyIndex(),
col;
for(var i=0, len=allKeys.length; i<len; i++) {
col = allKeys[i];
... | javascript | function() {
// Shrinks height of all resizer els to not hold open TH els
var allKeys = this.datatable.getColumnSet().keys,
thisKey = this.column.getKeyIndex(),
col;
for(var i=0, len=allKeys.length; i<len; i++) {
col = allKeys[i];
... | [
"function",
"(",
")",
"{",
"// Shrinks height of all resizer els to not hold open TH els",
"var",
"allKeys",
"=",
"this",
".",
"datatable",
".",
"getColumnSet",
"(",
")",
".",
"keys",
",",
"thisKey",
"=",
"this",
".",
"column",
".",
"getKeyIndex",
"(",
")",
",",... | Handles start drag on the Column resizer.
@method startDrag
@param e {string} The drag event | [
"Handles",
"start",
"drag",
"on",
"the",
"Column",
"resizer",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1591-L1602 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(e) {
var newX = YAHOO.util.Event.getXY(e)[0];
if(newX > YAHOO.util.Dom.getX(this.headCellLiner)) {
var offsetX = newX - this.startX;
var newWidth = this.startWidth + offsetX - this.nLinerPadding;
if(newWidth > 0) {
this... | javascript | function(e) {
var newX = YAHOO.util.Event.getXY(e)[0];
if(newX > YAHOO.util.Dom.getX(this.headCellLiner)) {
var offsetX = newX - this.startX;
var newWidth = this.startWidth + offsetX - this.nLinerPadding;
if(newWidth > 0) {
this... | [
"function",
"(",
"e",
")",
"{",
"var",
"newX",
"=",
"YAHOO",
".",
"util",
".",
"Event",
".",
"getXY",
"(",
"e",
")",
"[",
"0",
"]",
";",
"if",
"(",
"newX",
">",
"YAHOO",
".",
"util",
".",
"Dom",
".",
"getX",
"(",
"this",
".",
"headCellLiner",
... | Handles drag events on the Column resizer.
@method onDrag
@param e {string} The drag event | [
"Handles",
"drag",
"events",
"on",
"the",
"Column",
"resizer",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1610-L1619 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(index, range) {
if(!lang.isNumber(range) || (range < 0)) {
range = 1;
}
this._records.splice(index, range);
//this._length = this._length - range;
} | javascript | function(index, range) {
if(!lang.isNumber(range) || (range < 0)) {
range = 1;
}
this._records.splice(index, range);
//this._length = this._length - range;
} | [
"function",
"(",
"index",
",",
"range",
")",
"{",
"if",
"(",
"!",
"lang",
".",
"isNumber",
"(",
"range",
")",
"||",
"(",
"range",
"<",
"0",
")",
")",
"{",
"range",
"=",
"1",
";",
"}",
"this",
".",
"_records",
".",
"splice",
"(",
"index",
",",
... | Deletes Records from the RecordSet at the given index. If range is null,
then only one Record is deleted.
@method _deleteRecord
@param index {Number} Position index.
@param range {Number} (optional) How many Records to delete
@private | [
"Deletes",
"Records",
"from",
"the",
"RecordSet",
"at",
"the",
"given",
"index",
".",
"If",
"range",
"is",
"null",
"then",
"only",
"one",
"Record",
"is",
"deleted",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1784-L1790 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(record) {
var i;
if(record instanceof widget.Record) {
for(i=0; i<this._records.length; i++) {
if(this._records[i] && (this._records[i]._sId === record._sId)) {
return record;
}
}
}
else if(lang.isNumber... | javascript | function(record) {
var i;
if(record instanceof widget.Record) {
for(i=0; i<this._records.length; i++) {
if(this._records[i] && (this._records[i]._sId === record._sId)) {
return record;
}
}
}
else if(lang.isNumber... | [
"function",
"(",
"record",
")",
"{",
"var",
"i",
";",
"if",
"(",
"record",
"instanceof",
"widget",
".",
"Record",
")",
"{",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"_records",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
... | Returns Record by ID or RecordSet position index.
@method getRecord
@param record {YAHOO.widget.Record | Number | String} Record instance,
RecordSet position index, or Record ID.
@return {YAHOO.widget.Record} Record object. | [
"Returns",
"Record",
"by",
"ID",
"or",
"RecordSet",
"position",
"index",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1837-L1861 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(index, range) {
if(!lang.isNumber(index)) {
return this._records;
}
if(!lang.isNumber(range)) {
return this._records.slice(index);
}
return this._records.slice(index, index+range);
} | javascript | function(index, range) {
if(!lang.isNumber(index)) {
return this._records;
}
if(!lang.isNumber(range)) {
return this._records.slice(index);
}
return this._records.slice(index, index+range);
} | [
"function",
"(",
"index",
",",
"range",
")",
"{",
"if",
"(",
"!",
"lang",
".",
"isNumber",
"(",
"index",
")",
")",
"{",
"return",
"this",
".",
"_records",
";",
"}",
"if",
"(",
"!",
"lang",
".",
"isNumber",
"(",
"range",
")",
")",
"{",
"return",
... | Returns an array of Records from the RecordSet.
@method getRecords
@param index {Number} (optional) Recordset position index of which Record to
start at.
@param range {Number} (optional) Number of Records to get.
@return {YAHOO.widget.Record[]} Array of Records starting at given index and
length equal to given range. ... | [
"Returns",
"an",
"array",
"of",
"Records",
"from",
"the",
"RecordSet",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1873-L1881 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function (index, range) {
var recs = this.getRecords(index,range);
for (var i = 0; i < range; ++i) {
if (typeof recs[i] === 'undefined') {
return false;
}
}
return true;
} | javascript | function (index, range) {
var recs = this.getRecords(index,range);
for (var i = 0; i < range; ++i) {
if (typeof recs[i] === 'undefined') {
return false;
}
}
return true;
} | [
"function",
"(",
"index",
",",
"range",
")",
"{",
"var",
"recs",
"=",
"this",
".",
"getRecords",
"(",
"index",
",",
"range",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"range",
";",
"++",
"i",
")",
"{",
"if",
"(",
"typeof",
"r... | Returns a boolean indicating whether Records exist in the RecordSet at the
specified index range. Returns true if and only if a Record exists at each
index in the range.
@method hasRecords
@param index
@param range
@return {Boolean} true if all indices are populated in the RecordSet | [
"Returns",
"a",
"boolean",
"indicating",
"whether",
"Records",
"exist",
"in",
"the",
"RecordSet",
"at",
"the",
"specified",
"index",
"range",
".",
"Returns",
"true",
"if",
"and",
"only",
"if",
"a",
"Record",
"exists",
"at",
"each",
"index",
"in",
"the",
"r... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1892-L1900 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(oRecord) {
if(oRecord) {
for(var i=this._records.length-1; i>-1; i--) {
if(this._records[i] && oRecord.getId() === this._records[i].getId()) {
return i;
}
}
}
return null;
} | javascript | function(oRecord) {
if(oRecord) {
for(var i=this._records.length-1; i>-1; i--) {
if(this._records[i] && oRecord.getId() === this._records[i].getId()) {
return i;
}
}
}
return null;
} | [
"function",
"(",
"oRecord",
")",
"{",
"if",
"(",
"oRecord",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"this",
".",
"_records",
".",
"length",
"-",
"1",
";",
"i",
">",
"-",
"1",
";",
"i",
"--",
")",
"{",
"if",
"(",
"this",
".",
"_records",
"[",
... | Returns current position index for the given Record.
@method getRecordIndex
@param oRecord {YAHOO.widget.Record} Record instance.
@return {Number} Record's RecordSet position index. | [
"Returns",
"current",
"position",
"index",
"for",
"the",
"given",
"Record",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1910-L1920 | train | |
neyric/webhookit | public/javascripts/yui/datatable/datatable.js | function(aData, index) {
if(lang.isArray(aData)) {
var newRecords = [],
idx,i,len;
index = lang.isNumber(index) ? index : this._records.length;
idx = index;
// Can't go backwards bc we need to preserve order
for(i=0,len=aData.length; ... | javascript | function(aData, index) {
if(lang.isArray(aData)) {
var newRecords = [],
idx,i,len;
index = lang.isNumber(index) ? index : this._records.length;
idx = index;
// Can't go backwards bc we need to preserve order
for(i=0,len=aData.length; ... | [
"function",
"(",
"aData",
",",
"index",
")",
"{",
"if",
"(",
"lang",
".",
"isArray",
"(",
"aData",
")",
")",
"{",
"var",
"newRecords",
"=",
"[",
"]",
",",
"idx",
",",
"i",
",",
"len",
";",
"index",
"=",
"lang",
".",
"isNumber",
"(",
"index",
")... | Adds multiple Records at once to the RecordSet at the given index with the
given object literal data. If index is null, then the new Records are
added to the end of the RecordSet.
@method addRecords
@param aData {Object[]} An object literal data or an array of data object literals.
@param index {Number} (optional) Pos... | [
"Adds",
"multiple",
"Records",
"at",
"once",
"to",
"the",
"RecordSet",
"at",
"the",
"given",
"index",
"with",
"the",
"given",
"object",
"literal",
"data",
".",
"If",
"index",
"is",
"null",
"then",
"the",
"new",
"Records",
"are",
"added",
"to",
"the",
"en... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/datatable/datatable.js#L1952-L1978 | train |
Subsets and Splits
SQL Console for semeru/code-text-javascript
Retrieves 20,000 non-null code samples labeled as JavaScript, providing a basic overview of the dataset.