rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
range.length = 0; | provideObjectAtIndex: function(index, object) { var array = this._TMP_PROVIDE_ARRAY, range = this._TMP_PROVIDE_RANGE; array[0] = object; range.start = index; return this.provideObjectsInRange(range, array); }, |
|
if (this._requestingIndex <= 0) this.enumerableContentDidChange() ; | if (this._requestingIndex <= 0) this.enumerableContentDidChange(range.start, range.length, 0); | provideObjectsInRange: function(range, array) { var content = this._sa_content ; if (!content) content = this._sa_content = [] ; var start = range.start, len = range.length; while(--len >= 0) content[start+len] = array[len]; if (this._requestingIndex <= 0) this.enumerableContentDidChange() ; return this ; }, |
if (this._requestingIndex <= 0) this.enumerableContentDidChange(range.start, range.length, 0); | if (this._requestingIndex <= 0) this.enumerableContentDidChange(range.start, range.length); | provideObjectsInRange: function(range, array) { var content = this._sa_content ; if (!content) content = this._sa_content = [] ; var start = range.start, len = range.length; while(--len >= 0) content[start+len] = array[len]; if (this._requestingIndex <= 0) this.enumerableContentDidChange(range.start, range.length, 0); return this ; }, |
while(--len >= 0) content[start+len] = array[len]; | while(--len >= 0) content[start+len] = array.objectAt(len); | provideObjectsInRange: function(range, array) { var content = this._sa_content ; if (!content) content = this._sa_content = [] ; var start = range.start, len = range.length; while(--len >= 0) content[start+len] = array[len]; if (this._requestingIndex <= 0) this.enumerableContentDidChange(range.start, range.length); return this ; }, |
0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b=== "string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&& | a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&& !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari= | 0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&& |
var anyArgs = [signal].concat(args); for(var i = 0, sub; sub = this._subscribers.__any[i]; ++i) { | var anyArgs = [signal].concat(args), subs = this._subscribers.__any.slice(0); for(var i = 0, sub; sub = subs[i]; ++i) { | this.publish = function(signal) { if(this._subscribers) { var args = Array.prototype.slice.call(arguments, 1); if(this._subscribers.__any) { var anyArgs = [signal].concat(args); for(var i = 0, sub; sub = this._subscribers.__any[i]; ++i) { sub.apply(ctx, args); } } if(!this._subscribers[signal]) { return; } for(var i = 0, sub; sub = this._subscribers[signal][i]; ++i) { sub.apply(ctx, args); } } return this; } |
if(!this._subscribers[signal]) { return; } for(var i = 0, sub; sub = this._subscribers[signal][i]; ++i) { | if(!this._subscribers[signal]) { return; } var subs = this._subscribers[signal].slice(0); for(var i = 0, sub; sub = subs[i]; ++i) { | this.publish = function(signal) { if(this._subscribers) { var args = Array.prototype.slice.call(arguments, 1); if(this._subscribers.__any) { var anyArgs = [signal].concat(args); for(var i = 0, sub; sub = this._subscribers.__any[i]; ++i) { sub.apply(ctx, args); } } if(!this._subscribers[signal]) { return; } for(var i = 0, sub; sub = this._subscribers[signal][i]; ++i) { sub.apply(ctx, args); } } return this; } |
this._modeStack.push([this._main, this._extended]); this.set(mainMode, extendedMode, silent, { push: this._modeStack[this._modeStack.length - 1] }); | this.set(mainMode, extendedMode, silent, { push: this.topOfStack }); | push: function (mainMode, extendedMode, silent) { this._modeStack.push([this._main, this._extended]); this.set(mainMode, extendedMode, silent, { push: this._modeStack[this._modeStack.length - 1] }); }, |
push: function (mainMode, extendedMode, silent) { this.set(mainMode, extendedMode, silent, { push: this.topOfStack }); | push: function (mainMode, extendedMode, params) { this.set(mainMode, extendedMode, params, { push: this.topOfStack }); | push: function (mainMode, extendedMode, silent) { this.set(mainMode, extendedMode, silent, { push: this.topOfStack }); }, |
r = RangeFind.Range(r, frames.length); if (r) | if (r = RangeFind.Range(r, frames.length)) | function push(r) { r = RangeFind.Range(r, frames.length); if (r) frames.push(r); } |
r = RangeFind.Range(r, frames.length); if (r) | if (r = RangeFind.Range(r, frames.length)) | function pushRange(start, end) { function push(r) { r = RangeFind.Range(r, frames.length); if (r) frames.push(r); } let range = start.startContainer.ownerDocument.createRange(); range.setStart(start.startContainer, start.startOffset); range.setEnd(end.startContainer, end.startOffset); if (!self.elementPath) push(range); else for (let r in self.findSubRanges(range)) push(r); } |
this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= | a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, | this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length= |
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget); n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType=== | "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= | e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType=== |
this._indexQueries(ctx); this._lookup(ctx, callback); | this._lookup(this._indexQueries(ctx), ctx, callback); | query: function (ctx, callback) { if (!this._dict) { Logger.error("dict not yet loaded."); return; } this._indexQueries(ctx); this._lookup(ctx, callback); }, |
this._dummyQuery(ctx, callback); | var seg = ctx._segmentation; var maxKeywordLength = ctx.schema.maxKeywordLength; var maxKeyLength = ctx.schema.maxKeyLength; var indexingLevel = this._dict.indexingLevel; var queries = {}; var registerQuery = function (r) { Logger.debug("registerQuery: [" + r.start + ", " + r.end + ") " + r.ikey); var index = r.ikey.slice(0, indexingLevel).join("_"); if (queries[index]) queries[index].push(r); else queries[index] = [r]; }; var q = []; for (var i = 0; i < seg.b.length; ++i) { var s = []; for (var j = i + 1; j < seg.b.length && b[j] - b[i] <= maxKeywordLength; ++j) { var kw = seg.a[b[j]][b[i]]; if (kw) { var r = {ikey: [kw], start: b[i], end: b[j]}; registerQuery(r); if (r.ikey.length < maxKeyLength) s.push(r); $.each(q, function (k, e) { if (e.end == b[i]) { r = {ikey: e.ikey.concat([kw]), start: e.start, end: b[j]}; registerQuery(r); if (r.ikey.length < maxKeyLength) s.push(r); } }); } } q = q.concat(s); } q = undefined; | query: function (ctx, callback) { // TODO: this._dummyQuery(ctx, callback); }, |
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this, a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a, | a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, | a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a, |
TBRL.Service.open(tab, req.content); | TBRL.Popup.open(tab, req.content); | quick: function(req, sender, func){ getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); }); func({}); }, |
func({}); | quick: function(req, sender, func){ getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); func({}); }); }, |
|
func({}); | quick: function(req, sender, func){ getSelected().addCallback(function(tab){ TBRL.Service.open(tab, req.content); func({}); }); }, |
|
callLater(0.1, Form.resize); | callLater(0.5, Form.resize); | quote: function(){ var ps = this.ps; var title = this.savers['item'] = this.title = new Title(ps, true); var link = this.savers['itemUrl'] = this.link = new Link(ps, true); var body = this.savers['body'] = this.body = new Body(ps); var tags = this.savers['tags'] = this.tags = new Tags(ps, true); var desc = this.savers['description'] = this.desc = new Desc(ps, true); this.toggles = [title, link, tags, desc]; body.focus(); callLater(0.1, Form.resize); }, |
maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) | var ctx = TBRL.createContext(); var ext = (Extractors.Quote.check(ctx))? Extractors.Quote : Extractors.Text; maybeDeferred(ext.extract(ctx)) | quote: function(ev){ maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); }, |
return maybeDeferred(Extractors.Photo.extract(TBRL.createContext())) | return maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) | quote: function(ev){ return maybeDeferred(Extractors.Photo.extract(TBRL.createContext())) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); }, |
return maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) | maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) | quote: function(ev){ return maybeDeferred(Extractors.Quote.extract(TBRL.createContext())) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); }, |
maybeDeferred(ext.extract(ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); | return TBRL.share(ctx, ext, true); | quote: function(ev){ var ctx = TBRL.createContext(); var ext = (Extractors.Quote.check(ctx))? Extractors.Quote : Extractors.Text; maybeDeferred(ext.extract(ctx)) .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }); }, |
function quote(q, list, map) { map = map || Commands.quoteMap; let re = RegExp("[" + list + "]", "g"); let res = function (str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; res.list = list; return res; }; | function quote(str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; | function quote(q, list, map) { map = map || Commands.quoteMap; let re = RegExp("[" + list + "]", "g"); let res = function (str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; res.list = list; return res; }; |
function quote(q, list) { | function quote(q, list, map) { map = map || Commands.quoteMap; | function quote(q, list) { let re = RegExp("[" + list + "]", "g"); let res = function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q; res.list = list; return res; }; |
let res = function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q; | let res = function (str) q + String.replace(str, re, function ($0) $0 in map ? map[$0] : ("\\" + $0)) + q; | function quote(q, list) { let re = RegExp("[" + list + "]", "g"); let res = function (str) q + String.replace(str, re, function ($0) $0 in Commands.quoteMap ? Commands.quoteMap[$0] : ("\\" + $0)) + q; res.list = list; return res; }; |
return F?F.indent+indentUnit:0}}function h(){return a(j,h)}function j(B,D){if(D=="<")c(l,u,r(z==1));else if(D=="</")c(m,d(">"));else{if(B=="xml-cdata"){if(!E||E.name!="!cdata")f("!cdata");if(/\]\]>$/.test(D))E=E.prev}else N.hasOwnProperty(B)||b();c()}}function l(B,D){if(B=="xml-name"){H=D.toLowerCase();A.style="xml-tagname";c()}else{H=null;a()}}function m(B,D){if(B=="xml-name"){A.style="xml-tagname";if(E&&D.toLowerCase()==E.name)E=E.prev;else b()}c()}function r(B){return function(D,G){if(G=="/>"|| G==">"&&k.autoSelfClosers.hasOwnProperty(H))c();else if(G==">"){f(H,B);c()}else{b();c(arguments.callee)}}}function u(B){if(B=="xml-name"){A.style="xml-attname";c(w,u)}else a()}function w(B,D){if(D=="=")c(x);else D==">"||D=="/>"?a(r):a()}function x(B){B=="xml-attribute"?c(x):a()}var y=o(q),A,v=[h],z=0,L=0,H=null,E=null,O,N={"xml-text":true,"xml-entity":true,"xml-comment":true,"xml-processing":true,"xml-doctype":true};return{indentation:function(){return L},next:function(){A=y.next();if(A.style=="whitespace"&& | r=f.addEventHandler(f,"resize",h,true);x=function(){o();r();if(k.updateNumbers==h)k.updateNumbers=null};h()}function g(){function h(n,z){q||(q=j.appendChild(document.createElement("DIV")));H&&H(q,z,n);t.push(q);t.push(n);A=q.offsetHeight+q.offsetTop;q=q.nextSibling}function o(){for(var n=0;n<t.length;n+=2)t[n].innerHTML=t[n+1];t=[]}function r(){if(!(!j.parentNode||j.parentNode!=k.lineNumbers)){for(var n=(new Date).getTime()+k.options.lineNumberTime;l;){for(h(B++,l.previousSibling);l&&!f.isBR(l);l= l.nextSibling)for(var z=l.offsetTop+l.offsetHeight;j.offsetHeight&&z-3>A;)h(" ");if(l)l=l.nextSibling;if((new Date).getTime()>n){o();u=setTimeout(r,k.options.lineNumberDelay);return}}for(;q;)h(B++);o();b()}}function v(n){b();c(n);l=p.firstChild;q=j.firstChild;A=0;B=k.options.firstLineNumber;r()}function w(){u&&clearTimeout(u);if(k.editor.allClean())v();else u=setTimeout(w,200)}var l,q,B,A,t=[],H=k.options.styleNumbers;v(true);var u=null;k.updateNumbers=w;var J=f.addEventHandler(f,"scroll",b, | return F?F.indent+indentUnit:0}}function h(){return a(j,h)}function j(B,D){if(D=="<")c(l,u,r(z==1));else if(D=="</")c(m,d(">"));else{if(B=="xml-cdata"){if(!E||E.name!="!cdata")f("!cdata");if(/\]\]>$/.test(D))E=E.prev}else N.hasOwnProperty(B)||b();c()}}function l(B,D){if(B=="xml-name"){H=D.toLowerCase();A.style="xml-tagname";c()}else{H=null;a()}}function m(B,D){if(B=="xml-name"){A.style="xml-tagname";if(E&&D.toLowerCase()==E.name)E=E.prev;else b()}c()}function r(B){return function(D,G){if(G=="/>"||G==">"&&k.autoSelfClosers.hasOwnProperty(H))c();else if(G==">"){f(H,B);c()}else{b();c(arguments.callee)}}}function u(B){if(B=="xml-name"){A.style="xml-attname";c(w,u)}else a()}function w(B,D){if(D=="=")c(x);else D==">"||D=="/>"?a(r):a()}function x(B){B=="xml-attribute"?c(x):a()}var y=o(q),A,v=[h],z=0,L=0,H=null,E=null,O,N={"xml-text":true,"xml-entity":true,"xml-comment":true,"xml-processing":true,"xml-doctype":true};return{indentation:function(){return L},next:function(){A=y.next();if(A.style=="whitespace"&& |
n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType=== | "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e= | n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType=== |
readerPostProcess = null; | read: function (aMsg, aCallback, aUserArg, aCollection, aInitialInput, aInitialCount, aGroup) { if (!promptbox) return; if (currentCallback) { modules.display.echoStatusBar("Prompt is already used by another command"); return; } savedFocusedElement = window.document.commandDispatcher.focusedElement || window.content.window; type = TYPE_READ; // set up history readerSetupHistory(aGroup); // set up completion readerState = READER_ST_NEUT; readerCurrentCompleter = completer.matcher.header(aCollection); // set up callbacks currentCallback = aCallback; currentUserArg = aUserArg; // display prompt box label.value = aMsg; textbox.value = aInitialInput || ""; self.editModeEnabled = false; promptbox.hidden = false; // do not set selection value till textbox appear (cause crash) textbox.selectionStart = textbox.selectionEnd = 0; // now focus to the input area textbox.focus(); readerKeymap = actionKeys["read"]; // add event listener textbox.addEventListener('keypress', handleKeyPressRead, false); textbox.addEventListener('keyup', handleKeyUpRead, false); listbox.addEventListener('click', modules.util.stopEventPropagation, true); // listbox.addEventListener('mousedown', handleMouseDownRead, true); eventListenerRemover = function () { textbox.removeEventListener('keypress', handleKeyPressRead, false); textbox.removeEventListener('keyup', handleKeyUpRead, false); listbox.removeEventListener('click', modules.util.stopEventPropagation, true); // listbox.removeEventListener('mousedown', handleMouseDownRead, true); }; modules.display.echoStatusBar(modules.util.getLocaleString("promptKeyDescription")); modules.display.echo.close(); }, |
|
readAttribute: function(element, name) { element = $(element); if (Prototype.Browser.IE) { var t = Element._attributeTranslations.read; if (t.values[name]) return t.values[name](element, name); if (t.names[name]) name = t.names[name]; if (name.include(':')) { return (!element.attributes || !element.attributes[name]) ? null : element.attributes[name].value; } } return element.getAttribute(name); }, | 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])*?\*\ | readAttribute: function(element, name) { element = $(element); if (Prototype.Browser.IE) { var t = Element._attributeTranslations.read; if (t.values[name]) return t.values[name](element, name); if (t.names[name]) name = t.names[name]; if (name.include(':')) { return (!element.attributes || !element.attributes[name]) ? null : element.attributes[name].value; } } return element.getAttribute(name); }, |
for (let [i, line] in iter) if (line === end) return res.join("\n"); else res.push(line); | try { while (true) let ([i, line] = iter.next()) { if (line === end) return res.join("\n"); res.push(line); } } catch (e if e instanceof StopIteration) {} | this.readHeredoc = function (end) { let res = []; for (let [i, line] in iter) if (line === end) return res.join("\n"); else res.push(line); dactyl.assert(false, "Unexpected end of file waiting for " + end); }; |
jQuery('.atd-ajax-load').css('height','0'); | ready: function(errorCount) { /* this function is called when the AtD async service request has finished. this is a good time to allow the user to click the spell check/edit text link again. */ options['link'].unbind('click', disableClick); }, |
|
})(win || window.content); | })(win || content); | (function rec(frame) { if (frame.document.body instanceof HTMLBodyElement) frames.push(frame); Array.forEach(frame.frames, rec); })(win || window.content); |
let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); | let pageRange = RangeFind.nodeRange(doc.body || doc.documentElement.lastChild); | function rec(win) { let doc = win.document; let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); backup = backup || pageRange; let pageStart = RangeFind.endpoint(pageRange, true); let pageEnd = RangeFind.endpoint(pageRange, false); for (let frame in util.Array.itervalues(win.frames)) { let range = doc.createRange(); range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } pushRange(pageStart, pageEnd); } |
range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); | if (util.computedStyle(frame.frameElement).visibility == "visible") { range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } | function rec(win) { let doc = win.document; let pageRange = doc.createRange(); pageRange.selectNode(doc.body || doc.documentElement.lastChild); backup = backup || pageRange; let pageStart = RangeFind.endpoint(pageRange, true); let pageEnd = RangeFind.endpoint(pageRange, false); for (let frame in util.Array.itervalues(win.frames)) { let range = doc.createRange(); range.selectNode(frame.frameElement); pushRange(pageStart, RangeFind.endpoint(range, true)); pageStart = RangeFind.endpoint(range, false); rec(frame); } pushRange(pageStart, pageEnd); } |
setTimeout(withErrorHandler(passInputToPageSpeedModule), 700); | var timesTried = 0; var tryPassingInput = function () { try { pagespeed_module.appendInput(''); } catch (e) { ++timesTried; if (timesTried >= 20) { throw e; } setTimeout(withErrorHandler(tryPassingInput), 100); return; } passInputToPageSpeedModule(); }; tryPassingInput(); | function receiveInput(response) { if (!response) { throw new Error('No response to getInput request.'); } // Load the Page Speed NaCl module. var pagespeed_module = document.createElement('embed'); pagespeed_module.setAttribute('name', 'nacl_module'); pagespeed_module.setAttribute('width', 0); pagespeed_module.setAttribute('height', 0); var nexes = ('x86-32: ' + chrome.extension.getURL('pagespeed_ia32.nexe') + '\nx86-64: ' + chrome.extension.getURL('pagespeed_x64.nexe') + '\nARM: ' + chrome.extension.getURL('pagespeed_arm.nexe')); pagespeed_module.setAttribute('nexes', nexes); pagespeed_module.setAttribute('type', 'application/x-nacl-srpc'); // Add the module to the body so that the NaCl module will load. // TODO(mdsteele): Find a way to load the module without modifying the body. var body = document.getElementsByTagName('body')[0]; body.appendChild(pagespeed_module); var passInputToPageSpeedModule = function () { // Feed the HAR data into the NaCl module. We have to do this a piece at a // time, because SRPC currently can't handle strings larger than one or two // dozen kilobytes. var har_string = JSON.stringify(response.har); var har_length = har_string.length; var kChunkSize = 8192; for (var start = 0; start < har_length; start += kChunkSize) { pagespeed_module.appendInput(har_string.substr(start, kChunkSize)); } // Run the rules. pagespeed_module.runPageSpeed(document, response.analyze); // Get the result data back from the NaCl module. Again, this must be done // a piece at a time. var output_chunks = []; while (true) { var piece = pagespeed_module.readMoreOutput(); if (typeof(piece) !== 'string') { break; } output_chunks.push(piece); } var output_string = output_chunks.join(''); // Take the module back out of the body. body.removeChild(pagespeed_module); // Send the results back to the extension. chrome.extension.sendRequest({ kind: 'putResults', results: { analyze: response.analyze, results: JSON.parse(output_string) } }); }; // We mustn't call passInputToPageSpeedModule() until the NaCl module has // loaded, so give it a little time to load before we try. // TODO(mdsteele): Find a less fragile way to deal with this issue. setTimeout(withErrorHandler(passInputToPageSpeedModule), 700);} |
recordDidChange: function() { | recordDidChange: function(key) { | recordDidChange: function() { if (this._parentRecord && this._parentRecord.recordDidChange) { this._parentRecord.recordDidChange(); } else{ sc_super(); } }, |
this._parentRecord.recordDidChange(); | this._parentRecord.recordDidChange(key); | recordDidChange: function() { if (this._parentRecord && this._parentRecord.recordDidChange) { this._parentRecord.recordDidChange(); } else{ sc_super(); } }, |
recursivelyCollect: function(element, property) { element = $(element); var elements = []; while (element = element[property]) if (element.nodeType == 1) elements.push(Element.extend(element)); return elements; }, | 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])*?\*\ | recursivelyCollect: function(element, property) { element = $(element); var elements = []; while (element = element[property]) if (element.nodeType == 1) elements.push(Element.extend(element)); return elements; }, |
UndoHistory.prototype={scheduleCommit:function(){var i=this;this.parent.clearTimeout(this.commitTimeout);this.commitTimeout=this.parent.setTimeout(function(){i.tryCommit()},this.commitDelay)},touch:function(i){this.setTouched(i);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var i=this.history.pop();this.redoHistory.push(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},redo:function(){this.commit();if(this.redoHistory.length){var i=this.redoHistory.pop(); this.addUndoLevel(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},clear:function(){this.history=[];this.redoHistory=[]},historySize:function(){return{undo:this.history.length,redo:this.redoHistory.length}},push:function(i,p,k){for(var n=[],o=0;o<k.length;o++){var q=o==k.length-1?p:this.container.ownerDocument.createElement("BR");n.push({from:i,to:q,text:cleanText(k[o])});i=q}this.pushChains([n],i==null&&p==null);this.notifyEnvironment()},pushChains:function(i,p){this.commit(p); | 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= | UndoHistory.prototype={scheduleCommit:function(){var i=this;this.parent.clearTimeout(this.commitTimeout);this.commitTimeout=this.parent.setTimeout(function(){i.tryCommit()},this.commitDelay)},touch:function(i){this.setTouched(i);this.scheduleCommit()},undo:function(){this.commit();if(this.history.length){var i=this.history.pop();this.redoHistory.push(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},redo:function(){this.commit();if(this.redoHistory.length){var i=this.redoHistory.pop();this.addUndoLevel(this.updateTo(i,"applyChain"));this.notifyEnvironment();return this.chainNode(i)}},clear:function(){this.history=[];this.redoHistory=[]},historySize:function(){return{undo:this.history.length,redo:this.redoHistory.length}},push:function(i,p,k){for(var n=[],o=0;o<k.length;o++){var q=o==k.length-1?p:this.container.ownerDocument.createElement("BR");n.push({from:i,to:q,text:cleanText(k[o])});i=q}this.pushChains([n],i==null&&p==null);this.notifyEnvironment()},pushChains:function(i,p){this.commit(p); |
refresh: function() { if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } | 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])*?\*\ | refresh: function() { // extend methods for all tags (Safari doesn't need this) if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } |
this.Data.noreload = false; | this.refresh_Change = function(el) { var thisRef = this; this.Data.refresh = parseInt($(el).val()); try { clearInterval(this.intervalID); } finally {} if (this.Data.refresh > 0) this.intervalID = setInterval( function() {thisRef.viewUpdater()}, (this.Data.refresh*1000)); //this.Data.noreload = true; //$('.tablePlus').attr('src', 'media/images/table_plus.png'); //this.Data.or = []; this.setupURL(); }; |
|
$('previewpage').options[x]=new Option(x+' of '+(pagecount-1),x,selected,selected); | $('previewpage').options[x]=new Option(x+'/'+(pagecount-1),x,selected,selected); | function refreshIt(pagecount) { document.previewimage.src = contactsheet_previewimage_prefix+'/tmp/contactsheet.jpg?'+ Math.random(); if (pagecount>1){ $('previewPageOptions').style.display='block'; // display selector pagecount++; curval=$('previewpage').value; $('previewpage').options.length=0; for (x=1;x<pagecount;x++){ selected=false; if (x==curval){selected=true;} $('previewpage').options[x]=new Option(x+' of '+(pagecount-1),x,selected,selected); } } else { $('previewPageOptions').style.display='none'; } $('previewpage').options[0]=null;} |
vals.splice((after? i+1 : i), 0).concat(defs); | vals.splice.apply(vals, [(after ? i+1 : i), 0].concat(defs)); | register : function(defs, target, after){ if(!defs) return; defs = [].concat(defs); if(target){ var vals = this.values; this.clear(); for(var i = 0, len = vals.length; i < len; ++i){ if(vals[i].name === target) break; } vals.splice((after? i+1 : i), 0).concat(defs); defs = vals; } defs.forEach(function(d){ this.list.push(d); this[d.name] = d; }, this); }, |
register: function(responder) { if (!this.include(responder)) this.responders.push(responder); }, | 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])*?\*\ | register: function(responder) { if (!this.include(responder)) this.responders.push(responder); }, |
element.select('.menuBox form').invoke('observe', 'submit', function(evt) { | element.select('.menuBox form:not(.notAJAX)').invoke('observe', 'submit', function(evt) { | registerAJAXEvents: function(element) { // change all anchor to AJAX behaviour element.select('a:not(.notAJAX)').invoke('observe', 'click', function(evt) { evt.preventDefault(); var anchor = Event.element(evt); var aHREF = anchor.readAttribute('href'); // check where to load AJAX content from loadcontainer attribute var ajaxContainer = anchor.readAttribute('loadcontainer'); if (!ajaxContainer) { ajaxContainer = 'mainContent'; } // check if link have postdata attribute var postData = anchor.readAttribute('postdata'); if (postData) { setContent(ajaxContainer, aHREF, 'post', postData); } else { setContent(ajaxContainer, aHREF, 'get'); } }); // change all search form submit behaviour to AJAX element.select('.editFormLink').invoke('observe', 'click', function(evt) { evt.stop(); var button = Event.element(evt); var theForm = button.up('form'); theForm.enable(); }); // change all search form submit behaviour to AJAX element.select('.menuBox form').invoke('observe', 'submit', function(evt) { evt.preventDefault(); var theForm = Event.element(evt); var formAction = theForm.readAttribute('action'); var formMethod = theForm.readAttribute('method'); var formData = theForm.serialize(); setContent('mainContent', formAction, formMethod, formData); }); return element; } |
registerCallback: function() { this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); }, | 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])*?\*\ | registerCallback: function() { this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); }, |
registerFormCallbacks: function() { Form.getElements(this.element).each(this.registerCallback, this); }, | 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])*?\*\ | registerFormCallbacks: function() { Form.getElements(this.element).each(this.registerCallback, this); }, |
callLater(0.1, Form.resize); | callLater(0.5, Form.resize); | regular: function(){ var ps = this.ps; var title = this.savers['item'] = this.title = new Title(ps, true); var tags = this.savers['tags'] = this.tags = new Tags(ps, true); var desc = this.savers['description'] = this.desc = new Desc(ps); this.toggles = [title, tags]; desc.focus(); callLater(0.1, Form.resize); }, |
10)}},replaceRange:function(a,b,d){d=i(d);d[0]=this.history.textAfter(a.node).slice(0,a.offset)+d[0];var f=d[d.length-1];d[d.length-1]=f+this.history.textAfter(b.node).slice(b.offset);b=this.history.nodeAfter(b.node);this.history.push(a.node,b,d);return{node:this.history.nodeBefore(b),offset:f.length}},getSearchCursor:function(a,b,d){return new q(this,a,b,d)},reindent:function(){this.container.firstChild&&this.indentRegion(null,this.container.lastChild)},reindentSelection:function(a){if(select.somethingSelected()){var b= | 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, | 10)}},replaceRange:function(a,b,d){d=i(d);d[0]=this.history.textAfter(a.node).slice(0,a.offset)+d[0];var f=d[d.length-1];d[d.length-1]=f+this.history.textAfter(b.node).slice(b.offset);b=this.history.nodeAfter(b.node);this.history.push(a.node,b,d);return{node:this.history.nodeBefore(b),offset:f.length}},getSearchCursor:function(a,b,d){return new q(this,a,b,d)},reindent:function(){this.container.firstChild&&this.indentRegion(null,this.container.lastChild)},reindentSelection:function(a){if(select.somethingSelected()){var b= |
10)}},replaceRange:function(a,b,d){d=i(d);d[0]=this.history.textAfter(a.node).slice(0,a.offset)+d[0];var f=d[d.length-1];d[d.length-1]=f+this.history.textAfter(b.node).slice(b.offset);b=this.history.nodeAfter(b.node);this.history.push(a.node,b,d);return{node:this.history.nodeBefore(b),offset:f.length}},getSearchCursor:function(a,b,d){return new q(this,a,b,d)},reindent:function(){this.container.firstChild&&this.indentRegion(null,this.container.lastChild)},reindentSelection:function(a){if(select.somethingSelected()){var b= select.selectionTopNode(this.container,true),d=select.selectionTopNode(this.container,false);b===false||d===false||this.indentRegion(b,d,a)}else this.indentAtCursor(a)},grabKeys:function(a,b){this.frozen=a;this.keyFilter=b},ungrabKeys:function(){this.frozen="leave"},setParser:function(a,b){e.Parser=window[a];(b=b||this.options.parserConfig)&&e.Parser.configure&&e.Parser.configure(b);if(this.container.firstChild){forEach(this.container.childNodes,function(d){if(d.nodeType!=3)d.dirty=true});this.addDirtyNode(this.firstChild); | 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, | 10)}},replaceRange:function(a,b,d){d=i(d);d[0]=this.history.textAfter(a.node).slice(0,a.offset)+d[0];var f=d[d.length-1];d[d.length-1]=f+this.history.textAfter(b.node).slice(b.offset);b=this.history.nodeAfter(b.node);this.history.push(a.node,b,d);return{node:this.history.nodeBefore(b),offset:f.length}},getSearchCursor:function(a,b,d){return new q(this,a,b,d)},reindent:function(){this.container.firstChild&&this.indentRegion(null,this.container.lastChild)},reindentSelection:function(a){if(select.somethingSelected()){var b=select.selectionTopNode(this.container,true),d=select.selectionTopNode(this.container,false);b===false||d===false||this.indentRegion(b,d,a)}else this.indentAtCursor(a)},grabKeys:function(a,b){this.frozen=a;this.keyFilter=b},ungrabKeys:function(){this.frozen="leave"},setParser:function(a,b){e.Parser=window[a];(b=b||this.options.parserConfig)&&e.Parser.configure&&e.Parser.configure(b);if(this.container.firstChild){forEach(this.container.childNodes,function(d){if(d.nodeType!=3)d.dirty=true});this.addDirtyNode(this.firstChild); |
relativize: function(element) { Position.prepare(); return Element.relativize(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])*?\*\ | relativize: function(element) { Position.prepare(); return Element.relativize(element); }, |
if(!this._invalidIndexes) return this; | reload: function(indexes) { // for some reason this can be called before init... which doesn't work if(!this._invalidIndexes) return this; // just calling reload with no arg means reload EVERYTHING if(SC.none(indexes)) { this.invalidate(0, this._SCCFP_oldLength); // otherwise only reload what is necessary } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeLast(this.reloadIfNeeded); return this ; }, |
|
this.invalidate(0, this._SCCFP_oldLength); | var i, len = this._indexMap.length; for(i = 0; i < len; i++) this.invalidate(i); | reload: function(indexes) { // for some reason this can be called before init... which doesn't work if(!this._invalidIndexes) return this; // just calling reload with no arg means reload EVERYTHING if(SC.none(indexes)) { this.invalidate(0, this._SCCFP_oldLength); // otherwise only reload what is necessary } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeLast(this.reloadIfNeeded); return this ; }, |
} else if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); | reload: function(indexes) { // for some reason this can be called before init... which doesn't work if(!this._invalidIndexes) return this; // just calling reload with no arg means reload EVERYTHING if(SC.none(indexes)) { this.invalidate(0, this._SCCFP_oldLength); // otherwise only reload what is necessary } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeLast(this.reloadIfNeeded); return this ; }, |
|
if(indexes) { | if(!SC.none(indexes)) { | reload: function(indexes) { if(indexes) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
console.log("stuff changed", indexes); | reload: function(indexes) { if(indexes) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
|
console.log("stuff changed", indexes); | reload: function(indexes) { console.log("stuff changed", indexes); if(indexes) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
|
if(!SC.none(indexes)) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } | if(!this._invalidIndexes) return this; | reload: function(indexes) { if(!SC.none(indexes)) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); | if(SC.none(indexes)) { this.invalidate(0, this.getPath('content.length')); } else { this.invalidate(indexes); | reload: function(indexes) { if(!SC.none(indexes)) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
if (this.get('isVisibleInWindow')) this.invokeLast(this.reloadIfNeeded); | reload: function(indexes) { if(!SC.none(indexes)) { if(indexes.isIndexSet) { indexes.forEach(this.invalidate, this); } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeOnce(this.reloadIfNeeded); } return this ; }, |
|
this.invalidate(0, this.getPath('content.length')); | this.invalidate(0, this._SCCFP_oldLength); | reload: function(indexes) { // for some reason this can be called before init... which doesn't work if(!this._invalidIndexes) return this; // just calling reload with no arg means reload EVERYTHING if(SC.none(indexes)) { // TODO: make this use the old length this.invalidate(0, this.getPath('content.length')); // otherwise only reload what is necessary } else { this.invalidate(indexes); } if (this.get('isVisibleInWindow')) this.invokeLast(this.reloadIfNeeded); return this ; }, |
invalid, view; | view; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid, view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
if(!content || !this.get('isVisibleInWindow')) return; | if(!this.get('isVisibleInWindow')) return; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid, view; if(!content || !this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.get('length'); // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { view = pendingRemovals.pop(); view = this.updateView(view); if(view) this.sendToDOMPool(view); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
if(!this._indexMap[index]) debugger; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } if(scrollOnly) { // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; } // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
this.maxShowing = 0; this.minShowing = clen; | this._maxShowing = 0; this._minShowing = clen; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) throw "cannot pull null view"; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) throw "cannot pull null view"; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
|
this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; | for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) throw "cannot pull null view"; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; | if(!scrollOnly) { this.contentLengthDidChange(); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) throw "cannot pull null view"; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
if(!content) return; | if(!content || !this.get('isVisibleInWindow')) return; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; } // scrolling updates if(scrollOnly) { this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; } | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; } // scrolling updates if(scrollOnly) { this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
|
if(!scrollOnly) { | if(curShowing.length === 0 || !scrollOnly) { | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; } // scrolling updates if(scrollOnly) { this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
invalid; | invalid, view; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content || !this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.get('length'); // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
this.sendToDOMPool(pendingRemovals.pop()); | view = pendingRemovals.pop(); view = this.updateView(view); if(view) this.sendToDOMPool(view); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content || !this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.get('length'); // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
if(!this._indexMap[index]) debugger; | if(!this._indexMap[index]) throw "cannot pull null view"; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), clen = content ? content.get('length') : 0, curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = clen; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them while(view = pendingRemovals.pop()) { view = this.updateView(view); if(view) this.sendToDOMPool(view); } // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates // reset the pointer into the list so background insertions go to the back correctly if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap // TODO: determine if we actually need to keep these values seperately this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // if the content length changed we need to relayout // TODO: hook this into collectionview's _cv_contentDidChange if(this._SCCFP_oldLength !== clen) { var layout = this.computeLayout(); if (layout) this.adjust(layout); this._SCCFP_oldLength = clen; } }, |
this.minShowing = content.length; | this.minShowing = content.get('length'); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content || !this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; | if(scrollOnly) { shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; | this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
if(!shouldBeShowing.contains(index)) { pendingRemovals.push(this._indexMap[index]); | if(!shouldBeShowing.contains(index)) { pendingRemovals.push(this._indexMap[index]); } | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } pendingRemovals.length = 0; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
if(curShowing.length === 0 || !scrollOnly) { | len = content.get('length'); if(this._SCCFP_oldLength !== len) { | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid, view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.get('length'); // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { view = pendingRemovals.pop(); view = this.updateView(view); if(view) this.sendToDOMPool(view); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
this._SCCFP_oldLength = len; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid, view; if(!this.get('isVisibleInWindow')) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.get('length'); // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { scrollOnly = YES; // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { view = pendingRemovals.pop(); view = this.updateView(view); if(view) this.sendToDOMPool(view); } // just to be sure pendingRemovals.length = 0; // also check for adds len = shouldBeShowing.length; for(i = 0; i < len; i++) { if(!curShowing.contains(shouldBeShowing[i])) scrollOnly = YES; } // scrolling updates if(scrollOnly) { for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } } // do these no matter what // we reset these even on non-scrolling updates because data might have been loaded from the server and checking if views exist is cheap this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); // we want to make sure we do this on the first render if(curShowing.length === 0 || !scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); } }, |
|
if (this.willReload) this.willReload(invalid === YES ? null : invalid); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } if(scrollOnly) { // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; } // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; nowShowing.forEach(this.processNowShowing, this); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } if(scrollOnly) { // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; } // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; if(!shouldBeShowing.contains(index)) { if(!this._indexMap[index]) debugger; pendingRemovals.push(this._indexMap[index]); } } len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } pendingRemovals.length = 0; | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } if(scrollOnly) { // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; } // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
if (this.didReload) this.didReload(invalid === YES ? null : invalid); | reloadIfNeeded: function(nowShowing, scrollOnly) { var content = this.get('content'), curShowing = this._curShowing, shouldBeShowing = this._shouldBeShowing, i, len, index, pendingRemovals = this._pendingRemovals || (this._pendingRemovals = []), invalid; if(!content) return; // we use the nowShowing to determine what should and should not be showing. if (!nowShowing || !nowShowing.isIndexSet) nowShowing = this.get('nowShowing'); if (!scrollOnly) { invalid = this._invalidIndexes; if (!invalid || !this.get('isVisibleInWindow')) return this; if (this.willReload) this.willReload(invalid === YES ? null : invalid); } if(scrollOnly) { // scrolling updates shouldBeShowing.clear(); this.maxShowing = 0; this.minShowing = content.length; // we need to be able to iterate nowshowing more easily, so copy it into a coreset nowShowing.forEach(this.processNowShowing, this); this.topBackground = this.maxShowing; this.bottomBackground = this.minShowing; for(var pool in this._domPools) { this._domPools[pool]._lastRendered = null; } // find the indices that arent showing any more and pool them len = curShowing.length; for(i = 0; i < len; i++) { index = curShowing[i]; // remove and send to the pool if(!shouldBeShowing.contains(index)) { // not sure what's causing this... it's either a view being pooled twice, something being put in curshowing without being mapped, or something being unmapped without being removed from curshowing // or if something was (un)mapped with the wrong contentIndex assigned if(!this._indexMap[index]) debugger; // need to use a seperate array to remove after iterating due to the way coreset handles removals pendingRemovals.push(this._indexMap[index]); } } // now actually queue them len = pendingRemovals.length; for(i = 0;i < len; i++) { this.sendToDOMPool(pendingRemovals.pop()); } // just to be sure pendingRemovals.length = 0; } // adds ourself to the incremental renderer and stops any background rendering this.incrementalRenderer.add(this); // add ourself to be background rendered; it won't actually start until it's ready this.backgroundRenderer.add(this); if(!scrollOnly) { var layout = this.computeLayout(); if (layout) this.adjust(layout); if (this.didReload) this.didReload(invalid === YES ? null : invalid); } }, |
|
count = Math.max(count, 1); | count = count || 1; | remove: function (tab, count, focusLeftTab, quitOnLastTab) { count = Math.max(count, 1); if (quitOnLastTab >= 1 && this.count <= count) { if (dactyl.windows.length > 1) window.close(); else dactyl.quit(quitOnLastTab == 2); return; } let tabs = this.visibleTabs; if (tabs.indexOf(tab) < 0) tabs = this.allTabs; let index = tabs.indexOf(tab); let next = index + (focusLeftTab ? -count : count); if (!(next in tabs)) next = index + (focusLeftTab ? 1 : -1); if (next in tabs) { this._alternates[0] = tabs[next]; config.tabbrowser.mTabContainer.selectedItem = tabs[next]; } if (focusLeftTab) tabs.slice(Math.max(0, index + 1 - count), index + 1).forEach(config.removeTab); else tabs.slice(index, index + count).forEach(config.removeTab); }, |
remove: function(classNameToRemove) { if (!this.include(classNameToRemove)) return; this.set($A(this).without(classNameToRemove).join(' ')); }, | elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1) elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];} | remove: function(classNameToRemove) { if (!this.include(classNameToRemove)) return; this.set($A(this).without(classNameToRemove).join(' ')); }, |
if (next in tabs) | if (next in tabs) { this._alternates[0] = tabs[next]; | remove: function (tab, count, focusLeftTab, quitOnLastTab) { count = Math.max(count, 1); if (quitOnLastTab >= 1 && this.count <= count) { if (dactyl.windows.length > 1) window.close(); else dactyl.quit(quitOnLastTab == 2); return; } let tabs = this.visibleTabs; if (tabs.indexOf(tab) < 0) tabs = this.allTabs; let index = tabs.indexOf(tab); let next = index + (focusLeftTab ? -count : count); if (!(next in tabs)) next = index + (focusLeftTab ? 1 : -1); if (next in tabs) config.tabbrowser.mTabContainer.selectedItem = tabs[next]; if (focusLeftTab) tabs.slice(Math.max(0, index + 1 - count), index + 1).forEach(config.removeTab); else tabs.slice(index, index + count).forEach(config.removeTab); }, |
} | remove: function (tab, count, focusLeftTab, quitOnLastTab) { count = Math.max(count, 1); if (quitOnLastTab >= 1 && this.count <= count) { if (dactyl.windows.length > 1) window.close(); else dactyl.quit(quitOnLastTab == 2); return; } let tabs = this.visibleTabs; if (tabs.indexOf(tab) < 0) tabs = this.allTabs; let index = tabs.indexOf(tab); let next = index + (focusLeftTab ? -count : count); if (!(next in tabs)) next = index + (focusLeftTab ? 1 : -1); if (next in tabs) config.tabbrowser.mTabContainer.selectedItem = tabs[next]; if (focusLeftTab) tabs.slice(Math.max(0, index + 1 - count), index + 1).forEach(config.removeTab); else tabs.slice(index, index + count).forEach(config.removeTab); }, |
|
this._showOverflow(); | if(this.get('isVisibleInWindow')) this._showOverflow(); | remove: function(){ this._showOverflow(); return sc_super(); }, |
d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex> | k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type= | d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex> |
len = this.length; | len = this.length, tmp; | remove: function(obj) { if (this.isFrozen) throw SC.FROZEN_ERROR; // Implementation note: SC.none() and SC.hashFor() are inlined because // sets are fundamental in SproutCore, and the inlined code is ~ 25% // faster than calling them "normally" in IE8. if (obj === null || obj === undefined) return this ; var hashFunc, guid = (obj && (hashFunc = obj.hash) && (typeof hashFunc === SC.T_FUNCTION)) ? hashFunc.call(obj) : SC.guidFor(obj), idx = this[guid], len = this.length; // not in set. // (SC.none is inlined for the reasons given above) if ((idx === null || idx === undefined) || (idx >= len) || (this[idx] !== obj)) return this; // clear the guid key delete this[guid]; // to clear the index, we will swap the object stored in the last index. // if this is the last object, just reduce the length. if (idx < (len-1)) { // we need to keep a reference to "obj" so we can alert others below; // so, no changing it. Instead, create a temporary variable. tmp = this[idx] = this[len-1]; guid = (tmp && (hashFunc = tmp.hash) && (typeof hashFunc === SC.T_FUNCTION)) ? hashFunc.call(tmp) : SC.guidFor(tmp); this[guid] = idx; } // reduce the length this.length = len-1; if (this.isObservable) this.enumerableContentDidChange(); if (this.setObservers) this.didRemoveItem(obj); return this ; }, |
el = $.id(el); if(el && el.parentNode) { el.parentNode.removeChild(el); | el = $.id(el); if(el && el.parentNode) { el.parentNode.removeChild(el); } | $.remove = function(el) { el = $.id(el); if(el && el.parentNode) { el.parentNode.removeChild(el); }} |
} | $.remove = function(el) { el = $.id(el); if(el && el.parentNode) { el.parentNode.removeChild(el); }} |
|
return; | return this; | removeClass: function(classNames) { var idx, len; if (arguments.length > 1) { len = arguments.length; for (idx = 0; idx < len; idx++) { this.addClass(arguments[idx]); } return; } if (typeof classNames === "string") classNames = classNames.split(' '); len = classNames.length; for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; } }, |
for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; } | this.classNames.removeEach(classNames); return this; | removeClass: function(classNames) { var idx, len; if (arguments.length > 1) { len = arguments.length; for (idx = 0; idx < len; idx++) { this.addClass(arguments[idx]); } return; } if (typeof classNames === "string") classNames = classNames.split(' '); len = classNames.length; for (idx = 0; idx < len; idx++) { this.classNames[classNames[idx]] = YES; } }, |
" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a, | i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ", " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className= | " "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a, |
removeClassName: function(element, className) { if (!(element = $(element))) return; element.className = element.className.replace( new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); 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])*?\*\ | removeClassName: function(element, className) { if (!(element = $(element))) return; element.className = element.className.replace( new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); return element; }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.