rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
var context = this.renderContext(this.get('layer')) ; | var context = optionalContext || this.renderContext(this.get('layer')) ; | updateLayer: function() { var mixins, idx, len, renderer; this.updateViewSettings(); if (renderer = this.renderer) { this.updateRenderer(renderer); // renderers always update. if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, renderer); } } // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { if (renderer) renderer.update(); } else { var context = this.renderContext(this.get('layer')) ; this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; }, |
this.renderer.update(); | if (renderer) renderer.update(); | updateLayer: function() { var mixins, idx, len, renderer; this.updateViewSettings(); if (renderer = this.renderer) { this.updateRenderer(renderer); // renderers always update. if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, renderer); } } // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { this.renderer.update(); } else { var context = this.renderContext(this.get('layer')) ; this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; }, |
var mixins, idx, len, renderer = this.renderer; | var mixins, idx, len, renderer = this.renderer, viewRenderer = this._viewRenderer; | updateLayer: function(optionalContext) { var mixins, idx, len, renderer = this.renderer; this.updateViewSettings(); // make sure to update any renderers this._updateRenderer(); // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { if (renderer) renderer.update(); } else { var context = optionalContext || this.renderContext(this.get('layer')) ; this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; }, |
if (viewRenderer) viewRenderer.update(); | updateLayer: function(optionalContext) { var mixins, idx, len, renderer = this.renderer; this.updateViewSettings(); // make sure to update any renderers this._updateRenderer(); // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { if (renderer) renderer.update(); } else { var context = optionalContext || this.renderContext(this.get('layer')) ; this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; }, |
|
this.renderViewSettings(context); | this.renderViewSettings(context, NO); | updateLayer: function(optionalContext) { var mixins, idx, len, renderer = this.renderer, viewRenderer = this._viewRenderer; // make sure to update any renderers this._updateRenderer(); // Now, update using renderer if possible; render() otherwise if (!this._useRenderFirst && this.createRenderer) { this.updateViewSettings(); if (renderer) renderer.update(); } else { var context = optionalContext || this.renderContext(this.get('layer')) ; this.renderViewSettings(context); this.render(context, NO) ; if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, NO) ; } context.update() ; if (context._innerHTMLReplaced) { var pane = this.get('pane'); if(pane && pane.get('isPaneAttached')) { this._notifyDidAppendToDocument(); } } } // If this view uses static layout, then notify that the frame (likely) // changed. if (this.useStaticLayout) this.viewDidResize(); if (this.didUpdateLayer) this.didUpdateLayer(); // call to update DOM if(this.designer && this.designer.viewDidUpdateLayer) { this.designer.viewDidUpdateLayer(); //let the designer know } return this ; }, |
this.renderLayout(context); | this.renderLayout(context, NO); | updateLayout: function() { var layer = this.get('layer'), context; if (layer) { context = this.renderContext(layer); this.renderLayout(context); context.update(); // If this view uses static layout, then notify if the frame changed. // (viewDidResize will do a comparison) if (this.useStaticLayout) this.viewDidResize(); } layer = null ; return this ; }, |
function UpdateNode(field,node) { if (document.getElementById(field + "_node" + node)) { document.getElementById(field + "_node" + node).innerHTML=DrawFromNode(field,node,true); } | function UpdateNode( field, node ) { if( document.getElementById( field + "_node" + node ) ) { document.getElementById( field + "_node" + node ).innerHTML = DrawFromNode( field, node, true ); | function UpdateNode(field,node) { if (document.getElementById(field + "_node" + node)) { document.getElementById(field + "_node" + node).innerHTML=DrawFromNode(field,node,true); } } |
} | function UpdateNode(field,node) { if (document.getElementById(field + "_node" + node)) { document.getElementById(field + "_node" + node).innerHTML=DrawFromNode(field,node,true); } } |
|
} | }, | updatePage: function(event){ var self = event.data.obj; var name = $(this).attr('class'); if(self.current_page >= 1 && self.current_page < self.page_count) { if(name === 'next'){ self.next_page = self.current_page +1; self.current_page = self.next_page; } } if(self.current_page > 1 && self.current_page <= self.page_count){ if(name === 'prev'){ self.prev_page = self.current_page -1; self.current_page = self.prev_page; } } self.renderPagenate(); self.element.trigger('dcmgrGUI.updatePagenate'); } |
sel: isArray ? value.indexOf(item.value) : value === item.value | sel: isArray ? value.indexOf(item.value) > -1 : value === item.value | updateRenderer: function(r) { var items = this.get('displayItems'), value = this.get('value'), isArray = SC.isArray(value), activeIndex = this.get("activeIndex"), item; for (var idx = 0, len = items.length; idx < len; idx++) { item = items[idx]; item.classNames = { active: activeIndex === idx, sel: isArray ? value.indexOf(item.value) : value === item.value }; } // set the attributes var size = this.get('controlSize'); r.attr({ segments: items, align: this.get('align'), layoutDirection: this.get('layoutDirection'), size: size === SC.AUTO_CONTROL_SIZE ? this.get('frame') : size }); }, |
for (idx = 0, len = overflowItems.length; idx < len; idx++) { item = overflowItems[idx]; if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { items[items.length - 1].isSelected = YES; | if (SC.empty(this.overflowIndex)) { this.invokeLast(function() { this.elementWidths = null; this.measureForOverflow(); }, this); } else { for (idx = 0, len = overflowItems.length; idx < len; idx++) { item = overflowItems[idx]; if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { items[items.length - 1].isSelected = YES; } | updateRenderer: function(r) { var items = this.get('displayItems'), overflowItems = this.overflowItems, value = this.get('value'), isArray = SC.isArray(value), activeIndex = this.get("activeIndex"), item; // Check displayed items for (var idx = 0, len = items.length; idx < len; idx++) { item = items[idx]; // change active if (activeIndex == idx) item.isActive = YES; else item.isActive = NO; // change selection if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { item.isSelected = YES; } else item.isSelected = NO; } // Check overflowed items for (idx = 0, len = overflowItems.length; idx < len; idx++) { item = overflowItems[idx]; // change selection if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { items[items.length - 1].isSelected = YES; } } // set the attributes r.attr({ segments: items, align: this.get('align'), layoutDirection: this.get('layoutDirection') }); }, |
if (isArray ? value.indexOf(item.value) : value === item.value) { | if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { | updateRenderer: function(r) { var items = this.get('displayItems'), value = this.get('value'), isArray = SC.isArray(value), activeIndex = this.get("activeIndex"), item; for (var idx = 0, len = items.length; idx < len; idx++) { item = items[idx]; // change active if (activeIndex == idx) item.isActive = YES; else item.isActive = NO; // chance selection if (isArray ? value.indexOf(item.value) : value === item.value) { item.isSelected = YES; } else item.isSelected = NO; } // set the attributes r.attr({ segments: items, align: this.get('align'), layoutDirection: this.get('layoutDirection') }); }, |
if (this.get("localize")) toolTip = toolTip.loc(); | if (toolTip && this.get("localize")) toolTip = toolTip.loc(); | updateRenderer: function(r) { var toolTip = this.get("toolTip"); if (this.get("localize")) toolTip = toolTip.loc(); r.attr({ toolTip: toolTip, isAnchor: this.get("tagName") === 'a', href: this.get("href"), isDefault: this.get('isDefault'), isCancel: this.get('isCancel'), icon: this.get('icon'), supportFocusRing: this.get("supportFocusRing"), title: this.get("displayTitle"), escapeHTML: this.get("escapeHTML"), needsEllipsis: this.get("needsEllipsis"), oldButtonTheme: this.get("oldButtonTheme") }); }, |
var items = this.get('displayItems'), value = this.get('value'), isArray = SC.isArray(value), | var items = this.get('displayItems'), overflowItems = this.overflowItems, value = this.get('value'), isArray = SC.isArray(value), | updateRenderer: function(r) { var items = this.get('displayItems'), value = this.get('value'), isArray = SC.isArray(value), activeIndex = this.get("activeIndex"), item; for (var idx = 0, len = items.length; idx < len; idx++) { item = items[idx]; // change active if (activeIndex == idx) item.isActive = YES; else item.isActive = NO; // change selection if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { item.isSelected = YES; } else item.isSelected = NO; } // set the attributes r.attr({ segments: items, align: this.get('align'), layoutDirection: this.get('layoutDirection') }); }, |
for (idx = 0, len = overflowItems.length; idx < len; idx++) { item = overflowItems[idx]; if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { items[items.length - 1].isSelected = YES; } } | updateRenderer: function(r) { var items = this.get('displayItems'), value = this.get('value'), isArray = SC.isArray(value), activeIndex = this.get("activeIndex"), item; for (var idx = 0, len = items.length; idx < len; idx++) { item = items[idx]; // change active if (activeIndex == idx) item.isActive = YES; else item.isActive = NO; // change selection if (isArray ? value.indexOf(item.value) >= 0 : value === item.value) { item.isSelected = YES; } else item.isSelected = NO; } // set the attributes r.attr({ segments: items, align: this.get('align'), layoutDirection: this.get('layoutDirection') }); }, |
|
needsEllipsis: this.get("needsEllipsis"), oldButtonTheme: this.get("oldButtonTheme") | needsEllipsis: this.get("needsEllipsis") | updateRenderer: function(r) { var toolTip = this.get("toolTip"); if (toolTip && this.get("localize")) toolTip = toolTip.loc(); r.attr({ toolTip: toolTip, isAnchor: this.get("tagName") === 'a', href: this.get("href"), isDefault: this.get('isDefault'), isCancel: this.get('isCancel'), icon: this.get('icon'), supportFocusRing: this.get("supportFocusRing"), title: this.get("displayTitle"), escapeHTML: this.get("escapeHTML"), needsEllipsis: this.get("needsEllipsis"), oldButtonTheme: this.get("oldButtonTheme") }); }, |
attrs.disclosureState = value; | attrs.disclosureState = value === SC.BRANCH_OPEN ? YES : NO; | updateRenderer: function(renderer) { var content = this.get('content'), del = this.displayDelegate, key, value; var attrs = { contentIndex: this.get('contentIndex'), contentIsEditable: this.get('contentIsEditable'), escapeHTML: this.get('escapeHTML'), isEnabled: this.get('isEnabled'), outlineIndent: this.get('outlineIndent'), outlineLevel: this.get('outlineLevel') }; // disclosure value = this.get('disclosureState'); if (value !== SC.LEAF_NODE) { attrs.disclosureState = value; } // checkbox if (key = this.getDelegateProperty('contentCheckboxKey', del)) { value = content ? (content.get ? content.get(key) : content[key]) : NO; attrs.checkbox = value; } // icon if (this.getDelegateProperty('hasContentIcon', del)) { key = this.getDelegateProperty('contentIconKey', del); value = (key && content) ? (content.get ? content.get(key) : content[key]) : null; attrs.icon = value; } // label, always on key = this.getDelegateProperty('contentValueKey', del) ; value = (key && content) ? (content.get ? content.get(key) : content[key]) : content; if (value && SC.typeOf(value) !== SC.T_STRING) { value = value.toString(); } attrs.label = value; // right icon if (this.getDelegateProperty('hasContentRightIcon', del)) { key = this.getDelegateProperty('contentRightIconKey', del); value = (key && content) ? (content.get ? content.get(key) : content[key]) : null; attrs.rightIcon = value; } // unread count key = this.getDelegateProperty('contentUnreadCountKey', del) ; value = (key && content) ? (content.get ? content.get(key) : content[key]) : null; attrs.count = value; // WTF does the listItemActionProperty do? // its render function does essentially nothing? // key = this.getDelegateProperty('listItemActionProperty', del) ; // value = (key && content) ? (content.get ? content.get(key) : content[key]) : null ; // if (value) { // this.renderAction(working, value); // classArray.push('has-action'); // } if (this.getDelegateProperty('hasContentBranch', del)) { key = this.getDelegateProperty('contentIsBranchKey', del); value = (key && content) ? (content.get ? content.get(key) : content[key]) : NO; attrs.branch = value; } renderer.attr(attrs); }, |
r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); | r.attr({ isSelected: this.get('isSelected'), isEnabled: this.get('isEnabled'), isActive: this.get('isActive') }); | updateRendererMixin: function(r) { r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); // we have to figure out if we are passing control size through, or our layout. var controlSize = this.get('controlSize'); if (controlSize === SC.AUTO_CONTROL_SIZE || controlSize === SC.CALCULATED_CONTROL_SIZE) { // get the layout controlSize = this.get("layout"); // determine if we have height if (SC.none(controlSize.height)) { // throw a performance warning if (this.get("controlSize") !== SC.CALCULATED_CONTROL_SIZE) { SC.Logger.warn( "PERFORMANCE WARNING!!! When your control lacks a height, but is set to automatically " + "calculate what theme control size to use, it can impact performance. To hide this warning, " + "set controlSize on this control to SC.CALCULATED_CONTROL_SIZE, or if you know the control size, " + "set controlSize to the numeric or string control size." ); } var frame = SC.clone(this.get("frame")); if (frame) { controlSize = frame; // I don't know of any renderer that will need these properties, but hey, we should be consistent. controlSize.left = controlSize.x; controlSize.top = controlSize.y; } } // okay, we've preprocessed all we need. } // set control size r.controlSize = controlSize; }, |
controlSize = frame; controlSize.left = controlSize.x; controlSize.top = controlSize.y; | controlSize.width = frame.width; controlSize.height = frame.height; | updateRendererMixin: function(r) { r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); // we have to figure out if we are passing control size through, or our layout. var controlSize = this.get('controlSize'); if (controlSize === SC.AUTO_CONTROL_SIZE || controlSize === SC.CALCULATED_CONTROL_SIZE) { // get the layout controlSize = this.get("layout"); // determine if we have height if (SC.none(controlSize.height)) { // throw a performance warning if (this.get("controlSize") !== SC.CALCULATED_CONTROL_SIZE) { SC.Logger.warn( "PERFORMANCE WARNING!!! When your control lacks a height, but is set to automatically " + "calculate what theme control size to use, it can impact performance. To hide this warning, " + "set controlSize on this control to SC.CALCULATED_CONTROL_SIZE, or if you know the control size, " + "set controlSize to the numeric or string control size." ); } var frame = SC.clone(this.get("frame")); if (frame) { controlSize = frame; // I don't know of any renderer that will need these properties, but hey, we should be consistent. controlSize.left = controlSize.x; controlSize.top = controlSize.y; } } // okay, we've preprocessed all we need. } // set control size r.controlSize = controlSize; }, |
r.controlSize = controlSize; | r.attr('controlSize', controlSize); | updateRendererMixin: function(r) { r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); // we have to figure out if we are passing control size through, or our layout. var controlSize = this.get('controlSize'); if (controlSize === SC.AUTO_CONTROL_SIZE || controlSize === SC.CALCULATED_CONTROL_SIZE) { // get the layout controlSize = this.get("layout"); // determine if we have height if (SC.none(controlSize.height)) { // throw a performance warning if (this.get("controlSize") !== SC.CALCULATED_CONTROL_SIZE) { SC.Logger.warn( "PERFORMANCE WARNING!!! When your control lacks a height, but is set to automatically " + "calculate what theme control size to use, it can impact performance. To hide this warning, " + "set controlSize on this control to SC.CALCULATED_CONTROL_SIZE, or if you know the control size, " + "set controlSize to the numeric or string control size." ); } var frame = SC.clone(this.get("frame")); if (frame) { controlSize = frame; // I don't know of any renderer that will need these properties, but hey, we should be consistent. controlSize.left = controlSize.x; controlSize.top = controlSize.y; } } // okay, we've preprocessed all we need. } // set control size r.controlSize = controlSize; }, |
if (controlSize !== SC.CALCULATED_CONTROL_SIZE) { | if (this.get("controlSize") !== SC.CALCULATED_CONTROL_SIZE) { | updateRendererMixin: function(r) { r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); // we have to figure out if we are passing control size through, or our layout. var controlSize = this.get('controlSize'); if (controlSize === SC.AUTO_CONTROL_SIZE || controlSize === SC.CALCULATED_CONTROL_SIZE) { // get the layout controlSize = this.get("layout"); // determine if we have height if (SC.none(controlSize.height)) { // throw a performance warning if (controlSize !== SC.CALCULATED_CONTROL_SIZE) { SC.Logger.warn( "PERFORMANCE WARNING!!! When your control lacks a height, but is set to automatically " + "calculate what theme control size to use, it can impact performance. To hide this warning, " + "set controlSize on this control to SC.CALCULATED_CONTROL_SIZE, or if you know the control size, " + "set controlSize to the numeric or string control size." ); } controlSize = SC.clone(this.get("frame")); // I don't know of any renderer that will need these properties, but hey, we should be consistent. controlSize.left = controlSize.x; controlSize.top = controlSize.y; } // okay, we've preprocessed all we need. } // set control size r.controlSize = controlSize; }, |
controlSize = SC.clone(this.get("frame")); controlSize.left = controlSize.x; controlSize.top = controlSize.y; | var frame = SC.clone(this.get("frame")); if (frame) { controlSize = frame; controlSize.left = controlSize.x; controlSize.top = controlSize.y; } | updateRendererMixin: function(r) { r.isSelected = this.get("isSelected"); r.isEnabled = this.get("isEnabled"); r.isActive = this.get("isActive"); // we have to figure out if we are passing control size through, or our layout. var controlSize = this.get('controlSize'); if (controlSize === SC.AUTO_CONTROL_SIZE || controlSize === SC.CALCULATED_CONTROL_SIZE) { // get the layout controlSize = this.get("layout"); // determine if we have height if (SC.none(controlSize.height)) { // throw a performance warning if (controlSize !== SC.CALCULATED_CONTROL_SIZE) { SC.Logger.warn( "PERFORMANCE WARNING!!! When your control lacks a height, but is set to automatically " + "calculate what theme control size to use, it can impact performance. To hide this warning, " + "set controlSize on this control to SC.CALCULATED_CONTROL_SIZE, or if you know the control size, " + "set controlSize to the numeric or string control size." ); } controlSize = SC.clone(this.get("frame")); // I don't know of any renderer that will need these properties, but hey, we should be consistent. controlSize.left = controlSize.x; controlSize.top = controlSize.y; } // okay, we've preprocessed all we need. } // set control size r.controlSize = controlSize; }, |
this.updateIcon(this.rightIcon, "right-icon"); | if (this.rightIcon) { this.updateIcon(this.rightIcon, "right-icon"); } | updateRightIcon: function() { this.updateIcon(this.rightIcon, "right-icon"); }, |
this.throwIfDisposed_(); | activity.TimelineView.Row_.prototype.updateRowCss = function(primary) { this.throwIfDisposed_(); if (primary) { this.row_.setAttribute('class', 'primaryTimelineRow'); } else { this.row_.setAttribute('class', 'secondaryTimelineRow'); }}; |
|
var parts = $H(partsOrElement); if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false; if (parts.get("day")) { var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check"); for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day")); t_selected_date.setYear(parts.get("year")); t_selected_date.setMonth(parts.get("month")); | var parts = $H(partsOrElement); if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false; if (parts.get("day")) { var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check"); for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day")); t_selected_date.setYear(parts.get("year")); t_selected_date.setMonth(parts.get("month")); if (vdc && ! vdc(t_selected_date.stripTime())) { return false; } this.selected_date = t_selected_date; this.selection_made = true; } | updateSelectedDate:function(partsOrElement, via_click) { var parts = $H(partsOrElement); if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false; if (parts.get("day")) { var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check"); for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day")); t_selected_date.setYear(parts.get("year")); t_selected_date.setMonth(parts.get("month")); if (vdc && ! vdc(t_selected_date.stripTime())) { return false; } this.selected_date = t_selected_date; this.selection_made = true; } if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour")); if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) ); if (parts.get("hour") === "" || parts.get("minute") === "") this.setUseTime(false); else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute"))) this.setUseTime(true); this.updateFooter(); this.setSelectedClass(); if (this.selection_made) this.updateValue(); if (this.closeOnClick()) { this.close(); } if (via_click && !this.options.get("embedded")) { if ((new Date() - this.last_click_at) < 333) this.close(); this.last_click_at = new Date(); } }, |
if (vdc && ! vdc(t_selected_date.stripTime())) { return false; } this.selected_date = t_selected_date; this.selection_made = true; } if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour")); if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) ); if (parts.get("hour") === "" || parts.get("minute") === "") this.setUseTime(false); else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute"))) this.setUseTime(true); this.updateFooter(); this.setSelectedClass(); if (this.selection_made) this.updateValue(); if (this.closeOnClick()) { this.close(); } if (via_click && !this.options.get("embedded")) { if ((new Date() - this.last_click_at) < 333) this.close(); this.last_click_at = new Date(); } }, | if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour")); if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) ); if (parts.get("hour") === "" || parts.get("minute") === "") this.setUseTime(false); else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute"))) this.setUseTime(true); this.updateFooter(); this.setSelectedClass(); if (this.selection_made) this.updateValue(); if (this.closeOnClick()) { this.close(); } if (via_click && !this.options.get("embedded")) { if ((new Date() - this.last_click_at) < 333) this.close(); this.last_click_at = new Date(); } }, | updateSelectedDate:function(partsOrElement, via_click) { var parts = $H(partsOrElement); if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false; if (parts.get("day")) { var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check"); for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day")); t_selected_date.setYear(parts.get("year")); t_selected_date.setMonth(parts.get("month")); if (vdc && ! vdc(t_selected_date.stripTime())) { return false; } this.selected_date = t_selected_date; this.selection_made = true; } if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour")); if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) ); if (parts.get("hour") === "" || parts.get("minute") === "") this.setUseTime(false); else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute"))) this.setUseTime(true); this.updateFooter(); this.setSelectedClass(); if (this.selection_made) this.updateValue(); if (this.closeOnClick()) { this.close(); } if (via_click && !this.options.get("embedded")) { if ((new Date() - this.last_click_at) < 333) this.close(); this.last_click_at = new Date(); } }, |
if (!tabs) { if (this.getTab() == this._alternates[0] || this.alternate && this.allTabs.indexOf(this._alternates[0]) == -1 || this.alternate && config.tabbrowser._removingTabs && config.tabbrowser._removingTabs.indexOf(this._alternates[0]) >= 0) tabs = [this.getTab(), this.alternate]; } | updateSelectionHistory: function (tabs) { this._alternates = tabs || [this.getTab(), this._alternates[0]]; } |
|
else if ( oldShippSelIndex != 'undefined' ) | else if ( oldShippSelIndex ) | function updateShipping() { YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } else { var selectedIndex = Y.Node.get( '#s_country').get( 'selectedIndex' ); var country = Y.Node.get( '#s_country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } var doit = function(data) { if ( Y.Node.get( '#shippingtype' ).get( 'tagName' ) == 'INPUT' ) { return false; } // If shippingtype is selected: get the old value for checking it later if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) > 0 ) { var oldShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var oldname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'text' ); var old = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'value' ); } var nodes = Y.all('#shippingtype option'); var deleteNodes = function(n, a, b) { n.get('parentNode').removeChild(n); }; nodes.each(deleteNodes); for (i = 0; i < data.length; i++) { if (data[i][2] == false) { var node = Y.Node.create('<option value="' + data[i][1] + '" disabled>' + data[i][0] + '</option>'); } else { if (old == data[i][1]) { var selected = i; } var node = Y.Node.create('<option value="' + data[i][1] + '">' + data[i][0] + '</option>'); } Y.Node.get('#shippingtype').appendChild(node); } if (typeof (selected) != 'undefined') { Y.Node.get('#shippingtype').set('selectedIndex', selected); } else if ( oldShippSelIndex != 'undefined' ) { if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) != -1 ) { var replace = new Array(); replace['%old%'] = oldname; var newShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var newname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( newShippSelIndex ).get( 'text' ); replace['%new%'] = newname; ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } } Y.log('INFO2: ' + Y.Lang.dump(Y.Node.get('#shippingtype').get('options'))); }; ezjson('getshipping?country=' + country, doit); });} |
ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); | if ( oldname ) { ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } | function updateShipping() { YUI().use( 'node', 'io', 'io-ez', 'dump', 'json-parse', function( Y ) { if ( !Y.Node.get('#shippingtype') ) { return false; } if ( Y.Node.get( '#shipping-checkbox' ).get( 'checked' ) ) { var selectedIndex = Y.Node.get( '#country' ).get( 'selectedIndex' ); var country = Y.Node.get( '#country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } else { var selectedIndex = Y.Node.get( '#s_country').get( 'selectedIndex' ); var country = Y.Node.get( '#s_country' ).get( 'options' ).item( selectedIndex ).get( 'value' ); } var doit = function(data) { if ( Y.Node.get( '#shippingtype' ).get( 'tagName' ) == 'INPUT' ) { return false; } // If shippingtype is selected: get the old value for checking it later if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) > 0 ) { var oldShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var oldname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'text' ); var old = Y.Node.get( '#shippingtype' ).get( 'options' ).item( oldShippSelIndex ).get( 'value' ); } var nodes = Y.all('#shippingtype option'); var deleteNodes = function(n, a, b) { n.get('parentNode').removeChild(n); }; nodes.each(deleteNodes); for (i = 0; i < data.length; i++) { if (data[i][2] == false) { var node = Y.Node.create('<option value="' + data[i][1] + '" disabled>' + data[i][0] + '</option>'); } else { if (old == data[i][1]) { var selected = i; } var node = Y.Node.create('<option value="' + data[i][1] + '">' + data[i][0] + '</option>'); } Y.Node.get('#shippingtype').appendChild(node); } if (typeof (selected) != 'undefined') { Y.Node.get('#shippingtype').set('selectedIndex', selected); } else if ( oldShippSelIndex != 'undefined' ) { if ( Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ) != -1 ) { var replace = new Array(); replace['%old%'] = oldname; var newShippSelIndex = Y.Node.get( '#shippingtype' ).get( 'selectedIndex' ); var newname = Y.Node.get( '#shippingtype' ).get( 'options' ).item( newShippSelIndex ).get( 'text' ); replace['%new%'] = newname; ez18nAlert("The shipping method '%old%' is not available for your country of destination and was changed to '%new%'.", replace); } } Y.log('INFO2: ' + Y.Lang.dump(Y.Node.get('#shippingtype').get('options'))); }; ezjson('getshipping?country=' + country, doit); });} |
function UpdateStatusBox(field) { var nodes=""; for (i=0;i<TreeParents[field].length;i++) { if (TreeChecked[field][i]==1) { var c=CountTickedChildren(field,i); if (c==0) { nodes+=DescribeNode(field,i) + "<br/>"; } | function UpdateStatusBox( field ) { var nodes = ""; for( var i = 0; i < TreeParents[field].length; i++ ) { if( TreeChecked[field][i] == 1 ) { var c = CountTickedChildren( field, i ); if( c == 0 ) { nodes += DescribeNode( field, i ) + "<br/>"; | function UpdateStatusBox(field) { var nodes=""; for (i=0;i<TreeParents[field].length;i++) { if (TreeChecked[field][i]==1) { var c=CountTickedChildren(field,i); if (c==0) { nodes+=DescribeNode(field,i) + "<br/>"; } } } if (nodes=="") {document.getElementById(field + "_statusbox").innerHTML="<b>" + nocategoriesmessage + "</b>";} else { document.getElementById(field + "_statusbox").innerHTML=nodes; } } |
} if (nodes=="") {document.getElementById(field + "_statusbox").innerHTML="<b>" + nocategoriesmessage + "</b>";} else { document.getElementById(field + "_statusbox").innerHTML=nodes; } | } | function UpdateStatusBox(field) { var nodes=""; for (i=0;i<TreeParents[field].length;i++) { if (TreeChecked[field][i]==1) { var c=CountTickedChildren(field,i); if (c==0) { nodes+=DescribeNode(field,i) + "<br/>"; } } } if (nodes=="") {document.getElementById(field + "_statusbox").innerHTML="<b>" + nocategoriesmessage + "</b>";} else { document.getElementById(field + "_statusbox").innerHTML=nodes; } } |
if( nodes == "" ) { document.getElementById( field + "_statusbox" ).innerHTML = "<b>" + nocategoriesmessage + "</b>"; } else { document.getElementById( field + "_statusbox" ).innerHTML = nodes; } } | function UpdateStatusBox(field) { var nodes=""; for (i=0;i<TreeParents[field].length;i++) { if (TreeChecked[field][i]==1) { var c=CountTickedChildren(field,i); if (c==0) { nodes+=DescribeNode(field,i) + "<br/>"; } } } if (nodes=="") {document.getElementById(field + "_statusbox").innerHTML="<b>" + nocategoriesmessage + "</b>";} else { document.getElementById(field + "_statusbox").innerHTML=nodes; } } |
|
YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); | YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; | function updateSubdivisions( country_node ) { YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } // If state is selected: get the old value for checking it later if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option> </option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); } } }); });} |
Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option> </option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); } | if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } if ( !oldStateValue ) { if( country_node.get('id') == 'country' && Y.Node.get( '#hidden_state' ) ) { var oldStateValue = Y.Node.get( '#hidden_state' ).get( 'value' ); } else if ( country_node.get('id') == 's_country' && Y.Node.get( '#hidden_s_state' ) ) { var oldStateValue = Y.Node.get( '#hidden_s_state' ).get( 'value' ); } } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option> </option>' ); subdivision_node.appendChild(node); var index = 0; for (i in data ) { index++; if (oldStateValue == i) { var stateSelected = index; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if ( typeof( stateSelected ) != 'undefined' ) { subdivision_node.set( 'selectedIndex', stateSelected ); } else { subdivision_node.set('selectedIndex', 0); } }); } | function updateSubdivisions( country_node ) { YUI().use( 'node', 'io', 'io-ez', function( Y ) { var country = country_node.get( 'options' ).item( country_node.get( 'selectedIndex' ) ).get( 'value' ); Y.io.ez( 'xrowecommerce::getSubdivisions::' + country, { arguments: country_node, on: { success: function( id, r, country_node) { YUI().use('node', function(Y) { var data = r.responseJSON.content; if( country_node.get('id') == 'country' ) { var subdivision_node = Y.Node.get( '#state' ); } else { var subdivision_node = Y.Node.get( '#s_state' ); } // If state is selected: get the old value for checking it later if ( subdivision_node.get( 'selectedIndex' ) > 0 ) { var stateSelIndex = subdivision_node.get( 'selectedIndex' ); var oldStateValue = subdivision_node.get( 'options' ).item( stateSelIndex ).get( 'value' ); } var nodes = subdivision_node.all( 'option' ); var deleteNodes = function(n, a, b) { n.get( 'parentNode' ).removeChild(n); }; nodes.each(deleteNodes); var node = Y.Node.create( '<option> </option>' ); subdivision_node.appendChild(node); for (i in data ) { if (oldStateValue == data[i]) { var stateSelected = i; } var node = Y.Node.create( '<option value="' + i + '">' + data[i] + '</option>' ); subdivision_node.appendChild(node); } if (typeof (stateSelected) != 'undefined') { subdivision_node.set('selectedIndex', selected); } else { subdivision_node.set('selectedIndex', 0); } }); } } }); });} |
this._trace("target.textContent::"+target.textContent); | MyanmarConverterExtension.updateText = function(target, prevValue, newValue){ if (!prevValue) prevValue = ""; if (!newValue) newValue = ""; var s = 0; var prevE = prevValue.length - 1; var newE = newValue.length - 1; // find common text at start for (s = 0; s < prevValue.length && s < newValue.length; s++) { if (prevValue[s] != newValue[s]) break; } // find common text at end for (; prevE > s && newE > s; --prevE, --newE) { if (prevValue[prevE] != newValue[newE]) break; } var prefix = prevValue.substring(0, s); var suffix = prevValue.substring(prevE+1, prevValue.length); var toConvert = newValue.substring(s, newE+1); var converter = tlsMyanmarConverters[target.ownerDocument.tlsMyanmarEncoding.toLowerCase()]; if (typeof converter == "undefined") { MyanmarConverterExtension.guessMyanmarEncoding(target.ownerDocument, target); converter = tlsMyanmarConverters[target.ownerDocument.tlsMyanmarEncoding.toLowerCase()]; } if (typeof converter != "undefined") { var converted = converter.convertToUnicode(toConvert); target.textContent = new String(prefix + converted + suffix); }}; |
|
new activity.JsEventFetcher.EventDispatcher_(this.timelineModel_); | new activity.JsEventFetcher.EventDispatcher_( this.timelineModel_, this.aggregateBrowserJS_); | activity.JsEventFetcher.prototype.updateTimelineModel_ = function(events) { // Pause the JSD so as to minimize the overhead introduced by our // own JS execution. activity.Profiler.pause(); try { if (this.isDisposed()) { return; } var dispatcher = new activity.JsEventFetcher.EventDispatcher_(this.timelineModel_); dispatcher.populate(events); if (dispatcher.hasEvents()) { dispatcher.dispatchEvents(); this.startTimeUsec_ = dispatcher.getMaxEventEndTimeUsec(); } /* * We're finished once we're no longer running and there are no more * events to consume. */ this.isFinished_ = (!this.isRunning_ && !dispatcher.hasEvents()); this.isCallbackPending_ = false; } finally { activity.Profiler.unpause(); }}; |
updateTitle: function() { this.titleRenderer.update(); this.$().css("font-weight", ""); }, | updateTitle: function(cq) { this.titleRenderer.update(cq); cq.css("font-weight", ""); } | updateTitle: function() { this.titleRenderer.update(); this.$().css("font-weight", ""); }, |
if (key in Set('gzipOk', 'contentType') && value != this.variables[key] && this.cometResponse) { | if (updatedHeaders.contains(key) && value != this.variables[key] && this.cometResponse) { | this.updateVars = function (params) { for (param in params) { var key = varNames[param]; if (!key) continue; var value = params[param]; // if gzipOk or contentType changes value, finish up any comet response // with the previous values if (key in Set('gzipOk', 'contentType') && value != this.variables[key] && this.cometResponse) { this.completeResponse(); }; if (key in this.variables) { this.variables[key] = value; } else if (key == 'prebufferSize') { var prebufferSize = parseInt(value); if (prebufferSize > 0) { // string of spaces of length prebufferSize this.variables.prebuffer = (new Array(prebufferSize+1)).join(' '); }; }; }; }; |
} else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex || this._invalidIndexes.contains(newIndex)) { | } else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex || SC.none(oldIndex)) { | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var oldIndex = view.contentIndex, newIndex = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(newIndex), content = this.get('content'), item = content.objectAt(newIndex); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || newIndex >= content.get('length') || newIndex < 0) { this.sendToOffscreenDOMPool(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated // TODO: make sure these conditions are accurate } else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex || this._invalidIndexes.contains(newIndex)) { // remapping is cheap so just do it no matter what this.unmapFromItem(view); if(!SC.none(oldIndex)) { this.unmapFromIndex(view); // if we are mapping it to a new index it needs to be removed from curShowing. even if we arent, its just going to get added again anyway this._curShowing.remove(oldIndex); } // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(newIndex, this._tempAttrs); /* var cname = view.content ? view.content.get('fullName') : "undefined", aname = attrs.content ? attrs.content.get('fullName') : "undefined"; console.log("updating view " + cname + " to " + aname); */ // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later while(SC.Binding.flushPendingChanges()); this._ignore = NO; view.update(); // remap it now that we have updated it this.mapToIndex(view); this.mapToItem(view); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(newIndex); } return view; }, |
updateView: function(view, force) { var index = view.contentIndex, | updateView: function(view, attrs, force) { var index = attrs ? attrs.contentIndex : view.contentIndex, | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, index); } // make sure it's moved to its new positions view.set('layout', this.layoutForContentIndex(index)); view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(index); } return view; }, |
view.adjust({ top: -f.height }); | view.adjust({ top: -f.height - this.get('rowSpacing')}); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, index); } // make sure it's moved to its new positions view.set('layout', this.layoutForContentIndex(index)); view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(index); } return view; }, |
if(item !== view.content) { this.unmapView(view); view.set('content', item); SC.Binding.flushPendingChanges(); this.mapView(view, index); } | if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, index); } // make sure it's moved to its new positions view.set('layout', this.layoutForContentIndex(index)); view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(index); } return view; }, |
view.set('layout', this.layoutForContentIndex(index)); | this._ignore = YES; this.configureItemView(view, attrs); this.flushBindings(); this._ignore = NO; this.mapView(view, index); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, index); } // make sure it's moved to its new positions view.set('layout', this.layoutForContentIndex(index)); view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(index); } return view; }, |
this.mapView(view); | this.mapView(view, view.contentIndex); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._cfp_dirty || this.isInvalid(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view); } view.update(); view._cfp_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
} else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex || SC.none(oldIndex)) { | } else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex) { | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var oldIndex = view.contentIndex, newIndex = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(newIndex), content = this.get('content'), item = content.objectAt(newIndex); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || newIndex >= content.get('length') || newIndex < 0) { this.sendToOffscreenDOMPool(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated // TODO: make sure these conditions are accurate } else if(force || view._SCCFP_dirty || item !== view.content || oldIndex !== newIndex || SC.none(oldIndex)) { // remapping is cheap so just do it no matter what this.unmapFromItem(view); if(!SC.none(oldIndex)) { this.unmapFromIndex(view); // if we are mapping it to a new index it needs to be removed from curShowing. even if we arent, its just going to get added again anyway this._curShowing.remove(oldIndex); } // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(newIndex, this._tempAttrs); /* var cname = view.content ? view.content.get('fullName') : "undefined", aname = attrs.content ? attrs.content.get('fullName') : "undefined"; console.log("updating view " + cname + " to " + aname); */ // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later SC.RunLoop.currentRunLoop.flushAllPending(); this._ignore = NO; view.update(); // remap it now that we have updated it this.mapToIndex(view); this.mapToItem(view); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(newIndex); } return view; }, |
pool = this.domPoolForExampleView(view.createdFromExampleView); | pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like unmap but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later pool.push(view); // this._curShowing.remove(index); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._cfp_dirty || this.isInvalid(view.contentIndex)) { view.update(); view._cfp_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
if(item !== view.content) { view.set('content', item); SC.Binding.flushPendingChanges(); } | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like unmap but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later pool.push(view); // this._curShowing.remove(index); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._cfp_dirty || this.isInvalid(view.contentIndex)) { view.update(); view._cfp_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
|
view.set('layout', this.layoutForContentIndex(index)); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, index); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(index); } return view; }, |
|
var exampleView = this.exampleViewForIndex(view.contentIndex), | var index = view.contentIndex, exampleView = this.exampleViewForIndex(index), | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
item = this.get('content').objectAt(view.contentIndex); | content = this.get('content'), item = content.objectAt(index); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
if(exampleView !== view.createdFromExampleView) { | if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); | this._indexMap[index] = null; this._curShowing.remove(index); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
} else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { | } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
this.mapView(view, view.contentIndex); | this.mapView(view, index); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
this.validate(view.contentIndex); | this.validate(index); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; this._curShowing.remove(view.contentIndex); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // push it in front because we want it to get put back somewhere useful asap pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { // the item the view is mapped to could have changed, so it needs to be remapped this.unmapView(view); view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); this.mapView(view, view.contentIndex); } view.update(); view._SCCFP_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), | var oldIndex = view.contentIndex, newIndex = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(newIndex), | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
item = content.objectAt(index); | item = content.objectAt(newIndex); | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { | if(exampleView !== view.createdFromExampleView || newIndex >= content.get('length') || newIndex < 0) { | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
this._indexMap[index] = null; this._curShowing.remove(index); | this._indexMap[oldIndex] = null; this._curShowing.remove(oldIndex); | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
} else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { | } else if(force || view._SCCFP_dirty || oldIndex != newIndex || this._invalidIndexes.contains(newIndex)) { | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); | if(!attrs) attrs = this.setAttributes(newIndex, this._tempAttrs); | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
this.mapView(view, index); | this.mapView(view, newIndex); | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
this.validate(index); | this.validate(newIndex); | updateView: function(view, attrs, force) { // if an attribute hash is provided to update to, use that as the target index var index = attrs ? attrs.contentIndex : view.contentIndex, exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(view.createdFromExampleView), content = this.get('content'), item = content.objectAt(index); // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type if(exampleView !== view.createdFromExampleView || index >= content.get('length') || index < 0) { // make sure it is no longer treated as a rendered view; this is like sendToDOMPool but it leaves it mapped to the item in case the item is rendered later this._indexMap[index] = null; this._curShowing.remove(index); // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height - this.get('rowSpacing')}); // push it in front because we want it to get put back somewhere useful asap this.unpool(view); pool.push(view); // null so we render it later view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._SCCFP_dirty || this._invalidIndexes.contains(index)) { // remapping is cheap so just do it no matter what this.unmapView(view); // TODO: make sure this isn't too slow if(!attrs) attrs = this.setAttributes(index, this._tempAttrs); // update whatever changed this._ignore = YES; this.configureItemView(view, attrs); // need to fire observers now or else they will trigger an extra run loop later this.flushBindings(); this._ignore = NO; // remap it now that we have updated it this.mapView(view, index); view.update(); // we just updated so it must be valid view._SCCFP_dirty = NO; this.validate(index); } return view; }, |
this.mapView(view); | updateView: function(view, force) { // if the item changed types we have to move the view to an offscreen pool (like the original fastpath) and replace it with a new view for the new type var exampleView = this.exampleViewForIndex(view.contentIndex), pool = this.domPoolForExampleView(view.createdFromExampleView), item = this.get('content').objectAt(view.contentIndex); if(exampleView !== view.createdFromExampleView) { // make sure it is no longer treated as a rendered view; this is like unmap but it leaves it mapped to the item in case the item is rendered later this._indexMap[view.contentIndex] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later pool.push(view); // this._curShowing.remove(index); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(force || view._cfp_dirty || this.isInvalid(view.contentIndex)) { // check if it went invalid because its backing item was changed, and update if so if(item !== view.content) { view.set('content', item); // flush now so we don't get an extra notification later SC.Binding.flushPendingChanges(); } view.update(); view._cfp_dirty = NO; // we just updated so it must be valid this.validate(view.contentIndex); } return view; }, |
|
if (!node.collapsed == !visible) { | if (node && !node.collapsed == !visible) { | updateVisibility: function () { for (let elem in values(this.elements)) if (elem.getGroup) { let value = elem.getValue ? elem.getValue.call(this) : elem.noValue || this[elem.name]; let activeGroup = this.getGroup(elem.name, value); for (let group in values([this.commandbar, this.statusbar])) { let meth, node = group[elem.name]; let visible = (value && group === activeGroup); if (!node.collapsed == !visible) { node.collapsed = !visible; if (elem.onVisibility) elem.onVisibility.call(this, node, visible); } } } }, |
function url(path) addon.getResourceURI(path).spec; | function url(path) getURI(path).spec; | function url(path) addon.getResourceURI(path).spec; |
document.getElementById("myanmarConverter.options.urlHostnameExact").selected = true; | hostExact.parentNode.selectedItem = hostExact; | urlOnSelect : function() { var urlList = document.getElementById("myanmarConverter.options.urlList"); var selectedIndex = urlList.selectedIndex; if (selectedIndex > -1) { var urlData = MyanmarConverterOptions.urlPatterns[selectedIndex]; document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname; document.getElementById("myanmarConverter.options.urlPathname").value = urlData.pathname; if (urlData.hostnameExact) document.getElementById("myanmarConverter.options.urlHostnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlHostnameSuffix").selected = true; if (urlData.pathnameExact) document.getElementById("myanmarConverter.options.urlPathnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlPathnamePrefix").selected = true; document.getElementById("myanmarConverter.options.enableConversionForPattern").checked = urlData.enableConversion; } }, |
document.getElementById("myanmarConverter.options.urlHostnameSuffix").selected = true; | hostSuffix.parentNode.selectedItem = hostSuffix; | urlOnSelect : function() { var urlList = document.getElementById("myanmarConverter.options.urlList"); var selectedIndex = urlList.selectedIndex; if (selectedIndex > -1) { var urlData = MyanmarConverterOptions.urlPatterns[selectedIndex]; document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname; document.getElementById("myanmarConverter.options.urlPathname").value = urlData.pathname; if (urlData.hostnameExact) document.getElementById("myanmarConverter.options.urlHostnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlHostnameSuffix").selected = true; if (urlData.pathnameExact) document.getElementById("myanmarConverter.options.urlPathnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlPathnamePrefix").selected = true; document.getElementById("myanmarConverter.options.enableConversionForPattern").checked = urlData.enableConversion; } }, |
document.getElementById("myanmarConverter.options.urlPathnameExact").selected = true; | pathExact.parentNode.selectItem = pathExact; | urlOnSelect : function() { var urlList = document.getElementById("myanmarConverter.options.urlList"); var selectedIndex = urlList.selectedIndex; if (selectedIndex > -1) { var urlData = MyanmarConverterOptions.urlPatterns[selectedIndex]; document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname; document.getElementById("myanmarConverter.options.urlPathname").value = urlData.pathname; if (urlData.hostnameExact) document.getElementById("myanmarConverter.options.urlHostnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlHostnameSuffix").selected = true; if (urlData.pathnameExact) document.getElementById("myanmarConverter.options.urlPathnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlPathnamePrefix").selected = true; document.getElementById("myanmarConverter.options.enableConversionForPattern").checked = urlData.enableConversion; } }, |
document.getElementById("myanmarConverter.options.urlPathnamePrefix").selected = true; | pathPrefix.parentNode.selectItem = pathPrefix; | urlOnSelect : function() { var urlList = document.getElementById("myanmarConverter.options.urlList"); var selectedIndex = urlList.selectedIndex; if (selectedIndex > -1) { var urlData = MyanmarConverterOptions.urlPatterns[selectedIndex]; document.getElementById("myanmarConverter.options.urlHostname").value = urlData.hostname; document.getElementById("myanmarConverter.options.urlPathname").value = urlData.pathname; if (urlData.hostnameExact) document.getElementById("myanmarConverter.options.urlHostnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlHostnameSuffix").selected = true; if (urlData.pathnameExact) document.getElementById("myanmarConverter.options.urlPathnameExact").selected = true; else document.getElementById("myanmarConverter.options.urlPathnamePrefix").selected = true; document.getElementById("myanmarConverter.options.enableConversionForPattern").checked = urlData.enableConversion; } }, |
urls: function (context, tags) { | urls: function (context, args, tags) { | urls: function (context, tags) { let compare = String.localeCompare; let contains = String.indexOf; if (context.ignoreCase) { compare = util.compareIgnoreCase; contains = function (a, b) a && a.toLowerCase().indexOf(b.toLowerCase()) > -1; } if (tags) context.filters.push(function (item) tags. every(function (tag) (item.tags || []). some(function (t) !compare(tag, t)))); context.anchored = false; if (!context.title) context.title = ["URL", "Title"]; context.fork("additional", 0, this, function (context) { context.title[0] += " (additional)"; context.filter = context.parent.filter; // FIXME context.completions = context.parent.completions; // For items whose URL doesn't exactly match the filter, // accept them if all tokens match either the URL or the title. // Filter out all directly matching strings. let match = context.filters[0]; context.filters[0] = function (item) !match.call(this, item); // and all that don't match the tokens. let tokens = context.filter.split(/\s+/); context.filters.push(function (item) tokens.every( function (tok) contains(item.url, tok) || contains(item.title, tok))); let re = RegExp(tokens.filter(util.identity).map(util.escapeRegexp).join("|"), "g"); function highlight(item, text, i) process[i].call(this, item, template.highlightRegexp(text, re)); let process = context.process; context.process = [ function (item, text) highlight.call(this, item, item.text, 0), function (item, text) highlight.call(this, item, text, 1) ]; }); } |
ulistPanels.refresh(); | ulistPanel.refresh(); | WakameGUI.User = function(){ var ulistPanel = new WakameGUI.UserList(); var ulogPanel = new WakameGUI.UserLog(); WakameGUI.User.superclass.constructor.call(this, { split: true, header: false, border: false, layout: 'border', items: [ulistPanel,ulogPanel] }); this.refresh = function(){ ulistPanels.refresh(); ulogPanel.refresh(); }} |
ulistPanel.refresh(); | ulistPanels.refresh(); | WakameGUI.User = function(){ var ulistPanel = new WakameGUI.UserList(); var ulogPanel = new WakameGUI.UserLog(); WakameGUI.User.superclass.constructor.call(this, { split: true, header: false, border: false, layout: 'border', items: [ulistPanel,ulogPanel] }); this.refresh = function(){ ulistPanel.refresh(); ulogPanel.refresh(); }} |
context.keys = { text: "name", description: "replacementText" }; context.completions = commands.getUserCommands(); | context.completions = [ [command.name, command.replacementText || "function () { ... }"] for each (command in commands.getUserCommands()) ]; | completion.userCommand = function userCommand(context) { context.title = ["User Command", "Definition"]; context.keys = { text: "name", description: "replacementText" }; context.completions = commands.getUserCommands(); }; |
this.Data.noreload = false; | this.userDropDown_Change = function(el) { $('.tablePlus').attr('src', 'media/images/table_plus.png'); //this.Data.or = []; this.Data.tid = ''; this.Data.sorting = []; this.Data.user = $(el).val(); this.setupURL(); }; |
|
return Cu.evalInSandbox("eval('with (window) {'+" + EVAL_STRING + "+'}')", context, "1.8", fileName, lineNumber); | return Cu.evalInSandbox("with (window) { eval(" + EVAL_STRING + ") }", context, "1.8", fileName, lineNumber); | userEval: function (str, context, fileName, lineNumber) { if (fileName == null) if (io.sourcing) ({ file: fileName, line: lineNumber }) = io.sourcing; else if (String.indexOf(commandline.command, str) > -1) [fileName, lineNumber] = ["[Command Line]", 1]; if (!context) context = userContext; context[EVAL_STRING] = str; return Cu.evalInSandbox("eval('with (window) {'+" + EVAL_STRING + "+'}')", context, "1.8", fileName, lineNumber); }, |
return Cu.evalInSandbox("with (window) { eval(" + EVAL_STRING + ") }", context, "1.8", fileName, lineNumber); | return Cu.evalInSandbox("eval('with (window) {'+" + EVAL_STRING + "+'}')", context, "1.8", fileName, lineNumber); | userEval: function (str, context, fileName, lineNumber) { if (fileName == null) if (io.sourcing) ({ file: fileName, line: lineNumber }) = io.sourcing; else if (String.indexOf(commandline.command, str) > -1) [fileName, lineNumber] = ["[Command Line]", 1]; if (!context) context = userContext; context[EVAL_STRING] = str; return Cu.evalInSandbox("with (window) { eval(" + EVAL_STRING + ") }", context, "1.8", fileName, lineNumber); }, |
return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber); | if (!window.XPCSafeJSObjectWrapper) return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber); return Cu.evalInSandbox("with (window) { with (modules) { this.eval(" + str.quote() + ") } }", context, "1.8", fileName, lineNumber); | userEval: function (str, context, fileName, lineNumber) { if (fileName == null) if (io.sourcing) ({ file: fileName, line: lineNumber }) = io.sourcing; else if (String.indexOf(commandline.command, str) > -1) [fileName, lineNumber] = ["[Command Line]", 1]; if (!context) context = userContext; return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber); }, |
if (!window.XPCSafeJSObjectWrapper) | if (window.isPrototypeOf(modules)) | userEval: function (str, context, fileName, lineNumber) { if (fileName == null) if (io.sourcing) ({ file: fileName, line: lineNumber }) = io.sourcing; else if (String.indexOf(commandline.command, str) > -1) [fileName, lineNumber] = ["[Command Line]", 1]; if (!context) context = userContext; if (!window.XPCSafeJSObjectWrapper) return Cu.evalInSandbox(str, context, "1.8", fileName, lineNumber); return Cu.evalInSandbox("with (window) { with (modules) { this.eval(" + str.quote() + ") } }", context, "1.8", fileName, lineNumber); }, |
this.Data.noreload = false; | this.userListItem_Click = function(el) { this.Data.user = $(el).text(); this.setupURL(); }; |
|
$("#utrTemplateManager").hide(); | function utrIntro(){ historyAction = new Array();//Reset history of actions pathProperties = new Array(); $("#divInitialInstances").html(""); $("#contextClasses").html(""); $("#contextProperties").html(""); $("#propertyBinding").hide(); $("#divPathWizard").hide(); $("#menuPathBuilder").hide(); $("#pieStat").hide();//remove session //$("#tablePreview").hide();} |
|
historyAction = new Array(); | function utrIntro(){ pathProperties = new Array(); $("#divInitialInstances").html(""); $("#contextClasses").html(""); $("#contextProperties").html(""); $("#propertyBinding").hide(); $("#divPathWizard").hide(); $("#menuPathBuilder").hide(); $("#pieStat").hide();//remove session //$("#tablePreview").hide();} |
|
a("}"),A,b)}function x(t){t.type=="function"?r():e(f(["function"],[r]))}function y(t){function I(P){P.type==","&&e(t,I)}return function(){c(t,I)}}function A(t){t.type=="}"?e():c(h,A)}function v(t){t.content=="array"&&e(f("("),f(")"))}function z(t){t.content=="="&&e(f(["t_string","string","number","atom"],[v,null,null]))}function L(t){if(t.type=="variable")e(z);else t.content=="&"&&e(f("variable"),z)}function H(t){t.type=="t_string"?e(L):L(t)}function E(t){t.type=="t_double_colon"&&e(O)}function O(){c(f("t_string"), | l.nextSibling)for(var z=l.offsetTop+l.offsetHeight;j.offsetHeight&&z-3>A;)h(" ");if(l)l=l.nextSibling;if((new Date).getTime()>n){o();u=setTimeout(r,k.options.lineNumberDelay);return}}for(;q;)h(B++);o();b()}}function v(n){b();c(n);l=p.firstChild;q=j.firstChild;A=0;B=k.options.firstLineNumber;r()}function w(){u&&clearTimeout(u);if(k.editor.allClean())v();else u=setTimeout(w,200)}var l,q,B,A,t=[],H=k.options.styleNumbers;v(true);var u=null;k.updateNumbers=w;var J=f.addEventHandler(f,"scroll",b, | a("}"),A,b)}function x(t){t.type=="function"?r():e(f(["function"],[r]))}function y(t){function I(P){P.type==","&&e(t,I)}return function(){c(t,I)}}function A(t){t.type=="}"?e():c(h,A)}function v(t){t.content=="array"&&e(f("("),f(")"))}function z(t){t.content=="="&&e(f(["t_string","string","number","atom"],[v,null,null]))}function L(t){if(t.type=="variable")e(z);else t.content=="&"&&e(f("variable"),z)}function H(t){t.type=="t_string"?e(L):L(t)}function E(t){t.type=="t_double_colon"&&e(O)}function O(){c(f("t_string"), |
" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex= -1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | " "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; |
validate: function(start, range) { this._invalidIndexes.remove(start, range); | validate: function(index) { var view = this._indexMap[index]; if(view) view._SCCFP_dirty = NO; | validate: function(start, range) { this._invalidIndexes.remove(start, range); }, |
validate: function(index) { var invalidIndexes = this._invalidIndexes; return invalidIndexes.remove(index); | validate: function(start, range) { this._invalidIndexes.remove(start, range); | validate: function(index) { var invalidIndexes = this._invalidIndexes; return invalidIndexes.remove(index); }, |
if(invalidIndexes.isIndexSet) { invalidIndexes.remove(index); } return invalidIndexes; | return invalidIndexes.remove(index); | validate: function(index) { var invalidIndexes = this._invalidIndexes; if(invalidIndexes.isIndexSet) { invalidIndexes.remove(index); } return invalidIndexes; }, |
if(email != "" && ! /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) { | if(email != "" && ! /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,6})+$/.test(email)) { | function validate(type) { var form = document.forms['signupform']; var pw1 = form.pw1.value; var pw2 = form.pw2.value; var email = form.email.value; if(type == 'RESET') { if(! confirm(gt.gettext("This will PERMANENTLY delete ALL YOUR FLIGHTS. Have you exported a backup copy, and are you sure you want to do this?"))) { document.getElementById("miniresultbox").innerHTML = "<i>" + gt.gettext("Deletion cancelled.") + "</i>"; return; } } if(type == 'NEW') { var name = form.username.value; if(name == "") { showError(gt.gettext("Please enter a username.")); form.username.focus(); return; } if(pw1 == "") { showError(gt.gettext("Please enter a password.")); form.pw1.focus(); return; } } if(type == 'EDIT') { var oldpw = form.oldpw.value; if(pw1 != "" && oldpw == "") { showError(gt.gettext("Please enter your current password if you wish to change to a new password.")); form.oldpw.focus(); return; } if(pw1 == "" && oldpw != "") { showError(gt.gettext("Please enter a new password, or clear current password if you do not wish to change it.")); form.pw1.focus(); return; } } if(pw1 != pw2) { showError(gt.gettext("Your passwords don't match, please try again.")); form.pw1.focus(); return; } if(email != "" && ! /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) { showError(gt.gettext('Invalid e-mail address, it should be "[email protected]"')); form.email.focus(); return; } document.getElementById("miniresultbox").innerHTML = "<i>" + gt.gettext("Processing...") + "</i>"; xmlhttpPost(URL_SETTINGS, type);} |
return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0) | return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0); | validator: function (value) { this.format({}, value); return Object.keys(util.compileMacro(value).seen).every(function (k) ["column", "file", "line"].indexOf(k) >= 0) } |
var val = this.get('value'); if (val && val.length>0) this.set('hintON', NO); else this.set('hintON', YES); | var val = this.get('value'), max; if (val && val.length>0) { this.set('hintON', NO); max = this.get('maxLength'); if(!SC.browser.safari && val.length>max){ this.set('value', val.substr(0, max)); } }else this.set('hintON', YES); | valueObserver: function(){ // console.log('value observer'); var val = this.get('value'); if (val && val.length>0) this.set('hintON', NO); else this.set('hintON', YES); }.observes('value') |
{ | function variableExists(variables, bindingType, value){//alert(variables.toSource()); for (var i in variables) { //alert("variables[i].bindingType: " + variables[i].bindingType + "\nbindingType.type: " + bindingType.type + "\nvariables[i].variable: " + variables[i].variable + "\nvalue: " + value); if (variables[i].bindingType == bindingType.type && variables[i].variable == value) return true; } return false;} |
|
} | function variableExists(variables, bindingType, value){//alert(variables.toSource()); for (var i in variables) { //alert("variables[i].bindingType: " + variables[i].bindingType + "\nbindingType.type: " + bindingType.type + "\nvariables[i].variable: " + variables[i].variable + "\nvalue: " + value); if (variables[i].bindingType == bindingType.type && variables[i].variable == value) return true; } return false;} |
|
callLater(0.1, Form.resize); | callLater(0.5, Form.resize); | video: function(){ var ps = this.ps; var title = this.savers['item'] = this.title = new Title(ps); var link = this.savers['itemUrl'] = this.link = new Link(ps, true); var tags = this.savers['tags'] = this.tags = new Tags(ps, true); var desc = this.savers['description'] = this.desc = new Desc(ps, true); this.toggles = [title, tags, link, desc]; callLater(0.1, Form.resize); }, |
viewportOffset: function(forElement) { var valueT = 0, valueL = 0; var element = forElement; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; if (element.offsetParent == document.body && Element.getStyle(element, 'position') == 'absolute') break; } while (element = element.offsetParent); element = forElement; do { if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) { valueT -= element.scrollTop || 0; valueL -= element.scrollLeft || 0; } } while (element = element.parentNode); return Element._returnOffset(valueL, valueT); }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | viewportOffset: function(forElement) { var valueT = 0, valueL = 0; var element = forElement; do { valueT += element.offsetTop || 0; valueL += element.offsetLeft || 0; // Safari fix if (element.offsetParent == document.body && Element.getStyle(element, 'position') == 'absolute') break; } while (element = element.offsetParent); element = forElement; do { if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) { valueT -= element.scrollTop || 0; valueL -= element.scrollLeft || 0; } } while (element = element.parentNode); return Element._returnOffset(valueL, valueT); }, |
this.tasksTable = Array(); this.drawJobsTable(); | $("#siteTabs").tabs("enable",1); $("#siteTabs").tabs("select",0); this.mainsTable = Array(); this.drawSubsTable(); | this.viewUpdater = function() { var _Settings = this.Settings.Application; // Shortcut if (this.Data.user || !_Settings.userSelection) { if (this.Data.tid) { // Show jobs this.tasksTable = Array(); this.drawJobsTable(); } else { //show tasks this.Data.uparam = []; this.jobsTable = Array(); this.drawTaskTable(); } } else if (_Settings.userSelection) { // Show users this.Data.uparam = []; this.tasksTable = Array(); this.jobsTable = Array(); this.drawUsers(); } this.timeRange_update(); if (_Settings.userSelection) this.userDropdown_update(); // Update only if avaliable this.fromTill_update(); this.userRefresh_update(); this.breadcrumbs_update(); this.setupURL(); }; |
$("#siteTabs").tabs("enable",1); $("#siteTabs").tabs("select",0); | this.viewUpdater = function() { var _Settings = this.Settings.Application; // Shortcut if (this.Data.user || !_Settings.userSelection) { if (this.Data.tid) { // Show jobs this.tasksTable = Array(); this.drawJobsTable(); } else { //show tasks this.Data.uparam = []; this.jobsTable = Array(); this.drawTaskTable(); } } else if (_Settings.userSelection) { // Show users this.Data.uparam = []; this.tasksTable = Array(); this.jobsTable = Array(); this.drawUsers(); } this.timeRange_update(); if (_Settings.userSelection) this.userDropdown_update(); // Update only if avaliable this.fromTill_update(); this.userRefresh_update(); this.breadcrumbs_update(); this.setupURL(); }; |
|
this.jobsTable = Array(); this.drawTaskTable(); | this.subsTable = Array(); this.drawMainsTable(); | this.viewUpdater = function() { var _Settings = this.Settings.Application; // Shortcut if (this.Data.user || !_Settings.userSelection) { if (this.Data.tid) { // Show jobs this.tasksTable = Array(); this.drawJobsTable(); } else { //show tasks this.Data.uparam = []; this.jobsTable = Array(); this.drawTaskTable(); } } else if (_Settings.userSelection) { // Show users this.Data.uparam = []; this.tasksTable = Array(); this.jobsTable = Array(); this.drawUsers(); } this.timeRange_update(); if (_Settings.userSelection) this.userDropdown_update(); // Update only if avaliable this.fromTill_update(); this.userRefresh_update(); this.breadcrumbs_update(); this.setupURL(); }; |
this.tasksTable = Array(); this.jobsTable = Array(); | this.mainsTable = Array(); this.subsTable = Array(); | this.viewUpdater = function() { var _Settings = this.Settings.Application; // Shortcut if (this.Data.user || !_Settings.userSelection) { if (this.Data.tid) { // Show jobs this.tasksTable = Array(); this.drawJobsTable(); } else { //show tasks this.Data.uparam = []; this.jobsTable = Array(); this.drawTaskTable(); } } else if (_Settings.userSelection) { // Show users this.Data.uparam = []; this.tasksTable = Array(); this.jobsTable = Array(); this.drawUsers(); } this.timeRange_update(); if (_Settings.userSelection) this.userDropdown_update(); // Update only if avaliable this.fromTill_update(); this.userRefresh_update(); this.breadcrumbs_update(); this.setupURL(); }; |
f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/, | a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== | f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/, |
visible: function(element) { return $(element).style.display != 'none'; }, | var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\ | visible: function(element) { return $(element).style.display != 'none'; }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.