rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if(exampleView !== view.createdFromExampleView) { this._indexMap[index] = null; var f = view.get("frame"); view.adjust({ top: -f.height }); this.sendToDOMPool(view); view = null; } else if(this.isInvalid(index)) { view.update(); } | view = this.updateView(view); | renderFast: function(index) { var view, exampleView; // if it already exists in the right place we don't need to do anything if(view = this._indexMap[index]) { // maybe move this logic down in case an item can be rendered more than one way exampleView = this.exampleViewForIndex(index); // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); // 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) { // 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[index] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later this.sendToDOMPool(view); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(this.isInvalid(index)) { view.update(); } } // we have to do actual work :( if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); // if a view has been rendered for the same item already, just take it and move it into its new position if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } // if a pooled view exists take it and update it to match its new content } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); // otherwise it needs to be rendered from scratch } else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } } // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); | var attrs = this._tempAttrs; this.setAttributes(index, attrs); if(!view && (view = this.pooledViewForItem(index))) { pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); this.configureItemView(view, attrs); | renderFast: function(index) { var view, exampleView; // if it already exists in the right place we don't need to do anything if(view = this._indexMap[index]) { // maybe move this logic down in case an item can be rendered more than one way exampleView = this.exampleViewForIndex(index); // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); // 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) { // 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[index] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later this.sendToDOMPool(view); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(this.isInvalid(index)) { view.update(); } } // we have to do actual work :( if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); // if a view has been rendered for the same item already, just take it and move it into its new position if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } // if a pooled view exists take it and update it to match its new content } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); // otherwise it needs to be rendered from scratch } else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } } // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); | view = this.updateView(view); } if(!view && (view = this.viewFromDOMPoolFor(index))) { | renderFast: function(index) { var view, exampleView; // if it already exists in the right place we don't need to do anything if(view = this._indexMap[index]) { // maybe move this logic down in case an item can be rendered more than one way exampleView = this.exampleViewForIndex(index); // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); // 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) { // 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[index] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later this.sendToDOMPool(view); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(this.isInvalid(index)) { view.update(); } } // we have to do actual work :( if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); // if a view has been rendered for the same item already, just take it and move it into its new position if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } // if a pooled view exists take it and update it to match its new content } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); // otherwise it needs to be rendered from scratch } else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } } // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
} else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } | this.configureItemView(view, attrs); this._ignore = YES; SC.Binding.flushPendingChanges(); this._ignore = NO; view = this.updateView(view, YES); | renderFast: function(index) { var view, exampleView; // if it already exists in the right place we don't need to do anything if(view = this._indexMap[index]) { // maybe move this logic down in case an item can be rendered more than one way exampleView = this.exampleViewForIndex(index); // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); // 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) { // 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[index] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later this.sendToDOMPool(view); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(this.isInvalid(index)) { view.update(); } } // we have to do actual work :( if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); // if a view has been rendered for the same item already, just take it and move it into its new position if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } // if a pooled view exists take it and update it to match its new content } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); // otherwise it needs to be rendered from scratch } else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } } // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
this.validate(index); this.mapView(view, index); | if(!view) { view = this.renderItem(this.exampleViewForIndex(index), attrs); } | renderFast: function(index) { var view, exampleView; // if it already exists in the right place we don't need to do anything if(view = this._indexMap[index]) { // maybe move this logic down in case an item can be rendered more than one way exampleView = this.exampleViewForIndex(index); // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); pool.remove(view); // 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) { // 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[index] = null; // move it off screen var f = view.get("frame"); view.adjust({ top: -f.height }); // pool it and null so we render it later this.sendToDOMPool(view); view = null; // if we are going to be keeping the view, make sure that it's updated } else if(this.isInvalid(index)) { view.update(); } } // we have to do actual work :( if(!view ) { var attrs = this._tempAttrs; this.setAttributes(index, attrs); // if a view has been rendered for the same item already, just take it and move it into its new position if(view = this.pooledViewForItem(index)) { this.configureItemView(view, attrs); if(view._cfp_dirty) { view.update(); view._cfp_dirty = NO; } // if a pooled view exists take it and update it to match its new content } else if(view = this.viewFromDOMPoolFor(index)) { this.configureItemView(view, attrs); view.update(); // otherwise it needs to be rendered from scratch } else { view = this.renderItem(this.exampleViewForIndex(index), attrs); } } // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
this.mapView(view, index); | renderForeground: function(index) { var view = this.renderFast(index); // if it was just rendered it's obviously not invalid anymore this.validate(index); this._curShowing.add(index); this.mapView(view, index); return view; }, |
|
this.mapView(view, index); | renderForeground: function(index) { var view = this.renderFast(index); this._curShowing.add(index); return view; }, |
|
if (this.didReload) this.didReload(reloaded || SC.IndexSet.create(index)); | renderForeground: function(index) { var view = this.renderFast(index); // if it was just rendered it's obviously not invalid anymore this.validate(index); this._curShowing.add(index); return view; }, |
|
this.deprecatedRenderWarning(); | renderIcon: function(context, icon) { this.deprecatedRenderWarning(); // get a class name and url to include if relevant var url = null, className = null , classArray=[]; if (icon && SC.ImageView.valueIsUrl(icon)) { url = icon; className = '' ; } else { className = icon; url = SC.BLANK_IMAGE_URL ; } // generate the img element... classArray.push(className,'icon'); context.begin('img') .addClass(classArray) .attr('src', url) .end(); }, |
|
SC.Binding.flushPendingChanges(); | renderItem: function(exampleView, attrs) { var view = exampleView.create(attrs); SC.Binding.flushPendingChanges(); this.appendChild(view); return view; }, |
|
this.flushBindings(); this._ignore = NO; | renderItem: function(exampleView, attrs) { var view = exampleView.create(attrs); SC.Binding.flushPendingChanges(); this.appendChild(view); return view; }, |
|
SC.Binding.flushPendingChanges(); | renderItem: function(exampleView, attrs) { var view = exampleView.create(attrs); this.appendChild(view); return view; }, |
|
view.createdFromExampleView = exampleView; | renderItem: function(index, attrs) { var exampleView = this.exampleViewForIndex(index), view; if(!attrs) { attrs = this._tempAttrs; this.setAttributes(index, attrs); } view = exampleView.create(attrs); view.createdFromExampleView = exampleView; this.appendChild(view); return view; }, |
|
view.awake(); | renderItem: function(exampleView, attrs) { var view = exampleView.create(attrs); view.awake(); this.appendChild(view); return view; }, |
|
this.deprecatedRenderWarning(); | renderLabel: function(context, label) { this.deprecatedRenderWarning(); context.push('<label>', label || '', '</label>') ; }, |
|
this._viewRenderer.render(context); | renderLayout: function(context, firstTime) { this._viewRenderer.attr({ layoutStyle: this.get('layoutStyle') }); }, |
|
this._scv_willRenderAnimations(); | this.get('layoutStyleCalculator').willRenderAnimations(); | renderLayout: function(context, firstTime) { this._scv_willRenderAnimations(); context.addStyle(this.get('layoutStyle')); this._scv_didRenderAnimations(); }, |
this._scv_didRenderAnimations(); | this.get('layoutStyleCalculator').didRenderAnimations(); | renderLayout: function(context, firstTime) { this._scv_willRenderAnimations(); context.addStyle(this.get('layoutStyle')); this._scv_didRenderAnimations(); }, |
this._scv_didRenderAnimations(); | renderLayout: function(context, firstTime) { this._scv_willRenderAnimations(); context.addStyle(this.get('layoutStyle')); }, |
|
this._scv_didRenderAnimations(); | renderLayout: function(context, firstTime) { context.addStyle(this.get('layoutStyle')); this._scv_didRenderAnimations(); }, |
|
this._viewRenderer.render(context); | renderLayout: function(context, firstTime) { this._viewRenderer.attr({ layoutStyle: this.get('layoutStyle') }); this._viewRenderer.render(context); }, |
|
n=DOM.add(tr,'td');n=DOM.add(n,'img',{src:op_get_relative_uri_root()+"/images/emoji/"+s.carrier+"/"+s.carrier+i+".gif",alt:"["+s.carrier+":"+i+"]"});Event.add(n,'mousedown',function(e){if(Prototype.Browser.IE){tinyMCE.execCommand("mceInsertContent",false,e.srcElement.getAttribute("alt"));}else{tinyMCE.execCommand("mceInsertContent",false,e.element().getAttribute("alt"));}});}} | n=DOM.add(tr,'td');n=DOM.add(n,'img',{src:op_get_relative_uri_root()+"/images/emoji/"+s.carrier+"/"+s.carrier+i+".gif",alt:"["+s.carrier+":"+i+"]",width:12,height:12});Event.add(n,'mousedown',function(e){if(Prototype.Browser.IE){tinyMCE.execCommand("mceInsertContent",false,e.srcElement.getAttribute("alt"));}else{tinyMCE.execCommand("mceInsertContent",false,e.element().getAttribute("alt"));}});}} | return h;},postRender:function(){tinymce.dom.Event.add(this.id,'click',this.showMenu,this);},setColor:function(c){this.value=c;this.hideMenu();this.settings.onselect(c);}});tinymce.create('tinymce.ui.OpenPNEEmojiButton:tinymce.ui.ColorSplitButton',{OpenPNEEmojiButton:function(id,s){var t=this;t.parent(id,s);t.settings=s;},renderMenu:function(){var t=this,m,i=0,s=t.settings,n,tb,tr,w;var DOM=tinymce.DOM,Event=tinymce.dom.Event,is=tinymce.is,each=tinymce.each;w=DOM.add(s.menu_container,'div',{id:t.id+'_menu',dir:'ltr','class':s['menu_class']+' '+s['class'],style:'position:absolute;left:0;top:-1000px;width:402px;'});m=DOM.add(w,'div',{'class':s['class']+' mceSplitButtonMenu'});DOM.add(m,'span',{'class':'mceMenuLine'});n=DOM.add(m,'table',{'class':'mceEmojiSplitMenu'});tb=DOM.add(n,'tbody');for(var num in s.emoji){var emoji=s.emoji[num];for(var i=emoji.start;i<=emoji.end;i++){if(i==emoji.start||i%25==0){tr=DOM.add(tb,'tr');}n=DOM.add(tr,'td');n=DOM.add(n,'img',{src:op_get_relative_uri_root()+"/images/emoji/"+s.carrier+"/"+s.carrier+i+".gif",alt:"["+s.carrier+":"+i+"]"});Event.add(n,'mousedown',function(e){if(Prototype.Browser.IE){tinyMCE.execCommand("mceInsertContent",false,e.srcElement.getAttribute("alt"));}else{tinyMCE.execCommand("mceInsertContent",false,e.element().getAttribute("alt"));}});}}DOM.addClass(m,'mceColorSplitMenu');return w;},renderHTML:function(){var s=this.settings,h='<a id="'+this.id+'" href="javascript:;" class="mceButton mceButtonEnabled '+s['class'] |
attrs = this._tempAttrs; this.setAttributes(index, attrs); | attrs = this.setAttributes(index, this._tempAttrs); | renderNew: function(index) { var exampleView = this.exampleViewForIndex(index), view, attrs; // if it already exists in the right place we might be able to use the existing view if(view = this._indexMap[index]) { // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); if(pool._lastRendered == view) debugger; pool.remove(view); view = this.updateView(view); } if(!view) { attrs = this._tempAttrs; this.setAttributes(index, attrs); view = this.renderItem(exampleView, attrs); } this.mapView(view, index); return view; }, |
this.mapView(view, index); | renderNew: function(index) { var exampleView = this.exampleViewForIndex(index), view, attrs; // if it already exists in the right place we might be able to use the existing view if(view = this._indexMap[index]) { // if we just rendered it, it is no longer in a pool var pool = this.domPoolForExampleView(view.createdFromExampleView); if(pool._lastRendered == view) debugger; pool.remove(view); view = this.updateView(view); } if(!view) { attrs = this._tempAttrs; this.setAttributes(index, attrs); view = this.renderItem(exampleView, attrs); } return view; }, |
|
attrs = this._tempAttrs; this.setAttributes(index, attrs); | if(view = this._indexMap[index]) { var pool = this.domPoolForExampleView(view.createdFromExampleView); if(pool._lastRendered == view) debugger; pool.remove(view); view = this.updateView(view); } | renderNew: function(index) { var exampleView = this.exampleViewForIndex(index), view, attrs; attrs = this._tempAttrs; this.setAttributes(index, attrs); view = this.renderItem(exampleView, attrs); // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
view = this.renderItem(exampleView, attrs); | if(!view) { attrs = this._tempAttrs; this.setAttributes(index, attrs); | renderNew: function(index) { var exampleView = this.exampleViewForIndex(index), view, attrs; attrs = this._tempAttrs; this.setAttributes(index, attrs); view = this.renderItem(exampleView, attrs); // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
this.validate(index); this.mapView(view, index); | view = this.renderItem(exampleView, attrs); } | renderNew: function(index) { var exampleView = this.exampleViewForIndex(index), view, attrs; attrs = this._tempAttrs; this.setAttributes(index, attrs); view = this.renderItem(exampleView, attrs); // if it was just rendered it's obviously not invalid anymore this.validate(index); this.mapView(view, index); return view; }, |
if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { | view = this._indexMap[index]; if(view && view._SCCFP_dirty) { | renderNextBackground: function() { var index = this.getNextBackground(); if(index === undefined) return; var exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) debugger; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { pool._lastRendered = null; return; } //console.log("background rendering: " + index); if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
if(pool._lastRendered && !pool.head) console.log("something is wrong"); | if(pool._lastRendered && !pool.head) debugger; | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) console.log("something is wrong"); // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) { pool._lastRendered = null; return; } if(index === undefined) { return; } //console.log("background rendering: ", index); if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
if(pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) { | if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._prev)) { | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) console.log("something is wrong"); // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) { pool._lastRendered = null; return; } if(index === undefined) { return; } //console.log("background rendering: ", index); if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
if(pool._lastRendered && !pool.head) throw "pool.lastRendered not cleared"; | if(pool._lastRendered && !pool.head) throw "New background render cycle started but last rendered view was not cleared"; | renderNextBackground: function() { var index = this.getNextBackground(); if(index === undefined) return; var exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) throw "pool.lastRendered not cleared"; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { pool._lastRendered = null; return; } //console.log("background rendering: " + index); view = this._indexMap[index]; if(view && view._SCCFP_dirty) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { | if(pool.length >= this.DOMPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { | renderNextBackground: function() { var index = this.getNextBackground(); if(index === undefined) return; var exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) throw "pool.lastRendered not cleared"; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { pool._lastRendered = null; return; } //console.log("background rendering: " + index); view = this._indexMap[index]; if(view && view._SCCFP_dirty) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), | var index = this.getNextBackground(); if(index === undefined) return; var exampleView = this.exampleViewForIndex(index), | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) debugger; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._prev)) { pool._lastRendered = null; return; } if(index === undefined) { return; } //console.log("background rendering: ", index); if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
return; } if(index === undefined) { | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) debugger; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._prev)) { pool._lastRendered = null; return; } if(index === undefined) { return; } //console.log("background rendering: ", index); if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
|
console.log("stopping"); | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView); // dont render if the last view rendered is the tail if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { console.log("stopping"); return; } console.log("background rendering: ", index); return this.renderBackground(index); }, |
|
console.log("background rendering: ", index); | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView); // dont render if the last view rendered is the tail if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { console.log("stopping"); return; } console.log("background rendering: ", index); return this.renderBackground(index); }, |
|
if(pool._lastRendered && !pool.head) debugger; | if(pool._lastRendered && !pool.head) throw "pool.lastRendered not cleared"; | renderNextBackground: function() { var index = this.getNextBackground(); if(index === undefined) return; var exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView), view; if(pool._lastRendered && !pool.head) debugger; // if the last rendered is the tail and is about to be reused, that means we're done if(pool.length >= this.domPoolSize && pool._lastRendered && (pool._lastRendered === pool.head._SCCFP_prev)) { pool._lastRendered = null; return; } //console.log("background rendering: " + index); view = this._indexMap[index]; if(view && view._SCCFP_dirty) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; }, |
pool = this.domPoolForExampleView(exampleView); | pool = this.domPoolForExampleView(exampleView), view; | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView); // dont render if the last view rendered is the tail if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { return; } //console.log("background rendering: ", index); return this.renderBackground(index); }, |
if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { | if(pool._lastRendered && !pool.head) console.log("something is wrong"); if(pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) { pool._lastRendered = null; return; } if(index === undefined) { | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView); // dont render if the last view rendered is the tail if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { return; } //console.log("background rendering: ", index); return this.renderBackground(index); }, |
return this.renderBackground(index); | if(this._invalidIndexes.contains(index) && (view = this._indexMap[index])) { view = this.updateView(view); } if(!view) { view = this.renderBackground(index); } return view; | renderNextBackground: function() { var index = this.getNextBackground(), exampleView = this.exampleViewForIndex(index), pool = this.domPoolForExampleView(exampleView); // dont render if the last view rendered is the tail if(index === undefined || (pool.length >= this.domPoolSize && pool._lastRendered && pool._lastRendered === pool.head._prev) ) { return; } //console.log("background rendering: ", index); return this.renderBackground(index); }, |
var html = this.current_page + ' to ' + this.page_count + ' of ' + this.page_count; | this.start = this.getStartCount(); this.offset = this.getOffsetCount(); var html = this.start + ' to ' + this.offset + ' of ' + this.total; | renderPagenate: function(){ var html = this.current_page + ' to ' + this.page_count + ' of ' + this.page_count; $("#viewPagenate").html(html+' '+this.view); }, |
this.deprecatedRenderWarning(); | renderRightIcon: function(context, icon) { this.deprecatedRenderWarning(); // get a class name and url to include if relevant var url = null, className = null, classArray=[]; if (icon && SC.ImageView.valueIsUrl(icon)) { url = icon; className = '' ; } else { className = icon; url = SC.BLANK_IMAGE_URL ; } // generate the img element... classArray.push('right-icon',className); context.begin('img') .addClass(classArray) .attr('src', url) .end(); }, |
|
this.renderIcon(context, this.rightIcon, "right-icon"); | if (this.rightIcon) { this.renderIcon(context, this.rightIcon, "right-icon"); } | renderRightIcon: function(context) { this.renderIcon(context, this.rightIcon, "right-icon"); }, |
if (!this.renderer) { this.renderer = this.createRenderer(); this.renderer.contentProvider = this; if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this); | var theme = this.get("theme"); if (!this.renderer && theme) { this.renderer = this.createRenderer(theme); if (this.renderer) { this.renderer.contentProvider = this; if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, theme); } | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed if (!this.renderer) { this.renderer = this.createRenderer(); this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this); } } // update! this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } if (!this._useRenderFirst && this.createRenderer) { this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); | if (this.renderer){ this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed if (!this.renderer) { this.renderer = this.createRenderer(); this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this); } } // update! this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } if (!this._useRenderFirst && this.createRenderer) { this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
this.renderer.render(context); | if (this.renderer) this.renderer.render(context); | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed if (!this.renderer) { this.renderer = this.createRenderer(); this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this); } } // update! this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } if (!this._useRenderFirst && this.createRenderer) { this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
renderToContext: function(context) { | renderToContext: function(context, firstTime) { | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed var theme = this.get("theme"); // renderers need a theme if (!this.renderer && theme) { this.renderer = this.createRenderer(theme); // the renderer was not necessarily successfully created. if (this.renderer) { this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, theme); } } } // update! if (this.renderer){ this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } } if (!this._useRenderFirst && this.createRenderer) { if (this.renderer) this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
this.render(context, YES); | if (SC.none(firstTime)) firstTime = YES; this.render(context, firstTime); | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed var theme = this.get("theme"); // renderers need a theme if (!this.renderer && theme) { this.renderer = this.createRenderer(theme); // the renderer was not necessarily successfully created. if (this.renderer) { this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, theme); } } } // update! if (this.renderer){ this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } } if (!this._useRenderFirst && this.createRenderer) { if (this.renderer) this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; | for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, firstTime) ; | renderToContext: function(context) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // even if we don't use the renderer to update, we must make sure we create it if there is one // because inheriting views will build on top of the renderer (even if they don't know it) if (this.createRenderer) { // create if needed var theme = this.get("theme"); // renderers need a theme if (!this.renderer && theme) { this.renderer = this.createRenderer(theme); // the renderer was not necessarily successfully created. if (this.renderer) { this.renderer.contentProvider = this; // set renderer's content provider to this (it will call renderContent, etc. as needed) if (mixins = this.createRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, theme); } } } // update! if (this.renderer){ this.updateRenderer(this.renderer); if (mixins = this.updateRendererMixin) { len = mixins.length; for (idx = 0; idx < len; idx++) mixins[idx].call(this, this.renderer); } } } if (!this._useRenderFirst && this.createRenderer) { if (this.renderer) this.renderer.render(context); } else { this.render(context, YES); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, YES) ; } } this.endPropertyChanges() ; }, |
}, | } | renderToContext: function(context) { equals(context.prevObject, curContext, 'passed child context of curContext'); equals(context.tagName(), this.get('tagName'), 'context setup with current tag name'); runCount++; // record run }, |
this.renderViewSettings(context); | this.renderViewSettings(context, YES); | renderToContext: function(context, firstTime) { var mixins, idx, len; this.beginPropertyChanges() ; this.set('layerNeedsUpdate', NO) ; this.renderViewSettings(context); /* Now, the actual rendering, which will use a renderer if possible */ // the renderer will have been created when the theme was found; if it is around, // we just need to ensure it is up-to-date if (this.createRenderer) { // our private version does mixins too! Yay! this._updateRenderer(); } if (!this._useRenderFirst && this.createRenderer) { if (this.renderer) this.renderer.render(context); } else { if (SC.none(firstTime)) firstTime = YES; this.render(context, firstTime); if (mixins = this.renderMixin) { len = mixins.length; for(idx=0; idx<len; ++idx) mixins[idx].call(this, context, firstTime) ; } } this.endPropertyChanges() ; }, |
renderViewSettings: function(context) { | renderViewSettings: function(context, firstTime) { if (SC.none(firstTime)) firstTime = YES; | renderViewSettings: function(context) { this._updateViewRenderer(); this._viewRenderer.render(context); this.renderLayout(context, YES); // provide backwards compatibility }, |
this.renderLayout(context, YES); | if (firstTime) this.renderLayout(context, YES); | renderViewSettings: function(context) { this._updateViewRenderer(); this._viewRenderer.render(context); this.renderLayout(context, YES); // provide backwards compatibility }, |
classArray.splice(0, 0, this.get("theme").classNames); | classArray = classArray.concat(this.get("theme").classNames); | renderViewSettings: function(context) { /* MUCH OF THIS SHOULD POSSIBLY BE MOVED INTO A RENDERER FOR VIEWS */ // first, render view stuff. var layerId, bgcolor, cursor, classArray=[], mixins, len, idx; // do some initial setup only needed at create time. layerId = this.layerId ? this.get('layerId') : SC.guidFor(this) ; context.id(layerId).classNames(this.get('classNames'), YES) ; // VIEW LAYOUT RENDERER, ANYONE? this.renderLayout(context, YES) ; // do some standard setup... if (this.get('isTextSelectable')) classArray.push('allow-select') ; if (!this.get('isEnabled')) classArray.push('disabled') ; if (!this.get('isVisible')) classArray.push('hidden') ; if (this.get('isFirstResponder')) classArray.push('focus'); bgcolor = this.get('backgroundColor'); if (bgcolor) context.addStyle('backgroundColor', bgcolor); cursor = this.get('cursor') ; if (cursor) classArray.push(cursor.get('className')) ; if (this.get("theme")) { classArray.splice(0, 0, this.get("theme").classNames); } context.addClass(classArray); }, |
this.renderLayout(context, YES); | renderViewSettings: function(context) { this._updateViewRenderer(); this._viewRenderer.render(context); }, |
|
if(SC.typeOf(views) === SC.T_ARRAY) views = arguments; | if(!SC.typeOf(views) === SC.T_ARRAY) views = arguments; | reorder: function(views) { if(SC.typeOf(views) === SC.T_ARRAY) views = arguments; var i = views.length, childViews = this.childViews, view; // childViews.[] should be observed this.beginPropertyChanges(); while(i-- > 0) { view = views[i]; childViews.removeObject(view); childViews.unshiftObject(view); } this.endPropertyChanges(); this._scfl_childViewsDidChange(); return this; } |
this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() }); | if (this._modeStack.length > 1) this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() }); | replace: function (mode, oldMode) { while (oldMode && this._modeStack.length > 1 && this.main != oldMode) this.pop(); this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() }); this.push(mode); }, |
this.enumerableContentDidChange(idx, amt, len - amt); | replace: function(idx, amt, recs) { if (!this.get('isEditable')) { throw "%@.%@[] is not editable".fmt(this.get('record'), this.get('propertyName')); } var storeIds = this.get('editableStoreIds'), len = recs ? (recs.get ? recs.get('length') : recs.length) : 0, record = this.get('record'), pname = this.get('propertyName'), i, keys, ids, toRemove, inverse, attr, inverseRecord; // map to store keys ids = [] ; for(i=0;i<len;i++) ids[i] = recs.objectAt(i).get('id'); // if we have an inverse - collect the list of records we are about to // remove inverse = this.get('inverse'); if (inverse && amt>0) { toRemove = SC.ManyArray._toRemove; if (toRemove) SC.ManyArray._toRemove = null; // reuse if possible else toRemove = []; for(i=0;i<amt;i++) toRemove[i] = this.objectAt(idx + i); } // pass along - if allowed, this should trigger the content observer storeIds.replace(idx, amt, ids); // ok, notify records that were removed then added; this way reordered // objects are added and removed if (inverse) { // notive removals for(i=0;i<amt;i++) { inverseRecord = toRemove[i]; attr = inverseRecord ? inverseRecord[inverse] : null; if (attr && attr.inverseDidRemoveRecord) { attr.inverseDidRemoveRecord(inverseRecord, inverse, record, pname); } } if (toRemove) { toRemove.length = 0; // cleanup if (!SC.ManyArray._toRemove) SC.ManyArray._toRemove = toRemove; } // notify additions for(i=0;i<len;i++) { inverseRecord = recs.objectAt(i); attr = inverseRecord ? inverseRecord[inverse] : null; if (attr && attr.inverseDidAddRecord) { attr.inverseDidAddRecord(inverseRecord, inverse, record, pname); } } } // only mark record dirty if there is no inverse or we are master if (record && (!inverse || this.get('isMaster'))) { record.recordDidChange(pname); } return this; }, |
|
true;if(a){if(!g)return b();g=this.history.nodeBefore(g);h=this.history.textAfter(g).length}else{f=this.history.nodeAfter(g);if(!f){h=this.history.textAfter(g).length;return b()}g=f;h=0}}},select:function(){if(this.atOccurrence){select.setCursorPos(this.editor.container,this.pos.from,this.pos.to);select.scrollToCursor(this.editor.container)}},replace:function(a){if(this.atOccurrence){this.pos.to=this.editor.replaceRange(this.pos.from,this.pos.to,a);this.atOccurrence=false}},position:function(){if(this.atOccurrence)return{line:this.pos.from.node, | d}else if(d)j=p*d;if(j)b.wrapping.style.height=Math.max(m+j,b.options.minHeight)+"px"}var b=this,c=b.options.cursorActivity,e=b.win,g=e.document.body,d=null,f=null,m=2*b.frame.offsetTop;g.style.overflowY="hidden";e.document.documentElement.style.overflowY="hidden";this.frame.scrolling="no";setTimeout(a,300);b.options.cursorActivity=function(p){c&&c(p);clearTimeout(f);f=setTimeout(a,100)}}};s.InvalidLineHandle={toString:function(){return"CodeMirror.InvalidLineHandle"}};s.replace=function(a){if(typeof a== "string")a=document.getElementById(a);return function(b){a.parentNode.replaceChild(b,a)}};s.fromTextArea=function(a,b){if(typeof a=="string")a=document.getElementById(a);b=b||{};if(a.style.width&&b.width==null)b.width=a.style.width;if(a.style.height&&b.height==null)b.height=a.style.height;if(b.content==null)b.content=a.value;if(a.form){var c=function(){a.value=d.getCode()};typeof a.form.addEventListener=="function"?a.form.addEventListener("submit",c,false):a.form.attachEvent("onsubmit",c);var e=a.form.submit, | true;if(a){if(!g)return b();g=this.history.nodeBefore(g);h=this.history.textAfter(g).length}else{f=this.history.nodeAfter(g);if(!f){h=this.history.textAfter(g).length;return b()}g=f;h=0}}},select:function(){if(this.atOccurrence){select.setCursorPos(this.editor.container,this.pos.from,this.pos.to);select.scrollToCursor(this.editor.container)}},replace:function(a){if(this.atOccurrence){this.pos.to=this.editor.replaceRange(this.pos.from,this.pos.to,a);this.atOccurrence=false}},position:function(){if(this.atOccurrence)return{line:this.pos.from.node, |
Element.Methods.replace = function(element, content) { element = $(element); if (content && content.toElement) content = content.toElement(); if (Object.isElement(content)) { element.parentNode.replaceChild(content, element); return element; } content = Object.toHTML(content); var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); if (Element._insertionTranslations.tags[tagName]) { var nextSibling = element.next(); var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); parent.removeChild(element); if (nextSibling) fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); else fragments.each(function(node) { parent.appendChild(node) }); } else element.outerHTML = content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; | 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])*?\*\ | Element.Methods.replace = function(element, content) { element = $(element); if (content && content.toElement) content = content.toElement(); if (Object.isElement(content)) { element.parentNode.replaceChild(content, element); return element; } content = Object.toHTML(content); var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); if (Element._insertionTranslations.tags[tagName]) { var nextSibling = element.next(); var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); parent.removeChild(element); if (nextSibling) fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); else fragments.each(function(node) { parent.appendChild(node) }); } else element.outerHTML = content.stripScripts(); content.evalScripts.bind(content).defer(); return element; }; |
selection:function(){this.focusIfIE();return this.editor.selectedText()},reindent:function(){this.editor.reindent()},reindentSelection:function(){this.focusIfIE();this.editor.reindentSelection(null)},focusIfIE:function(){this.win.select.ie_selection&&this.focus()},focus:function(){this.win.focus();this.editor.selectionSnapshot&&this.win.select.setBookmark(this.win.document.body,this.editor.selectionSnapshot)},replaceSelection:function(e){this.focus();this.editor.replaceSelection(e);return true},replaceChars:function(e, c,a){this.editor.replaceChars(e,c,a)},getSearchCursor:function(e,c,a){return this.editor.getSearchCursor(e,c,a)},undo:function(){this.editor.history.undo()},redo:function(){this.editor.history.redo()},historySize:function(){return this.editor.history.historySize()},clearHistory:function(){this.editor.history.clear()},grabKeys:function(e,c){this.editor.grabKeys(e,c)},ungrabKeys:function(){this.editor.ungrabKeys()},setParser:function(e,c){this.editor.setParser(e,c)},setSpellcheck:function(e){this.win.document.body.spellcheck= | selection:function(){this.focusIfIE();return this.editor.selectedText()},reindent:function(){this.editor.reindent()},reindentSelection:function(){this.focusIfIE();this.editor.reindentSelection(null)},focusIfIE:function(){this.win.select.ie_selection&&this.focus()},focus:function(){this.win.focus();this.editor.selectionSnapshot&&this.win.select.setBookmark(this.win.document.body,this.editor.selectionSnapshot)},replaceSelection:function(a){this.focus();this.editor.replaceSelection(a);return true},replaceChars:function(a, b,c){this.editor.replaceChars(a,b,c)},getSearchCursor:function(a,b,c){return this.editor.getSearchCursor(a,b,c)},undo:function(){this.editor.history.undo()},redo:function(){this.editor.history.redo()},historySize:function(){return this.editor.history.historySize()},clearHistory:function(){this.editor.history.clear()},grabKeys:function(a,b){this.editor.grabKeys(a,b)},ungrabKeys:function(){this.editor.ungrabKeys()},setParser:function(a,b){this.editor.setParser(a,b)},setSpellcheck:function(a){this.win.document.body.spellcheck= | selection:function(){this.focusIfIE();return this.editor.selectedText()},reindent:function(){this.editor.reindent()},reindentSelection:function(){this.focusIfIE();this.editor.reindentSelection(null)},focusIfIE:function(){this.win.select.ie_selection&&this.focus()},focus:function(){this.win.focus();this.editor.selectionSnapshot&&this.win.select.setBookmark(this.win.document.body,this.editor.selectionSnapshot)},replaceSelection:function(e){this.focus();this.editor.replaceSelection(e);return true},replaceChars:function(e,c,a){this.editor.replaceChars(e,c,a)},getSearchCursor:function(e,c,a){return this.editor.getSearchCursor(e,c,a)},undo:function(){this.editor.history.undo()},redo:function(){this.editor.history.redo()},historySize:function(){return this.editor.history.historySize()},clearHistory:function(){this.editor.history.clear()},grabKeys:function(e,c){this.editor.grabKeys(e,c)},ungrabKeys:function(){this.editor.ungrabKeys()},setParser:function(e,c){this.editor.setParser(e,c)},setSpellcheck:function(e){this.win.document.body.spellcheck= |
false);if(!b||!d)return"";if(b.node==d.node)return a.textAfter(b.node).slice(b.offset,d.offset);var f=[a.textAfter(b.node).slice(b.offset)];for(b=a.nodeAfter(b.node);b!=d.node;b=a.nodeAfter(b))f.push(a.textAfter(b));f.push(a.textAfter(d.node).slice(0,d.offset));return cleanText(f.join("\n"))},replaceSelection:function(a){this.history.commit();var b=select.cursorPos(this.container,true),d=select.cursorPos(this.container,false);if(b&&d){d=this.replaceRange(b,d,a);select.setCursorPos(this.container, d);webkitLastLineHack(this.container)}},cursorCoords:function(a){function b(j,l){var m=-(document.body.scrollTop||document.documentElement.scrollTop||0),r=-(document.body.scrollLeft||document.documentElement.scrollLeft||0)+l;forEach([j,window.frameElement],function(u){for(;u;){r+=u.offsetLeft;m+=u.offsetTop;u=u.offsetParent}});return{x:r,y:m,yBot:m+j.offsetHeight}}function d(j,l){var m=document.createElement("SPAN");m.appendChild(document.createTextNode(j));try{return l(m)}finally{m.parentNode&&m.parentNode.removeChild(m)}} | selection:function(){this.focusIfIE();return this.editor.selectedText()},reindent:function(){this.editor.reindent()},reindentSelection:function(){this.focusIfIE();this.editor.reindentSelection(null)},focusIfIE:function(){this.win.select.ie_selection&&this.focus()},focus:function(){this.win.focus();this.editor.selectionSnapshot&&this.win.select.setBookmark(this.win.document.body,this.editor.selectionSnapshot)},replaceSelection:function(a){this.focus();this.editor.replaceSelection(a);return true},replaceChars:function(a, | false);if(!b||!d)return"";if(b.node==d.node)return a.textAfter(b.node).slice(b.offset,d.offset);var f=[a.textAfter(b.node).slice(b.offset)];for(b=a.nodeAfter(b.node);b!=d.node;b=a.nodeAfter(b))f.push(a.textAfter(b));f.push(a.textAfter(d.node).slice(0,d.offset));return cleanText(f.join("\n"))},replaceSelection:function(a){this.history.commit();var b=select.cursorPos(this.container,true),d=select.cursorPos(this.container,false);if(b&&d){d=this.replaceRange(b,d,a);select.setCursorPos(this.container,d);webkitLastLineHack(this.container)}},cursorCoords:function(a){function b(j,l){var m=-(document.body.scrollTop||document.documentElement.scrollTop||0),r=-(document.body.scrollLeft||document.documentElement.scrollLeft||0)+l;forEach([j,window.frameElement],function(u){for(;u;){r+=u.offsetLeft;m+=u.offsetTop;u=u.offsetParent}});return{x:r,y:m,yBot:m+j.offsetHeight}}function d(j,l){var m=document.createElement("SPAN");m.appendChild(document.createTextNode(j));try{return l(m)}finally{m.parentNode&&m.parentNode.removeChild(m)}} |
1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z= | ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&& this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]|| | 1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z= |
tweet("@" + aUserID + " ", aStatusID); | let init = "@" + aUserID + " "; tweet(init, aStatusID, init.length); | function reply(aUserID, aStatusID) { tweet("@" + aUserID + " ", aStatusID); } |
$('form.comments input[@name="parent"]').val(parent_id); | $('form.comments input[name="parent"]').val(parent_id); | replyToComment : function(parent_id) { $('form.comments input[@name="parent"]').val(parent_id); $('#comment-message').hide(); this.callJSONService('get_comment', {comment_id: parent_id}, function(c) { $('#comment-message') .addClass('info') .text(_('Replying to comment by %s.').replace('%s', c.author) + ' ') .append($('<a href="#">') .text(_('(Create as top level comment)')) .click(function() { Zine.replyToNothing(); return false; })); document.location = '#leave-reply'; $('#comment-message').fadeIn(); }); }, |
$('form.comments input[@name="parent"]').val(''); | $('form.comments input[name="parent"]').val(''); | replyToNothing : function() { $('form.comments input[@name="parent"]').val(''); $('#comment-message').fadeOut(); }, |
this.visualizations = this.filterSufficient(); | this.visualizations = this.getSufficientVisualizations(visualizations.results.bindings); var unsufficient = this.getUnsufficientVisualizations(visualizations.results.bindings); | function Report(table, visualizations, bindings, variables, options, containers){//alert(this.typeColumns.toSource()); this.data = new google.visualization.DataTable(table, 0.6); // count columns after data is set - but before visualizations are filtered this.countColumns(); this.visualizations = visualizations.results.bindings; // hide unused containers!!! for (var h = 0; h < containers.length; h++) containers[h].element.style.display = "none"; // join and split the whole thing for (var i = 0; i < this.visualizations.length; i++) { var visualization = this.visualizations[i]; var visBindings = bindings.results.bindings.filter(function(binding) { return binding.visualization.value == visualization.visualization.value; } ); var visVariables = variables.results.bindings.filter(function(variable) { return variable.visualization.value == visualization.visualization.value; } ); var visContainer = containers.filter(function(container) { return container.visType == visualization.type.value; } )[0]; //var visOptions = options.results.bindings.filter(function(option) { return option.visualization.value == visualization.visualization.value; } ); var visOptions = new Array(); visualization.constructor = Visualization; // only pass arrays, not the whole SPARQL result visualization.constructor(this, visBindings, visVariables, visOptions, visContainer.element); } // filter out visualizations that do not have sufficient columns!!! this.visualizations = this.filterSufficient(); //this.bindings = bindings.results.bindings; //this.options = options.results.bindings; //this.containers = containers;} |
for (var i in this.visualizations) | for (var i = 0; i < this.visualizations.length; i++) | function Report(table, visualizations, bindings, variables, options, containers){ //alert(Report.bindingTypes.results.bindings.toSource());//alert(variables.toSource()); this.data = new google.visualization.DataTable(table, 0.6); this.visualizations = visualizations.results.bindings; this.countColumns(); // join and split the whole thing for (var i in this.visualizations) { var visualization = this.visualizations[i];//alert(visualization.toSource()); var visBindings = bindings.results.bindings.filter(function(binding) { return binding.visualization.value == visualization.visualization.value; } ); var visVariables = variables.results.bindings.filter(function(variable) { return variable.visualization.value == visualization.visualization.value; } );//alert(visVariables.toSource()); var visContainer = containers.filter(function(container) { return container.visType == visualization.type.value; } )[0]; //var visOptions = options.results.bindings.filter(function(option) { return option.visualization.value == visualization.visualization.value; } ); var visOptions = new Array();//temp = new Visualization();//alert(temp.baseClass); visualization.constructor = Visualization; // only pass arrays, not the whole SPARQL result visualization.constructor(this, visBindings, visVariables, visOptions, visContainer.element);//alert(visualization.variables.toSource()); } //alert(this.visualizations.toSource()); //this.bindings = bindings.results.bindings; //this.options = options.results.bindings; //this.containers = containers;} |
if (Cu.reportError) Cu.reportError(error); try { let obj = { toString: function () String(error), stack: <>{String.replace(error.stack || Error().stack, /^/mg, "\t")}</> }; for (let [k, v] in Iterator(error)) { if (!(k in obj)) obj[k] = v; } if (dactyl.storeErrors) { let errors = storage.newArray("errors", { store: false }); errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n"); errors.push([new Date, obj + obj.stack]); } dactyl.dump(String(error)); dactyl.dump(obj); dactyl.dump(""); } catch (e) { window.dump(e); } | util.reportError(error); | reportError: function (error, echo) { if (error instanceof FailedAssertion) { if (error.message) dactyl.echoerr(error.message); else dactyl.beep(); return; } if (error.result == Cr.NS_BINDING_ABORTED) return; if (echo) dactyl.echoerr(error); if (Cu.reportError) Cu.reportError(error); try { let obj = { toString: function () String(error), stack: <>{String.replace(error.stack || Error().stack, /^/mg, "\t")}</> }; for (let [k, v] in Iterator(error)) { if (!(k in obj)) obj[k] = v; } if (dactyl.storeErrors) { let errors = storage.newArray("errors", { store: false }); errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n"); errors.push([new Date, obj + obj.stack]); } dactyl.dump(String(error)); dactyl.dump(obj); dactyl.dump(""); } catch (e) { window.dump(e); } }, |
dump("dactyl: components: " + e + "\n" + (e.stack || Error().stack)); | dump("dactyl: command-line-handler: " + e + "\n" + (e.stack || Error().stack)); | function reportError(e) { dump("dactyl: components: " + e + "\n" + (e.stack || Error().stack)); Cu.reportError(e);} |
dump("dactyl: components: " + e + "\n" + (e.stack || Error().stack)); | dump("dactyl: protocols: " + e + "\n" + (e.stack || Error().stack)); | function reportError(e) { dump("dactyl: components: " + e + "\n" + (e.stack || Error().stack)); Cu.reportError(e);} |
this.write('<span style="color: #00f">' +this.formatOutput(example.example) +'</span>'); | this.write('<span style="color: #00f"><a href="#' + example.htmlID + '" class="doctest-failure-link" title="Go to example">' + this.formatOutput(example.example) +'</a></span>'); | doctest.Reporter.prototype.reportFailure = function (example, output) { this.write('Failed example:\n'); this.write('<span style="color: #00f">' +this.formatOutput(example.example) +'</span>'); this.write('Expected:\n'); this.write(this.formatOutput(example.output)); this.write('Got:\n'); this.write(this.formatOutput(output)); this.failure += 1; example.markExample('doctest-failure', 'Actual output:\n' + output);}; |
example.markExample('doctest-success'); | if (doctest.strip(example.output) == '...') { example.markExample('doctest-success', 'Output:\n' + output); } else { example.markExample('doctest-success'); } | doctest.Reporter.prototype.reportSuccess = function (example, output) { if (this.verbosity > 0) { if (this.verbosity > 1) { this.write('Trying:\n'); this.write(this.formatOutput(example.example)); this.write('Expecting:\n'); this.write(this.formatOutput(example.output)); this.write('ok\n'); } else { this.writeln(example.example + ' ... passed!'); } } this.success += 1; example.markExample('doctest-success');}; |
if (example.output.indexOf('...') >= 0 && output) { | if ((example.output.indexOf('...') >= 0 || example.output.indexOf('?') >= 0) && output) { | doctest.Reporter.prototype.reportSuccess = function (example, output) { if (this.verbosity > 0) { if (this.verbosity > 1) { this.write('Trying:\n'); this.write(this.formatOutput(example.example)); this.write('Expecting:\n'); this.write(this.formatOutput(example.output)); this.write('ok\n'); } else { this.writeln(example.example + ' ... passed!'); } } this.success += 1; if (example.output.indexOf('...') >= 0 && output) { example.markExample('doctest-success', 'Output:\n' + output); } else { example.markExample('doctest-success'); }}; |
doctest.repr = function (o) { if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring; } | func.repr = function () { return 'called:'+repr(self); }; | doctest.repr = function (o) { if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring;} |
if (maxLen === undefined) { maxLen = 120; } if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; | if (doctest._reprTracker === null) { var iAmTheTop = true; doctest._reprTracker = []; } else { var iAmTheTop = false; | doctest.repr = function (o, indent, maxLen) { indent = indent || ''; if (maxLen === undefined) { maxLen = 120; } if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(indent, maxLen); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(indent, maxLen); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o, indent, maxLen); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); if (ostring == '[object Object]' || ostring == '[object]') { ostring = doctest.objRepr(o, indent, maxLen); } } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring;}; |
if (typeof(o.__repr__) == 'function') { return o.__repr__(indent, maxLen); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(indent, maxLen); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o, indent, maxLen); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } | if (doctest._reprTrackObj(o)) { return '..recursive..'; } if (maxLen === undefined) { maxLen = 120; } if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(indent, maxLen); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(indent, maxLen); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o, indent, maxLen); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); if (ostring == '[object Object]' || ostring == '[object]') { ostring = doctest.objRepr(o, indent, maxLen); } } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring; } finally { if (iAmTheTop) { doctest._reprTracker = null; } | doctest.repr = function (o, indent, maxLen) { indent = indent || ''; if (maxLen === undefined) { maxLen = 120; } if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(indent, maxLen); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(indent, maxLen); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o, indent, maxLen); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); if (ostring == '[object Object]' || ostring == '[object]') { ostring = doctest.objRepr(o, indent, maxLen); } } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring;}; |
try { var ostring = (o + ""); if (ostring == '[object Object]' || ostring == '[object]') { ostring = doctest.objRepr(o, indent, maxLen); } } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring; | doctest.repr = function (o, indent, maxLen) { indent = indent || ''; if (maxLen === undefined) { maxLen = 120; } if (typeof o == 'undefined') { return 'undefined'; } else if (o === null) { return "null"; } try { if (typeof(o.__repr__) == 'function') { return o.__repr__(indent, maxLen); } else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) { return o.repr(indent, maxLen); } for (var i=0; i<doctest.repr.registry.length; i++) { var item = doctest.repr.registry[i]; if (item[0](o)) { return item[1](o, indent, maxLen); } } } catch (e) { if (typeof(o.NAME) == 'string' && ( o.toString == Function.prototype.toString || o.toString == Object.prototype.toString)) { return o.NAME; } } try { var ostring = (o + ""); if (ostring == '[object Object]' || ostring == '[object]') { ostring = doctest.objRepr(o, indent, maxLen); } } catch (e) { return "[" + typeof(o) + "]"; } if (typeof(o) == "function") { var ostring = ostring.replace(/^\s+/, "").replace(/\s+/g, " "); var idx = ostring.indexOf("{"); if (idx != -1) { ostring = ostring.substr(o, idx) + "{...}"; } } return ostring;}; |
|
request: function(form, options) { form = $(form), options = Object.clone(options || { }); var params = options.parameters, action = form.readAttribute('action') || ''; if (action.blank()) action = window.location.href; options.parameters = form.serialize(true); if (params) { if (Object.isString(params)) params = params.toQueryParams(); Object.extend(options.parameters, params); } if (form.hasAttribute('method') && !options.method) options.method = form.method; return new Ajax.Request(action, options); } | 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])*?\*\ | request: function(form, options) { form = $(form), options = Object.clone(options || { }); var params = options.parameters, action = form.readAttribute('action') || ''; if (action.blank()) action = window.location.href; options.parameters = form.serialize(true); if (params) { if (Object.isString(params)) params = params.toQueryParams(); Object.extend(options.parameters, params); } if (form.hasAttribute('method') && !options.method) options.method = form.method; return new Ajax.Request(action, options); } |
request: function(req, sender, func) { var content = req.content; (content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var sel = createFlavoredString(window.getSelection()); var ctx = update({ document :document, window : window, title : title, selection : (!!sel.raw)? sel : null, target : TBRL.getTarget() || document }, window.location); if(Extractors.Quote.check(ctx)){ var d = Extractors.Quote.extract(ctx); } else { var d = Extractors.Link.extract(ctx); } maybeDeferred(d).addCallback(function(ps){ func(checkHttps(update({ page : title, pageUrl : content.url }, ps))); }); }); }, | var request = function(url, opt){ var ret = new Deferred(); chrome.extension.sendRequest(TBRL.id, { request: "request", content: { "url" : url, "opt" : opt } }, function(res){ if(res.success){ ret.callback(res.content); } else { ret.errback(res.content); } }); return ret; } | request: function(req, sender, func) { var content = req.content; (content.title ? succeed(content.title):getTitle()).addCallback(function(title){ var sel = createFlavoredString(window.getSelection()); var ctx = update({ document :document, window : window, title : title, selection : (!!sel.raw)? sel : null, target : TBRL.getTarget() || document }, window.location); if(Extractors.Quote.check(ctx)){ var d = Extractors.Quote.extract(ctx); } else { var d = Extractors.Link.extract(ctx); } maybeDeferred(d).addCallback(function(ps){ func(checkHttps(update({ page : title, pageUrl : content.url }, ps))); }); }); }, |
var request = function(url, opt){ | function request(url, opt){ | var request = function(url, opt){ var req = new XMLHttpRequest(), ret = new Deferred(); opt = update({ method: 'GET' }, opt || {}); if(opt.queryString){ var qs = queryString(opt.queryString, true); url += qs; } if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if('username' in opt){ req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true, opt.username, opt.password); } else { req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true); } if(opt.charset) req.overrideMimeType(opt.charset); //req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(opt.headers){ if(!opt.headers['Content-Type']){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } } Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); } var position = -1; var error = false; req.onprogress = function(e){ position = e.position; } req.onreadystatechange = function(e){ if(req.readyState === 4){ var length = 0; try { length = parseInt(req.getResponseHeader('Content-Length'), 10); } catch(e) { console.log('ERROR', e); } // 最終時のlengthと比較 if(position !== length){ if(opt.denyRedirection){ ret.errback(req); error = true; } } if(!error){ if(req.status >= 200 && req.status < 300){ ret.callback(req); } else { ret.errback(req); } } } } req.send(opt.sendContent); return ret;} |
if(!opt.headers['Content-Type']){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } | if(opt.headers['Content-Type']){ setHeader = false; | var request = function(url, opt){ var req = new XMLHttpRequest(), ret = new Deferred(); opt = update({ method: 'GET' }, opt || {}); if(opt.queryString){ var qs = queryString(opt.queryString, true); url += qs; } if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if('username' in opt){ req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true, opt.username, opt.password); } else { req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true); } if(opt.charset) req.overrideMimeType(opt.charset); //req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(opt.headers){ if(!opt.headers['Content-Type']){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } } Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); } var position = -1; var error = false; req.onprogress = function(e){ position = e.position; } req.onreadystatechange = function(e){ if(req.readyState === 4){ var length = 0; try { length = parseInt(req.getResponseHeader('Content-Length'), 10); } catch(e) { console.log('ERROR', e); } // 最終時のlengthと比較 if(position !== length){ if(opt.denyRedirection){ ret.errback(req); error = true; } } if(!error){ if(req.status >= 200 && req.status < 300){ ret.callback(req); } else { ret.errback(req); } } } } req.send(opt.sendContent); return ret;} |
} if(setHeader){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } | var request = function(url, opt){ var req = new XMLHttpRequest(), ret = new Deferred(); opt = update({ method: 'GET' }, opt || {}); if(opt.queryString){ var qs = queryString(opt.queryString, true); url += qs; } if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if('username' in opt){ req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true, opt.username, opt.password); } else { req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true); } if(opt.charset) req.overrideMimeType(opt.charset); //req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(opt.headers){ if(!opt.headers['Content-Type']){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } } Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); } var position = -1; var error = false; req.onprogress = function(e){ position = e.position; } req.onreadystatechange = function(e){ if(req.readyState === 4){ var length = 0; try { length = parseInt(req.getResponseHeader('Content-Length'), 10); } catch(e) { console.log('ERROR', e); } // 最終時のlengthと比較 if(position !== length){ if(opt.denyRedirection){ ret.errback(req); error = true; } } if(!error){ if(req.status >= 200 && req.status < 300){ ret.callback(req); } else { ret.errback(req); } } } } req.send(opt.sendContent); return ret;} |
|
if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } | var request = function(url, opt){ var req = new XMLHttpRequest(), ret = new Deferred(); opt = update({ method: 'GET' }, opt || {}); if(opt.queryString){ var qs = queryString(opt.queryString, true); url += qs; } if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if('username' in opt){ req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true, opt.username, opt.password); } else { req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true); } if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } if(opt.charset) req.overrideMimeType(opt.charset); //req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(opt.headers){ Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); } var position = -1; var error = false; req.onprogress = function(e){ position = e.position; } req.onreadystatechange = function(e){ if(req.readyState === 4){ var length = 0; try { length = parseInt(req.getResponseHeader('Content-Length'), 10); } catch(e) { console.log('ERROR', e); } // 最終時のlengthと比較 if(position !== length){ if(opt.denyRedirection){ ret.errback(req); error = true; } } if(!error){ if(req.status >= 200 && req.status < 300){ ret.callback(req); } else { ret.errback(req); } } } } req.send(opt.sendContent); return ret;} |
|
if(!opt.headers['Content-Type']){ if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } } | var request = function(url, opt){ var req = new XMLHttpRequest(), ret = new Deferred(); opt = update({ method: 'GET' }, opt || {}); if(opt.queryString){ var qs = queryString(opt.queryString, true); url += qs; } if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if('username' in opt){ req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true, opt.username, opt.password); } else { req.open(opt.method ? opt.method : (opt.sendContent)? 'POST' : 'GET', url, true); } if(opt.sendContent){ req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } else { req.setRequestHeader('Content-Type', 'application/octet-stream'); } if(opt.charset) req.overrideMimeType(opt.charset); //req.setRequestHeader("X-Requested-With", "XMLHttpRequest"); if(opt.headers){ Object.keys(opt.headers).forEach(function(key){ req.setRequestHeader(key, opt.headers[key]); }); } var position = -1; var error = false; req.onprogress = function(e){ position = e.position; } req.onreadystatechange = function(e){ if(req.readyState === 4){ var length = 0; try { length = parseInt(req.getResponseHeader('Content-Length'), 10); } catch(e) { console.log('ERROR', e); } // 最終時のlengthと比較 if(position !== length){ if(opt.denyRedirection){ ret.errback(req); error = true; } } if(!error){ if(req.status >= 200 && req.status < 300){ ret.callback(req); } else { ret.errback(req); } } } } req.send(opt.sendContent); return ret;} |
|
var request_v1 = function(url,opt){ | function request_v1(url,opt){ | var request_v1 = function(url,opt){ opt = update({ method: 'GET' }, opt || {}); if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if(opt.method && opt.method.toUpperCase() === 'POST'){ if(!opt.headers) opt.headers = []; opt.headers.push(['Content-Type', 'application/x-www-form-urlencoded']); } return doXHR(url, opt);}; |
}; | } | function request_v1(url,opt){ opt = update({ method: 'GET' }, opt || {}); if(opt.sendContent){ opt.method = 'POST'; opt.sendContent = queryString(opt.sendContent, false); } if(opt.method && opt.method.toUpperCase() === 'POST'){ if(!opt.headers) opt.headers = []; opt.headers.push(['Content-Type', 'application/x-www-form-urlencoded']); } return doXHR(url, opt);}; |
reset: function (brief) { this._startIndex = this._endIndex = this._selIndex = -1; this._div = null; if (!brief) this.selectItem(-1); }, | reset: function () { this.index = null; }, | reset: function (brief) { this._startIndex = this._endIndex = this._selIndex = -1; this._div = null; if (!brief) this.selectItem(-1); }, |
reset: function (silent) { this._modeStack = []; if (config.isComposeWindow) this.set(modes.COMPOSE, modes.NONE, silent); else this.set(modes.NORMAL, modes.NONE, silent); | reset: function () { while (this._modeStack.length > 1) this.pop(); | reset: function (silent) { this._modeStack = []; if (config.isComposeWindow) this.set(modes.COMPOSE, modes.NONE, silent); else this.set(modes.NORMAL, modes.NONE, silent); }, |
reset: function(form) { $(form).reset(); return form; }, | 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])*?\*\ | reset: function(form) { $(form).reset(); return form; }, |
if (key.substring(0,6) === 'animate') { | if (key.substring(0,7) === 'animate') { | resetAnimation: function() { var layout = this.get('layout'), didChange = NO, key; for (key in layout) { if (key.substring(0,6) === 'animate') { didChange = YES; delete layout[key]; } } if (didChange) this.set('layout', layout); return this; }, |
if (didChange) this.set('layout', layout); | console.log('resetAnimation didChange', didChange); if (didChange) { this.set('layout', layout); this.notifyPropertyChange('layout'); console.log('set layout', layout); } | resetAnimation: function() { var layout = this.get('layout'), didChange = NO, key; for (key in layout) { if (key.substring(0,6) === 'animate') { didChange = YES; delete layout[key]; } } if (didChange) this.set('layout', layout); return this; }, |
function ResetChildren(field,node) { var p=0; for (p=0;p<TreeParents[field].length;p++) { if (TreeParents[field][p]==node) {TreeChecked[field][p]=0;ResetChildren(field,p);UpdateNode(field,p);} } | function ResetChildren( field, node ) { for( var p = 0; p < TreeParents[field].length; p++ ) { if( TreeParents[field][p] == node ) { TreeChecked[field][p] = 0; ResetChildren( field ,p ); UpdateNode( field, p ); } | function ResetChildren(field,node) { var p=0; for (p=0;p<TreeParents[field].length;p++) { if (TreeParents[field][p]==node) {TreeChecked[field][p]=0;ResetChildren(field,p);UpdateNode(field,p);} } } |
} | function ResetChildren(field,node) { var p=0; for (p=0;p<TreeParents[field].length;p++) { if (TreeParents[field][p]==node) {TreeChecked[field][p]=0;ResetChildren(field,p);UpdateNode(field,p);} } } |
|
delete localStorage[key]; | try{ delete localStorage[key]; } catch(e) { console.warn('Deleting local storage encountered a problem. '+e); } | resetDefault: function(keyName) { var fullKeyName, userKeyName, written, localStorage, key, storageSafari3; fullKeyName = this._normalizeKeyName(keyName); userKeyName = this._userKeyName(fullKeyName); this.propertyWillChange(keyName); this.propertyWillChange(fullKeyName); written = this._written; if (written) delete written[userKeyName]; if(SC.browser.msie=="7.0"){ localStorage=document.body; }else if(this.HTML5DB_noLocalStorage){ storageSafari3 = this._safari3DB; }else{ localStorage = window.localStorage ; if (!localStorage && window.globalStorage) { localStorage = window.globalStorage[window.location.hostname]; } } key=["SC.UserDefaults",userKeyName].join('-at-'); if (localStorage) { if(SC.browser.msie=="7.0"){ localStorage.setAttribute(key.replace(/\W/gi, ''), null); localStorage.save("SC.UserDefaults"); } else if(storageSafari3){ var obj = this; storageSafari3.transaction( function (t) { t.executeSql("delete from SCLocalStorage where key = ?", [key], null); } ); delete this.dataHash[key]; }else{ delete localStorage[key]; } } this.propertyDidChange(keyName); this.propertyDidChange(fullKeyName); return this ; }, |
var height = root.scrollHeight - window.outerHeight; var width = root.scrollWidth - window.outerWidth; | var height = root.scrollHeight - window.innerHeight; var width = root.scrollWidth - window.innerWidth; console.log(width, height); | Form.resize = function(){ if(!Form.nowResizing){ Form.nowResizing = true; var root = document.body;// var height = window.outerHeight - (window.innerHeight*2) + root.scrollHeight;// var width = window.outerWidth - (window.innerWidth*2) + root.scrollWidth; var height = root.scrollHeight - window.outerHeight; var width = root.scrollWidth - window.outerWidth; window.resizeBy(width, height); Form.nowResizing = false; } else { callLater(0.5, arguments.callee); }}; |
function resolveImportRequest(context, path, request, opts) { | function resolveImportRequest(context, request, opts) { | function resolveImportRequest(context, path, request, opts) { var cmds = jsio.__cmds, imports = [], result = false; for (var i = 0, imp; imp = cmds[i]; ++i) { if ((result = imp(context, path, request, opts, imports))) { break; } } if (result !== true) { throw new (typeof SyntaxError != 'undefined' ? SyntaxError : Error)(String(result) || 'invalid jsio command: jsio(\'' + request + '\')'); } return imports; }; |
if ((result = imp(context, path, request, opts, imports))) { break; } | if ((result = imp(context, request, opts, imports))) { break; } | function resolveImportRequest(context, path, request, opts) { var cmds = jsio.__cmds, imports = [], result = false; for (var i = 0, imp; imp = cmds[i]; ++i) { if ((result = imp(context, path, request, opts, imports))) { break; } } if (result !== true) { throw new (typeof SyntaxError != 'undefined' ? SyntaxError : Error)(String(result) || 'invalid jsio command: jsio(\'' + request + '\')'); } return imports; }; |
external: match[1] == 'external', "import": {} | external: match[1] == 'external', 'import': {} | function resolveImportRequest(path, request) { var match, imports = []; if((match = request.match(/^(from|external)\s+([\w.$]+)\s+import\s+(.*)$/))) { imports[0] = { from: resolveRelativePath(match[2], path), external: match[1] == 'external', "import": {} }; match[3].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]["import"][item] = as || item; }); } else if((match = request.match(/^import\s+(.*)$/))) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports[imports.length] = as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}; }); } else { var msg = 'Invalid jsio request: jsio(\'' + request + '\')'; throw SyntaxError ? new SyntaxError(msg) : new Error(msg); } return imports; }; |
imports[0]["import"][item] = as || item; | imports[0]['import'][item] = as || item; | function resolveImportRequest(path, request) { var match, imports = []; if((match = request.match(/^(from|external)\s+([\w.$]+)\s+import\s+(.*)$/))) { imports[0] = { from: resolveRelativePath(match[2], path), external: match[1] == 'external', "import": {} }; match[3].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]["import"][item] = as || item; }); } else if((match = request.match(/^import\s+(.*)$/))) { match[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g, function(_, pkg, as) { fullPkg = resolveRelativePath(pkg, path); imports[imports.length] = as ? {from: fullPkg, as: as} : {from: fullPkg, as: pkg}; }); } else { var msg = 'Invalid jsio request: jsio(\'' + request + '\')'; throw SyntaxError ? new SyntaxError(msg) : new Error(msg); } return imports; }; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.