_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q30400
train
function (name,sheet) { return !!(name && sheet instanceof StyleSheet && !sheets[name] && (sheets[name] = sheet)); }
javascript
{ "resource": "" }
q30401
train
function(el, node) { this.logger.log("animating expand"); if (this._expandAnim && this._animCount < this.maxAnim) { // this.locked = true; var tree = this; var a = Widget.TVAnim.getAnim(this._expandAnim, el, function() { tree.expandComple...
javascript
{ "resource": "" }
q30402
train
function(el, node) { this.logger.log("animating collapse"); if (this._collapseAnim && this._animCount < this.maxAnim) { // this.locked = true; var tree = this; var a = Widget.TVAnim.getAnim(this._collapseAnim, el, function() { tree.collap...
javascript
{ "resource": "" }
q30403
train
function(node) { if (node.expanded) { // wait until the animation is complete before deleting to // avoid javascript errors if (this._collapseAnim) { this.subscribe("animComplete", this._removeChildren_animComplete, this, true); ...
javascript
{ "resource": "" }
q30404
train
function(node) { this.logger.log("insertAfter: " + node); var p = node.parent; if (p) { if (this.tree) { this.tree.popNode(this); } var refIndex = node.isChildOf(p); this.logger.log(refIndex); if (!node.nextSibling) {...
javascript
{ "resource": "" }
q30405
train
function() { // this.logger.log("No children, " + " isDyanmic: " + this.isDynamic() + " expanded: " + this.expanded); if (this.isLoading) { this.logger.log("returning the loading icon"); return "ygtvloading"; } else { // location top or bottom, middle nodes al...
javascript
{ "resource": "" }
q30406
train
function() { this.logger.log("rendering children for " + this.index); var node = this; if (this.isDynamic() && !this.dynamicLoadComplete) { this.isLoading = true; this.tree.locked = true; if (this.dataLoader) { this.logger.log("Using dynami...
javascript
{ "resource": "" }
q30407
train
function() { this.logger.log(this.index + " loadComplete, children: " + this.children.length); this.getChildrenEl().innerHTML = this.completeRender(); if (this.propagateHighlightDown) { if (this.highlightState === 1 && !this.tree.singleNodeHighlight) { for (var i = 0; i < this.children.length; ...
javascript
{ "resource": "" }
q30408
train
function() { this.logger.log("Generating html"); var sb = []; sb[sb.length] = '<table id="ygtvtableel' + this.index + '" border="0" cellpadding="0" cellspacing="0" class="ygtvtable ygtvdepth' + this.depth; if (this.enableHighlight) { sb[sb.length] = ' ygtv-highlight' + this...
javascript
{ "resource": "" }
q30409
train
function(r, g, b) { if (isArray(r)) { return this.rgb2hex.apply(this, r); } var f=this.dec2hex; return f(r) + f(g) + f(b); }
javascript
{ "resource": "" }
q30410
train
function(n) { n = parseInt(n,10)|0; n = (n > 255 || n < 0) ? 0 : n; return (ZERO+n.toString(16)).slice(-2).toUpperCase(); }
javascript
{ "resource": "" }
q30411
train
function(s) { var f = this.hex2dec; return [f(s.slice(0, 2)), f(s.slice(2, 4)), f(s.slice(4, 6))]; }
javascript
{ "resource": "" }
q30412
train
function(r, g, b) { if (isArray(r)) { return this.websafe.apply(this, r); } // returns the closest match [0, 51, 102, 153, 204, 255] var f = function(v) { if (isNumber(v)) { v = Math.min(Math.max(0, v), 255); ...
javascript
{ "resource": "" }
q30413
ColorPicker
train
function ColorPicker(el, attr) { _pickercount = _pickercount + 1; attr = attr || {}; if (arguments.length === 1 && !YAHOO.lang.isString(el) && !el.nodeName) { attr = el; // treat first arg as attr object el = attr.element || null; } if (!el && !at...
javascript
{ "resource": "" }
q30414
train
function () { var el = document.createElement('div'); if (this.CSS.BASE) { el.className = this.CSS.BASE; } return el; }
javascript
{ "resource": "" }
q30415
train
function(rgb, silent) { silent = (silent) || false; this.set(this.OPT.RGB, rgb, silent); this._updateSliders(); }
javascript
{ "resource": "" }
q30416
train
function() { var rgb = this.get(this.OPT.RGB), websafe = this.get(this.OPT.WEBSAFE), el = this.getElement(this.ID.SWATCH), color = rgb.join(","), txt = this.get(this.OPT.TXT); Dom.setStyle(el, "background-color", "rgb(" + color + ...
javascript
{ "resource": "" }
q30417
train
function(e) { var c = Event.getCharCode(e); //alert(Event.getCharCode(e) + ", " + e.keyCode + ", " + e.charCode); // special keys if (c === 38) { // up arrow return 3; } else if (c === 13) { // return return 6; } e...
javascript
{ "resource": "" }
q30418
train
function(e, el, prop) { var val = el.value; if (prop !== this.OPT.HEX) { val = parseInt(val, 10); } if (val !== this.get(prop)) { this.set(prop, val); } }
javascript
{ "resource": "" }
q30419
train
function(e, el, prop) { var command = this._getCommand(e), inc = (e.shiftKey) ? 10 : 1; switch (command) { case 6: // return, update the value this._useFieldValue.apply(this, arguments); break; ...
javascript
{ "resource": "" }
q30420
train
function(e, el, prop) { var command = this._getCommand(e); if (command === 6) { // return, update the value this._useFieldValue.apply(this, arguments); } }
javascript
{ "resource": "" }
q30421
train
function(e, numbersOnly) { var command = this._getCommand(e); switch (command) { case 6: // return case 5: // special char case 1: // number break; case 2: // hex char (a-f) if (numbersOnly !=...
javascript
{ "resource": "" }
q30422
train
function () { var ID = this.ID, O = this.OPT; this.hueSlider.subscribe("change", this._onHueSliderChange, this, true); this.pickerSlider.subscribe("change", this._onPickerSliderChange, this, true); Event.on(this.getElemen...
javascript
{ "resource": "" }
q30423
train
function(id, on) { var el = (lang.isString(id) ? this.getElement(id) : id); Dom.setStyle(el, "display", (on) ? "" : "none"); }
javascript
{ "resource": "" }
q30424
train
function (options) { var x; options = options || {}; // Store folders this.folders = options.folders || {}; this.safenames = options.safenames || false; // check for existing folders for (x in this.folders) { if (!fs.existsSync( this.folders[x] )){ // create folder if not exists mkdirp( this.folders[x] ...
javascript
{ "resource": "" }
q30425
train
function (callback) { var fn, scope; fn = callback.fn; scope = callback.scope; if (this.formAvailable) { fn.call(scope); } else { this.formAvailableEvt.subscribe(fn, scope, true); } }
javascript
{ "resource": "" }
q30426
train
function (key, value, silent) { var property; key = key.toLowerCase(); YAHOO.log("setProperty: " + key + "=" + value, "info", "Config"); if (this.queueInProgress && ! silent) { // Currently running through a queue... ...
javascript
{ "resource": "" }
q30427
train
function (key, value) { key = key.toLowerCase(); YAHOO.log("queueProperty: " + key + "=" + value, "info", "Config"); var property = this.config[key], foundDuplicate = false, iLen, queueItem, queueItemKe...
javascript
{ "resource": "" }
q30428
train
function (type, args, obj) { var pos = args[0], x = pos[0], y = pos[1]; this.cfg.setProperty("x", x); this.cfg.setProperty("y", y); this.beforeMoveEvent.fire([x, y]); x = this.cfg.getProperty("x"); y = this.cfg.g...
javascript
{ "resource": "" }
q30429
train
function () { var me = this; me.logger.log("Setting hide tooltip timeout", "time"); return setTimeout(function () { me.logger.log("Hide tooltip", "time"); me.hide(); }, this.cfg.getProperty("autodismissdelay")); }
javascript
{ "resource": "" }
q30430
train
function (pageX, pageY) { var height = this.element.offsetHeight, mousePoint = new YAHOO.util.Point(pageX, pageY), elementRegion = Dom.getRegion(this.element); elementRegion.top -= 5; elementRegion.left -= 5; elementRegion...
javascript
{ "resource": "" }
q30431
train
function(name, method){ //create instrumented version of function var newMethod = function () { var start = new Date(), retval = method.apply(this, arguments), stop = new Date(); saveDataPoint(...
javascript
{ "resource": "" }
q30432
train
function () { var start = new Date(), retval = method.apply(this, arguments), stop = new Date(); saveDataPoint(name, stop-start); return retval; }
javascript
{ "resource": "" }
q30433
train
function(name){ if(container[name]){ throw new Error("Cannot use '" + name + "' for profiling through start(), name is already in use."); } else { //create report if necessary if (!report[name]){ createReport(name);...
javascript
{ "resource": "" }
q30434
train
function(name){ var now = new Date(), stopwatch = stopwatches[name]; if (stopwatch){ if (stopwatch.state == WATCH_STARTED){ saveDataPoint(name, stopwatch.total + (now - stopwatch.start)); } e...
javascript
{ "resource": "" }
q30435
train
function(name /*:String*/, owner /*:Object*/, registerPrototype /*:Boolean*/) /*:Void*/{ //figure out the function name without namespacing var funcName = (name.indexOf(".") > -1 ? name.substring(name.lastIndexOf(".")+1) : name), method, ...
javascript
{ "resource": "" }
q30436
get_user_collection
train
function get_user_collection(req, res, next) { app.db.collection('users', function(error, user_collection) { if(error) { throw error; } else { req.user_collection = user_collection; next(); } }); }
javascript
{ "resource": "" }
q30437
train
function() { this.subfieldWrapper = inputEx.cn('div', {className: "inputEx-SerializedField-SubFieldWrapper"}); this.fieldContainer.appendChild( this.subfieldWrapper ); var config = {parentEl: this.subfieldWrapper}; lang.augmentObject(config, this.options.subfield); this.subField = inputEx...
javascript
{ "resource": "" }
q30438
train
function() { inputEx.SerializeField.superclass.initEvents.call(this); this.subField.updatedEvt.subscribe(this.fireUpdatedEvt, this, true); }
javascript
{ "resource": "" }
q30439
train
function(o) { if(!XML || !YAHOO.lang.isFunction(XML.ObjTree) ) { alert("ObjTree.js not loaded."); return null; } var xotree = new XML.ObjTree(); return xotree.writeXML(o); }
javascript
{ "resource": "" }
q30440
train
function(sValue) { if(!XML || !YAHOO.lang.isFunction(XML.ObjTree) ) { alert("ObjTree.js not loaded."); return null; } var xotree = new XML.ObjTree(); var tree = xotree.parseXML( sValue ); return tree; }
javascript
{ "resource": "" }
q30441
train
function(req, res){ return function(){ var buf = [], messages = req.flash(), types = Object.keys(messages), len = types.length; if (!len) { return ''; } buf.push('<div id="messages">'); for (var i = 0 ; i < ...
javascript
{ "resource": "" }
q30442
Slider
train
function Slider(sElementId, sGroup, oThumb, sType) { Slider.ANIM_AVAIL = (!YAHOO.lang.isUndefined(YAHOO.util.Anim)); if (sElementId) { this.init(sElementId, sGroup, true); this.initSlider(sType); this.initThumb(oThumb); } }
javascript
{ "resource": "" }
q30443
train
function (sBGElId, sHandleElId, iUp, iDown, iTickSize) { return new Slider(sBGElId, sBGElId, new YAHOO.widget.SliderThumb(sHandleElId, sBGElId, 0, 0, iUp, iDown, iTickSize), "vert"); }
javascript
{ "resource": "" }
q30444
train
function(t) { var self = this; /** * A YAHOO.widget.SliderThumb instance that we will use to * reposition the thumb when the background is clicked * @property thumb * @type YAHOO.widget.SliderThumb */ this.thumb = t; t.cacheBetweenDrags = ...
javascript
{ "resource": "" }
q30445
train
function () { Event.on(this.id, "keydown", this.handleKeyDown, this, true); Event.on(this.id, "keypress", this.handleKeyPress, this, true); }
javascript
{ "resource": "" }
q30446
train
function(e) { if (this.enableKeys) { var kc = Event.getCharCode(e); switch (kc) { case 0x25: // left case 0x26: // up case 0x27: // right case 0x28: // down case 0x24: // home case 0x23: // e...
javascript
{ "resource": "" }
q30447
train
function(e) { if (this.enableKeys) { var kc = Event.getCharCode(e), t = this.thumb, h = this.getXValue(), v = this.getYValue(), changeValue = true; switch (kc) { // left case 0x25: h -= t...
javascript
{ "resource": "" }
q30448
train
function() { var el = this.thumb.getEl(); if (el) { /** * The center of the slider element is stored so we can * place it in the correct position when the background is clicked. * @property thumbCenterPoint * @type {"x": int, "y": int} ...
javascript
{ "resource": "" }
q30449
train
function() { var args = _AS.call(arguments); args.unshift(Slider.SOURCE_SET_VALUE); return this._setValue.apply(this,args); }
javascript
{ "resource": "" }
q30450
train
function(finalCoord) { var t = this.thumb, self = this, nextCoord = null, tmpX, tmpY; if (t._isRegion) { nextCoord = this._getNextX(this.curCoord, finalCoord); tmpX = (nextCoord !== null) ? nextCoord[0] : this.curCoord[0]; nextCoo...
javascript
{ "resource": "" }
q30451
train
function(e) { if (!this.backgroundEnabled || this.isLocked()) { return false; } this._mouseDown = true; var x = Event.getPageX(e), y = Event.getPageY(e); this.focus(); this._slideStart(); this.moveThumb(x, y); }
javascript
{ "resource": "" }
q30452
train
function () { var t = this.thumb; t.setXConstraint(t.leftConstraint, t.rightConstraint, t.xTickSize); t.setYConstraint(t.topConstraint, t.bottomConstraint, t.xTickSize); }
javascript
{ "resource": "" }
q30453
train
function(parentPos) { var myPos = YAHOO.util.Dom.getXY(this.getEl()), ppos = parentPos || YAHOO.util.Dom.getXY(this.parentElId); return [ (myPos[0] - ppos[0]), (myPos[1] - ppos[1]) ]; }
javascript
{ "resource": "" }
q30454
train
function (iLeft, iRight, iUp, iDown, iTickSize) { this.initLeft = iLeft; this.initRight = iRight; this.initUp = iUp; this.initDown = iDown; this.setXConstraint(iLeft, iRight, iTickSize); this.setYConstraint(iUp, iDown, iTickSize); if (iTickSize && iTickSize > 1)...
javascript
{ "resource": "" }
q30455
train
function () { if (!this.available) { return 0; } var newOffset = this.getOffsetFromParent(); if (YAHOO.lang.isNumber(newOffset[0])) { this.lastOffset = newOffset; return (newOffset[0] - this.startOffset[0]); } else { return (this....
javascript
{ "resource": "" }
q30456
train
function (slider) { Event.on(slider.id,'keydown', this._handleKeyDown, this,true); Event.on(slider.id,'keypress',this._handleKeyPress,this,true); }
javascript
{ "resource": "" }
q30457
train
function (min, max, skipAnim, force, silent) { var mins = this.minSlider, maxs = this.maxSlider, mint = mins.thumb, maxt = maxs.thumb, self = this, done = { min : false, max : false }; // Clear constraints to prevent animated thumbs from prema...
javascript
{ "resource": "" }
q30458
train
function (min, skipAnim, force, silent) { var mins = this.minSlider, self = this; this.activeSlider = mins; // Use a one-time event callback to delay the updateValue call // until after the slide operation is done self = this; this._oneTimeCallback(mins,'sli...
javascript
{ "resource": "" }
q30459
train
function (max, skipAnim, force, silent) { var maxs = this.maxSlider, self = this; this.activeSlider = maxs; // Use a one-time event callback to delay the updateValue call // until after the slide operation is done this._oneTimeCallback(maxs,'slideEnd',function () { ...
javascript
{ "resource": "" }
q30460
train
function(silent) { var min = this.minSlider.getValue(), max = this.maxSlider.getValue(), changed = false, mint,maxt,dim,minConstraint,maxConstraint,thumbInnerWidth; if (min != this.minVal || max != this.maxVal) { changed = true; mint ...
javascript
{ "resource": "" }
q30461
train
function(e) { var min = this.minSlider, max = this.maxSlider, minLocked = min.isLocked() || !min.backgroundEnabled, maxLocked = max.isLocked() || !min.backgroundEnabled, Ev = YAHOO.util.Event, d; if (minLocked || maxLocked) { this...
javascript
{ "resource": "" }
q30462
train
function(e) { if (!e._handled && !this.minSlider._sliding && !this.maxSlider._sliding) { e._handled = true; this.selectActiveSlider(e); return YW.Slider.prototype.onMouseDown.call(this.activeSlider, e); } else { return false; } }
javascript
{ "resource": "" }
q30463
train
function (o,evt,fn) { var sub = function () { // Unsubscribe myself o.unsubscribe(evt, sub); // Pass the event handler arguments to the one time callback fn.apply({},arguments); }; o.subscribe(evt,sub); }
javascript
{ "resource": "" }
q30464
train
function (o,evt) { var ce,i,len,j,subs,newSubs; if (o.__yui_events && o.events[evt]) { for (i = o.__yui_events.length; i >= 0; --i) { if (o.__yui_events[i].type === evt) { ce = o.__yui_events[i]; break; } } ...
javascript
{ "resource": "" }
q30465
createElement
train
function createElement(el, attrs) { var newEl = document.createElement(el); attrs = attrs || {}; if (attrs.className) { Dom.addClass(newEl, attrs.className); } if (attrs.styles) { setStyles(newEl, attrs.styles); } if (attrs.parent) { ...
javascript
{ "resource": "" }
q30466
getStyle
train
function getStyle(el, style, type) { var value; if (!el) { return 0; } function getStyleIntVal(el, style) { var val; /* * XXX: Safari calculates incorrect marginRight for an element * which has its parent element style set ...
javascript
{ "resource": "" }
q30467
getCarouselItemSize
train
function getCarouselItemSize(which) { var carousel = this, child, item, size = 0, first = carousel.get("firstVisible"), vertical = false; if (carousel._itemsTable.numItems === 0) { return 0; } item = carousel._...
javascript
{ "resource": "" }
q30468
getCarouselItemPosition
train
function getCarouselItemPosition(pos) { var carousel = this, itemsPerRow = carousel._cols, itemsPerCol = carousel._rows, page, sz, isVertical, itemsCol, itemsRow, sentinel, delta = 0, top, ...
javascript
{ "resource": "" }
q30469
getScrollOffset
train
function getScrollOffset(delta) { var itemSize = 0, size = 0; itemSize = getCarouselItemSize.call(this); size = itemSize * delta; return size; }
javascript
{ "resource": "" }
q30470
setItemSelection
train
function setItemSelection(newpos, oldpos) { var carousel = this, cssClass = carousel.CLASSES, el, firstItem = carousel._firstItem, isCircular = carousel.get("isCircular"), numItems = carousel.get("numItems"), numVisible = carousel.get(...
javascript
{ "resource": "" }
q30471
syncPagerUi
train
function syncPagerUi(page) { var carousel = this, numPages, numVisible; // Don't do anything if the Carousel is not rendered if (!carousel._hasRendered) { return; } numVisible = carousel.get("numVisible"); if (!JS.isNumber(page)) { page = Math.f...
javascript
{ "resource": "" }
q30472
getDimensions
train
function getDimensions(el, which) { switch (which) { case 'height': return getStyle(el, "marginTop") + getStyle(el, "marginBottom") + getStyle(el, "paddingTop") + getStyle(el, "paddingBottom") + ...
javascript
{ "resource": "" }
q30473
syncUi
train
function syncUi(o) { var carousel = this; if (!JS.isObject(o)) { return; } switch (o.ev) { case itemAddedEvent: carousel._syncUiForItemAdd(o); break; case itemRemovedEvent: carousel._syncUiForItemRemove(o); bre...
javascript
{ "resource": "" }
q30474
updateStateAfterScroll
train
function updateStateAfterScroll(item, sentinel) { var carousel = this, page = carousel.get("currentPage"), newPage, numPerPage = carousel.get("numVisible"); newPage = parseInt(carousel._firstItem / numPerPage, 10); if (newPage != page) { c...
javascript
{ "resource": "" }
q30475
train
function () { var carousel = this, n = carousel.get("numItems"); while (n > 0) { if (!carousel.removeItem(0)) { YAHOO.log("Item could not be removed - missing?", "warn", WidgetName); } /* ...
javascript
{ "resource": "" }
q30476
train
function () { var carousel = this, first, focusEl, isSelectionInvisible, itemsTable, last, numVisible, selectOnScroll, selected, selItem; // Don't do a...
javascript
{ "resource": "" }
q30477
train
function () { var carousel = this; if (carousel.fireEvent(beforeHideEvent) !== false) { carousel.removeClass(carousel.CLASSES.VISIBLE); carousel.fireEvent(hideEvent); } }
javascript
{ "resource": "" }
q30478
train
function (el, attrs) { var carousel = this, elId = el, // save for a rainy day parse = false, selected; if (!el) { YAHOO.log(el + " is neither an HTML element, nor a string", "error", WidgetName); ...
javascript
{ "resource": "" }
q30479
train
function (attrs) { var carousel = this; attrs = attrs || {}; Carousel.superclass.initAttributes.call(carousel, attrs); /** * @attribute carouselEl * @description The type of the Carousel element. * @default OL * @type ...
javascript
{ "resource": "" }
q30480
train
function (index) { var carousel = this; if (index < 0 || index >= carousel.get("numItems")) { YAHOO.log("Index out of bounds", "error", WidgetName); return null; } if (carousel._itemsTable.items[index]) { return Dom.get(ca...
javascript
{ "resource": "" }
q30481
train
function () { var carousel = this, els = [], i; for (i = 0; i < carousel._itemsTable.numItems; i++) { els.push(carousel.getElementForItem(i)); } return els; }
javascript
{ "resource": "" }
q30482
train
function (index) { var carousel = this; if (index < 0 || index >= carousel.get("numItems")) { YAHOO.log("Index out of bounds", "error", WidgetName); return null; } if (carousel._itemsTable.numItems > index) { if (!JS.isUnd...
javascript
{ "resource": "" }
q30483
train
function (id) { var carousel = this, n = carousel.get("numItems"), i = 0, items = carousel._itemsTable.items, item; while (i < n) { item = items[i] || {}; if(item.id == id) { retu...
javascript
{ "resource": "" }
q30484
train
function () { var carousel = this, i = carousel.get("firstVisible"), n = i + carousel.get("numVisible"), r = []; while (i < n) { r.push(carousel.getElementForItem(i)); i++; } ...
javascript
{ "resource": "" }
q30485
train
function (index) { var carousel = this, item, num = carousel.get("numItems"); if (index < 0 || index >= num) { YAHOO.log("Index out of bounds", "error", WidgetName); return false; } item = carousel._it...
javascript
{ "resource": "" }
q30486
train
function (item, index) { var carousel = this, className, content, elId, numItems = carousel.get("numItems"), oel, el = item; if (!item) { return false; } if (...
javascript
{ "resource": "" }
q30487
train
function (appendTo) { var carousel = this, cssClass = carousel.CLASSES, rows = carousel._rows; carousel.addClass(cssClass.CAROUSEL); if (!carousel._clipEl) { carousel._clipEl = carousel._createCarouselClip(); carouse...
javascript
{ "resource": "" }
q30488
train
function () { var carousel = this, isVertical = carousel.get("isVertical"), cols = carousel._cols, item = carousel._firstItem - carousel.get("numVisible"); if (item < 0) { // only account for multi-row when scrolling backwards from item ...
javascript
{ "resource": "" }
q30489
train
function () { var carousel = this, item = carousel._firstItem + carousel.get("numVisible"); if (item > carousel.get("numItems")) { item = 0; } if (carousel.get("selectOnScroll")) { carousel._selectedItem = carousel._ge...
javascript
{ "resource": "" }
q30490
train
function () { var carousel = this, newpos = 0, selected = carousel.get("selectedItem"); if (selected == this._firstItem) { newpos = selected - carousel.get("numVisible"); carousel._selectedItem = carousel._getSelectedItem(selecte...
javascript
{ "resource": "" }
q30491
train
function () { var carousel = this, newpos = 0; newpos = carousel.get("selectedItem") + carousel.get("scrollIncrement"); carousel.set("selectedItem", carousel._getSelectedItem(newpos)); }
javascript
{ "resource": "" }
q30492
train
function () { var carousel = this, cssClass = carousel.CLASSES; if (carousel.fireEvent(beforeShowEvent) !== false) { carousel.addClass(cssClass.VISIBLE); carousel.fireEvent(showEvent); } }
javascript
{ "resource": "" }
q30493
train
function () { var carousel = this, timer; if (JS.isUndefined(carousel._autoPlayTimer)) { timer = carousel.get("autoPlayInterval"); if (timer <= 0) { return; } carousel._isAutoPlayInProgress = true; ...
javascript
{ "resource": "" }
q30494
train
function () { var carousel = this; if (!JS.isUndefined(carousel._autoPlayTimer)) { clearTimeout(carousel._autoPlayTimer); delete carousel._autoPlayTimer; carousel._isAutoPlayInProgress = false; carousel.fireEvent(stopAutoPlayEvent)...
javascript
{ "resource": "" }
q30495
train
function () { var carousel = this, pagination = carousel._pagination; if(!pagination.el){ return false; } var numItems = carousel.get('numItems'), numVisible = carousel.get('numVisible'), firstVisible = carousel.get('firstVisible')+1, ...
javascript
{ "resource": "" }
q30496
train
function (tpl, pos, cb) { var carousel = this; carousel._pagination.template = tpl; carousel._pagination.callback = cb || {}; if(!carousel._pagination.el){ carousel._pagination.el = createElement('DIV', {className:carousel.CLASSES.PAGINATION}); ...
javascript
{ "resource": "" }
q30497
train
function (ev, p, o) { o.scope._isAnimationInProgress = false; updateStateAfterScroll.call(o.scope, o.item, o.last); }
javascript
{ "resource": "" }
q30498
train
function() { var carousel = this, currIndex = carousel._firstItem, index; if (currIndex >= carousel.get("numItems") - 1) { if (carousel.get("isCircular")) { index = 0; } else { carousel.stop...
javascript
{ "resource": "" }
q30499
train
function (elId) { var carousel = this, cssClass = carousel.CLASSES, el = Dom.get(elId); if (!el) { el = createElement("DIV", { className : cssClass.CAROUSEL, id : elId })...
javascript
{ "resource": "" }