id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
43,100 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(e) {
//YAHOO.log("handlemousemove");
var dc = this.dragCurrent;
if (dc) {
// YAHOO.log("no current drag obj");
// var button = e.which || e.button;
// YAHOO.log("which: " + e.which + ", button: "+ e.button);
... | javascript | function(e) {
//YAHOO.log("handlemousemove");
var dc = this.dragCurrent;
if (dc) {
// YAHOO.log("no current drag obj");
// var button = e.which || e.button;
// YAHOO.log("which: " + e.which + ", button: "+ e.button);
... | [
"function",
"(",
"e",
")",
"{",
"//YAHOO.log(\"handlemousemove\");",
"var",
"dc",
"=",
"this",
".",
"dragCurrent",
";",
"if",
"(",
"dc",
")",
"{",
"// YAHOO.log(\"no current drag obj\");",
"// var button = e.which || e.button;",
"// YAHOO.log(\"which: \" + e.which + \", butto... | Internal function to handle the mousemove event. Will be invoked
from the context of the html element.
@TODO figure out what we can do about mouse events lost when the
user drags objects beyond the window boundary. Currently we can
detect this in internet explorer by verifying that the mouse is
down during the mouse... | [
"Internal",
"function",
"to",
"handle",
"the",
"mousemove",
"event",
".",
"Will",
"be",
"invoked",
"from",
"the",
"context",
"of",
"the",
"html",
"element",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L826-L878 | |
43,101 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(el) {
try {
if (el) {
var parent = el.offsetParent;
if (parent) {
return true;
}
}
} catch(e) {
YAHOO.log("detected problem with an element", "info", "Drag... | javascript | function(el) {
try {
if (el) {
var parent = el.offsetParent;
if (parent) {
return true;
}
}
} catch(e) {
YAHOO.log("detected problem with an element", "info", "Drag... | [
"function",
"(",
"el",
")",
"{",
"try",
"{",
"if",
"(",
"el",
")",
"{",
"var",
"parent",
"=",
"el",
".",
"offsetParent",
";",
"if",
"(",
"parent",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"catch",
"(",
"e",
")",
"{",
"YAHOO",
".",
"log... | This checks to make sure an element exists and is in the DOM. The
main purpose is to handle cases where innerHTML is used to remove
drag and drop objects from the DOM. IE provides an 'unspecified
error' when trying to access the offsetParent of such an element
@method verifyEl
@param {HTMLElement} el the element to c... | [
"This",
"checks",
"to",
"make",
"sure",
"an",
"element",
"exists",
"and",
"is",
"in",
"the",
"DOM",
".",
"The",
"main",
"purpose",
"is",
"to",
"handle",
"cases",
"where",
"innerHTML",
"is",
"used",
"to",
"remove",
"drag",
"and",
"drop",
"objects",
"from"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1135-L1148 | |
43,102 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(oDD) {
if (! this.isTypeOfDD(oDD)) {
YAHOO.log(oDD + " is not a DD obj", "info", "DragDropMgr");
return null;
}
var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
try {
pos= YAHOO.util.Dom.getXY(el);
... | javascript | function(oDD) {
if (! this.isTypeOfDD(oDD)) {
YAHOO.log(oDD + " is not a DD obj", "info", "DragDropMgr");
return null;
}
var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
try {
pos= YAHOO.util.Dom.getXY(el);
... | [
"function",
"(",
"oDD",
")",
"{",
"if",
"(",
"!",
"this",
".",
"isTypeOfDD",
"(",
"oDD",
")",
")",
"{",
"YAHOO",
".",
"log",
"(",
"oDD",
"+",
"\" is not a DD obj\"",
",",
"\"info\"",
",",
"\"DragDropMgr\"",
")",
";",
"return",
"null",
";",
"}",
"var"... | Returns a Region object containing the drag and drop element's position
and size, including the padding configured for it
@method getLocation
@param {DragDrop} oDD the drag and drop object to get the
location for
@return {YAHOO.util.Region} a Region object representing the total area
the element occupies, including any... | [
"Returns",
"a",
"Region",
"object",
"containing",
"the",
"drag",
"and",
"drop",
"element",
"s",
"position",
"and",
"size",
"including",
"the",
"padding",
"configured",
"for",
"it"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1161-L1189 | |
43,103 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(pt, oTarget, intersect, curRegion) {
// use cache if available
var loc = this.locationCache[oTarget.id];
if (!loc || !this.useCache) {
YAHOO.log("cache not populated", "info", "DragDropMgr");
loc = this.getLocation(oTarget);
th... | javascript | function(pt, oTarget, intersect, curRegion) {
// use cache if available
var loc = this.locationCache[oTarget.id];
if (!loc || !this.useCache) {
YAHOO.log("cache not populated", "info", "DragDropMgr");
loc = this.getLocation(oTarget);
th... | [
"function",
"(",
"pt",
",",
"oTarget",
",",
"intersect",
",",
"curRegion",
")",
"{",
"// use cache if available",
"var",
"loc",
"=",
"this",
".",
"locationCache",
"[",
"oTarget",
".",
"id",
"]",
";",
"if",
"(",
"!",
"loc",
"||",
"!",
"this",
".",
"useC... | Checks the cursor location to see if it over the target
@method isOverTarget
@param {YAHOO.util.Point} pt The point to evaluate
@param {DragDrop} oTarget the DragDrop object we are inspecting
@param {boolean} intersect true if we are in intersect mode
@param {YAHOO.util.Region} pre-cached location of the dragged elemen... | [
"Checks",
"the",
"cursor",
"location",
"to",
"see",
"if",
"it",
"over",
"the",
"target"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1202-L1261 | |
43,104 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id) {
var oWrapper = this.elementCache[id];
if (!oWrapper || !oWrapper.el) {
oWrapper = this.elementCache[id] =
new this.ElementWrapper(YAHOO.util.Dom.get(id));
}
return oWrapper;
} | javascript | function(id) {
var oWrapper = this.elementCache[id];
if (!oWrapper || !oWrapper.el) {
oWrapper = this.elementCache[id] =
new this.ElementWrapper(YAHOO.util.Dom.get(id));
}
return oWrapper;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"oWrapper",
"=",
"this",
".",
"elementCache",
"[",
"id",
"]",
";",
"if",
"(",
"!",
"oWrapper",
"||",
"!",
"oWrapper",
".",
"el",
")",
"{",
"oWrapper",
"=",
"this",
".",
"elementCache",
"[",
"id",
"]",
"=",
... | Get the wrapper for the DOM element specified
@method getElWrapper
@param {String} id the id of the element to get
@return {YAHOO.util.DDM.ElementWrapper} the wrapped element
@private
@deprecated This wrapper isn't that useful
@static | [
"Get",
"the",
"wrapper",
"for",
"the",
"DOM",
"element",
"specified"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1315-L1322 | |
43,105 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(n1, n2) {
if (n1.swapNode) {
n1.swapNode(n2);
} else {
var p = n2.parentNode;
var s = n2.nextSibling;
if (s == n1) {
p.insertBefore(n1, n2);
} else if (n2 == n1.nextSibling) {
... | javascript | function(n1, n2) {
if (n1.swapNode) {
n1.swapNode(n2);
} else {
var p = n2.parentNode;
var s = n2.nextSibling;
if (s == n1) {
p.insertBefore(n1, n2);
} else if (n2 == n1.nextSibling) {
... | [
"function",
"(",
"n1",
",",
"n2",
")",
"{",
"if",
"(",
"n1",
".",
"swapNode",
")",
"{",
"n1",
".",
"swapNode",
"(",
"n2",
")",
";",
"}",
"else",
"{",
"var",
"p",
"=",
"n2",
".",
"parentNode",
";",
"var",
"s",
"=",
"n2",
".",
"nextSibling",
";... | Swap two nodes. In IE, we use the native method, for others we
emulate the IE behavior
@method swapNode
@param n1 the first node to swap
@param n2 the other node to swap
@static | [
"Swap",
"two",
"nodes",
".",
"In",
"IE",
"we",
"use",
"the",
"native",
"method",
"for",
"others",
"we",
"emulate",
"the",
"IE",
"behavior"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1408-L1424 | |
43,106 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function () {
var t, l, dde=document.documentElement, db=document.body;
if (dde && (dde.scrollTop || dde.scrollLeft)) {
t = dde.scrollTop;
l = dde.scrollLeft;
} else if (db) {
t = db.scrollTop;
l = db.scrollLeft;
... | javascript | function () {
var t, l, dde=document.documentElement, db=document.body;
if (dde && (dde.scrollTop || dde.scrollLeft)) {
t = dde.scrollTop;
l = dde.scrollLeft;
} else if (db) {
t = db.scrollTop;
l = db.scrollLeft;
... | [
"function",
"(",
")",
"{",
"var",
"t",
",",
"l",
",",
"dde",
"=",
"document",
".",
"documentElement",
",",
"db",
"=",
"document",
".",
"body",
";",
"if",
"(",
"dde",
"&&",
"(",
"dde",
".",
"scrollTop",
"||",
"dde",
".",
"scrollLeft",
")",
")",
"{... | Returns the current scroll position
@method getScroll
@private
@static | [
"Returns",
"the",
"current",
"scroll",
"position"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1432-L1444 | |
43,107 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function() {
var DDM = YAHOO.util.DDM;
if ( YAHOO.util.Event && document ) {
DDM._onLoad();
} else {
if (DDM._timeoutCount > 2000) {
YAHOO.log("DragDrop requires the Event Utility", "error", "DragDropMgr");
} else {
... | javascript | function() {
var DDM = YAHOO.util.DDM;
if ( YAHOO.util.Event && document ) {
DDM._onLoad();
} else {
if (DDM._timeoutCount > 2000) {
YAHOO.log("DragDrop requires the Event Utility", "error", "DragDropMgr");
} else {
... | [
"function",
"(",
")",
"{",
"var",
"DDM",
"=",
"YAHOO",
".",
"util",
".",
"DDM",
";",
"if",
"(",
"YAHOO",
".",
"util",
".",
"Event",
"&&",
"document",
")",
"{",
"DDM",
".",
"_onLoad",
"(",
")",
";",
"}",
"else",
"{",
"if",
"(",
"DDM",
".",
"_t... | Trying to make the load order less important. Without this we get
an error if this file is loaded before the Event Utility.
@method _addListeners
@private
@static | [
"Trying",
"to",
"make",
"the",
"load",
"order",
"less",
"important",
".",
"Without",
"this",
"we",
"get",
"an",
"error",
"if",
"this",
"file",
"is",
"loaded",
"before",
"the",
"Event",
"Utility",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1533-L1547 | |
43,108 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(node, id) {
if (this.isHandle(id, node.id)) {
YAHOO.log("clicked node is a handle", "info", "DragDropMgr");
return true;
} else {
// check to see if this is a text node child of the one we want
var p = node.parentNode;
... | javascript | function(node, id) {
if (this.isHandle(id, node.id)) {
YAHOO.log("clicked node is a handle", "info", "DragDropMgr");
return true;
} else {
// check to see if this is a text node child of the one we want
var p = node.parentNode;
... | [
"function",
"(",
"node",
",",
"id",
")",
"{",
"if",
"(",
"this",
".",
"isHandle",
"(",
"id",
",",
"node",
".",
"id",
")",
")",
"{",
"YAHOO",
".",
"log",
"(",
"\"clicked node is a handle\"",
",",
"\"info\"",
",",
"\"DragDropMgr\"",
")",
";",
"return",
... | Recursively searches the immediate parent and all child nodes for
the handle element in order to determine wheter or not it was
clicked.
@method handleWasClicked
@param node the html element to inspect
@static | [
"Recursively",
"searches",
"the",
"immediate",
"parent",
"and",
"all",
"child",
"nodes",
"for",
"the",
"handle",
"element",
"in",
"order",
"to",
"determine",
"wheter",
"or",
"not",
"it",
"was",
"clicked",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L1557-L1577 | |
43,109 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id, sGroup, config) {
this.initTarget(id, sGroup, config);
Event.on(this._domRef || this.id, "mousedown",
this.handleMouseDown, this, true);
// Event.on(this.id, "selectstart", Event.preventDefault);
for (var i in this.events) {
this.createE... | javascript | function(id, sGroup, config) {
this.initTarget(id, sGroup, config);
Event.on(this._domRef || this.id, "mousedown",
this.handleMouseDown, this, true);
// Event.on(this.id, "selectstart", Event.preventDefault);
for (var i in this.events) {
this.createE... | [
"function",
"(",
"id",
",",
"sGroup",
",",
"config",
")",
"{",
"this",
".",
"initTarget",
"(",
"id",
",",
"sGroup",
",",
"config",
")",
";",
"Event",
".",
"on",
"(",
"this",
".",
"_domRef",
"||",
"this",
".",
"id",
",",
"\"mousedown\"",
",",
"this"... | Sets up the DragDrop object. Must be called in the constructor of any
YAHOO.util.DragDrop subclass
@method init
@param id the id of the linked element
@param {String} sGroup the group of related items
@param {object} config configuration attributes | [
"Sets",
"up",
"the",
"DragDrop",
"object",
".",
"Must",
"be",
"called",
"in",
"the",
"constructor",
"of",
"any",
"YAHOO",
".",
"util",
".",
"DragDrop",
"subclass"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2139-L2149 | |
43,110 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id, sGroup, config) {
// configuration attributes
this.config = config || {};
this.events = {};
// create a local reference to the drag and drop manager
this.DDM = YAHOO.util.DDM;
// initialize the groups object
this.groups = {};
// assume t... | javascript | function(id, sGroup, config) {
// configuration attributes
this.config = config || {};
this.events = {};
// create a local reference to the drag and drop manager
this.DDM = YAHOO.util.DDM;
// initialize the groups object
this.groups = {};
// assume t... | [
"function",
"(",
"id",
",",
"sGroup",
",",
"config",
")",
"{",
"// configuration attributes ",
"this",
".",
"config",
"=",
"config",
"||",
"{",
"}",
";",
"this",
".",
"events",
"=",
"{",
"}",
";",
"// create a local reference to the drag and drop manager",
"this... | Initializes Targeting functionality only... the object does not
get a mousedown handler.
@method initTarget
@param id the id of the linked element
@param {String} sGroup the group of related items
@param {object} config configuration attributes | [
"Initializes",
"Targeting",
"functionality",
"only",
"...",
"the",
"object",
"does",
"not",
"get",
"a",
"mousedown",
"handler",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2159-L2206 | |
43,111 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(diffX, diffY) {
var el = this.getEl();
if (!this.DDM.verifyEl(el)) {
if (el && el.style && (el.style.display == 'none')) {
this.logger.log(this.id + " can not get initial position, element style is display: none");
} else {
this.logger.lo... | javascript | function(diffX, diffY) {
var el = this.getEl();
if (!this.DDM.verifyEl(el)) {
if (el && el.style && (el.style.display == 'none')) {
this.logger.log(this.id + " can not get initial position, element style is display: none");
} else {
this.logger.lo... | [
"function",
"(",
"diffX",
",",
"diffY",
")",
"{",
"var",
"el",
"=",
"this",
".",
"getEl",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"DDM",
".",
"verifyEl",
"(",
"el",
")",
")",
"{",
"if",
"(",
"el",
"&&",
"el",
".",
"style",
"&&",
"(",
"e... | Stores the initial placement of the linked element.
@method setInitialPosition
@param {int} diffX the X offset, default 0
@param {int} diffY the Y offset, default 0
@private | [
"Stores",
"the",
"initial",
"placement",
"of",
"the",
"linked",
"element",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2298-L2326 | |
43,112 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(pos) {
var p = pos || Dom.getXY(this.getEl());
this.deltaSetXY = null;
this.startPageX = p[0];
this.startPageY = p[1];
} | javascript | function(pos) {
var p = pos || Dom.getXY(this.getEl());
this.deltaSetXY = null;
this.startPageX = p[0];
this.startPageY = p[1];
} | [
"function",
"(",
"pos",
")",
"{",
"var",
"p",
"=",
"pos",
"||",
"Dom",
".",
"getXY",
"(",
"this",
".",
"getEl",
"(",
")",
")",
";",
"this",
".",
"deltaSetXY",
"=",
"null",
";",
"this",
".",
"startPageX",
"=",
"p",
"[",
"0",
"]",
";",
"this",
... | Sets the start position of the element. This is set when the obj
is initialized, the reset when a drag is started.
@method setStartPosition
@param pos current position (from previous lookup)
@private | [
"Sets",
"the",
"start",
"position",
"of",
"the",
"element",
".",
"This",
"is",
"set",
"when",
"the",
"obj",
"is",
"initialized",
"the",
"reset",
"when",
"a",
"drag",
"is",
"started",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2335-L2342 | |
43,113 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(sGroup) {
this.logger.log("Removing from group: " + sGroup);
if (this.groups[sGroup]) {
delete this.groups[sGroup];
}
this.DDM.removeDDFromGroup(this, sGroup);
} | javascript | function(sGroup) {
this.logger.log("Removing from group: " + sGroup);
if (this.groups[sGroup]) {
delete this.groups[sGroup];
}
this.DDM.removeDDFromGroup(this, sGroup);
} | [
"function",
"(",
"sGroup",
")",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"\"Removing from group: \"",
"+",
"sGroup",
")",
";",
"if",
"(",
"this",
".",
"groups",
"[",
"sGroup",
"]",
")",
"{",
"delete",
"this",
".",
"groups",
"[",
"sGroup",
"]",
";... | Remove's this instance from the supplied interaction group
@method removeFromGroup
@param {string} sGroup The group to drop | [
"Remove",
"s",
"this",
"instance",
"from",
"the",
"supplied",
"interaction",
"group"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2361-L2368 | |
43,114 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.handleElId = id;
this.DDM.regHandle(this.id, id);
} | javascript | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.handleElId = id;
this.DDM.regHandle(this.id, id);
} | [
"function",
"(",
"id",
")",
"{",
"if",
"(",
"typeof",
"id",
"!==",
"\"string\"",
")",
"{",
"YAHOO",
".",
"log",
"(",
"\"id is not a string, assuming it is an HTMLElement\"",
")",
";",
"id",
"=",
"Dom",
".",
"generateId",
"(",
"id",
")",
";",
"}",
"this",
... | Allows you to specify a child of the linked element that should be
used to initiate the drag operation. An example of this would be if
you have a content div with text and links. Clicking anywhere in the
content area would normally start the drag operation. Use this method
to specify that an element inside of the co... | [
"Allows",
"you",
"to",
"specify",
"a",
"child",
"of",
"the",
"linked",
"element",
"that",
"should",
"be",
"used",
"to",
"initiate",
"the",
"drag",
"operation",
".",
"An",
"example",
"of",
"this",
"would",
"be",
"if",
"you",
"have",
"a",
"content",
"div",... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2391-L2398 | |
43,115 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.logger.log("Adding outer handle event: " + id);
Event.on(id, "mousedown",
this.handleMouseDown, this, true... | javascript | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.logger.log("Adding outer handle event: " + id);
Event.on(id, "mousedown",
this.handleMouseDown, this, true... | [
"function",
"(",
"id",
")",
"{",
"if",
"(",
"typeof",
"id",
"!==",
"\"string\"",
")",
"{",
"YAHOO",
".",
"log",
"(",
"\"id is not a string, assuming it is an HTMLElement\"",
")",
";",
"id",
"=",
"Dom",
".",
"generateId",
"(",
"id",
")",
";",
"}",
"this",
... | Allows you to set an element outside of the linked element as a drag
handle
@method setOuterHandleElId
@param id the id of the element that will be used to initiate the drag | [
"Allows",
"you",
"to",
"set",
"an",
"element",
"outside",
"of",
"the",
"linked",
"element",
"as",
"a",
"drag",
"handle"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2406-L2417 | |
43,116 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function() {
this.logger.log("DragDrop obj cleanup " + this.id);
Event.removeListener(this.id, "mousedown",
this.handleMouseDown);
this._domRef = null;
this.DDM._remove(this);
} | javascript | function() {
this.logger.log("DragDrop obj cleanup " + this.id);
Event.removeListener(this.id, "mousedown",
this.handleMouseDown);
this._domRef = null;
this.DDM._remove(this);
} | [
"function",
"(",
")",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"\"DragDrop obj cleanup \"",
"+",
"this",
".",
"id",
")",
";",
"Event",
".",
"removeListener",
"(",
"this",
".",
"id",
",",
"\"mousedown\"",
",",
"this",
".",
"handleMouseDown",
")",
";",... | Remove all drag and drop hooks for this element
@method unreg | [
"Remove",
"all",
"drag",
"and",
"drop",
"hooks",
"for",
"this",
"element"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2423-L2429 | |
43,117 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(e, oDD) {
var button = e.which || e.button;
this.logger.log("button: " + button);
if (this.primaryButtonOnly && button > 1) {
this.logger.log("Mousedown was not produced by the primary button");
return;
}
if (this.isLocked()) {
this... | javascript | function(e, oDD) {
var button = e.which || e.button;
this.logger.log("button: " + button);
if (this.primaryButtonOnly && button > 1) {
this.logger.log("Mousedown was not produced by the primary button");
return;
}
if (this.isLocked()) {
this... | [
"function",
"(",
"e",
",",
"oDD",
")",
"{",
"var",
"button",
"=",
"e",
".",
"which",
"||",
"e",
".",
"button",
";",
"this",
".",
"logger",
".",
"log",
"(",
"\"button: \"",
"+",
"button",
")",
";",
"if",
"(",
"this",
".",
"primaryButtonOnly",
"&&",
... | Fired when this object is clicked
@method handleMouseDown
@param {Event} e
@param {YAHOO.util.DragDrop} oDD the clicked dd object (this dd obj)
@private | [
"Fired",
"when",
"this",
"object",
"is",
"clicked"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2449-L2519 | |
43,118 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.invalidHandleIds[id] = id;
} | javascript | function(id) {
if (typeof id !== "string") {
YAHOO.log("id is not a string, assuming it is an HTMLElement");
id = Dom.generateId(id);
}
this.invalidHandleIds[id] = id;
} | [
"function",
"(",
"id",
")",
"{",
"if",
"(",
"typeof",
"id",
"!==",
"\"string\"",
")",
"{",
"YAHOO",
".",
"log",
"(",
"\"id is not a string, assuming it is an HTMLElement\"",
")",
";",
"id",
"=",
"Dom",
".",
"generateId",
"(",
"id",
")",
";",
"}",
"this",
... | Lets you to specify an element id for a child of a drag handle
that should not initiate a drag
@method addInvalidHandleId
@param {string} id the element id of the element you wish to ignore | [
"Lets",
"you",
"to",
"specify",
"an",
"element",
"id",
"for",
"a",
"child",
"of",
"a",
"drag",
"handle",
"that",
"should",
"not",
"initiate",
"a",
"drag"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2589-L2595 | |
43,119 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(cssClass) {
for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
if (this.invalidHandleClasses[i] == cssClass) {
delete this.invalidHandleClasses[i];
}
}
} | javascript | function(cssClass) {
for (var i=0, len=this.invalidHandleClasses.length; i<len; ++i) {
if (this.invalidHandleClasses[i] == cssClass) {
delete this.invalidHandleClasses[i];
}
}
} | [
"function",
"(",
"cssClass",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"this",
".",
"invalidHandleClasses",
".",
"length",
";",
"i",
"<",
"len",
";",
"++",
"i",
")",
"{",
"if",
"(",
"this",
".",
"invalidHandleClasses",
"[",
"i",
... | Unsets an invalid css class
@method removeInvalidHandleClass
@param {string} cssClass the class of the element(s) you wish to
re-enable | [
"Unsets",
"an",
"invalid",
"css",
"class"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2637-L2643 | |
43,120 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(node) {
var valid = true;
// var n = (node.nodeName == "#text") ? node.parentNode : node;
var nodeName;
try {
nodeName = node.nodeName.toUpperCase();
} catch(e) {
nodeName = node.nodeName;
}
valid = valid && !this.invalidHandleTyp... | javascript | function(node) {
var valid = true;
// var n = (node.nodeName == "#text") ? node.parentNode : node;
var nodeName;
try {
nodeName = node.nodeName.toUpperCase();
} catch(e) {
nodeName = node.nodeName;
}
valid = valid && !this.invalidHandleTyp... | [
"function",
"(",
"node",
")",
"{",
"var",
"valid",
"=",
"true",
";",
"// var n = (node.nodeName == \"#text\") ? node.parentNode : node;",
"var",
"nodeName",
";",
"try",
"{",
"nodeName",
"=",
"node",
".",
"nodeName",
".",
"toUpperCase",
"(",
")",
";",
"}",
"catch... | Checks the tag exclusion list to see if this click should be ignored
@method isValidHandleChild
@param {HTMLElement} node the HTMLElement to evaluate
@return {boolean} true if this is a valid tag type, false if not | [
"Checks",
"the",
"tag",
"exclusion",
"list",
"to",
"see",
"if",
"this",
"click",
"should",
"be",
"ignored"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2651-L2672 | |
43,121 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(iLeft, iRight, iTickSize) {
this.leftConstraint = parseInt(iLeft, 10);
this.rightConstraint = parseInt(iRight, 10);
this.minX = this.initPageX - this.leftConstraint;
this.maxX = this.initPageX + this.rightConstraint;
if (iTickSize) { this.setXTicks(this.initPageX, iTick... | javascript | function(iLeft, iRight, iTickSize) {
this.leftConstraint = parseInt(iLeft, 10);
this.rightConstraint = parseInt(iRight, 10);
this.minX = this.initPageX - this.leftConstraint;
this.maxX = this.initPageX + this.rightConstraint;
if (iTickSize) { this.setXTicks(this.initPageX, iTick... | [
"function",
"(",
"iLeft",
",",
"iRight",
",",
"iTickSize",
")",
"{",
"this",
".",
"leftConstraint",
"=",
"parseInt",
"(",
"iLeft",
",",
"10",
")",
";",
"this",
".",
"rightConstraint",
"=",
"parseInt",
"(",
"iRight",
",",
"10",
")",
";",
"this",
".",
... | By default, the element can be dragged any place on the screen. Use
this method to limit the horizontal travel of the element. Pass in
0,0 for the parameters if you want to lock the drag to the y axis.
@method setXConstraint
@param {int} iLeft the number of pixels the element can move to the left
@param {int} iRight ... | [
"By",
"default",
"the",
"element",
"can",
"be",
"dragged",
"any",
"place",
"on",
"the",
"screen",
".",
"Use",
"this",
"method",
"to",
"limit",
"the",
"horizontal",
"travel",
"of",
"the",
"element",
".",
"Pass",
"in",
"0",
"0",
"for",
"the",
"parameters",... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2748-L2759 | |
43,122 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(iUp, iDown, iTickSize) {
this.logger.log("setYConstraint: " + iUp + "," + iDown + "," + iTickSize);
this.topConstraint = parseInt(iUp, 10);
this.bottomConstraint = parseInt(iDown, 10);
this.minY = this.initPageY - this.topConstraint;
this.maxY = this.initPageY + this.bo... | javascript | function(iUp, iDown, iTickSize) {
this.logger.log("setYConstraint: " + iUp + "," + iDown + "," + iTickSize);
this.topConstraint = parseInt(iUp, 10);
this.bottomConstraint = parseInt(iDown, 10);
this.minY = this.initPageY - this.topConstraint;
this.maxY = this.initPageY + this.bo... | [
"function",
"(",
"iUp",
",",
"iDown",
",",
"iTickSize",
")",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"\"setYConstraint: \"",
"+",
"iUp",
"+",
"\",\"",
"+",
"iDown",
"+",
"\",\"",
"+",
"iTickSize",
")",
";",
"this",
".",
"topConstraint",
"=",
"pars... | By default, the element can be dragged any place on the screen. Set
this to limit the vertical travel of the element. Pass in 0,0 for the
parameters if you want to lock the drag to the x axis.
@method setYConstraint
@param {int} iUp the number of pixels the element can move up
@param {int} iDown the number of pixels ... | [
"By",
"default",
"the",
"element",
"can",
"be",
"dragged",
"any",
"place",
"on",
"the",
"screen",
".",
"Set",
"this",
"to",
"limit",
"the",
"vertical",
"travel",
"of",
"the",
"element",
".",
"Pass",
"in",
"0",
"0",
"for",
"the",
"parameters",
"if",
"yo... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L2795-L2808 | |
43,123 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(el, iPageX, iPageY) {
var oCoord = this.getTargetCoord(iPageX, iPageY);
// this.logger.log("****alignElWithMouse : " + el.id + ", " + aCoord + ", " + el.style.display);
if (!this.deltaSetXY) {
var aCoord = [oCoord.x, oCoord.y];
YAHOO.util.Dom.setXY(el, aCoord);
... | javascript | function(el, iPageX, iPageY) {
var oCoord = this.getTargetCoord(iPageX, iPageY);
// this.logger.log("****alignElWithMouse : " + el.id + ", " + aCoord + ", " + el.style.display);
if (!this.deltaSetXY) {
var aCoord = [oCoord.x, oCoord.y];
YAHOO.util.Dom.setXY(el, aCoord);
... | [
"function",
"(",
"el",
",",
"iPageX",
",",
"iPageY",
")",
"{",
"var",
"oCoord",
"=",
"this",
".",
"getTargetCoord",
"(",
"iPageX",
",",
"iPageY",
")",
";",
"// this.logger.log(\"****alignElWithMouse : \" + el.id + \", \" + aCoord + \", \" + el.style.display);",
"if",
"(... | Sets the element to the location of the mousedown or click event,
maintaining the cursor location relative to the location on the element
that was clicked. Override this if you want to place the element in a
location other than where the cursor is.
@method alignElWithMouse
@param {HTMLElement} el the element to move
@... | [
"Sets",
"the",
"element",
"to",
"the",
"location",
"of",
"the",
"mousedown",
"or",
"click",
"event",
"maintaining",
"the",
"cursor",
"location",
"relative",
"to",
"the",
"location",
"on",
"the",
"element",
"that",
"was",
"clicked",
".",
"Override",
"this",
"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3073-L3095 | |
43,124 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(iPageX, iPageY) {
if (iPageX) {
this.lastPageX = iPageX;
this.lastPageY = iPageY;
} else {
var aCoord = YAHOO.util.Dom.getXY(this.getEl());
this.lastPageX = aCoord[0];
this.lastPageY = aCoord[1];
}
} | javascript | function(iPageX, iPageY) {
if (iPageX) {
this.lastPageX = iPageX;
this.lastPageY = iPageY;
} else {
var aCoord = YAHOO.util.Dom.getXY(this.getEl());
this.lastPageX = aCoord[0];
this.lastPageY = aCoord[1];
}
} | [
"function",
"(",
"iPageX",
",",
"iPageY",
")",
"{",
"if",
"(",
"iPageX",
")",
"{",
"this",
".",
"lastPageX",
"=",
"iPageX",
";",
"this",
".",
"lastPageY",
"=",
"iPageY",
";",
"}",
"else",
"{",
"var",
"aCoord",
"=",
"YAHOO",
".",
"util",
".",
"Dom",... | Saves the most recent position so that we can reset the constraints and
tick marks on-demand. We need to know this so that we can calculate the
number of pixels the element is offset from its original position.
@method cachePosition
@param iPageX the current x position (optional, this just makes it so we
don't have to... | [
"Saves",
"the",
"most",
"recent",
"position",
"so",
"that",
"we",
"can",
"reset",
"the",
"constraints",
"and",
"tick",
"marks",
"on",
"-",
"demand",
".",
"We",
"need",
"to",
"know",
"this",
"so",
"that",
"we",
"can",
"calculate",
"the",
"number",
"of",
... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3107-L3116 | |
43,125 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(x, y, h, w) {
if (this.scroll) {
// The client height
var clientH = this.DDM.getClientHeight();
// The client width
var clientW = this.DDM.getClientWidth();
// The amt scrolled down
var st = this.DDM.getScrollTop();
... | javascript | function(x, y, h, w) {
if (this.scroll) {
// The client height
var clientH = this.DDM.getClientHeight();
// The client width
var clientW = this.DDM.getClientWidth();
// The amt scrolled down
var st = this.DDM.getScrollTop();
... | [
"function",
"(",
"x",
",",
"y",
",",
"h",
",",
"w",
")",
"{",
"if",
"(",
"this",
".",
"scroll",
")",
"{",
"// The client height",
"var",
"clientH",
"=",
"this",
".",
"DDM",
".",
"getClientHeight",
"(",
")",
";",
"// The client width",
"var",
"clientW",... | Auto-scroll the window if the dragged object has been moved beyond the
visible window boundary.
@method autoScroll
@param {int} x the drag element's x position
@param {int} y the drag element's y position
@param {int} h the height of the drag element
@param {int} w the width of the drag element
@private | [
"Auto",
"-",
"scroll",
"the",
"window",
"if",
"the",
"dragged",
"object",
"has",
"been",
"moved",
"beyond",
"the",
"visible",
"window",
"boundary",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3128-L3195 | |
43,126 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(iPageX, iPageY) {
var el = this.getEl();
var dragEl = this.getDragEl();
var s = dragEl.style;
this._resizeProxy();
if (this.centerFrame) {
this.setDelta( Math.round(parseInt(s.width, 10)/2),
Math.round(parseInt(s.height, 10)/2) ... | javascript | function(iPageX, iPageY) {
var el = this.getEl();
var dragEl = this.getDragEl();
var s = dragEl.style;
this._resizeProxy();
if (this.centerFrame) {
this.setDelta( Math.round(parseInt(s.width, 10)/2),
Math.round(parseInt(s.height, 10)/2) ... | [
"function",
"(",
"iPageX",
",",
"iPageY",
")",
"{",
"var",
"el",
"=",
"this",
".",
"getEl",
"(",
")",
";",
"var",
"dragEl",
"=",
"this",
".",
"getDragEl",
"(",
")",
";",
"var",
"s",
"=",
"dragEl",
".",
"style",
";",
"this",
".",
"_resizeProxy",
"... | Resizes the drag frame to the dimensions of the clicked object, positions
it over the object, and finally displays it
@method showFrame
@param {int} iPageX X click position
@param {int} iPageY Y click position
@private | [
"Resizes",
"the",
"drag",
"frame",
"to",
"the",
"dimensions",
"of",
"the",
"clicked",
"object",
"positions",
"it",
"over",
"the",
"object",
"and",
"finally",
"displays",
"it"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3486-L3501 | |
43,127 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function() {
if (this.resizeFrame) {
var DOM = YAHOO.util.Dom;
var el = this.getEl();
var dragEl = this.getDragEl();
var bt = parseInt( DOM.getStyle(dragEl, "borderTopWidth" ), 10);
var br = parseInt( DOM.getStyle(dragEl, "borderRightWidth" ... | javascript | function() {
if (this.resizeFrame) {
var DOM = YAHOO.util.Dom;
var el = this.getEl();
var dragEl = this.getDragEl();
var bt = parseInt( DOM.getStyle(dragEl, "borderTopWidth" ), 10);
var br = parseInt( DOM.getStyle(dragEl, "borderRightWidth" ... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"resizeFrame",
")",
"{",
"var",
"DOM",
"=",
"YAHOO",
".",
"util",
".",
"Dom",
";",
"var",
"el",
"=",
"this",
".",
"getEl",
"(",
")",
";",
"var",
"dragEl",
"=",
"this",
".",
"getDragEl",
"(",
")... | The proxy is automatically resized to the dimensions of the linked
element when a drag is initiated, unless resizeFrame is set to false
@method _resizeProxy
@private | [
"The",
"proxy",
"is",
"automatically",
"resized",
"to",
"the",
"dimensions",
"of",
"the",
"linked",
"element",
"when",
"a",
"drag",
"is",
"initiated",
"unless",
"resizeFrame",
"is",
"set",
"to",
"false"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3509-L3535 | |
43,128 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(e) {
this.setStartPosition();
var x = YAHOO.util.Event.getPageX(e);
var y = YAHOO.util.Event.getPageY(e);
this.autoOffset(x, y);
// This causes the autoscroll code to kick off, which means autoscroll can
// happen prior to the check for a valid drag handle.
... | javascript | function(e) {
this.setStartPosition();
var x = YAHOO.util.Event.getPageX(e);
var y = YAHOO.util.Event.getPageY(e);
this.autoOffset(x, y);
// This causes the autoscroll code to kick off, which means autoscroll can
// happen prior to the check for a valid drag handle.
... | [
"function",
"(",
"e",
")",
"{",
"this",
".",
"setStartPosition",
"(",
")",
";",
"var",
"x",
"=",
"YAHOO",
".",
"util",
".",
"Event",
".",
"getPageX",
"(",
"e",
")",
";",
"var",
"y",
"=",
"YAHOO",
".",
"util",
".",
"Event",
".",
"getPageY",
"(",
... | overrides YAHOO.util.DragDrop | [
"overrides",
"YAHOO",
".",
"util",
".",
"DragDrop"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3538-L3547 | |
43,129 | neyric/webhookit | public/javascripts/yui/dragdrop/dragdrop-debug.js | function(e) {
var DOM = YAHOO.util.Dom;
this.logger.log(this.id + " endDrag");
var lel = this.getEl();
var del = this.getDragEl();
// Show the drag frame briefly so we can get its position
// del.style.visibility = "";
DOM.setStyle(del, "visibility", "");
... | javascript | function(e) {
var DOM = YAHOO.util.Dom;
this.logger.log(this.id + " endDrag");
var lel = this.getEl();
var del = this.getDragEl();
// Show the drag frame briefly so we can get its position
// del.style.visibility = "";
DOM.setStyle(del, "visibility", "");
... | [
"function",
"(",
"e",
")",
"{",
"var",
"DOM",
"=",
"YAHOO",
".",
"util",
".",
"Dom",
";",
"this",
".",
"logger",
".",
"log",
"(",
"this",
".",
"id",
"+",
"\" endDrag\"",
")",
";",
"var",
"lel",
"=",
"this",
".",
"getEl",
"(",
")",
";",
"var",
... | overrides YAHOO.util.DragDrop By default we try to move the element to the last location of the frame. This is so that the default behavior mirrors that of YAHOO.util.DD. | [
"overrides",
"YAHOO",
".",
"util",
".",
"DragDrop",
"By",
"default",
"we",
"try",
"to",
"move",
"the",
"element",
"to",
"the",
"last",
"location",
"of",
"the",
"frame",
".",
"This",
"is",
"so",
"that",
"the",
"default",
"behavior",
"mirrors",
"that",
"of... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/dragdrop/dragdrop-debug.js#L3565-L3584 | |
43,130 | neyric/webhookit | public/javascripts/inputex/js/fields/Lens-beta.js | function(options) {
inputEx.Lens.superclass.setOptions.call(this, options);
var lens = "";
if( !lang.isString(options.lens) ) {
for(var i = 0 ; i < this.options.fields.length ; i++) {
lens += "<div class='field-"+this.options.fields[i].name+"'></div>";
}
}
this.options.lens = lang.isString(optio... | javascript | function(options) {
inputEx.Lens.superclass.setOptions.call(this, options);
var lens = "";
if( !lang.isString(options.lens) ) {
for(var i = 0 ; i < this.options.fields.length ; i++) {
lens += "<div class='field-"+this.options.fields[i].name+"'></div>";
}
}
this.options.lens = lang.isString(optio... | [
"function",
"(",
"options",
")",
"{",
"inputEx",
".",
"Lens",
".",
"superclass",
".",
"setOptions",
".",
"call",
"(",
"this",
",",
"options",
")",
";",
"var",
"lens",
"=",
"\"\"",
";",
"if",
"(",
"!",
"lang",
".",
"isString",
"(",
"options",
".",
"... | Set additional options | [
"Set",
"additional",
"options"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/Lens-beta.js#L25-L37 | |
43,131 | neyric/webhookit | public/javascripts/inputex/js/fields/Lens-beta.js | function(parentEl) {
parentEl.innerHTML = this.options.lens;
for(var i = 0 ; i < this.options.fields.length ; i++) {
var els = YAHOO.util.Dom.getElementsByClassName( "field-"+this.options.fields[i].name, "div", parentEl);
var el = els[0];
var params = { parentEl: el, editorField: this.optio... | javascript | function(parentEl) {
parentEl.innerHTML = this.options.lens;
for(var i = 0 ; i < this.options.fields.length ; i++) {
var els = YAHOO.util.Dom.getElementsByClassName( "field-"+this.options.fields[i].name, "div", parentEl);
var el = els[0];
var params = { parentEl: el, editorField: this.optio... | [
"function",
"(",
"parentEl",
")",
"{",
"parentEl",
".",
"innerHTML",
"=",
"this",
".",
"options",
".",
"lens",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"options",
".",
"fields",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Render each the fields in each div which class attribute is "field-"+fieldName | [
"Render",
"each",
"the",
"fields",
"in",
"each",
"div",
"which",
"class",
"attribute",
"is",
"field",
"-",
"+",
"fieldName"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/Lens-beta.js#L42-L64 | |
43,132 | neyric/webhookit | public/javascripts/yui/swfstore/swf.js | function (func, args)
{
if (this._swf[func]) {
return(this._swf[func].apply(this._swf, args));
} else {
return null;
}
} | javascript | function (func, args)
{
if (this._swf[func]) {
return(this._swf[func].apply(this._swf, args));
} else {
return null;
}
} | [
"function",
"(",
"func",
",",
"args",
")",
"{",
"if",
"(",
"this",
".",
"_swf",
"[",
"func",
"]",
")",
"{",
"return",
"(",
"this",
".",
"_swf",
"[",
"func",
"]",
".",
"apply",
"(",
"this",
".",
"_swf",
",",
"args",
")",
")",
";",
"}",
"else",... | Calls a specific function exposed by the SWF's
ExternalInterface.
@method callSWF
@param func {String} the name of the function to call
@param args {Object} the set of arguments to pass to the function. | [
"Calls",
"a",
"specific",
"function",
"exposed",
"by",
"the",
"SWF",
"s",
"ExternalInterface",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/swfstore/swf.js#L226-L233 | |
43,133 | neyric/webhookit | public/javascripts/inputex/js/fields/MapField.js | function(options) {
inputEx.MapField.superclass.setOptions.call(this, options);
this.options.className = options.className || 'inputEx-Field inputEx-MapField';
this.options.width = options.width || '400px';
this.options.height = options.height || '400px';
this.options.loading = options.loading || 'loading... | javascript | function(options) {
inputEx.MapField.superclass.setOptions.call(this, options);
this.options.className = options.className || 'inputEx-Field inputEx-MapField';
this.options.width = options.width || '400px';
this.options.height = options.height || '400px';
this.options.loading = options.loading || 'loading... | [
"function",
"(",
"options",
")",
"{",
"inputEx",
".",
"MapField",
".",
"superclass",
".",
"setOptions",
".",
"call",
"(",
"this",
",",
"options",
")",
";",
"this",
".",
"options",
".",
"className",
"=",
"options",
".",
"className",
"||",
"'inputEx-Field in... | Adds the 'inputEx-MapField' default className | [
"Adds",
"the",
"inputEx",
"-",
"MapField",
"default",
"className"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MapField.js#L76-L89 | |
43,134 | neyric/webhookit | public/javascripts/inputex/js/fields/MapField.js | function() {
if(inputEx.MapFieldsNumber == undefined) { inputEx.MapFieldsNumber = -1; }
inputEx.MapFieldsNumber += 1;
this.apid = this.virtualearth;
if (this.options.api == "virtualearth") {
this.apid = this.virtualearth;
} else if (this.options.api == "google") {
this.apid = this.google;
} else if (... | javascript | function() {
if(inputEx.MapFieldsNumber == undefined) { inputEx.MapFieldsNumber = -1; }
inputEx.MapFieldsNumber += 1;
this.apid = this.virtualearth;
if (this.options.api == "virtualearth") {
this.apid = this.virtualearth;
} else if (this.options.api == "google") {
this.apid = this.google;
} else if (... | [
"function",
"(",
")",
"{",
"if",
"(",
"inputEx",
".",
"MapFieldsNumber",
"==",
"undefined",
")",
"{",
"inputEx",
".",
"MapFieldsNumber",
"=",
"-",
"1",
";",
"}",
"inputEx",
".",
"MapFieldsNumber",
"+=",
"1",
";",
"this",
".",
"apid",
"=",
"this",
".",
... | Render the field using the appropriate mapping function | [
"Render",
"the",
"field",
"using",
"the",
"appropriate",
"mapping",
"function"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MapField.js#L94-L148 | |
43,135 | neyric/webhookit | public/javascripts/inputex/js/fields/MapField.js | function() {
if (!this.elLat) return {};
return {
lat : parseFloat(this.elLat.value),
lon : parseFloat(this.elLon.value),
uzoom : parseInt(this.elUZoom.value),
nzoom : parseInt(this.elNZoom.value)
};
} | javascript | function() {
if (!this.elLat) return {};
return {
lat : parseFloat(this.elLat.value),
lon : parseFloat(this.elLon.value),
uzoom : parseInt(this.elUZoom.value),
nzoom : parseInt(this.elNZoom.value)
};
} | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"elLat",
")",
"return",
"{",
"}",
";",
"return",
"{",
"lat",
":",
"parseFloat",
"(",
"this",
".",
"elLat",
".",
"value",
")",
",",
"lon",
":",
"parseFloat",
"(",
"this",
".",
"elLon",
".",
... | return the same structure as setValue | [
"return",
"the",
"same",
"structure",
"as",
"setValue"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MapField.js#L182-L190 | |
43,136 | neyric/webhookit | public/javascripts/inputex/js/fields/MapField.js | function(_this) {
if (this == window) {
_this.wait_create(_this);
return;
}
if (document.getElementById(this.el.id)) {
this.apid.create(this);
} else {
window.setTimeout(this.wait_create, 0.1, this);
}
} | javascript | function(_this) {
if (this == window) {
_this.wait_create(_this);
return;
}
if (document.getElementById(this.el.id)) {
this.apid.create(this);
} else {
window.setTimeout(this.wait_create, 0.1, this);
}
} | [
"function",
"(",
"_this",
")",
"{",
"if",
"(",
"this",
"==",
"window",
")",
"{",
"_this",
".",
"wait_create",
"(",
"_this",
")",
";",
"return",
";",
"}",
"if",
"(",
"document",
".",
"getElementById",
"(",
"this",
".",
"el",
".",
"id",
")",
")",
"... | This will wait until the DOM element appears before completion of map rendering | [
"This",
"will",
"wait",
"until",
"the",
"DOM",
"element",
"appears",
"before",
"completion",
"of",
"map",
"rendering"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MapField.js#L195-L206 | |
43,137 | neyric/webhookit | public/javascripts/inputex/js/fields/MapField.js | function(superwrapper) {
if (window.VEMap) {
return;
}
var preloader = 'MapVEPreloader_' + inputEx.MapFieldsNumber;
inputEx[preloader] = function() {
superwrapper.wait_create();
};
/*
* Fixes the 'p_elSource.attachEvent is not a function' error
* http://www.google.ca/search?hl=en&q=... | javascript | function(superwrapper) {
if (window.VEMap) {
return;
}
var preloader = 'MapVEPreloader_' + inputEx.MapFieldsNumber;
inputEx[preloader] = function() {
superwrapper.wait_create();
};
/*
* Fixes the 'p_elSource.attachEvent is not a function' error
* http://www.google.ca/search?hl=en&q=... | [
"function",
"(",
"superwrapper",
")",
"{",
"if",
"(",
"window",
".",
"VEMap",
")",
"{",
"return",
";",
"}",
"var",
"preloader",
"=",
"'MapVEPreloader_'",
"+",
"inputEx",
".",
"MapFieldsNumber",
";",
"inputEx",
"[",
"preloader",
"]",
"=",
"function",
"(",
... | If Virtual Earth has not been added via script tag, this
will download it for you
http://soulsolutions.com.au/Blog/tabid/73/EntryID/519/Default.aspx
p_elSource.attachEvent is not a function | [
"If",
"Virtual",
"Earth",
"has",
"not",
"been",
"added",
"via",
"script",
"tag",
"this",
"will",
"download",
"it",
"for",
"you"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/MapField.js#L396-L426 | |
43,138 | neyric/webhookit | public/javascripts/inputex/js/fields/FileField.js | function(options) {
inputEx.FileField.superclass.setOptions.call(this, options);
this.options.size = options.size;
this.options.accept = options.accept;
} | javascript | function(options) {
inputEx.FileField.superclass.setOptions.call(this, options);
this.options.size = options.size;
this.options.accept = options.accept;
} | [
"function",
"(",
"options",
")",
"{",
"inputEx",
".",
"FileField",
".",
"superclass",
".",
"setOptions",
".",
"call",
"(",
"this",
",",
"options",
")",
";",
"this",
".",
"options",
".",
"size",
"=",
"options",
".",
"size",
";",
"this",
".",
"options",
... | Adds size and accept options
@param {Object} options Options object as passed to the constructor | [
"Adds",
"size",
"and",
"accept",
"options"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/FileField.js#L23-L27 | |
43,139 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function() {
var columndefs = inputEx.widget.dtInPlaceEdit.superclass.setColumnDefs.call(this);
// index fields declaration by keys
var fieldsByKey = {};
for(var k = 0 ; k < this.options.fields.length ; k++) {
// Retro-compatibility with inputParms
if (lang.isObject(this.options.fields[k]... | javascript | function() {
var columndefs = inputEx.widget.dtInPlaceEdit.superclass.setColumnDefs.call(this);
// index fields declaration by keys
var fieldsByKey = {};
for(var k = 0 ; k < this.options.fields.length ; k++) {
// Retro-compatibility with inputParms
if (lang.isObject(this.options.fields[k]... | [
"function",
"(",
")",
"{",
"var",
"columndefs",
"=",
"inputEx",
".",
"widget",
".",
"dtInPlaceEdit",
".",
"superclass",
".",
"setColumnDefs",
".",
"call",
"(",
"this",
")",
";",
"// index fields declaration by keys",
"var",
"fieldsByKey",
"=",
"{",
"}",
";",
... | Modify the column definitions to add the inputEx CellEditor | [
"Modify",
"the",
"column",
"definitions",
"to",
"add",
"the",
"inputEx",
"CellEditor"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L67-L91 | |
43,140 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(ev, rowIndex) {
// Get a particular CellEditor
var elCell = ev.target, oColumn;
elCell = this.datatable.getTdEl(elCell);
if(elCell) {
oColumn = this.datatable.getColumn(elCell);
if(oColumn && oColumn.editor) {
var oCellEditor = this.datatable._oCellEditor;
// Clean up active CellEditor... | javascript | function(ev, rowIndex) {
// Get a particular CellEditor
var elCell = ev.target, oColumn;
elCell = this.datatable.getTdEl(elCell);
if(elCell) {
oColumn = this.datatable.getColumn(elCell);
if(oColumn && oColumn.editor) {
var oCellEditor = this.datatable._oCellEditor;
// Clean up active CellEditor... | [
"function",
"(",
"ev",
",",
"rowIndex",
")",
"{",
"// Get a particular CellEditor",
"var",
"elCell",
"=",
"ev",
".",
"target",
",",
"oColumn",
";",
"elCell",
"=",
"this",
".",
"datatable",
".",
"getTdEl",
"(",
"elCell",
")",
";",
"if",
"(",
"elCell",
")"... | Public handler - When clicking on one of the datatable's cells | [
"Public",
"handler",
"-",
"When",
"clicking",
"on",
"one",
"of",
"the",
"datatable",
"s",
"cells"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L113-L135 | |
43,141 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(record,target){
var targetNode = target.childNodes[0];
// Only if the row has an id && isn't already being removed
if( !lang.isUndefined(record.getData('id')) && this.deleteLinkNode != targetNode ){
if (confirm(inputEx.messages.confirmDeletion)) {
this.deleteLinkNode = targetNode;
... | javascript | function(record,target){
var targetNode = target.childNodes[0];
// Only if the row has an id && isn't already being removed
if( !lang.isUndefined(record.getData('id')) && this.deleteLinkNode != targetNode ){
if (confirm(inputEx.messages.confirmDeletion)) {
this.deleteLinkNode = targetNode;
... | [
"function",
"(",
"record",
",",
"target",
")",
"{",
"var",
"targetNode",
"=",
"target",
".",
"childNodes",
"[",
"0",
"]",
";",
"// Only if the row has an id && isn't already being removed",
"if",
"(",
"!",
"lang",
".",
"isUndefined",
"(",
"record",
".",
"getData... | When trying to delete a row | [
"When",
"trying",
"to",
"delete",
"a",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L140-L153 | |
43,142 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(){
this.deleteLinkNode.innerHTML = inputEx.messages.deleteText;
Dom.removeClass(this.deleteLinkNode,'inputEx-dtInPlaceEdit-deleteLinkSpinner');
this.deleteLinkNode = null;
} | javascript | function(){
this.deleteLinkNode.innerHTML = inputEx.messages.deleteText;
Dom.removeClass(this.deleteLinkNode,'inputEx-dtInPlaceEdit-deleteLinkSpinner');
this.deleteLinkNode = null;
} | [
"function",
"(",
")",
"{",
"this",
".",
"deleteLinkNode",
".",
"innerHTML",
"=",
"inputEx",
".",
"messages",
".",
"deleteText",
";",
"Dom",
".",
"removeClass",
"(",
"this",
".",
"deleteLinkNode",
",",
"'inputEx-dtInPlaceEdit-deleteLinkSpinner'",
")",
";",
"this"... | When failed to delete a row | [
"When",
"failed",
"to",
"delete",
"a",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L165-L169 | |
43,143 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(e) {
// If insertWithDialog
if(this.options.insertWithDialog) {
inputEx.widget.dtInPlaceEdit.superclass.onInsertButton.call(this, e);
return;
}
var tbl = this.datatable;
// Insert a new row
tbl.addRow({});
// Select the new row
var lastRow = tbl.getLastTrEl();
tbl.sele... | javascript | function(e) {
// If insertWithDialog
if(this.options.insertWithDialog) {
inputEx.widget.dtInPlaceEdit.superclass.onInsertButton.call(this, e);
return;
}
var tbl = this.datatable;
// Insert a new row
tbl.addRow({});
// Select the new row
var lastRow = tbl.getLastTrEl();
tbl.sele... | [
"function",
"(",
"e",
")",
"{",
"// If insertWithDialog",
"if",
"(",
"this",
".",
"options",
".",
"insertWithDialog",
")",
"{",
"inputEx",
".",
"widget",
".",
"dtInPlaceEdit",
".",
"superclass",
".",
"onInsertButton",
".",
"call",
"(",
"this",
",",
"e",
")... | When clicking on the "insert" button to add a new row | [
"When",
"clicking",
"on",
"the",
"insert",
"button",
"to",
"add",
"a",
"new",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L174-L210 | |
43,144 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(e) {
Event.stopEvent(e);
var target = Event.getTarget(e),
record = this.datatable.getRecord(target),
field, requiredFields = [];
for(var i=0, fieldsLength = this.options.fields.length; i<fieldsLength; i++){
field = this.options.fields[i];
// Retro-compatibility with inputParms
... | javascript | function(e) {
Event.stopEvent(e);
var target = Event.getTarget(e),
record = this.datatable.getRecord(target),
field, requiredFields = [];
for(var i=0, fieldsLength = this.options.fields.length; i<fieldsLength; i++){
field = this.options.fields[i];
// Retro-compatibility with inputParms
... | [
"function",
"(",
"e",
")",
"{",
"Event",
".",
"stopEvent",
"(",
"e",
")",
";",
"var",
"target",
"=",
"Event",
".",
"getTarget",
"(",
"e",
")",
",",
"record",
"=",
"this",
".",
"datatable",
".",
"getRecord",
"(",
"target",
")",
",",
"field",
",",
... | When clicking "Add" button to save a new row | [
"When",
"clicking",
"Add",
"button",
"to",
"save",
"a",
"new",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L245-L285 | |
43,145 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(e) {
Event.stopEvent(e);
var target = Event.getTarget(e);
this.datatable.deleteRow(target);
this.insertButton.disabled = false ;
} | javascript | function(e) {
Event.stopEvent(e);
var target = Event.getTarget(e);
this.datatable.deleteRow(target);
this.insertButton.disabled = false ;
} | [
"function",
"(",
"e",
")",
"{",
"Event",
".",
"stopEvent",
"(",
"e",
")",
";",
"var",
"target",
"=",
"Event",
".",
"getTarget",
"(",
"e",
")",
";",
"this",
".",
"datatable",
".",
"deleteRow",
"(",
"target",
")",
";",
"this",
".",
"insertButton",
".... | When clicking "Cancel" button to cancel a new row | [
"When",
"clicking",
"Cancel",
"button",
"to",
"cancel",
"a",
"new",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L290-L295 | |
43,146 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(){
if(this.options.insertWithDialog) {
this.datatable.deleteRow(this.selectedRecord);
return;
}
this.addButton.value = inputEx.messages.addButtonText;
this.addButton.disabled = false;
} | javascript | function(){
if(this.options.insertWithDialog) {
this.datatable.deleteRow(this.selectedRecord);
return;
}
this.addButton.value = inputEx.messages.addButtonText;
this.addButton.disabled = false;
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"options",
".",
"insertWithDialog",
")",
"{",
"this",
".",
"datatable",
".",
"deleteRow",
"(",
"this",
".",
"selectedRecord",
")",
";",
"return",
";",
"}",
"this",
".",
"addButton",
".",
"value",
"=",
... | When Failed to Add Row | [
"When",
"Failed",
"to",
"Add",
"Row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L327-L336 | |
43,147 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(record, oArgs){
var itemContainer = oArgs.editor.getTdEl().childNodes[0];
// Add CSS
Dom.addClass(itemContainer, "inputEx-dtInPlaceEdit-onModifyItem");
this.itemModifiedEvt.fire(record);
} | javascript | function(record, oArgs){
var itemContainer = oArgs.editor.getTdEl().childNodes[0];
// Add CSS
Dom.addClass(itemContainer, "inputEx-dtInPlaceEdit-onModifyItem");
this.itemModifiedEvt.fire(record);
} | [
"function",
"(",
"record",
",",
"oArgs",
")",
"{",
"var",
"itemContainer",
"=",
"oArgs",
".",
"editor",
".",
"getTdEl",
"(",
")",
".",
"childNodes",
"[",
"0",
"]",
";",
"// Add CSS",
"Dom",
".",
"addClass",
"(",
"itemContainer",
",",
"\"inputEx-dtInPlaceEd... | When modifying a row | [
"When",
"modifying",
"a",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L341-L346 | |
43,148 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function(record, oData) {
var nodes = this.datatable.getElementsByClassName("inputEx-dtInPlaceEdit-onModifyItem");
// Remove CSS
for(i=0,nodesLength = nodes.length; i<nodesLength; i++){
Dom.removeClass(nodes[i], "inputEx-dtInPlaceEdit-onModifyItem");
}
// If we want to update additional columns
if(... | javascript | function(record, oData) {
var nodes = this.datatable.getElementsByClassName("inputEx-dtInPlaceEdit-onModifyItem");
// Remove CSS
for(i=0,nodesLength = nodes.length; i<nodesLength; i++){
Dom.removeClass(nodes[i], "inputEx-dtInPlaceEdit-onModifyItem");
}
// If we want to update additional columns
if(... | [
"function",
"(",
"record",
",",
"oData",
")",
"{",
"var",
"nodes",
"=",
"this",
".",
"datatable",
".",
"getElementsByClassName",
"(",
"\"inputEx-dtInPlaceEdit-onModifyItem\"",
")",
";",
"// Remove CSS",
"for",
"(",
"i",
"=",
"0",
",",
"nodesLength",
"=",
"node... | When successfully modified a row | [
"When",
"successfully",
"modified",
"a",
"row"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L351-L365 | |
43,149 | neyric/webhookit | public/javascripts/inputex/js/widgets/dtInPlaceEdit.js | function() {
// Build the inputEx field
this._inputExField = inputEx(this._inputExFieldDef);
this.getContainerEl().appendChild(this._inputExField.getEl());
// Locals for Save/Cancel Buttons
this.LABEL_SAVE = inputEx.messages.saveText;
this.LABEL_CANCEL = inputEx.messages.cancelText;
} | javascript | function() {
// Build the inputEx field
this._inputExField = inputEx(this._inputExFieldDef);
this.getContainerEl().appendChild(this._inputExField.getEl());
// Locals for Save/Cancel Buttons
this.LABEL_SAVE = inputEx.messages.saveText;
this.LABEL_CANCEL = inputEx.messages.cancelText;
} | [
"function",
"(",
")",
"{",
"// Build the inputEx field",
"this",
".",
"_inputExField",
"=",
"inputEx",
"(",
"this",
".",
"_inputExFieldDef",
")",
";",
"this",
".",
"getContainerEl",
"(",
")",
".",
"appendChild",
"(",
"this",
".",
"_inputExField",
".",
"getEl",... | Render the inputEx field editor | [
"Render",
"the",
"inputEx",
"field",
"editor"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/dtInPlaceEdit.js#L395-L403 | |
43,150 | neyric/webhookit | public/javascripts/yui/selector/selector-debug.js | function(selector) {
var token = {}, // one token per simple selector (left selector holds combinator)
tokens = [], // array of tokens
id, // unique id for the simple selector (if found)
found = false, // whether or not any matches were found this pass
... | javascript | function(selector) {
var token = {}, // one token per simple selector (left selector holds combinator)
tokens = [], // array of tokens
id, // unique id for the simple selector (if found)
found = false, // whether or not any matches were found this pass
... | [
"function",
"(",
"selector",
")",
"{",
"var",
"token",
"=",
"{",
"}",
",",
"// one token per simple selector (left selector holds combinator)",
"tokens",
"=",
"[",
"]",
",",
"// array of tokens",
"id",
",",
"// unique id for the simple selector (if found)",
"found",
"=",
... | Break selector into token units per simple selector.
Combinator is attached to left-hand selector. | [
"Break",
"selector",
"into",
"token",
"units",
"per",
"simple",
"selector",
".",
"Combinator",
"is",
"attached",
"to",
"left",
"-",
"hand",
"selector",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/selector/selector-debug.js#L551-L605 | |
43,151 | neyric/webhookit | public/javascripts/WireIt/js/CanvasContainer.js | function() {
WireIt.CanvasContainer.superclass.render.call(this);
this.canvasEl = new WireIt.CanvasElement(this.bodyEl);
this.canvasEl.SetCanvasRegion(0,0, this.width, this.height );
this.canvasWidth = this.width;
this.canvasHeight = this.height;
this.drawCanvas();
} | javascript | function() {
WireIt.CanvasContainer.superclass.render.call(this);
this.canvasEl = new WireIt.CanvasElement(this.bodyEl);
this.canvasEl.SetCanvasRegion(0,0, this.width, this.height );
this.canvasWidth = this.width;
this.canvasHeight = this.height;
this.drawCanvas();
} | [
"function",
"(",
")",
"{",
"WireIt",
".",
"CanvasContainer",
".",
"superclass",
".",
"render",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"canvasEl",
"=",
"new",
"WireIt",
".",
"CanvasElement",
"(",
"this",
".",
"bodyEl",
")",
";",
"this",
".",
... | Add the image property as a background image for the container
@method render | [
"Add",
"the",
"image",
"property",
"as",
"a",
"background",
"image",
"for",
"the",
"container"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/js/CanvasContainer.js#L61-L69 | |
43,152 | neyric/webhookit | public/javascripts/WireIt/js/CanvasContainer.js | function(event, args) {
WireIt.CanvasContainer.superclass.onResize.call(this, event, args);
var size = args[0];
// resize the canvas
// TODO: do not hardcode those sizes !!
this.canvasWidth = (size[0]-14);
this.canvasHeight = (size[1]-( this.ddHandle ? 44 : 14) );
this.canvasEl.SetCanvasRegio... | javascript | function(event, args) {
WireIt.CanvasContainer.superclass.onResize.call(this, event, args);
var size = args[0];
// resize the canvas
// TODO: do not hardcode those sizes !!
this.canvasWidth = (size[0]-14);
this.canvasHeight = (size[1]-( this.ddHandle ? 44 : 14) );
this.canvasEl.SetCanvasRegio... | [
"function",
"(",
"event",
",",
"args",
")",
"{",
"WireIt",
".",
"CanvasContainer",
".",
"superclass",
".",
"onResize",
".",
"call",
"(",
"this",
",",
"event",
",",
"args",
")",
";",
"var",
"size",
"=",
"args",
"[",
"0",
"]",
";",
"// resize the canvas"... | On resize, resize the canvas element and redraw it | [
"On",
"resize",
"resize",
"the",
"canvas",
"element",
"and",
"redraw",
"it"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/js/CanvasContainer.js#L74-L87 | |
43,153 | neyric/webhookit | public/javascripts/WireIt/js/CanvasContainer.js | function() {
var ctx = this.canvasEl.getContext('2d');
ctx.strokeStyle = "#5B81AD";
ctx.lineWidth= 2;
ctx.save();
ctx.translate( this.canvasWidth/2, this.canvasHeight/2);
ctx.scale(this.canvasWidth/2-5, this.canvasHeight/2-5);
ctx.arc(0, 0, 1, 0, 2*Math.PI, false);
ctx.restore(); // restore ... | javascript | function() {
var ctx = this.canvasEl.getContext('2d');
ctx.strokeStyle = "#5B81AD";
ctx.lineWidth= 2;
ctx.save();
ctx.translate( this.canvasWidth/2, this.canvasHeight/2);
ctx.scale(this.canvasWidth/2-5, this.canvasHeight/2-5);
ctx.arc(0, 0, 1, 0, 2*Math.PI, false);
ctx.restore(); // restore ... | [
"function",
"(",
")",
"{",
"var",
"ctx",
"=",
"this",
".",
"canvasEl",
".",
"getContext",
"(",
"'2d'",
")",
";",
"ctx",
".",
"strokeStyle",
"=",
"\"#5B81AD\"",
";",
"ctx",
".",
"lineWidth",
"=",
"2",
";",
"ctx",
".",
"save",
"(",
")",
";",
"ctx",
... | Draw the canvas | [
"Draw",
"the",
"canvas"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/js/CanvasContainer.js#L92-L109 | |
43,154 | neyric/webhookit | lib/controllers/wirings.js | get_wiring_collection | function get_wiring_collection(req, res, next) {
app.db.collection('wirings', function(error, wiring_collection) {
if(error) { throw error; }
else {
req.wiring_collection = wiring_collection;
next();
}
});
} | javascript | function get_wiring_collection(req, res, next) {
app.db.collection('wirings', function(error, wiring_collection) {
if(error) { throw error; }
else {
req.wiring_collection = wiring_collection;
next();
}
});
} | [
"function",
"get_wiring_collection",
"(",
"req",
",",
"res",
",",
"next",
")",
"{",
"app",
".",
"db",
".",
"collection",
"(",
"'wirings'",
",",
"function",
"(",
"error",
",",
"wiring_collection",
")",
"{",
"if",
"(",
"error",
")",
"{",
"throw",
"error",
... | store the wiring collection into req.wiring_collection | [
"store",
"the",
"wiring",
"collection",
"into",
"req",
".",
"wiring_collection"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/lib/controllers/wirings.js#L9-L17 |
43,155 | neyric/webhookit | lib/controllers/wirings.js | get_wiring | function get_wiring( req, res, next) {
req.wiring_collection.findOne({
user_id: req.current_user._id,
_id: ObjectID.createFromHexString(req.param('id'))
}, function(error, wiring) {
if(error) { throw error; }
req.wiring = wiring;
next();
});
} | javascript | function get_wiring( req, res, next) {
req.wiring_collection.findOne({
user_id: req.current_user._id,
_id: ObjectID.createFromHexString(req.param('id'))
}, function(error, wiring) {
if(error) { throw error; }
req.wiring = wiring;
next();
});
} | [
"function",
"get_wiring",
"(",
"req",
",",
"res",
",",
"next",
")",
"{",
"req",
".",
"wiring_collection",
".",
"findOne",
"(",
"{",
"user_id",
":",
"req",
".",
"current_user",
".",
"_id",
",",
"_id",
":",
"ObjectID",
".",
"createFromHexString",
"(",
"req... | store the wiring document into req.wiring | [
"store",
"the",
"wiring",
"document",
"into",
"req",
".",
"wiring"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/lib/controllers/wirings.js#L20-L29 |
43,156 | neyric/webhookit | lib/controllers/wirings.js | run_wiring | function run_wiring(wiring, req, res, format) {
var filteredParams = req.query;
// TODO
/*filteredParams = params.dup
filteredParams.delete("id")
filteredParams.delete("action")
filteredParams.delete("controller")
filteredParams.delete("callback")
filteredParams.delete("format")*/
mySi... | javascript | function run_wiring(wiring, req, res, format) {
var filteredParams = req.query;
// TODO
/*filteredParams = params.dup
filteredParams.delete("id")
filteredParams.delete("action")
filteredParams.delete("controller")
filteredParams.delete("callback")
filteredParams.delete("format")*/
mySi... | [
"function",
"run_wiring",
"(",
"wiring",
",",
"req",
",",
"res",
",",
"format",
")",
"{",
"var",
"filteredParams",
"=",
"req",
".",
"query",
";",
"// TODO",
"/*filteredParams = params.dup\n filteredParams.delete(\"id\")\n filteredParams.delete(\"action\")\n filteredP... | Run the wiring ! | [
"Run",
"the",
"wiring",
"!"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/lib/controllers/wirings.js#L292-L380 |
43,157 | 3rd-Eden/licenses | registry.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 npm license 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",
"npm",
"license",
"information",
"from",
"the",
"package",
"."
] | 8f58b7700fd03de0e095cc408852fa12d1379c3f | https://github.com/3rd-Eden/licenses/blob/8f58b7700fd03de0e095cc408852fa12d1379c3f/registry.js#L28-L47 |
43,158 | 3rd-Eden/licenses | registry.js | licenses | function licenses(data) {
if ('string' === typeof data && data) return data;
if ('type' in data && data.type) return data.type;
//
// Common typo's
//
if ('type:' in data && data['type:']) return data['type:'];
return;
} | javascript | function licenses(data) {
if ('string' === typeof data && data) return data;
if ('type' in data && data.type) return data.type;
//
// Common typo's
//
if ('type:' in data && data['type:']) return data['type:'];
return;
} | [
"function",
"licenses",
"(",
"data",
")",
"{",
"if",
"(",
"'string'",
"===",
"typeof",
"data",
"&&",
"data",
")",
"return",
"data",
";",
"if",
"(",
"'type'",
"in",
"data",
"&&",
"data",
".",
"type",
")",
"return",
"data",
".",
"type",
";",
"//",
"/... | Return the possible location of license information.
@param {Object} data The object that should contain the license.
@returns {String}
@api private | [
"Return",
"the",
"possible",
"location",
"of",
"license",
"information",
"."
] | 8f58b7700fd03de0e095cc408852fa12d1379c3f | https://github.com/3rd-Eden/licenses/blob/8f58b7700fd03de0e095cc408852fa12d1379c3f/registry.js#L56-L66 |
43,159 | 3rd-Eden/licenses | registry.js | get | function get(data) {
var parser = this
, matches = [];
//
// Another npm oddity, it allows licenses to be specified in to different
// properties. Because why the fuck not?
//
['license', 'licenses'].forEach(function each(key) {
if ('string' === typeof data[key]) {
return ma... | javascript | function get(data) {
var parser = this
, matches = [];
//
// Another npm oddity, it allows licenses to be specified in to different
// properties. Because why the fuck not?
//
['license', 'licenses'].forEach(function each(key) {
if ('string' === typeof data[key]) {
return ma... | [
"function",
"get",
"(",
"data",
")",
"{",
"var",
"parser",
"=",
"this",
",",
"matches",
"=",
"[",
"]",
";",
"//",
"// Another npm oddity, it allows licenses to be specified in to different",
"// properties. Because why the fuck not?",
"//",
"[",
"'license'",
",",
"'lice... | Retrieve the possible locations of the license information.
@param {Object} data The package.json or npm package contents.
@returns {Array}
@api private | [
"Retrieve",
"the",
"possible",
"locations",
"of",
"the",
"license",
"information",
"."
] | 8f58b7700fd03de0e095cc408852fa12d1379c3f | https://github.com/3rd-Eden/licenses/blob/8f58b7700fd03de0e095cc408852fa12d1379c3f/registry.js#L86-L117 |
43,160 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | makeWhiteSpace | function makeWhiteSpace(n) {
var buffer = [], nb = true;
for (; n > 0; n--) {
buffer.push((nb || n == 1) ? nbsp : " ");
nb = !nb;
}
return buffer.join("");
} | javascript | function makeWhiteSpace(n) {
var buffer = [], nb = true;
for (; n > 0; n--) {
buffer.push((nb || n == 1) ? nbsp : " ");
nb = !nb;
}
return buffer.join("");
} | [
"function",
"makeWhiteSpace",
"(",
"n",
")",
"{",
"var",
"buffer",
"=",
"[",
"]",
",",
"nb",
"=",
"true",
";",
"for",
"(",
";",
"n",
">",
"0",
";",
"n",
"--",
")",
"{",
"buffer",
".",
"push",
"(",
"(",
"nb",
"||",
"n",
"==",
"1",
")",
"?",
... | Make sure a string does not contain two consecutive 'collapseable' whitespace characters. | [
"Make",
"sure",
"a",
"string",
"does",
"not",
"contain",
"two",
"consecutive",
"collapseable",
"whitespace",
"characters",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L14-L21 |
43,161 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | fixSpaces | function fixSpaces(string) {
if (string.charAt(0) == " ") string = nbsp + string.slice(1);
return string.replace(/\t/g, function(){return makeWhiteSpace(indentUnit);})
.replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);});
} | javascript | function fixSpaces(string) {
if (string.charAt(0) == " ") string = nbsp + string.slice(1);
return string.replace(/\t/g, function(){return makeWhiteSpace(indentUnit);})
.replace(/[ \u00a0]{2,}/g, function(s) {return makeWhiteSpace(s.length);});
} | [
"function",
"fixSpaces",
"(",
"string",
")",
"{",
"if",
"(",
"string",
".",
"charAt",
"(",
"0",
")",
"==",
"\" \"",
")",
"string",
"=",
"nbsp",
"+",
"string",
".",
"slice",
"(",
"1",
")",
";",
"return",
"string",
".",
"replace",
"(",
"/",
"\\t",
... | Create a set of white-space characters that will not be collapsed by the browser, but will not break text-wrapping either. | [
"Create",
"a",
"set",
"of",
"white",
"-",
"space",
"characters",
"that",
"will",
"not",
"be",
"collapsed",
"by",
"the",
"browser",
"but",
"will",
"not",
"break",
"text",
"-",
"wrapping",
"either",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L25-L29 |
43,162 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | makePartSpan | function makePartSpan(value, doc) {
var text = value;
if (value.nodeType == 3) text = value.nodeValue;
else value = doc.createTextNode(text);
var span = doc.createElement("SPAN");
span.isPart = true;
span.appendChild(value);
span.currentText = text;
return span;
} | javascript | function makePartSpan(value, doc) {
var text = value;
if (value.nodeType == 3) text = value.nodeValue;
else value = doc.createTextNode(text);
var span = doc.createElement("SPAN");
span.isPart = true;
span.appendChild(value);
span.currentText = text;
return span;
} | [
"function",
"makePartSpan",
"(",
"value",
",",
"doc",
")",
"{",
"var",
"text",
"=",
"value",
";",
"if",
"(",
"value",
".",
"nodeType",
"==",
"3",
")",
"text",
"=",
"value",
".",
"nodeValue",
";",
"else",
"value",
"=",
"doc",
".",
"createTextNode",
"(... | Create a SPAN node with the expected properties for document part spans. | [
"Create",
"a",
"SPAN",
"node",
"with",
"the",
"expected",
"properties",
"for",
"document",
"part",
"spans",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L37-L47 |
43,163 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | pointAt | function pointAt(node){
var parent = node.parentNode;
var next = node.nextSibling;
return function(newnode) {
parent.insertBefore(newnode, next);
};
} | javascript | function pointAt(node){
var parent = node.parentNode;
var next = node.nextSibling;
return function(newnode) {
parent.insertBefore(newnode, next);
};
} | [
"function",
"pointAt",
"(",
"node",
")",
"{",
"var",
"parent",
"=",
"node",
".",
"parentNode",
";",
"var",
"next",
"=",
"node",
".",
"nextSibling",
";",
"return",
"function",
"(",
"newnode",
")",
"{",
"parent",
".",
"insertBefore",
"(",
"newnode",
",",
... | Create a function that can be used to insert nodes after the one given as argument. | [
"Create",
"a",
"function",
"that",
"can",
"be",
"used",
"to",
"insert",
"nodes",
"after",
"the",
"one",
"given",
"as",
"argument",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L123-L129 |
43,164 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | writeNode | function writeNode(node, c, end) {
var toYield = [];
forEach(simplifyDOM(node, end), function(part) {
toYield.push(insertPart(part));
});
return yield(toYield.join(""), c);
} | javascript | function writeNode(node, c, end) {
var toYield = [];
forEach(simplifyDOM(node, end), function(part) {
toYield.push(insertPart(part));
});
return yield(toYield.join(""), c);
} | [
"function",
"writeNode",
"(",
"node",
",",
"c",
",",
"end",
")",
"{",
"var",
"toYield",
"=",
"[",
"]",
";",
"forEach",
"(",
"simplifyDOM",
"(",
"node",
",",
"end",
")",
",",
"function",
"(",
"part",
")",
"{",
"toYield",
".",
"push",
"(",
"insertPar... | Extract the text and newlines from a DOM node, insert them into the document, and yield the textual content. Used to replace non-normalized nodes. | [
"Extract",
"the",
"text",
"and",
"newlines",
"from",
"a",
"DOM",
"node",
"insert",
"them",
"into",
"the",
"document",
"and",
"yield",
"the",
"textual",
"content",
".",
"Used",
"to",
"replace",
"non",
"-",
"normalized",
"nodes",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L165-L171 |
43,165 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
var line = cleanText(self.history.textAfter(self.line).slice(self.offset));
var match = (self.caseFold ? line.toLowerCase() : line).indexOf(string);
if (match > -1)
return {from: {node: self.line, offset: self.offset + match},
to: {node: self.line, offset... | javascript | function() {
var line = cleanText(self.history.textAfter(self.line).slice(self.offset));
var match = (self.caseFold ? line.toLowerCase() : line).indexOf(string);
if (match > -1)
return {from: {node: self.line, offset: self.offset + match},
to: {node: self.line, offset... | [
"function",
"(",
")",
"{",
"var",
"line",
"=",
"cleanText",
"(",
"self",
".",
"history",
".",
"textAfter",
"(",
"self",
".",
"line",
")",
".",
"slice",
"(",
"self",
".",
"offset",
")",
")",
";",
"var",
"match",
"=",
"(",
"self",
".",
"caseFold",
... | For one-line strings, searching can be done simply by calling indexOf on the current line. | [
"For",
"one",
"-",
"line",
"strings",
"searching",
"can",
"be",
"done",
"simply",
"by",
"calling",
"indexOf",
"on",
"the",
"current",
"line",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L273-L279 | |
43,166 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
var firstLine = cleanText(self.history.textAfter(self.line).slice(self.offset));
var match = (self.caseFold ? firstLine.toLowerCase() : firstLine).lastIndexOf(target[0]);
if (match == -1 || match != firstLine.length - target[0].length)
return false;
var startOffset... | javascript | function() {
var firstLine = cleanText(self.history.textAfter(self.line).slice(self.offset));
var match = (self.caseFold ? firstLine.toLowerCase() : firstLine).lastIndexOf(target[0]);
if (match == -1 || match != firstLine.length - target[0].length)
return false;
var startOffset... | [
"function",
"(",
")",
"{",
"var",
"firstLine",
"=",
"cleanText",
"(",
"self",
".",
"history",
".",
"textAfter",
"(",
"self",
".",
"line",
")",
".",
"slice",
"(",
"self",
".",
"offset",
")",
")",
";",
"var",
"match",
"=",
"(",
"self",
".",
"caseFold... | Multi-line strings require internal iteration over lines, and some clunky checks to make sure the first match ends at the end of the line and the last match starts at the start. | [
"Multi",
"-",
"line",
"strings",
"require",
"internal",
"iteration",
"over",
"lines",
"and",
"some",
"clunky",
"checks",
"to",
"make",
"sure",
"the",
"first",
"match",
"ends",
"at",
"the",
"end",
"of",
"the",
"line",
"and",
"the",
"last",
"match",
"starts"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L283-L304 | |
43,167 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | saveAfter | function saveAfter(pos) {
if (self.history.textAfter(pos.node).length > pos.offset) {
self.line = pos.node;
self.offset = pos.offset + 1;
}
else {
self.line = self.history.nodeAfter(pos.node);
self.offset = 0;
}
} | javascript | function saveAfter(pos) {
if (self.history.textAfter(pos.node).length > pos.offset) {
self.line = pos.node;
self.offset = pos.offset + 1;
}
else {
self.line = self.history.nodeAfter(pos.node);
self.offset = 0;
}
} | [
"function",
"saveAfter",
"(",
"pos",
")",
"{",
"if",
"(",
"self",
".",
"history",
".",
"textAfter",
"(",
"pos",
".",
"node",
")",
".",
"length",
">",
"pos",
".",
"offset",
")",
"{",
"self",
".",
"line",
"=",
"pos",
".",
"node",
";",
"self",
".",
... | Set the cursor's position one character after the given position. | [
"Set",
"the",
"cursor",
"s",
"position",
"one",
"character",
"after",
"the",
"given",
"position",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L322-L331 |
43,168 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
if (!this.container.firstChild)
return "";
var accum = [];
select.markSelection(this.win);
forEach(traverseDOM(this.container.firstChild), method(accum, "push"));
webkitLastLineHack(this.container);
select.selectMarked();
return cleanText(accum.join(""));
... | javascript | function() {
if (!this.container.firstChild)
return "";
var accum = [];
select.markSelection(this.win);
forEach(traverseDOM(this.container.firstChild), method(accum, "push"));
webkitLastLineHack(this.container);
select.selectMarked();
return cleanText(accum.join(""));
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"container",
".",
"firstChild",
")",
"return",
"\"\"",
";",
"var",
"accum",
"=",
"[",
"]",
";",
"select",
".",
"markSelection",
"(",
"this",
".",
"win",
")",
";",
"forEach",
"(",
"traverseDOM",
... | Extract the code from the editor. | [
"Extract",
"the",
"code",
"from",
"the",
"editor",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L472-L482 | |
43,169 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
var h = this.history;
h.commit();
var start = select.cursorPos(this.container, true),
end = select.cursorPos(this.container, false);
if (!start || !end) return "";
if (start.node == end.node)
return h.textAfter(start.node).slice(start.offset, end.offset);
... | javascript | function() {
var h = this.history;
h.commit();
var start = select.cursorPos(this.container, true),
end = select.cursorPos(this.container, false);
if (!start || !end) return "";
if (start.node == end.node)
return h.textAfter(start.node).slice(start.offset, end.offset);
... | [
"function",
"(",
")",
"{",
"var",
"h",
"=",
"this",
".",
"history",
";",
"h",
".",
"commit",
"(",
")",
";",
"var",
"start",
"=",
"select",
".",
"cursorPos",
"(",
"this",
".",
"container",
",",
"true",
")",
",",
"end",
"=",
"select",
".",
"cursorP... | Retrieve the selected text. | [
"Retrieve",
"the",
"selected",
"text",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L589-L605 | |
43,170 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(text) {
this.history.commit();
var start = select.cursorPos(this.container, true),
end = select.cursorPos(this.container, false);
if (!start || !end) return;
end = this.replaceRange(start, end, text);
select.setCursorPos(this.container, end);
webkitLastLineHack(t... | javascript | function(text) {
this.history.commit();
var start = select.cursorPos(this.container, true),
end = select.cursorPos(this.container, false);
if (!start || !end) return;
end = this.replaceRange(start, end, text);
select.setCursorPos(this.container, end);
webkitLastLineHack(t... | [
"function",
"(",
"text",
")",
"{",
"this",
".",
"history",
".",
"commit",
"(",
")",
";",
"var",
"start",
"=",
"select",
".",
"cursorPos",
"(",
"this",
".",
"container",
",",
"true",
")",
",",
"end",
"=",
"select",
".",
"cursorPos",
"(",
"this",
"."... | Replace the selection with another piece of text. | [
"Replace",
"the",
"selection",
"with",
"another",
"piece",
"of",
"text",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L608-L618 | |
43,171 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(event) {
var electric = Editor.Parser.electricChars, self = this;
// Hack for Opera, and Firefox on OS X, in which stopping a
// keydown event does not prevent the associated keypress event
// from happening, so we have to cancel enter and tab again
// here.
if ((this.frozen... | javascript | function(event) {
var electric = Editor.Parser.electricChars, self = this;
// Hack for Opera, and Firefox on OS X, in which stopping a
// keydown event does not prevent the associated keypress event
// from happening, so we have to cancel enter and tab again
// here.
if ((this.frozen... | [
"function",
"(",
"event",
")",
"{",
"var",
"electric",
"=",
"Editor",
".",
"Parser",
".",
"electricChars",
",",
"self",
"=",
"this",
";",
"// Hack for Opera, and Firefox on OS X, in which stopping a",
"// keydown event does not prevent the associated keypress event",
"// from... | Check for characters that should re-indent the current line, and prevent Opera from handling enter and tab anyway. | [
"Check",
"for",
"characters",
"that",
"should",
"re",
"-",
"indent",
"the",
"current",
"line",
"and",
"prevent",
"Opera",
"from",
"handling",
"enter",
"and",
"tab",
"anyway",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L781-L796 | |
43,172 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
var pos = select.selectionTopNode(this.container, true);
var to = select.selectionTopNode(this.container, false);
if (pos === false || to === false) return;
select.markSelection(this.win);
if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false)
ret... | javascript | function() {
var pos = select.selectionTopNode(this.container, true);
var to = select.selectionTopNode(this.container, false);
if (pos === false || to === false) return;
select.markSelection(this.win);
if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false)
ret... | [
"function",
"(",
")",
"{",
"var",
"pos",
"=",
"select",
".",
"selectionTopNode",
"(",
"this",
".",
"container",
",",
"true",
")",
";",
"var",
"to",
"=",
"select",
".",
"selectionTopNode",
"(",
"this",
".",
"container",
",",
"false",
")",
";",
"if",
"... | Re-highlight the selected part of the document. | [
"Re",
"-",
"highlight",
"the",
"selected",
"part",
"of",
"the",
"document",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L865-L875 | |
43,173 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
var cur = select.selectionTopNode(this.container, true), start = cur;
if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild)
return false;
while (cur && !isBR(cur)) cur = cur.previousSibling;
var next = cur ? cur.nextSibling : this.container.... | javascript | function() {
var cur = select.selectionTopNode(this.container, true), start = cur;
if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild)
return false;
while (cur && !isBR(cur)) cur = cur.previousSibling;
var next = cur ? cur.nextSibling : this.container.... | [
"function",
"(",
")",
"{",
"var",
"cur",
"=",
"select",
".",
"selectionTopNode",
"(",
"this",
".",
"container",
",",
"true",
")",
",",
"start",
"=",
"cur",
";",
"if",
"(",
"cur",
"===",
"false",
"||",
"!",
"(",
"!",
"cur",
"||",
"cur",
".",
"isPa... | Custom home behaviour that doesn't land the cursor in front of leading whitespace unless pressed twice. | [
"Custom",
"home",
"behaviour",
"that",
"doesn",
"t",
"land",
"the",
"cursor",
"in",
"front",
"of",
"leading",
"whitespace",
"unless",
"pressed",
"twice",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L889-L903 | |
43,174 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | highlight | function highlight(node, ok) {
if (!node) return;
if (self.options.markParen) {
self.options.markParen(node, ok);
}
else {
node.style.fontWeight = "bold";
node.style.color = ok ? "#8F8" : "#F88";
}
} | javascript | function highlight(node, ok) {
if (!node) return;
if (self.options.markParen) {
self.options.markParen(node, ok);
}
else {
node.style.fontWeight = "bold";
node.style.color = ok ? "#8F8" : "#F88";
}
} | [
"function",
"highlight",
"(",
"node",
",",
"ok",
")",
"{",
"if",
"(",
"!",
"node",
")",
"return",
";",
"if",
"(",
"self",
".",
"options",
".",
"markParen",
")",
"{",
"self",
".",
"options",
".",
"markParen",
"(",
"node",
",",
"ok",
")",
";",
"}",... | give the relevant nodes a colour. | [
"give",
"the",
"relevant",
"nodes",
"a",
"colour",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L931-L940 |
43,175 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | paren | function paren(node) {
if (node.currentText) {
var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);
return match && match[1];
}
} | javascript | function paren(node) {
if (node.currentText) {
var match = node.currentText.match(/^[\s\u00a0]*([\(\)\[\]{}])[\s\u00a0]*$/);
return match && match[1];
}
} | [
"function",
"paren",
"(",
"node",
")",
"{",
"if",
"(",
"node",
".",
"currentText",
")",
"{",
"var",
"match",
"=",
"node",
".",
"currentText",
".",
"match",
"(",
"/",
"^[\\s\\u00a0]*([\\(\\)\\[\\]{}])[\\s\\u00a0]*$",
"/",
")",
";",
"return",
"match",
"&&",
... | Extract a 'paren' from a piece of text. | [
"Extract",
"a",
"paren",
"from",
"a",
"piece",
"of",
"text",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L962-L967 |
43,176 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | tryFindMatch | function tryFindMatch() {
var stack = [], ch, ok = true;;
for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) {
if (runner.className == className && isSpan(runner) && (ch = paren(runner))) {
if (forward(ch) == dir)
stack.push(... | javascript | function tryFindMatch() {
var stack = [], ch, ok = true;;
for (var runner = cursor; runner; runner = dir ? runner.nextSibling : runner.previousSibling) {
if (runner.className == className && isSpan(runner) && (ch = paren(runner))) {
if (forward(ch) == dir)
stack.push(... | [
"function",
"tryFindMatch",
"(",
")",
"{",
"var",
"stack",
"=",
"[",
"]",
",",
"ch",
",",
"ok",
"=",
"true",
";",
";",
"for",
"(",
"var",
"runner",
"=",
"cursor",
";",
"runner",
";",
"runner",
"=",
"dir",
"?",
"runner",
".",
"nextSibling",
":",
"... | Since parts of the document might not have been properly highlighted, and it is hard to know in advance which part we have to scan, we just try, and when we find dirty nodes we abort, parse them, and re-try. | [
"Since",
"parts",
"of",
"the",
"document",
"might",
"not",
"have",
"been",
"properly",
"highlighted",
"and",
"it",
"is",
"hard",
"to",
"know",
"in",
"advance",
"which",
"part",
"we",
"have",
"to",
"scan",
"we",
"just",
"try",
"and",
"when",
"we",
"find",... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L985-L1002 |
43,177 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(direction) {
if (!this.container.firstChild) return;
// The line has to have up-to-date lexical information, so we
// highlight it first.
if (!this.highlightAtCursor()) return;
var cursor = select.selectionTopNode(this.container, false);
// If we couldn't determine the place... | javascript | function(direction) {
if (!this.container.firstChild) return;
// The line has to have up-to-date lexical information, so we
// highlight it first.
if (!this.highlightAtCursor()) return;
var cursor = select.selectionTopNode(this.container, false);
// If we couldn't determine the place... | [
"function",
"(",
"direction",
")",
"{",
"if",
"(",
"!",
"this",
".",
"container",
".",
"firstChild",
")",
"return",
";",
"// The line has to have up-to-date lexical information, so we",
"// highlight it first.",
"if",
"(",
"!",
"this",
".",
"highlightAtCursor",
"(",
... | Adjust the amount of whitespace at the start of the line that the cursor is on so that it is indented properly. | [
"Adjust",
"the",
"amount",
"of",
"whitespace",
"at",
"the",
"start",
"of",
"the",
"line",
"that",
"the",
"cursor",
"is",
"on",
"so",
"that",
"it",
"is",
"indented",
"properly",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1029-L1046 | |
43,178 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(start, end, direction) {
var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
if (!isBR(end)) end = endOfLine(end, this.container);
this.addDirtyNode(start);
do {
var next = endOfLine(current, this.container);
if (current) th... | javascript | function(start, end, direction) {
var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
if (!isBR(end)) end = endOfLine(end, this.container);
this.addDirtyNode(start);
do {
var next = endOfLine(current, this.container);
if (current) th... | [
"function",
"(",
"start",
",",
"end",
",",
"direction",
")",
"{",
"var",
"current",
"=",
"(",
"start",
"=",
"startOfLine",
"(",
"start",
")",
")",
",",
"before",
"=",
"start",
"&&",
"startOfLine",
"(",
"start",
".",
"previousSibling",
")",
";",
"if",
... | Indent all lines whose start falls inside of the current selection. | [
"Indent",
"all",
"lines",
"whose",
"start",
"falls",
"inside",
"of",
"the",
"current",
"selection",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1050-L1063 | |
43,179 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(safe) {
// pagehide event hack above
if (this.unloaded) {
this.win.document.designMode = "off";
this.win.document.designMode = "on";
this.unloaded = false;
}
if (internetExplorer) {
this.container.createTextRange().execCommand("unlink");
this.sel... | javascript | function(safe) {
// pagehide event hack above
if (this.unloaded) {
this.win.document.designMode = "off";
this.win.document.designMode = "on";
this.unloaded = false;
}
if (internetExplorer) {
this.container.createTextRange().execCommand("unlink");
this.sel... | [
"function",
"(",
"safe",
")",
"{",
"// pagehide event hack above",
"if",
"(",
"this",
".",
"unloaded",
")",
"{",
"this",
".",
"win",
".",
"document",
".",
"designMode",
"=",
"\"off\"",
";",
"this",
".",
"win",
".",
"document",
".",
"designMode",
"=",
"\"... | Find the node that the cursor is in, mark it as dirty, and make sure a highlight pass is scheduled. | [
"Find",
"the",
"node",
"that",
"the",
"cursor",
"is",
"in",
"mark",
"it",
"as",
"dirty",
"and",
"make",
"sure",
"a",
"highlight",
"pass",
"is",
"scheduled",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1067-L1091 | |
43,180 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(node) {
node = node || this.container.firstChild;
if (!node) return;
for (var i = 0; i < this.dirty.length; i++)
if (this.dirty[i] == node) return;
if (node.nodeType != 3)
node.dirty = true;
this.dirty.push(node);
} | javascript | function(node) {
node = node || this.container.firstChild;
if (!node) return;
for (var i = 0; i < this.dirty.length; i++)
if (this.dirty[i] == node) return;
if (node.nodeType != 3)
node.dirty = true;
this.dirty.push(node);
} | [
"function",
"(",
"node",
")",
"{",
"node",
"=",
"node",
"||",
"this",
".",
"container",
".",
"firstChild",
";",
"if",
"(",
"!",
"node",
")",
"return",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"dirty",
".",
"length",
";... | Add a node to the set of dirty nodes, if it isn't already in there. | [
"Add",
"a",
"node",
"to",
"the",
"set",
"of",
"dirty",
"nodes",
"if",
"it",
"isn",
"t",
"already",
"in",
"there",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1101-L1111 | |
43,181 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
// Timeouts are routed through the parent window, because on
// some browsers designMode windows do not fire timeouts.
var self = this;
this.parent.clearTimeout(this.highlightTimeout);
this.highlightTimeout = this.parent.setTimeout(function(){self.highlightDirty();}, this.opti... | javascript | function() {
// Timeouts are routed through the parent window, because on
// some browsers designMode windows do not fire timeouts.
var self = this;
this.parent.clearTimeout(this.highlightTimeout);
this.highlightTimeout = this.parent.setTimeout(function(){self.highlightDirty();}, this.opti... | [
"function",
"(",
")",
"{",
"// Timeouts are routed through the parent window, because on",
"// some browsers designMode windows do not fire timeouts.",
"var",
"self",
"=",
"this",
";",
"this",
".",
"parent",
".",
"clearTimeout",
"(",
"this",
".",
"highlightTimeout",
")",
";... | Cause a highlight pass to happen in options.passDelay milliseconds. Clear the existing timeout, if one exists. This way, the passes do not happen while the user is typing, and should as unobtrusive as possible. | [
"Cause",
"a",
"highlight",
"pass",
"to",
"happen",
"in",
"options",
".",
"passDelay",
"milliseconds",
".",
"Clear",
"the",
"existing",
"timeout",
"if",
"one",
"exists",
".",
"This",
"way",
"the",
"passes",
"do",
"not",
"happen",
"while",
"the",
"user",
"is... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1121-L1127 | |
43,182 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
while (this.dirty.length > 0) {
var found = this.dirty.pop();
// IE8 sometimes throws an unexplainable 'invalid argument'
// exception for found.parentNode
try {
// If the node has been coloured in the meantime, or is no
// longer in the document, i... | javascript | function() {
while (this.dirty.length > 0) {
var found = this.dirty.pop();
// IE8 sometimes throws an unexplainable 'invalid argument'
// exception for found.parentNode
try {
// If the node has been coloured in the meantime, or is no
// longer in the document, i... | [
"function",
"(",
")",
"{",
"while",
"(",
"this",
".",
"dirty",
".",
"length",
">",
"0",
")",
"{",
"var",
"found",
"=",
"this",
".",
"dirty",
".",
"pop",
"(",
")",
";",
"// IE8 sometimes throws an unexplainable 'invalid argument'",
"// exception for found.parentN... | Fetch one dirty node, and remove it from the dirty set. | [
"Fetch",
"one",
"dirty",
"node",
"and",
"remove",
"it",
"from",
"the",
"dirty",
"set",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1130-L1145 | |
43,183 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(force) {
// Prevent FF from raising an error when it is firing timeouts
// on a page that's no longer loaded.
if (!window.select) return;
if (!this.options.readOnly) select.markSelection(this.win);
var start, endTime = force ? null : time() + this.options.passTime;
while ((... | javascript | function(force) {
// Prevent FF from raising an error when it is firing timeouts
// on a page that's no longer loaded.
if (!window.select) return;
if (!this.options.readOnly) select.markSelection(this.win);
var start, endTime = force ? null : time() + this.options.passTime;
while ((... | [
"function",
"(",
"force",
")",
"{",
"// Prevent FF from raising an error when it is firing timeouts",
"// on a page that's no longer loaded.",
"if",
"(",
"!",
"window",
".",
"select",
")",
"return",
";",
"if",
"(",
"!",
"this",
".",
"options",
".",
"readOnly",
")",
... | Pick dirty nodes, and highlight them, until options.passTime milliseconds have gone by. The highlight method will continue to next lines as long as it finds dirty nodes. It returns information about the place where it stopped. If there are dirty nodes left after this function has spent all its lines, it shedules anothe... | [
"Pick",
"dirty",
"nodes",
"and",
"highlight",
"them",
"until",
"options",
".",
"passTime",
"milliseconds",
"have",
"gone",
"by",
".",
"The",
"highlight",
"method",
"will",
"continue",
"to",
"next",
"lines",
"as",
"long",
"as",
"it",
"finds",
"dirty",
"nodes"... | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1153-L1168 | |
43,184 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(passTime) {
var self = this, pos = null;
return function() {
// FF timeout weirdness workaround.
if (!window.select) return;
// If the current node is no longer in the document... oh
// well, we start over.
if (pos && pos.parentNode != self.container)
... | javascript | function(passTime) {
var self = this, pos = null;
return function() {
// FF timeout weirdness workaround.
if (!window.select) return;
// If the current node is no longer in the document... oh
// well, we start over.
if (pos && pos.parentNode != self.container)
... | [
"function",
"(",
"passTime",
")",
"{",
"var",
"self",
"=",
"this",
",",
"pos",
"=",
"null",
";",
"return",
"function",
"(",
")",
"{",
"// FF timeout weirdness workaround.",
"if",
"(",
"!",
"window",
".",
"select",
")",
"return",
";",
"// If the current node ... | Creates a function that, when called through a timeout, will continuously re-parse the document. | [
"Creates",
"a",
"function",
"that",
"when",
"called",
"through",
"a",
"timeout",
"will",
"continuously",
"re",
"-",
"parse",
"the",
"document",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1172-L1188 | |
43,185 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function() {
if (this.scanner) {
this.parent.clearTimeout(this.documentScan);
this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
}
} | javascript | function() {
if (this.scanner) {
this.parent.clearTimeout(this.documentScan);
this.documentScan = this.parent.setTimeout(this.scanner, this.options.continuousScanning);
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"scanner",
")",
"{",
"this",
".",
"parent",
".",
"clearTimeout",
"(",
"this",
".",
"documentScan",
")",
";",
"this",
".",
"documentScan",
"=",
"this",
".",
"parent",
".",
"setTimeout",
"(",
"this",
"... | Starts the continuous scanning process for this document after a given interval. | [
"Starts",
"the",
"continuous",
"scanning",
"process",
"for",
"this",
"document",
"after",
"a",
"given",
"interval",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1192-L1197 | |
43,186 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | tokenPart | function tokenPart(token){
var part = makePartSpan(token.value, self.doc);
part.className = token.style;
return part;
} | javascript | function tokenPart(token){
var part = makePartSpan(token.value, self.doc);
part.className = token.style;
return part;
} | [
"function",
"tokenPart",
"(",
"token",
")",
"{",
"var",
"part",
"=",
"makePartSpan",
"(",
"token",
".",
"value",
",",
"self",
".",
"doc",
")",
";",
"part",
".",
"className",
"=",
"token",
".",
"style",
";",
"return",
"part",
";",
"}"
] | Create a part corresponding to a given token. | [
"Create",
"a",
"part",
"corresponding",
"to",
"a",
"given",
"token",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1246-L1250 |
43,187 | neyric/webhookit | public/javascripts/codemirror/js/editor.js | function(){
var part = this.get();
// Allow empty nodes when they are alone on a line, needed
// for the FF cursor bug workaround (see select.js,
// insertNewlineAtCursor).
while (part && isSpan(part) && part.currentText == "") {
// Leave empty nodes that ar... | javascript | function(){
var part = this.get();
// Allow empty nodes when they are alone on a line, needed
// for the FF cursor bug workaround (see select.js,
// insertNewlineAtCursor).
while (part && isSpan(part) && part.currentText == "") {
// Leave empty nodes that ar... | [
"function",
"(",
")",
"{",
"var",
"part",
"=",
"this",
".",
"get",
"(",
")",
";",
"// Allow empty nodes when they are alone on a line, needed",
"// for the FF cursor bug workaround (see select.js,",
"// insertNewlineAtCursor).",
"while",
"(",
"part",
"&&",
"isSpan",
"(",
... | Advance to the next part that is not empty, discarding empty parts. | [
"Advance",
"to",
"the",
"next",
"part",
"that",
"is",
"not",
"empty",
"discarding",
"empty",
"parts",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/codemirror/js/editor.js#L1304-L1327 | |
43,188 | neyric/webhookit | public/javascripts/WireIt/plugins/layout/js/Layout.js | function() {
this.nodes = [];
this.edges = [];
// Extract wires
for(var i = 0 ; i < this.layer.wires.length ; i++) {
var wire = this.layer.wires[i];
this.edges.push([this.layer.containers.indexOf(wire.terminal1.container), this.layer.containers.indexOf(wire.terminal2.container) ]);
}
} | javascript | function() {
this.nodes = [];
this.edges = [];
// Extract wires
for(var i = 0 ; i < this.layer.wires.length ; i++) {
var wire = this.layer.wires[i];
this.edges.push([this.layer.containers.indexOf(wire.terminal1.container), this.layer.containers.indexOf(wire.terminal2.container) ]);
}
} | [
"function",
"(",
")",
"{",
"this",
".",
"nodes",
"=",
"[",
"]",
";",
"this",
".",
"edges",
"=",
"[",
"]",
";",
"// Extract wires",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"layer",
".",
"wires",
".",
"length",
";",
"i",
"... | Init the default structure | [
"Init",
"the",
"default",
"structure"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/layout/js/Layout.js#L99-L110 | |
43,189 | neyric/webhookit | public/javascripts/inputex/js/fields/IPv4Field.js | function(options) {
inputEx.IPv4Field.superclass.setOptions.call(this, options);
this.options.messages.invalid = inputEx.messages.invalidIPv4;
this.options.regexp = /^(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)(?:\.(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)){3}$/;
} | javascript | function(options) {
inputEx.IPv4Field.superclass.setOptions.call(this, options);
this.options.messages.invalid = inputEx.messages.invalidIPv4;
this.options.regexp = /^(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)(?:\.(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)){3}$/;
} | [
"function",
"(",
"options",
")",
"{",
"inputEx",
".",
"IPv4Field",
".",
"superclass",
".",
"setOptions",
".",
"call",
"(",
"this",
",",
"options",
")",
";",
"this",
".",
"options",
".",
"messages",
".",
"invalid",
"=",
"inputEx",
".",
"messages",
".",
... | set IPv4 regexp and invalid string
@param {Object} options Options object as passed to the constructor | [
"set",
"IPv4",
"regexp",
"and",
"invalid",
"string"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/IPv4Field.js#L19-L23 | |
43,190 | neyric/webhookit | public/javascripts/yui/calendar/calendar-debug.js | function(id, container, config) {
// Normalize 2.4.0, pre 2.4.0 args
var nArgs = this._parseArgs(arguments);
id = nArgs.id;
container = nArgs.container;
config = nArgs.config;
this.oDomContainer = Dom.get(container);
if (!this.oDomContainer) { this.logger.log("... | javascript | function(id, container, config) {
// Normalize 2.4.0, pre 2.4.0 args
var nArgs = this._parseArgs(arguments);
id = nArgs.id;
container = nArgs.container;
config = nArgs.config;
this.oDomContainer = Dom.get(container);
if (!this.oDomContainer) { this.logger.log("... | [
"function",
"(",
"id",
",",
"container",
",",
"config",
")",
"{",
"// Normalize 2.4.0, pre 2.4.0 args",
"var",
"nArgs",
"=",
"this",
".",
"_parseArgs",
"(",
"arguments",
")",
";",
"id",
"=",
"nArgs",
".",
"id",
";",
"container",
"=",
"nArgs",
".",
"contain... | Initializes the calendar group. All subclasses must call this method in order for the
group to be initialized properly.
@method init
@param {String} id optional The id of the table element that will represent the CalendarGroup widget. As of 2.4.0, this argument is optional.
@param {String | HTMLElement} container The i... | [
"Initializes",
"the",
"calendar",
"group",
".",
"All",
"subclasses",
"must",
"call",
"this",
"method",
"in",
"order",
"for",
"the",
"group",
"to",
"be",
"initialized",
"properly",
"."
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/calendar/calendar-debug.js#L4712-L4795 | |
43,191 | neyric/webhookit | public/javascripts/inputex/js/fields/TreeField.js | function() {
// Add element button
this.addButton = inputEx.cn('img', {src: inputEx.spacerUrl, className: 'inputEx-ListField-addButton'});
Dom.setStyle(this.addButton, 'float', 'left');
this.fieldContainer.appendChild(this.addButton);
// Instanciate the new subField
this.su... | javascript | function() {
// Add element button
this.addButton = inputEx.cn('img', {src: inputEx.spacerUrl, className: 'inputEx-ListField-addButton'});
Dom.setStyle(this.addButton, 'float', 'left');
this.fieldContainer.appendChild(this.addButton);
// Instanciate the new subField
this.su... | [
"function",
"(",
")",
"{",
"// Add element button",
"this",
".",
"addButton",
"=",
"inputEx",
".",
"cn",
"(",
"'img'",
",",
"{",
"src",
":",
"inputEx",
".",
"spacerUrl",
",",
"className",
":",
"'inputEx-ListField-addButton'",
"}",
")",
";",
"Dom",
".",
"se... | Render the addButton and childContainer | [
"Render",
"the",
"addButton",
"and",
"childContainer"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/fields/TreeField.js#L53-L75 | |
43,192 | neyric/webhookit | public/javascripts/WireIt/plugins/composable/examples/jsBox/jsBox.js | function() {
jsBox.WiringEditor.superclass.renderButtons.call(this);
// Add the run button to the toolbar
var toolbar = YAHOO.util.Dom.get('toolbar');
var runButton = new YAHOO.widget.Button({ label:"Run", id:"WiringEditor-runButton", container: toolbar });
runButton.on("click", jsBox.run, js... | javascript | function() {
jsBox.WiringEditor.superclass.renderButtons.call(this);
// Add the run button to the toolbar
var toolbar = YAHOO.util.Dom.get('toolbar');
var runButton = new YAHOO.widget.Button({ label:"Run", id:"WiringEditor-runButton", container: toolbar });
runButton.on("click", jsBox.run, js... | [
"function",
"(",
")",
"{",
"jsBox",
".",
"WiringEditor",
".",
"superclass",
".",
"renderButtons",
".",
"call",
"(",
"this",
")",
";",
"// Add the run button to the toolbar",
"var",
"toolbar",
"=",
"YAHOO",
".",
"util",
".",
"Dom",
".",
"get",
"(",
"'toolbar'... | Add the "run" button | [
"Add",
"the",
"run",
"button"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/WireIt/plugins/composable/examples/jsBox/jsBox.js#L98-L105 | |
43,193 | neyric/webhookit | public/javascripts/yui/menu/menu-debug.js | function (p_sType, p_aArgs, p_oItem) {
var sText = p_aArgs[0],
oConfig = this.cfg,
oAnchor = this._oAnchor,
sHelpText = oConfig.getProperty(_HELP_TEXT),
sHelpTextHTML = _EMPTY_STRING,
sEmphasisStartTag = _EMPTY_STRING,
sEmphasisEndTag = _E... | javascript | function (p_sType, p_aArgs, p_oItem) {
var sText = p_aArgs[0],
oConfig = this.cfg,
oAnchor = this._oAnchor,
sHelpText = oConfig.getProperty(_HELP_TEXT),
sHelpTextHTML = _EMPTY_STRING,
sEmphasisStartTag = _EMPTY_STRING,
sEmphasisEndTag = _E... | [
"function",
"(",
"p_sType",
",",
"p_aArgs",
",",
"p_oItem",
")",
"{",
"var",
"sText",
"=",
"p_aArgs",
"[",
"0",
"]",
",",
"oConfig",
"=",
"this",
".",
"cfg",
",",
"oAnchor",
"=",
"this",
".",
"_oAnchor",
",",
"sHelpText",
"=",
"oConfig",
".",
"getPro... | Event handlers for configuration properties
@method configText
@description Event handler for when the "text" configuration property of
the menu item changes.
@param {String} p_sType String representing the name of the event that
was fired.
@param {Array} p_aArgs Array of arguments sent when the event was fired.
@para... | [
"Event",
"handlers",
"for",
"configuration",
"properties"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/yui/menu/menu-debug.js#L7361-L7402 | |
43,194 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function() {
// Remove from DOM
if(Dom.inDocument(this.el)) {
this.el.parentNode.removeChild(this.el);
}
// recursively purge element
Event.purgeElement(this.el, true);
} | javascript | function() {
// Remove from DOM
if(Dom.inDocument(this.el)) {
this.el.parentNode.removeChild(this.el);
}
// recursively purge element
Event.purgeElement(this.el, true);
} | [
"function",
"(",
")",
"{",
"// Remove from DOM",
"if",
"(",
"Dom",
".",
"inDocument",
"(",
"this",
".",
"el",
")",
")",
"{",
"this",
".",
"el",
".",
"parentNode",
".",
"removeChild",
"(",
"this",
".",
"el",
")",
";",
"}",
"// recursively purge element",
... | Destroy the widget | [
"Destroy",
"the",
"widget"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L35-L44 | |
43,195 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function(obj,parentEl) {
var ul = inputEx.cn('ul', {className: 'inputEx-JsonTreeInspector'});
for(var key in obj) {
if(obj.hasOwnProperty(key)) {
var value = obj[key];
var id = Dom.generateId();
var li = inputEx.cn('li', {id: id}, null,... | javascript | function(obj,parentEl) {
var ul = inputEx.cn('ul', {className: 'inputEx-JsonTreeInspector'});
for(var key in obj) {
if(obj.hasOwnProperty(key)) {
var value = obj[key];
var id = Dom.generateId();
var li = inputEx.cn('li', {id: id}, null,... | [
"function",
"(",
"obj",
",",
"parentEl",
")",
"{",
"var",
"ul",
"=",
"inputEx",
".",
"cn",
"(",
"'ul'",
",",
"{",
"className",
":",
"'inputEx-JsonTreeInspector'",
"}",
")",
";",
"for",
"(",
"var",
"key",
"in",
"obj",
")",
"{",
"if",
"(",
"obj",
"."... | Build the sub-branch for obj | [
"Build",
"the",
"sub",
"-",
"branch",
"for",
"obj"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L49-L93 | |
43,196 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function(e, params) {
Event.stopEvent(e);
var tgt = Event.getTarget(e);
if( Dom.hasClass(tgt, 'expanded') || Dom.hasClass(tgt, 'collapsed') ) {
this.expandElement(tgt);
}
} | javascript | function(e, params) {
Event.stopEvent(e);
var tgt = Event.getTarget(e);
if( Dom.hasClass(tgt, 'expanded') || Dom.hasClass(tgt, 'collapsed') ) {
this.expandElement(tgt);
}
} | [
"function",
"(",
"e",
",",
"params",
")",
"{",
"Event",
".",
"stopEvent",
"(",
"e",
")",
";",
"var",
"tgt",
"=",
"Event",
".",
"getTarget",
"(",
"e",
")",
";",
"if",
"(",
"Dom",
".",
"hasClass",
"(",
"tgt",
",",
"'expanded'",
")",
"||",
"Dom",
... | When the user click on a node | [
"When",
"the",
"user",
"click",
"on",
"a",
"node"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L99-L106 | |
43,197 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function(li) {
var isExpanded = Dom.hasClass(li, 'expanded');
Dom.replaceClass(li, isExpanded ? 'expanded' : 'collapsed' , isExpanded ? 'collapsed':'expanded');
var h = this.hash[li.id];
if(isExpanded) {
// hide the sub-branch
h.expanded.style.display = 'none';
}... | javascript | function(li) {
var isExpanded = Dom.hasClass(li, 'expanded');
Dom.replaceClass(li, isExpanded ? 'expanded' : 'collapsed' , isExpanded ? 'collapsed':'expanded');
var h = this.hash[li.id];
if(isExpanded) {
// hide the sub-branch
h.expanded.style.display = 'none';
}... | [
"function",
"(",
"li",
")",
"{",
"var",
"isExpanded",
"=",
"Dom",
".",
"hasClass",
"(",
"li",
",",
"'expanded'",
")",
";",
"Dom",
".",
"replaceClass",
"(",
"li",
",",
"isExpanded",
"?",
"'expanded'",
":",
"'collapsed'",
",",
"isExpanded",
"?",
"'collapse... | expand the node given the li element | [
"expand",
"the",
"node",
"given",
"the",
"li",
"element"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L112-L131 | |
43,198 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function(li,maxLevel) {
this.expandElement(li);
var sub = Dom.getChildrenBy(li, function(c) {return c.tagName == "UL";})[0].childNodes;
for(var j = 0 ; j < sub.length ; j++) {
var s = sub[j];
if(Dom.hasClass(s,"collapsed") && maxLevel != 0) {
this.expandBranch(s,maxLevel-... | javascript | function(li,maxLevel) {
this.expandElement(li);
var sub = Dom.getChildrenBy(li, function(c) {return c.tagName == "UL";})[0].childNodes;
for(var j = 0 ; j < sub.length ; j++) {
var s = sub[j];
if(Dom.hasClass(s,"collapsed") && maxLevel != 0) {
this.expandBranch(s,maxLevel-... | [
"function",
"(",
"li",
",",
"maxLevel",
")",
"{",
"this",
".",
"expandElement",
"(",
"li",
")",
";",
"var",
"sub",
"=",
"Dom",
".",
"getChildrenBy",
"(",
"li",
",",
"function",
"(",
"c",
")",
"{",
"return",
"c",
".",
"tagName",
"==",
"\"UL\"",
";",... | Expand a branch given a li element
@param {HTMLElement} li
@param {Integer} maxLevel | [
"Expand",
"a",
"branch",
"given",
"a",
"li",
"element"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L138-L147 | |
43,199 | neyric/webhookit | public/javascripts/inputex/js/widgets/json-tree-inspector.js | function(maxLevel) {
var ul = this.el.childNodes[0];
var liEls = ul.childNodes;
for(var i = 0 ; i < liEls.length ; i++) {
var li = liEls[i];
this.expandBranch(li,maxLevel);
}
} | javascript | function(maxLevel) {
var ul = this.el.childNodes[0];
var liEls = ul.childNodes;
for(var i = 0 ; i < liEls.length ; i++) {
var li = liEls[i];
this.expandBranch(li,maxLevel);
}
} | [
"function",
"(",
"maxLevel",
")",
"{",
"var",
"ul",
"=",
"this",
".",
"el",
".",
"childNodes",
"[",
"0",
"]",
";",
"var",
"liEls",
"=",
"ul",
".",
"childNodes",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"liEls",
".",
"length",
";",
... | Expand the root node
@param {Integer} maxLevel | [
"Expand",
"the",
"root",
"node"
] | 13abf6f072e23d536432235da78fd3e4e5d742b6 | https://github.com/neyric/webhookit/blob/13abf6f072e23d536432235da78fd3e4e5d742b6/public/javascripts/inputex/js/widgets/json-tree-inspector.js#L153-L160 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.