_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q30200 | train | function(elContainer) {
Dom.removeClass(elContainer, DT.CLASS_SCROLLABLE);
SDT.superclass._destroyContainerEl.call(this, elContainer);
this._elHdContainer = null;
this._elBdContainer = null;
} | javascript | {
"resource": ""
} | |
q30201 | train | function(elContainer) {
SDT.superclass._initContainerEl.call(this, elContainer);
if(this._elContainer) {
elContainer = this._elContainer; // was constructor input, now is DOM ref
Dom.addClass(elContainer, DT.CLASS_SCROLLABLE);
// Container for header TABLE
var elHdC... | javascript | {
"resource": ""
} | |
q30202 | train | function() {
var elTable = this._elHdTable;
if(elTable) {
Ev.purgeElement(elTable, true);
elTable.parentNode.removeChild(elTable);
// A little out of place, but where else can we null out these extra elements?
///this._elBdColgroup = null;
this._elBdThead = null;... | javascript | {
"resource": ""
} | |
q30203 | train | function(elHdTable, elTable) {
elHdTable = elHdTable || this._elHdTable;
elTable = elTable || this._elTable;
// Scrolling body's THEAD
this._initBdTheadEl(elTable);
// Standard fixed head THEAD
SDT.superclass._initTheadEl.call(this, elHdTable);
} | javascript | {
"resource": ""
} | |
q30204 | train | function(elTh, oColumn) {
SDT.superclass._initThEl.call(this, elTh, oColumn);
elTh.id = this.getId() +"-fixedth-" + oColumn.getSanitizedKey(); // Needed for getColumn by TH and ColumnDD
} | javascript | {
"resource": ""
} | |
q30205 | train | function() {
var elBdThead = this._elBdThead;
if(elBdThead) {
var elTable = elBdThead.parentNode;
Ev.purgeElement(elBdThead, true);
elTable.removeChild(elBdThead);
this._elBdThead = null;
this._destroyColumnHelpers();
}
} | javascript | {
"resource": ""
} | |
q30206 | train | function(elTable) {
if(elTable) {
// Destroy previous
this._destroyBdTheadEl();
var elThead = elTable.insertBefore(document.createElement("thead"), elTable.firstChild);
// Add TRs to the THEAD;
var oColumnSet = this._oColumnSet,
colTree = oColumnSet.tree... | javascript | {
"resource": ""
} | |
q30207 | train | function(elTh, oColumn) {
elTh.id = this.getId()+"-th-" + oColumn.getSanitizedKey(); // Needed for accessibility
elTh.rowSpan = oColumn.getRowspan();
elTh.colSpan = oColumn.getColspan();
// Assign abbr attribute
if(oColumn.abbr) {
elTh.abbr = oColumn.abbr;
}
// TODO: strip links and... | javascript | {
"resource": ""
} | |
q30208 | train | function(elTable) {
SDT.superclass._initTbodyEl.call(this, elTable);
// Bug 2105534 - Safari 3 gap
// Bug 2492591 - IE8 offsetTop
elTable.style.marginTop = (this._elTbody.offsetTop > 0) ?
"-"+this._elTbody.offsetTop+"px" : 0;
} | javascript | {
"resource": ""
} | |
q30209 | train | function(el) {
el = el || this._elTbody;
var oSelf = this;
this._storeScrollPositions();
// http://developer.mozilla.org/en/docs/index.php?title=Key-navigable_custom_DHTML_widgets
// The timeout is necessary in both IE and Firefox 1.5, to prevent scripts from doing
// strange unexpected things a... | javascript | {
"resource": ""
} | |
q30210 | train | function() {
// Reset scroll positions
if(this._nScrollTop) {
this._elBdContainer.scrollTop = this._nScrollTop;
this._nScrollTop = null;
}
if(this._nScrollLeft) {
this._elBdContainer.scrollLeft = this._nScrollLeft;
this._nScrollLeft = null;
}
} | javascript | {
"resource": ""
} | |
q30211 | train | function(oColumn, elTd) {
// Only Columns without widths that are not hidden
if(!oColumn.width && !oColumn.hidden) {
var elTh = oColumn.getThEl();
// Unset a calculated auto-width
if(oColumn._calculatedWidth) {
this._setColumnWidth(oColumn, "auto", "visible");
}
... | javascript | {
"resource": ""
} | |
q30212 | train | function() {
var elTbody = this._elTbody,
elBdContainer = this._elBdContainer;
// X-scrolling not enabled
if(!this.get("width")) {
// Snap outer container width to content
this._elContainer.style.width =
(elBdContainer.scrollHeight > elBdContainer.clientHeight) ... | javascript | {
"resource": ""
} | |
q30213 | train | function() {
var elTbody = this._elTbody,
elBdContainer = this._elBdContainer;
// IE 6 and 7 only when y-scrolling not enabled
if(!this.get("height") && (ua.ie)) {
// Snap outer container height to content
elBdContainer.style.height =
// but account for x-scroll... | javascript | {
"resource": ""
} | |
q30214 | train | function(nBorderWidth) {
var aLastHeaders = this._oColumnSet.headers[this._oColumnSet.headers.length-1] || [],
len = aLastHeaders.length,
sPrefix = this._sId+"-fixedth-",
sValue = nBorderWidth + "px solid " + this.get("COLOR_COLUMNFILLER");
this._elThead.style.display = "none";
for(... | javascript | {
"resource": ""
} | |
q30215 | train | function() {
var elMask = this._elMask;
elMask.style.width = this._elBdContainer.offsetWidth + "px";
elMask.style.height = this._elHdContainer.offsetHeight + this._elBdContainer.offsetHeight + "px";
elMask.style.display = "";
this.fireEvent("disableEvent");
} | javascript | {
"resource": ""
} | |
q30216 | train | function(oColumn, nWidth) {
oColumn = this.getColumn(oColumn);
if(oColumn) {
this._storeScrollPositions();
// Validate new width against minWidth
if(lang.isNumber(nWidth)) {
nWidth = (nWidth > oColumn.minWidth) ? nWidth : oColumn.minWidth;
// Save state
... | javascript | {
"resource": ""
} | |
q30217 | train | function(to) {
var td = this.getTdEl(to);
if(td) {
this.clearScrollPositions();
this.getBdContainerEl().scrollLeft = td.offsetLeft;
this.getBdContainerEl().scrollTop = td.parentNode.offsetTop;
}
else {
var tr = this.getTrEl(to);
... | javascript | {
"resource": ""
} | |
q30218 | train | function() {
this.unsubscribeAll();
// Column is late-binding in attach()
var oColumn = this.getColumn();
if(oColumn) {
oColumn.editor = null;
}
var elContainer = this.getContainerEl();
Ev.purgeElement(elContainer, true);
elContainer.parentNode.removeChild(elContainer);... | javascript | {
"resource": ""
} | |
q30219 | train | function() {
if(this._elContainer) {
YAHOO.util.Event.purgeElement(this._elContainer, true);
this._elContainer.innerHTML = "";
}
// Render Cell Editor container element as first child of body
var elContainer = document.createElement("div");
elContainer.id = this.getId() + "-containe... | javascript | {
"resource": ""
} | |
q30220 | train | function() {
// Move Editor
var elContainer = this.getContainerEl(),
elTd = this.getTdEl(),
x = Dom.getX(elTd),
y = Dom.getY(elTd);
//TODO: remove scrolling logic
// SF doesn't get xy for cells in scrolling table
// when tbody display is set to block
if(isNaN(x) || isNaN... | javascript | {
"resource": ""
} | |
q30221 | train | function() {
// Get new value
var inputValue = this.getInputValue();
var validValue = inputValue;
// Validate new value
if(this.validator) {
validValue = this.validator.call(this.getDataTable(), inputValue, this.value, this);
if(validValue === undefined ) {
if(this.r... | javascript | {
"resource": ""
} | |
q30222 | train | function() {
// Normalize to array
var originalValues = lang.isArray(this.value) ? this.value : [this.value];
// Match checks to value
for(var i=0, j=this.checkboxes.length; i<j; i++) {
this.checkboxes[i].checked = false;
for(var k=0, len=originalValues.length; k<len; k++) {
... | javascript | {
"resource": ""
} | |
q30223 | train | function() {
var checkedValues = [];
for(var i=0, j=this.checkboxes.length; i<j; i++) {
if(this.checkboxes[i].checked) {
checkedValues[checkedValues.length] = this.checkboxes[i].value;
}
}
return checkedValues;
} | javascript | {
"resource": ""
} | |
q30224 | train | function() {
var value = this.value;
var selectedValue = (value.getMonth()+1)+"/"+value.getDate()+"/"+value.getFullYear();
this.calendar.cfg.setProperty("selected",selectedValue,false);
this.calendar.render();
} | javascript | {
"resource": ""
} | |
q30225 | train | function() {
var allOptions = this.dropdown.options,
i=0, j=allOptions.length;
// Look for multi-select selections
if(lang.isArray(this.value)) {
var allValues = this.value,
m=0, n=allValues.length,
hash = {};
// Reset all selections and stash options in a va... | javascript | {
"resource": ""
} | |
q30226 | train | function() {
var allOptions = this.dropdown.options;
// Look for multiple selections
if(this.multiple) {
var values = [],
i=0, j=allOptions.length;
for(; i<j; i++) {
if(allOptions[i].selected) {
values.push(allOptions[i].value);
}
... | javascript | {
"resource": ""
} | |
q30227 | train | function() {
for(var i=0, j=this.radios.length; i<j; i++) {
var elRadio = this.radios[i];
if(this.value === elRadio.value) {
elRadio.checked = true;
return;
}
}
} | javascript | {
"resource": ""
} | |
q30228 | train | function() {
for(var i=0, j=this.radios.length; i<j; i++) {
if(this.radios[i].checked) {
this.radios[i].focus();
return;
}
}
} | javascript | {
"resource": ""
} | |
q30229 | train | function() {
for(var i=0, j=this.radios.length; i<j; i++) {
if(this.radios[i].checked) {
return this.radios[i].value;
}
}
} | javascript | {
"resource": ""
} | |
q30230 | train | function() {
this.textarea.style.width = this.getTdEl().offsetWidth + "px";
this.textarea.style.height = "3em";
YAHOO.widget.TextareaCellEditor.superclass.move.call(this);
} | javascript | {
"resource": ""
} | |
q30231 | validateData | train | function validateData(data) {
var random = Math.floor(Math.random() * (data.length - 0) + 0);
// ensure: containing Array and Object keys
var ok = Array.isArray(data) || data instanceof Array;
ok = ok && ['code', 'name', 'age'].every(function (k) {
return data[random].hasOwnPr... | javascript | {
"resource": ""
} |
q30232 | train | function(id) {
this._el = Dom.get(id);
this.id = Dom.generateId(this._el,"yui-tv-auto-id-");
/**
* When animation is enabled, this event fires when the animation
* starts
* @event animStart
* @type CustomEvent
* @param {YAHOO.widget.Node} oArgs.node the ... | javascript | {
"resource": ""
} | |
q30233 | train | function (ev) {
var target = Event.getTarget(ev);
// go up looking for a TD with a className with a ygtv prefix
while (target && !(target.tagName.toUpperCase() == 'TD' && Dom.hasClass(target.parentNode,'ygtvrow'))) {
target = Dom.getAncestorByTagName(target,'td');
}
... | javascript | {
"resource": ""
} | |
q30234 | train | function (ev) {
var self = this,
td = this._getEventTargetTdEl(ev),
node,
target,
toggle = function (force) {
node.focus();
if (force || !node.href) {
node.toggle();
try {
Event.preventDefault(ev);
} catch (e) {
... | javascript | {
"resource": ""
} | |
q30235 | train | function (ev) {
if (!this._hasDblClickSubscriber) { return; }
var td = this._getEventTargetTdEl(ev);
if (!td) {return;}
if (!(/\bygtv[tl][mp]h?h?/.test(td.className))) {
this.fireEvent('dblClickEvent', {event:ev, node:this.getNodeByElement(td)});
if (this._dblCl... | javascript | {
"resource": ""
} | |
q30236 | train | function (ev) {
var target;
if ((target = this._getEventTargetTdEl(ev)) && (target = this.getNodeByElement(target)) && (target = target.getToggleEl())) {
target.className = target.className.replace(/\bygtv([lt])([mp])\b/gi,'ygtv$1$2h');
}
} | javascript | {
"resource": ""
} | |
q30237 | train | function() {
var html = this.root.getHtml(),
el = this.getEl();
el.innerHTML = html;
if (!this._hasEvents) {
Event.on(el, 'click', this._onClickEvent, this, true);
Event.on(el, 'dblclick', this._onDblClickEvent, this, true);
Event.on(el, 'mouseover... | javascript | {
"resource": ""
} | |
q30238 | train | function(property, value) {
for (var i in this._nodes) {
if (this._nodes.hasOwnProperty(i)) {
var n = this._nodes[i];
if ((property in n && n[property] == value) || (n.data && value == n.data[property])) {
return n;
}
}
... | javascript | {
"resource": ""
} | |
q30239 | train | function(property, value) {
var values = [];
for (var i in this._nodes) {
if (this._nodes.hasOwnProperty(i)) {
var n = this._nodes[i];
if ((property in n && n[property] == value) || (n.data && value == n.data[property])) {
values.push(n);
... | javascript | {
"resource": ""
} | |
q30240 | train | function(fn) {
var values = [];
for (var i in this._nodes) {
if (this._nodes.hasOwnProperty(i)) {
var n = this._nodes[i];
if (fn(n)) {
values.push(n);
}
}
}
return (values.length) ? values : null;... | javascript | {
"resource": ""
} | |
q30241 | train | function(el) {
var p=el, m, re=/ygtv([^\d]*)(.*)/;
do {
if (p && p.id) {
m = p.id.match(re);
if (m && m[2]) {
return this.getNodeByIndex(m[2]);
}
}
p = p.parentNode;
if (!p || !p.tagN... | javascript | {
"resource": ""
} | |
q30242 | train | function(node, autoRefresh) {
// Don't delete the root node
if (node.isRoot()) {
return false;
}
// Get the branch that we may need to refresh
var p = node.parent;
if (p.parent) {
p = p.parent;
}
// Delete the node and its child... | javascript | {
"resource": ""
} | |
q30243 | train | function(node) {
var p = node.parent;
// Update the parent's collection of children
var a = [];
for (var i=0, len=p.children.length;i<len;++i) {
if (p.children[i] != node) {
a[a.length] = p.children[i];
}
}
p.children = a;
... | javascript | {
"resource": ""
} | |
q30244 | train | function() {
// Since the label editor can be separated from the main TreeView control
// the destroy method for it might not be there.
if (this._destroyEditor) { this._destroyEditor(); }
var el = this.getEl();
Event.removeListener(el,'click');
Event.removeListener(el,'db... | javascript | {
"resource": ""
} | |
q30245 | train | function(name, value, refresh) {
this.root.setNodesProperty(name,value);
if (refresh) {
this.root.refresh();
}
} | javascript | {
"resource": ""
} | |
q30246 | train | function (oArgs) {
var node;
if ('node' in oArgs && oArgs.node instanceof Widget.Node) {
node = oArgs.node;
} else if (oArgs instanceof Widget.Node) {
node = oArgs;
} else {
return false;
}
node.toggleHighlight();
return false;
... | javascript | {
"resource": ""
} | |
q30247 | train | function(parentNode) {
if (!parentNode) {
return false;
}
this.tree = parentNode.tree;
this.parent = parentNode;
this.depth = parentNode.depth + 1;
// @todo why was this put here. This causes new nodes added at the
// root level to lose the menu ... | javascript | {
"resource": ""
} | |
q30248 | train | function(childNode) {
if (this.hasChildren()) {
var sib = this.children[this.children.length - 1];
sib.nextSibling = childNode;
childNode.previousSibling = sib;
}
this.children[this.children.length] = childNode;
childNode.applyParent(this);
//... | javascript | {
"resource": ""
} | |
q30249 | train | function(parentNode) {
if (parentNode && parentNode.children) {
for (var i=0, len=parentNode.children.length; i<len ; ++i) {
if (parentNode.children[i] === this) {
return i;
}
}
}
return -1;
} | javascript | {
"resource": ""
} | |
q30250 | train | function() {
var sib = this.parent.children.slice(0);
for (var i=0;i < sib.length && sib[i] != this;i++) {}
sib.splice(i,1);
if (sib.length) { return sib; }
return null;
} | javascript | {
"resource": ""
} | |
q30251 | train | function() {
var l = this.children.length;
for (var i=0;i<l;++i) {
var c = this.children[i];
if (c.isDynamic()) {
break;
} else if (! c.multiExpand) {
break;
} else {
c.expand();
c.expandAll(... | javascript | {
"resource": ""
} | |
q30252 | train | function() {
for (var i=0;i<this.children.length;++i) {
this.children[i].collapse();
this.children[i].collapseAll();
}
} | javascript | {
"resource": ""
} | |
q30253 | train | function(fnDataLoader, iconMode) {
if (fnDataLoader) {
this.dataLoader = fnDataLoader;
this._dynLoad = true;
} else {
this.dataLoader = null;
this._dynLoad = false;
}
if (iconMode) {
this.iconMode = iconMode;
}
} | javascript | {
"resource": ""
} | |
q30254 | train | function() {
var sb = [];
sb[sb.length] = '<div class="ygtvchildren" id="' + this.getChildrenElId() + '"';
// This is a workaround for an IE rendering issue, the child div has layout
// in IE, creating extra space if a leaf node is created with the expanded
// property set to ... | javascript | {
"resource": ""
} | |
q30255 | train | function() {
// this.loadComplete();
this.getChildrenEl().innerHTML = this.completeRender();
if (this.hasIcon) {
var el = this.getToggleEl();
if (el) {
el.className = el.className.replace(/\bygtv[lt][nmp]h*\b/gi,this.getStyle());
}
}
... | javascript | {
"resource": ""
} | |
q30256 | train | function () {
if (this._focusedItem) {
Event.removeListener(this._focusedItem,'blur');
this._focusedItem = null;
}
var el;
while ((el = this._focusHighlightedItems.shift())) { // yes, it is meant as an assignment, really
Dom.removeClass(el,YAHOO.widge... | javascript | {
"resource": ""
} | |
q30257 | train | function () {
var focused = false, self = this;
if (this.tree.currentFocus) {
this.tree.currentFocus._removeFocus();
}
var expandParent = function (node) {
if (node.parent) {
expandParent(node.parent);
node.parent.expand();
... | javascript | {
"resource": ""
} | |
q30258 | train | function() {
for (var i = 0, count = 0;i< this.children.length;i++) {
count += this.children[i].getNodeCount();
}
return count + 1;
} | javascript | {
"resource": ""
} | |
q30259 | train | function() {
if (this.isDynamic()) { return false; }
var def, defs = Lang.merge(this.data), children = [];
if (this.expanded) {defs.expanded = this.expanded; }
if (!this.multiExpand) { defs.multiExpand = this.multiExpand; }
if (!this.renderHidden... | javascript | {
"resource": ""
} | |
q30260 | train | function(name, value, refresh) {
if (name.charAt(0) != '_' && !Lang.isUndefined(this[name]) && !Lang.isFunction(this[name]) ) {
this[name] = value;
} else {
this.data[name] = value;
}
for (var i = 0; i < this.children.length;i++) {
this.children[i].se... | javascript | {
"resource": ""
} | |
q30261 | train | function(_silent) {
if (this.enableHighlight) {
if (this.tree.singleNodeHighlight) {
if (this.tree._currentlyHighlighted) {
this.tree._currentlyHighlighted.unhighlight(_silent);
}
this.tree._currentlyHighlighted = this;
... | javascript | {
"resource": ""
} | |
q30262 | train | function() {
var yes = false, no = false;
if (this.enableHighlight) {
for (var i = 0;i < this.children.length;i++) {
switch(this.children[i].highlightState) {
case 0:
no = true;
break;
cas... | javascript | {
"resource": ""
} | |
q30263 | train | function() {
var el = Dom.get('ygtvtableel' + this.index);
if (el) {
el.className = el.className.replace(/\bygtv-highlight\d\b/gi,'ygtv-highlight' + this.highlightState);
}
} | javascript | {
"resource": ""
} | |
q30264 | train | function() {
for (var def, defs = [], i = 0; i < this.children.length;i++) {
def = this.children[i].getNodeDefinition();
if (def === false) { return false;}
defs.push(def);
}
return defs;
} | javascript | {
"resource": ""
} | |
q30265 | train | function() {
var sb = [];
sb[sb.length] = this.href?'<a':'<span';
sb[sb.length] = ' id="' + this.labelElId + '"';
sb[sb.length] = ' class="' + this.labelStyle + '"';
if (this.href) {
sb[sb.length] = ' href="' + this.href + '"';
sb[sb.length] = ' target="... | javascript | {
"resource": ""
} | |
q30266 | train | function(o) {
this.html = (typeof o === "string") ? o : o.html;
var el = this.getContentEl();
if (el) {
el.innerHTML = this.html;
}
} | javascript | {
"resource": ""
} | |
q30267 | train | function() {
var def = YAHOO.widget.HTMLNode.superclass.getNodeDefinition.call(this);
if (def === false) { return false; }
def.html = this.html;
return def;
} | javascript | {
"resource": ""
} | |
q30268 | train | function (editorData) {
var cal, container = editorData.inputContainer;
if (Lang.isUndefined(Calendar)) {
Dom.replaceClass(editorData.editorPanel,'ygtv-edit-DateNode','ygtv-edit-TextNode');
YAHOO.widget.DateNode.superclass.fillEditorContainer.call(this, editorData);... | javascript | {
"resource": ""
} | |
q30269 | train | function (value,editorData) {
var node = editorData.node;
node.label = value;
node.getLabelEl().innerHTML = value;
} | javascript | {
"resource": ""
} | |
q30270 | train | function(type, el, callback) {
if (YAHOO.widget[type]) {
return new YAHOO.widget[type](el, callback);
} else {
return null;
}
} | javascript | {
"resource": ""
} | |
q30271 | train | function() {
var s = this.el.style;
s.display = "none";
s.opacity = 1;
s.filter = "alpha(opacity=100)";
this.callback();
} | javascript | {
"resource": ""
} | |
q30272 | train | function(tab, index) {
var tabs = this.get('tabs'),
before = this.getTab(index),
tabParent = this._tabParent,
contentParent = this._contentParent,
tabElement = tab.get(ELEMENT),
contentEl = tab.get(CONTENT_EL);
if (... | javascript | {
"resource": ""
} | |
q30273 | train | function(e) {
var target = Event.getTarget(e),
tabParent = this._tabParent,
tabs = this.get('tabs'),
tab,
tabEl,
contentEl;
if (Dom.isAncestor(tabParent, target) ) {
for (var i = 0, len ... | javascript | {
"resource": ""
} | |
q30274 | train | function(tab) {
var index = null,
tabs = this.get('tabs');
for (var i = 0, len = tabs.length; i < len; ++i) {
if (tab == tabs[i]) {
index = i;
break;
}
}
return index;
... | javascript | {
"resource": ""
} | |
q30275 | train | function(tab) {
var tabCount = this.get('tabs').length,
index = this.getTabIndex(tab);
if ( tab === this.get(ACTIVE_TAB) ) {
if (tabCount > 1) { // select another tab
if (index + 1 === tabCount) { // if last, activate previous
... | javascript | {
"resource": ""
} | |
q30276 | train | function(newTab, oldTab) {
if (newTab) {
newTab.set('contentVisible', true);
}
if (oldTab) {
oldTab.set('contentVisible', false);
}
} | javascript | {
"resource": ""
} | |
q30277 | train | function() {
var tabs = Dom.getChildren(this._tabParent),
contentElements = Dom.getChildren(this._contentParent),
activeIndex = this.get(ACTIVE_INDEX),
tab,
attr,
active;
for (var i = 0, len = tabs.length; i < len; ... | javascript | {
"resource": ""
} | |
q30278 | train | function(aData, index) {
var Rec = widget.Record,
a = lang.isArray(aData) ? aData : [aData],
added = [],
i = 0, l = a.length, j = 0;
index = parseInt(index,10)|0;
for(; i < l; ++i) {
if (typeof a[i] === 'object' && a[i]) {
a... | javascript | {
"resource": ""
} | |
q30279 | train | function(oData) {
//Convert to number
var number = oData * 1;
// Validate
if(lang.isNumber(number)) {
return number;
}
else {
YAHOO.log("Could not validate data " + lang.dump(oData) + " to type Number", "warn", this.toString());
return... | javascript | {
"resource": ""
} | |
q30280 | train | function(oDataSource) {
this._oDataSource = null;
if(oDataSource && (lang.isFunction(oDataSource.sendRequest))) {
this._oDataSource = oDataSource;
}
// Backward compatibility
else {
var tmpTable = null;
var tmpContainer = this._elContainer;
var i=0;
//TODO: th... | javascript | {
"resource": ""
} | |
q30281 | train | function() {
this._destroyDraggableColumns();
if(util.DD) {
var oColumn, elTh, elDragTarget;
for(var i=0, len=this._oColumnSet.tree[0].length; i<len; i++) {
oColumn = this._oColumnSet.tree[0][i];
elTh = oColumn.getThEl();
Dom.addClass(elTh, DT.CLASS_DRAGGABLE)... | javascript | {
"resource": ""
} | |
q30282 | train | function(cell) {
var elCell = this.getTdEl(cell);
if(elCell) {
var nThisTdIndex = elCell.cellIndex;
var elRow = this.getTrEl(elCell);
if(nThisTdIndex > 0) {
return elRow.cells[nThisTdIndex-1];
}
else {
var elPreviousRow = this.getPreviousTrEl(elRow... | javascript | {
"resource": ""
} | |
q30283 | train | function() {
// Store for later
var instanceName = this.toString();
this._oChainRender.stop();
// Destroy static resizer proxy and column proxy
DT._destroyColumnDragTargetEl();
DT._destroyColumnResizerProxyEl();
// Destroy ColumnDD and ColumnResizers
this._destroyColumnHelpers... | javascript | {
"resource": ""
} | |
q30284 | train | function(row, oData) {
var index = row;
if (!lang.isNumber(index)) {
index = this.getRecordIndex(row);
}
// Update the Record
if(lang.isNumber(index) && (index >= 0)) {
var oRecordSet = this._oRecordSet,
oldRecord = oRecordSet.getRecord(index);
... | javascript | {
"resource": ""
} | |
q30285 | train | function(elLiner, oRecord, oColumn) {
if(!oRecord) {
oRecord = this.getRecord(elLiner);
}
if(!oColumn) {
oColumn = this.getColumn(elLiner.parentNode.cellIndex);
}
if(oRecord && oColumn) {
var sField = oColumn.field;
var oData = oRecord.getData(sField);
var f... | javascript | {
"resource": ""
} | |
q30286 | train | function(oRecord, oColumn, oData) {
// Validate Column and Record
oColumn = (oColumn instanceof YAHOO.widget.Column) ? oColumn : this.getColumn(oColumn);
if(oColumn && oColumn.getField() && (oRecord instanceof YAHOO.widget.Record)) {
var sKey = oColumn.getField(),
// Copy data f... | javascript | {
"resource": ""
} | |
q30287 | train | function(row) {
var elRow = this.getTrEl(row);
if(elRow) {
// Make sure previous row is unhighlighted
/* if(this._sLastHighlightedTrElId) {
Dom.removeClass(this._sLastHighlightedTrElId,DT.CLASS_HIGHLIGHTED);
}*/
var oRecord = this.getRecord(elRow);
Dom.addClas... | javascript | {
"resource": ""
} | |
q30288 | train | function(oDataTable, elCell) {
// Validate
if(oDataTable instanceof YAHOO.widget.DataTable) {
this._oDataTable = oDataTable;
// Validate cell
elCell = oDataTable.getTdEl(elCell);
if(elCell) {
this._elTd = elCell;
// Validate Column
v... | javascript | {
"resource": ""
} | |
q30289 | train | function() {
this.resetForm();
this.isActive = true;
this.getContainerEl().style.display = "";
this.focus();
this.fireEvent("showEvent", {editor:this});
YAHOO.log("CellEditor shown", "info", this.toString());
} | javascript | {
"resource": ""
} | |
q30290 | train | function (options) {
inputEx.DSSelectField.superclass.setOptions.call(this, options);
this.options.valueKey = options.valueKey || "value";
this.options.labelKey = options.labelKey || "label";
this.options.datasource = options.datasource;
} | javascript | {
"resource": ""
} | |
q30291 | train | function (oRequest) {
if (!!this.options.datasource) {
this.options.datasource.sendRequest(oRequest, {success: this.onDatasourceSuccess, failure: this.onDatasourceFailure, scope: this});
}
} | javascript | {
"resource": ""
} | |
q30292 | train | function (items) {
var i, length;
// remove previous <option>s nodes
while (this.el.childNodes.length > 0) {
this.el.removeChild(this.el.childNodes[0]);
}
// add new options
for (i = 0, length = items.length; i < length ; i += 1) {
this.addChoice({ value: items[i][this.options.valueKe... | javascript | {
"resource": ""
} | |
q30293 | train | function(instanceObject) {
if(!instanceObject || !instanceObject["$schema"]) {
throw new Error("Invalid json schema instance object. Object must have a '$schema' property.");
}
var formDef = this.schemaToInputEx(instanceObject["$schema"]);
// Set the default value of each ... | javascript | {
"resource": ""
} | |
q30294 | train | function (config, sendUpdatedEvt) {
var position, choice;
position = this.getChoicePosition(config);
if (position !== -1) {
choice = this.choicesList[position];
// test if visible first in case we try to hide twice or more...
if (choice.visible) {
choice.visible = f... | javascript | {
"resource": ""
} | |
q30295 | train | function(options) {
inputEx.Form.superclass.setOptions.call(this, options);
this.buttons = [];
this.options.buttons = options.buttons || [];
this.options.action = options.action;
this.options.method = options.method;
this.options.className = options.className || 'inputEx-Group';
t... | javascript | {
"resource": ""
} | |
q30296 | train | function() {
var buttonConf, button, i, buttonsNb = this.options.buttons.length;
this.buttonDiv = inputEx.cn('div', {className: 'inputEx-Form-buttonBar'});
for(i = 0 ; i < buttonsNb ; i++ ) {
buttonConf = this.options.buttons[i];
// Throw Error if button is undefi... | javascript | {
"resource": ""
} | |
q30297 | train | function() {
if(this.options.ajax.showMask) { this.showMask(); }
var formValue = this.getValue();
// options.ajax.uri and options.ajax.method can also be functions that return a the uri/method depending of the value of the form
var uri = lang.isFunction(this.options.ajax.uri) ? this.options.ajax.uri(fo... | javascript | {
"resource": ""
} | |
q30298 | train | function() {
if(this.maskRendered) return;
// position as "relative" to position formMask inside as "absolute"
Dom.setStyle(this.divEl, "position", "relative");
// set zoom = 1 to fix hasLayout issue with IE6/7
if (YAHOO.env.ua.ie) { Dom.setStyle(this.divEl, "zoom", 1); }
// Rende... | javascript | {
"resource": ""
} | |
q30299 | train | function() {
inputEx.Form.superclass.enable.call(this);
for (var i = 0 ; i < this.buttons.length ; i++) {
this.buttons[i].enable();
}
} | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.