rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
function () { commandline.open(":", "winopen " + util.losslessDecodeURI(buffer.URL), modes.EX); }); | function () { commandline.open("", "winopen " + util.losslessDecodeURI(buffer.URL), modes.EX); }); | function () { commandline.open(":", "winopen " + util.losslessDecodeURI(buffer.URL), modes.EX); }); |
a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,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)})},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=== | a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,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, |
return function(id){ | var $ = (function(){ var hash = {}; return function(id){ | return function(id){ return hash[id] || document.getElementById(id); } |
})(); | return function(id){ return hash[id] || document.getElementById(id); } |
|
}).addErrback(function(e){ console.log(e); }); | .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ | }).addErrback(function(e){ console.log(e); }); |
if (arg || count > 0) { let index; if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } | if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); | function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; // count is ignored if an arg is specified, as per Vim if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, { |
index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); | dactyl.echoerr("E488: Trailing characters"); | function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; // count is ignored if an arg is specified, as per Vim if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, { |
tabs.select("+1", true); | tabs.select("-1", true); | function (args) { let count = args.count; let arg = args[0]; if (arg || count > 0) { let index; // count is ignored if an arg is specified, as per Vim if (arg) { dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else index = count - 1; if (index < tabs.count) tabs.select(index, true); else dactyl.beep(); } else tabs.select("+1", true); }, { |
$.each(data[q.ikey.join(" ")] || [], function (i, e) { | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } $.each(data[q.ikey.join(" ")] || [], function (i, e) { | $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); |
}); | $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); |
|
TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); | }, function(res){ }); | TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); |
this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); }); | Array.forEach(this.widgets.commandline.childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }, this); | this.registerCallback("complete", modes.PROMPT, function (context) { if (self._input.complete) context.fork("input", 0, commandline, self._input.complete); }); |
return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); | 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])*?\*\ | return (this.match(matchAll) || []).map(function(scriptTag) { return (scriptTag.match(matchOne) || ['', ''])[1]; }); |
var commitText = $.map(this._selected, function (e) { return e.text; }).join(""); | this._backend.query(this, function () { ctx._updateCandidates(ctx._predict()); }); | var commitText = $.map(this._selected, function (e) { return e.text; }).join(""); |
function () { commandline.open(":", "", modes.EX); }); | function () { commandline.open("", "", modes.EX); }); | function () { commandline.open(":", "", modes.EX); }); |
function () { dactyl.echoerr("E168: :finish used outside of a sourced file"); }, | function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; }, | function () { dactyl.echoerr("E168: :finish used outside of a sourced file"); }, |
function () { modes.push(modes.PASS_THROUGH); }); | function () { commandline.open(":", "", modes.EX); }); | function () { modes.push(modes.PASS_THROUGH); }); |
return res.responseText; | }).addCallback(function(res){ /* return map(function(s){ return ''+s.@title || ''+s; }, createXML(res.responseText).li.span); */ }); |
|
c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/, | "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== | c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/, |
Models.multipleTumblelogs.forEach(function(model){ Models.remove(model); }); | return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); | Models.multipleTumblelogs.forEach(function(model){ Models.remove(model); }); |
(function() { var timer; function fireContentLoadedEvent() { if (document.loaded) return; if (timer) window.clearInterval(timer); document.fire("dom:loaded"); document.loaded = true; } if (document.addEventListener) { if (Prototype.Browser.WebKit) { timer = window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); Event.observe(window, "load", fireContentLoadedEvent); } else { document.addEventListener("DOMContentLoaded", fireContentLoadedEvent, false); } } else { document.write("<script id=__onDOMContentLoaded defer src= $("__onDOMContentLoaded").onreadystatechange = function() { if (this.readyState == "complete") { this.onreadystatechange = null; fireContentLoadedEvent(); } }; } })(); | 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])*?\*\ | (function() { /* Support for the DOMContentLoaded event is based on work by Dan Webb, Matthias Miller, Dean Edwards and John Resig. */ var timer; function fireContentLoadedEvent() { if (document.loaded) return; if (timer) window.clearInterval(timer); document.fire("dom:loaded"); document.loaded = true; } if (document.addEventListener) { if (Prototype.Browser.WebKit) { timer = window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); Event.observe(window, "load", fireContentLoadedEvent); } else { document.addEventListener("DOMContentLoaded", fireContentLoadedEvent, false); } } else { document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>"); $("__onDOMContentLoaded").onreadystatechange = function() { if (this.readyState == "complete") { this.onreadystatechange = null; fireContentLoadedEvent(); } }; }})(); |
function () { buffer.showPageInfo(false); }) | function () { buffer.showPageInfo(false); }); | function () { buffer.showPageInfo(false); }) |
return res.responseText; | return res.channel.URI.spec; | }).addCallback(function(res){ return res.responseText; }); |
c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/, | g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== | c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/, |
timer = window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); | 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])*?\*\ | timer = window.setInterval(function() { if (/loaded|complete/.test(document.readyState)) fireContentLoadedEvent(); }, 0); |
return res.channel.URI.spec; | return res[url].shortUrl; | }).addCallback(function(res){ return res.channel.URI.spec; }); |
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), | "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; | c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), |
function(element, className) { className = className.toString().strip(); var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); return cond ? document._getElementsByXPath('. } : function(element, className) { | 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])*?\*\ | function(element, className) { className = className.toString().strip(); var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className); return cond ? document._getElementsByXPath('.//*' + cond, element) : []; } : function(element, className) { |
return res[url].shortUrl; | return res[hash].longUrl; | }).addCallback(function(res){ return res[url].shortUrl; }); |
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"), p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a); else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", | "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; | c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", |
} : function(element, className) { className = className.toString().strip(); var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); if (!classNames && !className) return elements; var nodes = $(element).getElementsByTagName('*'); className = ' ' + className + ' '; for (var i = 0, child, cn; child = nodes[i]; i++) { if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) || (classNames && classNames.all(function(name) { return !name.toString().blank() && cn.include(' ' + name + ' '); })))) elements.push(Element.extend(child)); } 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])*?\*\ | } : function(element, className) { className = className.toString().strip(); var elements = [], classNames = (/\s/.test(className) ? $w(className) : null); if (!classNames && !className) return elements; var nodes = $(element).getElementsByTagName('*'); className = ' ' + className + ' '; for (var i = 0, child, cn; child = nodes[i]; i++) { if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) || (classNames && classNames.all(function(name) { return !name.toString().blank() && cn.include(' ' + name + ' '); })))) elements.push(Element.extend(child)); } return elements; }; |
return res[hash].longUrl; | res = JSON.parse(res.responseText); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results; | }).addCallback(function(res){ return res[hash].longUrl; }); |
p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a); else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", | if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay"); | p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", |
}).addCallback(function(res){ res = JSON.parse(res.responseText); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results; }); | return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){ | }).addCallback(function(res){ res = JSON.parse(res.responseText); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results; }); |
else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", | "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)}, | else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle", |
if((ps.favorite && ps.favorite.name === m.name) || (m.check && m.check(ps))) | if((ps.favorite && ps.favorite.name === (m.typeName || m.name)) || (m.check && m.check(ps))) | return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === m.name) || (m.check && m.check(ps))) return true; }); |
return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){ | })).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); return text; }); | return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){ |
1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, | animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing= j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); | 1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, |
return Models.getPostConfig(config, m.name, ps) === 'default'; | return Models.getPostConfig(config, m.name, ps, m) === 'default'; | return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps) === 'default'; }); |
})).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ | zip(urls, ress).forEach(function(pair){ | })).addCallback(function(ress){ zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); return text; }); |
1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, | j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]); | 1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a, |
var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps); | var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps, m); | return this.check(ps).filter(function(m){ m.config = (m.config || {}); var val = m.config[ps.type] = Models.getPostConfig(config, m.name, ps); return val === undefined || /default|enabled/.test(val); }); |
zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); | return this.values.filter(function(m){ return (ps.favorite && ps.favorite.name === (m.typeName || m.name)) || (m.check && m.check(ps)); }); | zip(urls, ress).forEach(function(pair){ var url = pair[0], res = pair[1]; text = text.replace(url, res); }); |
model.typeName = 'Tumblr'; | return Tumblr.getTumblelogs().addCallback(function(blogs){ return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); }).addErrback(function(e){ |
|
return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === (m.typeName || m.name)) || (m.check && m.check(ps))) return true; | return this.check(ps).filter(function(m){ return Models.getPostConfig(config, m.name, ps, m) === 'default'; | return this.values.filter(function(m){ if((ps.favorite && ps.favorite.name === (m.typeName || m.name)) || (m.check && m.check(ps))) return true; }); |
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(), f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f= | this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== | null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f= |
model.typeName = 'Tumblr'; | return blogs.map(function(blog){ var model = update({}, Tumblr); model.name = 'Tumblr - ' + blog.name; addBefore(model, 'appendTags', function(form, ps){ form.channel_id = blog.id; }); Models.register(model, 'Tumblr', true); Models.multipleTumblelogs.push(model); return model; }); |
|
__iterator__: function () array.iterItems(this), | __iterator__: function () { let sorted = this._exCommands.sort(function (a, b) a.name > b.name); return array.iterValues(sorted); }, | __iterator__: function () array.iterItems(this), |
__iterator__: function () this._mappingsIterator([modes.NORMAL], this._main), | __iterator__: function () { let mode = modes.NORMAL; let seen = {}; for (let map in iterAll(values(this._user[mode]), values(this._main[mode]))) if (!set.add(seen, map.name)) yield map; }, | __iterator__: function () this._mappingsIterator([modes.NORMAL], this._main), |
this._updateStatusline(); | __reset: function () { if (!this._usedTabKey) { this._hintNumber = 0; this._updateStatusline(); } }, |
|
if (this.__continue && this._validHints.length <= 1) { this._hintString = ""; commandline.command = this._hintString; this._showHints(); } this._updateStatusline(); | __reset: function () { if (!this._usedTabKey) { this._hintNumber = 0; this._updateStatusline(); } }, |
|
currSel, itemList, menuControlSize, menuHeightPadding, customView, | value, itemList, menuControlSize, menuHeightPadding, customView, | _action: function( evt ) { var buttonLabel, menuWidth, scrollWidth, lastMenuWidth, offsetWidth, items, elementOffsetWidth, largestMenuWidth, item, element, idx, currSel, itemList, menuControlSize, menuHeightPadding, customView, customMenuView, menu, itemsLength; buttonLabel = this.$('.sc-button-label')[0] ; // Get the length of the text on the button in pixels menuWidth = this.get('layer').offsetWidth ; scrollWidth = buttonLabel.scrollWidth ; lastMenuWidth = this.get('lastMenuWidth') ; if(scrollWidth) { // Get the original width of the label in the button offsetWidth = buttonLabel.offsetWidth ; if(scrollWidth && offsetWidth) { menuWidth = menuWidth + scrollWidth - offsetWidth ; } } if (!lastMenuWidth || (menuWidth > lastMenuWidth)) { lastMenuWidth = menuWidth ; } items = this.get('_itemList') ; var customViewClassName = this.get('customViewClassName') ; var customViewMenuOffsetWidth = this.get('customViewMenuOffsetWidth') ; var className = 'sc-view sc-pane sc-panel sc-palette sc-picker sc-menu select-button sc-scroll-view sc-menu-scroll-view sc-container-view menuContainer sc-button-view sc-menu-item sc-regular-size' ; className = customViewClassName ? (className + ' ' + customViewClassName) : className ; SC.prepareStringMeasurement("", className); for (idx = 0, itemsLength = items.length; idx < itemsLength; ++idx) { //getting the width of largest menu item item = items.objectAt(idx) ; elementOffsetWidth = SC.measureString(item.title).width; if (!largestMenuWidth || (elementOffsetWidth > largestMenuWidth)) { largestMenuWidth = elementOffsetWidth ; } } SC.teardownStringMeasurement(); lastMenuWidth = (largestMenuWidth + this.menuItemPadding > lastMenuWidth) ? largestMenuWidth + this.menuItemPadding : lastMenuWidth ; // Get the window size width and compare with the lastMenuWidth. // If it is greater than windows width then reduce the maxwidth by 25px // so that the ellipsis property is enabled by default var maxWidth = SC.RootResponder.responder.get('currentWindowSize').width; if(lastMenuWidth > maxWidth) { lastMenuWidth = (maxWidth - 25) ; } this.set('lastMenuWidth',lastMenuWidth) ; currSel = this.get('_currentSelItem') ; itemList = this.get('_itemList') ; menuControlSize = this.get('controlSize') ; menuHeightPadding = this.get('menuPaneHeightPadding') ; // get the user defined custom view customView = this.get('exampleView') ; customMenuView = customView ? customView : SC.MenuItemView ; menu = SC.MenuPane.create({ /** Class name - select-button-item */ classNames: ['select-button'], /** The menu items are set from the itemList property of SelectButton @property */ items: itemList, /** Example view which will be used to create the Menu Items @default SC.MenuItemView @type SC.View */ exampleView: customMenuView, /** This property enables all the items and makes them selectable. @property */ isEnabled: YES, menuHeightPadding: menuHeightPadding, preferType: SC.PICKER_MENU, itemHeightKey: 'height', layout: { width: lastMenuWidth }, controlSize: menuControlSize, itemWidth: lastMenuWidth, contentView: SC.View.extend({ }) }) ; // no menu to toggle... bail... if (!menu) return NO ; menu.popup(this, this.preferMatrix) ; menu.set('currentSelectedMenuItem', currSel) ; return YES ; }, |
currSel = this.get('_currentSelItem') ; | value = this.get('value') ; | _action: function( evt ) { var buttonLabel, menuWidth, scrollWidth, lastMenuWidth, offsetWidth, items, elementOffsetWidth, largestMenuWidth, item, element, idx, currSel, itemList, menuControlSize, menuHeightPadding, customView, customMenuView, menu, itemsLength; buttonLabel = this.$('.sc-button-label')[0] ; // Get the length of the text on the button in pixels menuWidth = this.get('layer').offsetWidth ; scrollWidth = buttonLabel.scrollWidth ; lastMenuWidth = this.get('lastMenuWidth') ; if(scrollWidth) { // Get the original width of the label in the button offsetWidth = buttonLabel.offsetWidth ; if(scrollWidth && offsetWidth) { menuWidth = menuWidth + scrollWidth - offsetWidth ; } } if (!lastMenuWidth || (menuWidth > lastMenuWidth)) { lastMenuWidth = menuWidth ; } items = this.get('_itemList') ; var customViewClassName = this.get('customViewClassName') ; var customViewMenuOffsetWidth = this.get('customViewMenuOffsetWidth') ; var className = 'sc-view sc-pane sc-panel sc-palette sc-picker sc-menu select-button sc-scroll-view sc-menu-scroll-view sc-container-view menuContainer sc-button-view sc-menu-item sc-regular-size' ; className = customViewClassName ? (className + ' ' + customViewClassName) : className ; SC.prepareStringMeasurement("", className); for (idx = 0, itemsLength = items.length; idx < itemsLength; ++idx) { //getting the width of largest menu item item = items.objectAt(idx) ; elementOffsetWidth = SC.measureString(item.title).width; if (!largestMenuWidth || (elementOffsetWidth > largestMenuWidth)) { largestMenuWidth = elementOffsetWidth ; } } SC.teardownStringMeasurement(); lastMenuWidth = (largestMenuWidth + this.menuItemPadding > lastMenuWidth) ? largestMenuWidth + this.menuItemPadding : lastMenuWidth ; // Get the window size width and compare with the lastMenuWidth. // If it is greater than windows width then reduce the maxwidth by 25px // so that the ellipsis property is enabled by default var maxWidth = SC.RootResponder.responder.get('currentWindowSize').width; if(lastMenuWidth > maxWidth) { lastMenuWidth = (maxWidth - 25) ; } this.set('lastMenuWidth',lastMenuWidth) ; currSel = this.get('_currentSelItem') ; itemList = this.get('_itemList') ; menuControlSize = this.get('controlSize') ; menuHeightPadding = this.get('menuPaneHeightPadding') ; // get the user defined custom view customView = this.get('exampleView') ; customMenuView = customView ? customView : SC.MenuItemView ; menu = SC.MenuPane.create({ /** Class name - select-button-item */ classNames: ['select-button'], /** The menu items are set from the itemList property of SelectButton @property */ items: itemList, /** Example view which will be used to create the Menu Items @default SC.MenuItemView @type SC.View */ exampleView: customMenuView, /** This property enables all the items and makes them selectable. @property */ isEnabled: YES, menuHeightPadding: menuHeightPadding, preferType: SC.PICKER_MENU, itemHeightKey: 'height', layout: { width: lastMenuWidth }, controlSize: menuControlSize, itemWidth: lastMenuWidth, contentView: SC.View.extend({ }) }) ; // no menu to toggle... bail... if (!menu) return NO ; menu.popup(this, this.preferMatrix) ; menu.set('currentSelectedMenuItem', currSel) ; return YES ; }, |
menu.set('currentSelectedMenuItem', currSel) ; | _action: function( evt ) { var buttonLabel, menuWidth, scrollWidth, lastMenuWidth, offsetWidth, items, elementOffsetWidth, largestMenuWidth, item, element, idx, currSel, itemList, menuControlSize, menuHeightPadding, customView, customMenuView, menu, itemsLength; buttonLabel = this.$('.sc-button-label')[0] ; // Get the length of the text on the button in pixels menuWidth = this.get('layer').offsetWidth ; scrollWidth = buttonLabel.scrollWidth ; lastMenuWidth = this.get('lastMenuWidth') ; if(scrollWidth) { // Get the original width of the label in the button offsetWidth = buttonLabel.offsetWidth ; if(scrollWidth && offsetWidth) { menuWidth = menuWidth + scrollWidth - offsetWidth ; } } if (!lastMenuWidth || (menuWidth > lastMenuWidth)) { lastMenuWidth = menuWidth ; } items = this.get('_itemList') ; var customViewClassName = this.get('customViewClassName') ; var customViewMenuOffsetWidth = this.get('customViewMenuOffsetWidth') ; var className = 'sc-view sc-pane sc-panel sc-palette sc-picker sc-menu select-button sc-scroll-view sc-menu-scroll-view sc-container-view menuContainer sc-button-view sc-menu-item sc-regular-size' ; className = customViewClassName ? (className + ' ' + customViewClassName) : className ; SC.prepareStringMeasurement("", className); for (idx = 0, itemsLength = items.length; idx < itemsLength; ++idx) { //getting the width of largest menu item item = items.objectAt(idx) ; elementOffsetWidth = SC.measureString(item.title).width; if (!largestMenuWidth || (elementOffsetWidth > largestMenuWidth)) { largestMenuWidth = elementOffsetWidth ; } } SC.teardownStringMeasurement(); lastMenuWidth = (largestMenuWidth + this.menuItemPadding > lastMenuWidth) ? largestMenuWidth + this.menuItemPadding : lastMenuWidth ; // Get the window size width and compare with the lastMenuWidth. // If it is greater than windows width then reduce the maxwidth by 25px // so that the ellipsis property is enabled by default var maxWidth = SC.RootResponder.responder.get('currentWindowSize').width; if(lastMenuWidth > maxWidth) { lastMenuWidth = (maxWidth - 25) ; } this.set('lastMenuWidth',lastMenuWidth) ; currSel = this.get('_currentSelItem') ; itemList = this.get('_itemList') ; menuControlSize = this.get('controlSize') ; menuHeightPadding = this.get('menuPaneHeightPadding') ; // get the user defined custom view customView = this.get('exampleView') ; customMenuView = customView ? customView : SC.MenuItemView ; menu = SC.MenuPane.create({ /** Class name - select-button-item */ classNames: ['select-button'], /** The menu items are set from the itemList property of SelectButton @property */ items: itemList, /** Example view which will be used to create the Menu Items @default SC.MenuItemView @type SC.View */ exampleView: customMenuView, /** This property enables all the items and makes them selectable. @property */ isEnabled: YES, menuHeightPadding: menuHeightPadding, preferType: SC.PICKER_MENU, itemHeightKey: 'height', layout: { width: lastMenuWidth }, controlSize: menuControlSize, itemWidth: lastMenuWidth, contentView: SC.View.extend({ }) }) ; // no menu to toggle... bail... if (!menu) return NO ; menu.popup(this, this.preferMatrix) ; menu.set('currentSelectedMenuItem', currSel) ; return YES ; }, |
|
if (this._checkboxRenderer) { this._checkboxRenderer.attr('classNames', { 'active': YES }); this._checkboxRenderer.update(this.$('.sc-checkbox-view')); | if (this._checkboxRenderDelegate) { var source = this._checkboxRenderSource; if (!source) source = this._checkboxRenderSource = SC.Object.create(); source.set('isActive', YES); this._checkboxRenderDelegate.update(source, this.$('.sc-checkbox-view')); | _addCheckboxActiveState: function() { if (this.get('isEnabled')) { if (this._checkboxRenderer) { this._checkboxRenderer.attr('classNames', { 'active': YES }); this._checkboxRenderer.update(this.$('.sc-checkbox-view')); } else { // for backwards-compatibility. this.$('.sc-checkbox-view').addClass('active'); } } }, |
if (!source) source = this._checkboxRenderSource = SC.Object.create(); | _addCheckboxActiveState: function() { if (this.get('isEnabled')) { if (this._checkboxRenderDelegate) { var source = this._checkboxRenderSource; if (!source) source = this._checkboxRenderSource = SC.Object.create(); source.set('isActive', YES); this._checkboxRenderDelegate.update(source, this.$('.sc-checkbox-view')); } else { // for backwards-compatibility. this.$('.sc-checkbox-view').addClass('active'); } } }, |
|
this.renderer.attr({ checkboxActive: YES }); this.displayDidChange(); | this._checkboxRenderer.attr('classNames', { 'active': YES }); this._checkboxRenderer.update(this.$('.sc-checkbox-view')); | _addCheckboxActiveState: function() { if (this.get('isEnabled')) { this.renderer.attr({ checkboxActive: YES }); this.displayDidChange(); } }, |
"E182: Can't replace non-user command: " + args[0]); | "E182: Can't replace non-user command: " + args[0][0]); | _addCommand: function (args, replace) { let names = array.flatten(Command.parseSpecs(args[0])); dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this), "E182: Can't replace non-user command: " + args[0]); if (!replace || !(args[3] && args[3].user)) dactyl.assert(!names.some(function (name) name in this._exMap, this), "Not replacing command " + args[0]); for (let name in values(names)) if (name in this._exMap) commands.removeUserCommand(name); let name = names[0]; let closure = function () commands._exMap[name]; memoize(this._exMap, name, function () Command.apply(null, args)); memoize(this._exCommands, this._exCommands.length, closure); for (let alias in values(names.slice(1))) memoize(this._exMap, alias, closure); return true; }, |
if (!replace && args[3] && args[3].user) | if (!replace || !(args[3] && args[3].user)) | _addCommand: function (args, replace) { let names = array.flatten(Command.parseSpecs(args[0])); dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this), "E182: Can't replace non-user command: " + args[0]); if (!replace && args[3] && args[3].user) dactyl.assert(!names.some(function (name) name in this._exMap, this), "Not replacing command " + args[0]); for (let name in values(names)) if (name in this._exMap) commands.removeUserCommand(name); let name = names[0]; let closure = function () commands._exMap[name]; memoize(this._exMap, name, function () Command.apply(null, args)); memoize(this._exCommands, this._exCommands.length, closure); for (let alias in values(names.slice(1))) memoize(this._exMap, alias, closure); return true; }, |
for (let name in names) | for (let name in values(names)) | _addCommand: function (args, replace) { let names = array.flatten(Command.parseSpecs(args[0])); dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this), "E182: Can't replace non-user command: " + args[0]); if (!replace && args[3] && args[3].user) dactyl.assert(!names.some(function (name) name in this._exMap, this), "Not replacing command " + args[0]); for (let name in names) if (name in this._exMap) commands.removeUserCommand(name); let name = names[0]; let closure = function () commands._exMap[name]; memoize(this._exMap, name, function () Command.apply(null, args)); memoize(this._exCommands, this._exCommands.length, closure); for (let alias in values(names.slice(1))) memoize(this._exMap, alias, closure); return true; }, |
if (this._disclosureRenderer) { this._disclosureRenderer.attr('classNames', { "active": YES }); this._disclosureRenderer.update(this.$('.sc-disclosure-view')); | if (this._disclosureRenderDelegate) { var source = this._disclosureRenderSource; source.set('isActive', YES); this._disclosureRenderDelegate.update(source, this.$('.sc-disclosure-view')); | _addDisclosureActiveState: function() { if (this.get('isEnabled')) { if (this._disclosureRenderer) { this._disclosureRenderer.attr('classNames', { "active": YES }); this._disclosureRenderer.update(this.$('.sc-disclosure-view')); } else { // for backwards-compatibility. this.$('.sc-disclosure-view').addClass('active'); } } }, |
this.renderer.attr({ disclosureActive: YES }); this.displayDidChange(); | this._disclosureRenderer.attr('classNames', { "active": YES }); this._disclosureRenderer.update(this.$('.sc-list-item-disclosure')); | _addDisclosureActiveState: function() { if (this.get('isEnabled')) { this.renderer.attr({ disclosureActive: YES }); this.displayDidChange(); } }, |
SC.Event.add(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); | SC.Event.add(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); SC.Event.add(this.get('layer'), "transitionEnd", this, this.transitionEnd); | _animatable_didCreateLayer: function(){ this.resetAnimation(); SC.Event.add(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); return this._animatable_original_didCreateLayer(); }, |
SC.Event.add(this.get('layer'), "transitionEnd", this, this.transitionEnd); | _animatable_didCreateLayer: function(){ this.resetAnimation(); SC.Event.add(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); SC.Event.add(this.get('layer'), "transitionEnd", this, this.transitionEnd); return this._animatable_original_didCreateLayer(); }, |
|
SC.Event.add(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); | SC.Event.add(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); | _animatable_didCreateLayer: function(){ this.resetAnimation(); SC.Event.add(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); return this._animatable_original_didCreateLayer(); }, |
SC.Event.remove(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); | SC.Event.remove(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); SC.Event.remove(this.get('layer'), "transitionEnd", this, this.transitionEnd); | _animatable_willDestroyLayer: function(){ SC.Event.remove(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); return this._animatable_original_willDestroyLayer(); }, |
SC.Event.remove(this.get('layer'), "transitionEnd", this, this.transitionEnd); | _animatable_willDestroyLayer: function(){ SC.Event.remove(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); SC.Event.remove(this.get('layer'), "transitionEnd", this, this.transitionEnd); return this._animatable_original_willDestroyLayer(); }, |
|
SC.Event.remove(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); | SC.Event.remove(this.get('layer'), SC.platform.domCSSPrefix+"TransitionEnd", this, this.transitionEnd); | _animatable_willDestroyLayer: function(){ SC.Event.remove(this.get('layer'), SC.platform.cssPrefix+"TransitionEnd", this, this.transitionEnd); return this._animatable_original_willDestroyLayer(); }, |
style[SC.platform.cssPrefix+"Transform"] = transform; | _animatableApplyNonDisplayStyles: function(){ var layer = this.layer, styles = this.holder._animatableCurrentStyle; // this == timer var styleHelpers = { opacity: this.holder._style_opacity_helper // more to be added here... }; var newLayout = {}, updateLayout = NO, style = layer.style; // we extract the layout portion so SproutCore can do its own thing... var transform = ""; for (var i in styles) { if (i == "display") continue; if (this.holder._layoutStyles.indexOf(i) >= 0) { // otherwise, normal layout newLayout[i] = styles[i]; updateLayout = YES; continue; } else if (i == "transform") transform += " " + styles[i]; else if (styleHelpers[i]) styleHelpers[i](style, i, styles); else style[i] = styles[i]; } style[SC.platform.cssPrefix+"Transform"] = transform; // don't want to set because we don't want updateLayout... again. if (updateLayout) { var prev = this.holder.layout; this.holder.layout = newLayout; // set layout this.holder.notifyPropertyChange("layoutStyle"); // apply the styles (but we have to mix it in, because we still have transitions, etc. that we set) var ls = this.holder.get("layoutStyle"); for (var key in ls) { if (SC.none(ls[key])) style[key] = ""; // because IE is stupid and can't handle delete or null else if (style[key] != ls[key]) style[key] = ls[key]; } // go back to previous this.holder.layout = prev; } // queue up any delayed styles if (this.delayed) { // set settings SC.mixin(this.holder._animatableCurrentStyle, this.delayed); this.styles = this.delayed; this.delayed = undefined; // schedule. if (this._disableAnimation > 0) { this.inLoopAction(); } else { // after setting transition or display, we must wait a moment; // otherwise, no animation will happen. SC.Animatable.addTimer(this); } } }, |
|
style[SC.platform.cssPrefix+"Transform"] = transform; | _animatableApplyNonDisplayStyles: function(){ var layer = this.layer, styles = this.holder._animatableCurrentStyle; // this == timer var styleHelpers = { opacity: this.holder._style_opacity_helper // more to be added here... }; var newLayout = {}, updateLayout = NO, style = layer.style; // we extract the layout portion so SproutCore can do its own thing... var transform = ""; for (var i in styles) { if (i == "display") continue; if (this.holder._layoutStyles.indexOf(i) >= 0) { // otherwise, normal layout newLayout[i] = styles[i]; updateLayout = YES; continue; } else if (i == "transform") transform += " " + styles[i]; else if (styleHelpers[i]) styleHelpers[i](style, i, styles); else style[i] = styles[i]; } // don't want to set because we don't want updateLayout... again. if (updateLayout) { var prev = this.holder.layout; this.holder.layout = newLayout; // set layout this.holder.notifyPropertyChange("layoutStyle"); // apply the styles (but we have to mix it in, because we still have transitions, etc. that we set) var ls = this.holder.get("layoutStyle"); for (var key in ls) { if (SC.none(ls[key])) style[key] = ""; // because IE is stupid and can't handle delete or null else if (style[key] != ls[key]) style[key] = ls[key]; } // go back to previous this.holder.layout = prev; } // queue up any delayed styles if (this.delayed) { // set settings SC.mixin(this.holder._animatableCurrentStyle, this.delayed); this.styles = this.delayed; this.delayed = undefined; // schedule. if (this._disableAnimation > 0) { this.inLoopAction(); } else { // after setting transition or display, we must wait a moment; // otherwise, no animation will happen. SC.Animatable.addTimer(this); } } }, |
|
layer.style[SC.platform.domCSSPrefix+"Transition"] = this._animatableSetCSS; | layer.style["-"+SC.platform.cssPrefix+"-transition"] = this._animatableSetCSS; layer.style["-moz-transition"] = this._animatableSetCSS; | _animatableApplyStyles: function(layer, styles, delayed) { if (!layer) return; // handle a specific style first: display. There is a special case because it disrupts transitions. var needsRender = NO; if (styles["display"] && layer.style["display"] !== styles["display"]) { layer.style["display"] = styles["display"]; needsRender = YES; } // set CSS transitions very first thing if (this._animatableSetCSS != this._last_transition_css) { layer.style[SC.platform.domCSSPrefix+"Transition"] = this._animatableSetCSS; this._last_transition_css = this._animatableSetCSS; needsRender = YES; } if (!this._animators["display-styles"]) this._animators["display-styles"] = {}; // get timer var timer = this._animators["display-styles"]; // set settings timer.holder = this; timer.action = this._animatableApplyNonDisplayStylesFromTimer; timer.inLoopAction = this._animatableApplyNonDisplayStyles; timer.layer = layer; timer.styles = styles; timer.delayed = delayed; this._animatableCurrentStyle = styles; // schedule. if (this._disableAnimation > 0) { timer.inLoopAction(); } else { // after setting transition or display, we must wait a moment; // otherwise, no animation will happen. SC.Animatable.addTimer(timer); } }, |
layer.style["-"+SC.platform.cssPrefix+"-transition"] = this._animatableSetCSS; layer.style["-moz-transition"] = this._animatableSetCSS; | layer.style[SC.platform.domCSSPrefix+"Transition"] = this._animatableSetCSS; | _animatableApplyStyles: function(layer, styles, delayed) { if (!layer) return; // handle a specific style first: display. There is a special case because it disrupts transitions. var needsRender = NO; if (styles["display"] && layer.style["display"] !== styles["display"]) { layer.style["display"] = styles["display"]; needsRender = YES; } // set CSS transitions very first thing if (this._animatableSetCSS != this._last_transition_css) { layer.style["-"+SC.platform.cssPrefix+"-transition"] = this._animatableSetCSS; layer.style["-moz-transition"] = this._animatableSetCSS; this._last_transition_css = this._animatableSetCSS; needsRender = YES; } if (!this._animators["display-styles"]) this._animators["display-styles"] = {}; // get timer var timer = this._animators["display-styles"]; // set settings timer.holder = this; timer.action = this._animatableApplyNonDisplayStylesFromTimer; timer.inLoopAction = this._animatableApplyNonDisplayStyles; timer.layer = layer; timer.styles = styles; timer.delayed = delayed; this._animatableCurrentStyle = styles; // schedule. if (this._disableAnimation > 0) { timer.inLoopAction(); } else { // after setting transition or display, we must wait a moment; // otherwise, no animation will happen. SC.Animatable.addTimer(timer); } }, |
_argumentsToArray: function(arguments) { if (!arguments) return []; | _argumentsToArray: function(args) { if (!args) return []; | _argumentsToArray: function(arguments) { if (!arguments) return []; var a = []; for (var i = 0; i < arguments.length; i++) { a[i] = arguments[i]; } return a; }, |
for (var i = 0; i < arguments.length; i++) { a[i] = arguments[i]; | for (var i = 0; i < args.length; i++) { a[i] = args[i]; | _argumentsToArray: function(arguments) { if (!arguments) return []; var a = []; for (var i = 0; i < arguments.length; i++) { a[i] = arguments[i]; } return a; }, |
var msg = $msg({to: room_nick, | var msg = $msg({to: to, | _buildAndSendMessage: function(to, message, type) { if (type !== "groupchat") { var msgid = this._connection.getUniqueId(); var msg = $msg({to: room_nick, from: this._connection.jid, type: type, id: msgid}) .c("body", {xmlns: Strophe.NS.CLIENT}).t(message); msg.up().c("x", {xmlns: "jabber:x:event"}).c("composing"); this._connection.send(msg); } else { this._connection.muc.message(to, null, message); } this._messages.push(message); while (this._messages.length > Speeqe.CHAT_MESSAGE_HISTORY) { this._messages.splice(0,1); } }, |
var dataArr = _config.fnERContent(trID[0]); | var inputObj = _config.fnERContent(trID[0]); var tr, td, tdKEY, tdVAL; var properties = inputObj.properties; var table = inputObj.table; var html = inputObj.html; | var _buildExpandedRow = function(trID, trClass) { var dataArr = _config.fnERContent(trID[0]); var mainTR = $('<tr></tr>').attr({ 'id': 'expand_'+trID[0] }).addClass('expand').addClass(trClass); var mainTD = $('<td></td>').attr({ 'colspan': _config.tblLabels.length }).addClass('sorting_1'); var mainDIV = $('<div></div>'); var table = $('<table></table>').attr({ cellpadding: '0', cellspacing: '1' }).addClass('expTable'); var tr; for (i in dataArr) { tr = $('<tr></tr>'); tdKEY = $('<td></td>').addClass('orKEYS').text(dataArr[i][0]); tdVAL = $('<td></td>').addClass('orVALS').text(dataArr[i][1]); tr.append(tdKEY).append(tdVAL); table.append(tr); } mainTD.append(table); mainTR.append(mainTD); return mainTR; }; |
var mainDIV = $('<div></div>'); var table = $('<table></table>').attr({ cellpadding: '0', cellspacing: '1' }).addClass('expTable'); var tr; for (i in dataArr) { tr = $('<tr></tr>'); tdKEY = $('<td></td>').addClass('orKEYS').text(dataArr[i][0]); tdVAL = $('<td></td>').addClass('orVALS').text(dataArr[i][1]); tr.append(tdKEY).append(tdVAL); table.append(tr); | if (properties) { var propertiesTable = $('<table></table>').attr({ cellpadding: '0', cellspacing: '1' }).addClass('expTable'); for (i in properties) { tr = $('<tr></tr>'); tdKEY = $('<td></td>').addClass('orKEYS').text(properties[i][0]); tdVAL = $('<td></td>').addClass('orVALS').text(properties[i][1]); tr.append(tdKEY).append(tdVAL); propertiesTable.append(tr); } mainTD.append(propertiesTable); | var _buildExpandedRow = function(trID, trClass) { var dataArr = _config.fnERContent(trID[0]); var mainTR = $('<tr></tr>').attr({ 'id': 'expand_'+trID[0] }).addClass('expand').addClass(trClass); var mainTD = $('<td></td>').attr({ 'colspan': _config.tblLabels.length }).addClass('sorting_1'); var mainDIV = $('<div></div>'); var table = $('<table></table>').attr({ cellpadding: '0', cellspacing: '1' }).addClass('expTable'); var tr; for (i in dataArr) { tr = $('<tr></tr>'); tdKEY = $('<td></td>').addClass('orKEYS').text(dataArr[i][0]); tdVAL = $('<td></td>').addClass('orVALS').text(dataArr[i][1]); tr.append(tdKEY).append(tdVAL); table.append(tr); } mainTD.append(table); mainTR.append(mainTD); return mainTR; }; |
mainTD.append(table); | if (html) mainTD.append(html); if (table) { var dataTable = $('<table></table>').attr({ id: 'dataTable_'+elCnt, cellpadding: '0', cellspacing: '1' }).addClass('display').css('margin-bottom','10px'); var colHeaders = $('<tr></tr>'); for (i in table.tblLabels) { var colHeader = $('<th></th>').text(table.tblLabels[i]); colHeaders.append(colHeader); } var tblHead = $('<thead></thead>').append(colHeaders); var tblBody = $('<tbody></tbody>'); for (var i=0;i<table.tblData.length;i++) { tr = $('<tr></tr>'); for (var j=0;j<table.tblData[i].length;j++) { tr.append($('<td></td>').addClass('expDataTableTd').text(table.tblData[i][j])); } tblBody.append(tr); } dataTable.append(tblHead); dataTable.append(tblBody); mainTD.append(dataTable); } | var _buildExpandedRow = function(trID, trClass) { var dataArr = _config.fnERContent(trID[0]); var mainTR = $('<tr></tr>').attr({ 'id': 'expand_'+trID[0] }).addClass('expand').addClass(trClass); var mainTD = $('<td></td>').attr({ 'colspan': _config.tblLabels.length }).addClass('sorting_1'); var mainDIV = $('<div></div>'); var table = $('<table></table>').attr({ cellpadding: '0', cellspacing: '1' }).addClass('expTable'); var tr; for (i in dataArr) { tr = $('<tr></tr>'); tdKEY = $('<td></td>').addClass('orKEYS').text(dataArr[i][0]); tdVAL = $('<td></td>').addClass('orVALS').text(dataArr[i][1]); tr.append(tdKEY).append(tdVAL); table.append(tr); } mainTD.append(table); mainTR.append(mainTD); return mainTR; }; |
for (i in _config.tblLabels) colHeaders.append($('<th></th>').text(_config.tblLabels[i])); | for (i in _config.tblLabels) { var colHeader = $('<th></th>').text(_config.tblLabels[i]); if (!_config.expandableRows || i!=0) colHeader.addClass('tblSort'); colHeaders.append(colHeader); } | var _buildTable = function(elCnt) { var table = $('<table></table>').attr({ id: 'dataTable_'+elCnt, cellpadding: '0', cellspacing: '1' }).addClass('display'); var colHeaders = $('<tr></tr>'); for (i in _config.tblLabels) colHeaders.append($('<th></th>').text(_config.tblLabels[i])); var colFooters = colHeaders.clone(); var tblHead = $('<thead></thead>').append(colHeaders); var tblFoot = $('<tfoot></tfoot>').append(colFooters); table.append(tblHead); table.append(tblFoot); return table; }; |
var testFunc = fixture.runTest; | var testFunc = doh.hitch(fixture, fixture.runTest); | doh._calcTrialIterations = function(/*String*/ groupName, /*Object*/ fixture){ // summary: // This function determines the rough number of iterations to // use to reach a particular MS threshold. This returns a deferred // since tests can theoretically by async. Async tests aren't going to // give great perf #s, though. // The callback is passed the # of iterations to hit the requested // threshold. // // fixture: // The test fixture we want to calculate iterations for. var def = new doh.Deferred(); var calibrate = function () { var testFunc = fixture.runTest; //Set the initial state. We have to do this as a loop instead //of a recursive function. Otherwise, it blows the call stack //on some browsers. var iState = { start: new Date(), curIter: 0, iterations: 5 }; var handleIteration = function(state){ while(state){ if(state.curIter < state.iterations){ try{ var ret = testFunc(doh); if(ret instanceof doh.Deferred){ var aState = { start: state.start, curIter: state.curIter + 1, iterations: state.iterations }; ret.addCallback(function(){ handleIteration(aState); }); ret.addErrback(function(err) { fixture.endTime = new Date(); def.errback(err); }); state = null; }else{ state.curIter++; } }catch(err){ fixture.endTime = new Date(); def.errback(err); return; } }else{ var end = new Date(); var totalTime = (end.getTime() - state.start.getTime()); if(totalTime < fixture.trialDuration){ var nState = { iterations: state.iterations * 2, curIter: 0 } state = null; setTimeout(function(){ nState.start = new Date(); handleIteration(nState); }, 50); }else{ var itrs = state.iterations; setTimeout(function(){def.callback(itrs)}, 50); state = null; } } } }; handleIteration(iState); }; setTimeout(calibrate, 10); return def;}; |
if (i > 0 && delimiter.indexOf(input[i]) == -1) { | if (i > 0 && delimiter.indexOf(input[i - 1]) == -1) { | _calculateDisplayText: function (input, seg) { if (input.length == 0) return null; var index = []; var disp = []; var delimiter = this.schema.delimiter; var j = 0; var k = 0; for (var i = 0; i < seg.n; ++i) { if (i <= seg.m && i == seg.d[k]) { ++k; if (i > 0 && delimiter.indexOf(input[i]) == -1) { disp.push(delimiter.charAt(0)); j += 1; } } index[i] = j; disp.push(input[i]); j += input[i].length; } index[seg.n] = j; return {text: disp.join(""), index: index}; }, |
disp.push(input[i]); j += input[i].length; | var w = this.schema.translit ? this.schema.translit(input[i]) : input[i]; disp.push(w); j += w.length; | _calculateDisplayText: function (input, seg) { if (input.length == 0) return null; var index = []; var disp = []; var delimiter = this.schema.delimiter; var j = 0; var k = 0; for (var i = 0; i < seg.n; ++i) { if (i <= seg.m && i == seg.d[k]) { ++k; if (i > 0 && delimiter.indexOf(input[i - 1]) == -1) { disp.push(delimiter.charAt(0)); j += 1; } } index[i] = j; disp.push(input[i]); j += input[i].length; } index[seg.n] = j; return {text: disp.join(""), index: index}; }, |
var transformAttribute = SC.platform.domCSSPrefix+'Transform', | var transformAttribute = SC.platform.domCSSPrefix+'Transform'; | _calculateTransforms: function(translateLeft, translateTop){ if (SC.platform.supportsCSSTransforms) { // Handle transforms var layout = this.get('layout'); var transformAttribute = SC.platform.domCSSPrefix+'Transform', var transforms = []; if (this.turbo) { // FIXME: Can we just set translateLeft / translateTop to 0 earlier? transforms.push('translateX('+(translateLeft || 0)+'px)', 'translateY('+(translateTop || 0)+'px)'); // double check to make sure this is needed if (SC.platform.supportsCSS3DTransforms) { transforms.push('translateZ(0px)'); } } // normalizing transforms like rotateX: 5 to rotateX(5deg) var transformMap = SC.CSS_TRANSFORM_MAP; for(var transformName in transformMap) { var layoutTransform = layout[transformName]; if(layoutTransform != null) { transforms.push(transformMap[transformName](layoutTransform)); } } this.ret[transformAttribute] = transforms.length > 0 ? transforms.join(' ') : null; } }, |
ctx._segmentation, | seg.a, (q.end < seg.n) ? seg.n : -1, | _checkEntry: function (e, q, ctx) { var okey = e[0].split(" "); var ikey = q.ikey; var j = (okey.length == ikey.length) ? q.end : this._matchKey(okey.slice(ikey.length), q.end, ctx._segmentation, ctx.schema.fuzzyMap); return j ? {unigram: e, text: e[1], start: q.start, end: j} : null; }, |
AtD.counter--; if (AtD.counter == 0) AtD.restoreTextArea( id ); | AtD._checkTextArea = function(id, commChannel, linkId, after) { var container = jQuery('#' + id); /* store options based on the unique ID of the textarea */ if (AtD.textareas[id] == undefined) { var properties = {}; var saveProperty = function(key, node) { if (node.css(key) != "") properties[key] = node.css(key); } var saveme = ['background-color', 'color', 'font-size', 'font-family', 'border-top-width', 'border-bottom-width', 'border-left-width', 'border-right-width', 'border-top-style', 'border-bottom-style', 'border-left-style', 'border-right-style', 'border-top-color', 'border-bottom-color', 'border-left-color', 'border-right-color', 'text-align', 'margin-top', 'margin-bottom', 'margin-left', 'margin-right', 'width', 'line-height', 'letter-spacing', 'left', 'right', 'top', 'bottom', 'position', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom' ]; for (var x = 0, node = container; x < saveme.length; x++) { saveProperty(saveme[x], node); } AtD.textareas[id] = { 'node': container, 'height': container.height(), 'link': jQuery('#' + linkId), 'before': jQuery('#' + linkId).html(), 'after': after, 'style': properties }; } var options = AtD.textareas[id]; /* If the text of the link says edit comment, then restore the textarea so the user can edit the text */ if (options['link'].html() != options['before']) { AtD.restoreTextArea(id); } else if(!container.val()) { AtD.restoreTextArea(id); jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } else { /* set the spell check link to a link that lets the user edit the text */ options['link'].html( options['after'] ); /* disable the spell check link while an asynchronous call is in progress. if a user tries to make a request while one is in progress they will lose their text. Not cool! */ var disableClick = function() { return false; }; options['link'] .click(disableClick); /* replace the textarea with a preview div, notice how the div has to have the same id/class/style attributes as the textarea */ var div; var hidden = jQuery('<input type="hidden" />'); hidden.attr('id', 'AtD_sync_'); hidden.val(container.val()); var name = container.attr('name'); if (navigator.appName == 'Microsoft Internet Explorer') { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&').replace(/[\n\r\f]/gm, '<BR class="atd_remove_me">') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto' } ); options['style']['font-size'] = undefined; options['style']['font-family'] = undefined; } else { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto', 'white-space' : 'pre-wrap' } ); div.attr('contenteditable', 'true'); div.attr('spellcheck', false); /* ours is better */ div.css({ 'outline' : 'none' }); } /* block the enter key in proofreading mode */ div.keypress(function (event) { return event.keyCode != 13; }); /* setup the hidden attribute that will keep in sync with the contents of the textarea */ hidden.attr('name', name); div.after(hidden); var inProgress = false; var syncContents = function() { if (inProgress) return; inProgress = true; setTimeout(function() { var content; if (navigator.appName == 'Microsoft Internet Explorer') content = div.html().replace(/<BR.*?class.*?atd_remove_me.*?>/gi, "\n"); else content = div.html(); /* strip the AtD markup */ var temp = jQuery('<div></div>'); temp.html(content); AtD.core.removeWords(temp); hidden.val(temp.html().replace(/\<\;/g, '<').replace(/\>\;/, '>').replace(/\&/g, '&')); inProgress = false; }, 1500); }; div.keypress(syncContents); div.mousemove(syncContents); div.mouseout(syncContents); /* update some more CSS properties (the ones that time forgot) */ div.css( options['style'] ); div.height( options['height'] ); /* check the writing in the textarea */ commChannel(id, { 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); }, explain: function(url) { var left = (screen.width / 2) - (480 / 2); var top = (screen.height / 2) - (380 / 2); window.open( url, '', 'width=480,height=380,toolbar=0,status=0,resizable=0,location=0,menuBar=0,left=' + left + ',top=' + top).focus(); }, success: function(errorCount) { if (errorCount == 0) jAlert( AtD.getLang('message_no_errors_found', "No writing errors were found!"), AtD.getLang('message_no_errors', 'No errors!') ); /* once all errors are resolved, this function is called, it's an opportune time to restore the textarea */ AtD.restoreTextArea( id ); }, error: function(reason) { options['link'].unbind('click', disableClick); if (reason == undefined) jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service."), AtD.getLang('message_error', 'Error!') ); else jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service.") + "\n\n" + reason, AtD.getLang('message_error', 'Error!') ); /* restore the text area since there won't be any highlighted spelling errors */ AtD.restoreTextArea( id ); }, editSelection : function(element) { var oldtext = element.text(); jPrompt(AtD.getLang('dialog_replace_selection', "Replace selection with")+':', element.text(), AtD.getLang('dialog_replace', 'Replace'), function(text) { if (text != null && oldtext != text) { jQuery(element).html(text); AtD.core.removeParent(element); } }); } }); }} |
|
}, ignore: function(word) { jQuery('.atd-ajax-load').css('height','16px'); jQuery.ajax({ type : 'POST', url : AtD.rpc_ignore + encodeURI( word ).replace( /&/g, '%26'), data: "action=atd_ignore", format : 'raw', error : function(XHR, status, error) { if (AtD.callback_f != undefined && AtD.callback_f.error != undefined) AtD.callback_f.error(status + ": " + error); }, success : function() { jQuery('.atd-ajax-load').css('height','0'); } }); | AtD._checkTextArea = function(id, commChannel, linkId, after) { var container = jQuery('#' + id); /* store options based on the unique ID of the textarea */ if (AtD.textareas[id] == undefined) { var properties = {}; var saveProperty = function(key, node) { if (node.css(key) != "") properties[key] = node.css(key); } var saveme = ['background-color', 'color', 'font-size', 'font-family', 'border-top-width', 'border-bottom-width', 'border-left-width', 'border-right-width', 'border-top-style', 'border-bottom-style', 'border-left-style', 'border-right-style', 'border-top-color', 'border-bottom-color', 'border-left-color', 'border-right-color', 'text-align', 'margin-top', 'margin-bottom', 'margin-left', 'margin-right', 'width', 'line-height', 'letter-spacing', 'left', 'right', 'top', 'bottom', 'position', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom' ]; for (var x = 0, node = container; x < saveme.length; x++) { saveProperty(saveme[x], node); } AtD.textareas[id] = { 'node': container, 'height': container.height(), 'link': jQuery('#' + linkId), 'before': jQuery('#' + linkId).html(), 'after': after, 'style': properties }; } var options = AtD.textareas[id]; /* If the text of the link says edit comment, then restore the textarea so the user can edit the text */ if (options['link'].html() != options['before']) { AtD.restoreTextArea(id); } else if(!container.val()) { AtD.restoreTextArea(id); jAlert( AtD.getLang('message_error_no_text', 'Please enter some text in the post textbox to be checked!' ), AtD.getLang('message_error', 'Error!' ) ); } else { /* set the spell check link to a link that lets the user edit the text */ options['link'].html( options['after'] ); /* disable the spell check link while an asynchronous call is in progress. if a user tries to make a request while one is in progress they will lose their text. Not cool! */ var disableClick = function() { return false; }; options['link'] .click(disableClick); /* replace the textarea with a preview div, notice how the div has to have the same id/class/style attributes as the textarea */ var div; var hidden = jQuery('<input type="hidden" />'); hidden.attr('id', 'AtD_sync_'); hidden.val(container.val()); var name = container.attr('name'); if (navigator.appName == 'Microsoft Internet Explorer') { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&').replace(/[\n\r\f]/gm, '<BR class="atd_remove_me">') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto' } ); options['style']['font-size'] = undefined; options['style']['font-family'] = undefined; } else { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto', 'white-space' : 'pre-wrap' } ); div.attr('contenteditable', 'true'); div.attr('spellcheck', false); /* ours is better */ div.css({ 'outline' : 'none' }); } /* block the enter key in proofreading mode */ div.keypress(function (event) { return event.keyCode != 13; }); /* setup the hidden attribute that will keep in sync with the contents of the textarea */ hidden.attr('name', name); div.after(hidden); var inProgress = false; var syncContents = function() { if (inProgress) return; inProgress = true; setTimeout(function() { var content; if (navigator.appName == 'Microsoft Internet Explorer') content = div.html().replace(/<BR.*?class.*?atd_remove_me.*?>/gi, "\n"); else content = div.html(); /* strip the AtD markup */ var temp = jQuery('<div></div>'); temp.html(content); AtD.core.removeWords(temp); hidden.val(temp.html().replace(/\<\;/g, '<').replace(/\>\;/, '>').replace(/\&/g, '&')); inProgress = false; }, 1500); }; div.keypress(syncContents); div.mousemove(syncContents); div.mouseout(syncContents); /* update some more CSS properties (the ones that time forgot) */ div.css( options['style'] ); div.height( options['height'] ); /* check the writing in the textarea */ commChannel(id, { 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); }, explain: function(url) { var left = (screen.width / 2) - (480 / 2); var top = (screen.height / 2) - (380 / 2); window.open( url, '', 'width=480,height=380,toolbar=0,status=0,resizable=0,location=0,menuBar=0,left=' + left + ',top=' + top).focus(); }, success: function(errorCount) { if (errorCount == 0) jAlert( AtD.getLang('message_no_errors_found', "No writing errors were found!"), AtD.getLang('message_no_errors', 'No errors!') ); /* once all errors are resolved, this function is called, it's an opportune time to restore the textarea */ AtD.restoreTextArea( id ); }, error: function(reason) { options['link'].unbind('click', disableClick); if (reason == undefined) jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service."), AtD.getLang('message_error', 'Error!') ); else jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service.") + "\n\n" + reason, AtD.getLang('message_error', 'Error!') ); /* restore the text area since there won't be any highlighted spelling errors */ AtD.restoreTextArea( id ); }, editSelection : function(element) { var oldtext = element.text(); jPrompt(AtD.getLang('dialog_replace_selection', "Replace selection with")+':', element.text(), AtD.getLang('dialog_replace', 'Replace'), function(text) { if (text != null && oldtext != text) { jQuery(element).html(text); AtD.core.removeParent(element); AtD.counter--; if (AtD.counter == 0) AtD.restoreTextArea( id ); } }); } }); }} |
|
timeout : 5000, | AtD._checkTextArea = function(id, commChannel, linkId, after) { var container = jQuery('#' + id); /* store options based on the unique ID of the textarea */ if (AtD.textareas[id] == undefined) { var properties = {}; var saveProperty = function(key, node) { if (node.css(key) != "") properties[key] = node.css(key); } var saveme = ['background-color', 'color', 'font-size', 'font-family', 'border-top-width', 'border-bottom-width', 'border-left-width', 'border-right-width', 'border-top-style', 'border-bottom-style', 'border-left-style', 'border-right-style', 'border-top-color', 'border-bottom-color', 'border-left-color', 'border-right-color', 'text-align', 'margin-top', 'margin-bottom', 'margin-left', 'margin-right', 'width', 'line-height', 'letter-spacing', 'left', 'right', 'top', 'bottom', 'position', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom' ]; for (var x = 0, node = container; x < saveme.length; x++) { saveProperty(saveme[x], node); } AtD.textareas[id] = { 'node': container, 'height': container.height(), 'link': jQuery('#' + linkId), 'before': jQuery('#' + linkId).html(), 'after': after, 'style': properties }; } var options = AtD.textareas[id]; /* If the text of the link says edit comment, then restore the textarea so the user can edit the text */ if (options['link'].html() != options['before']) { AtD.restoreTextArea(id); } else { /* set the spell check link to a link that lets the user edit the text */ options['link'].html( options['after'] ); /* disable the spell check link while an asynchronous call is in progress. if a user tries to make a request while one is in progress they will lose their text. Not cool! */ var disableClick = function() { return false; }; options['link'].click(disableClick); /* replace the textarea with a preview div, notice how the div has to have the same id/class/style attributes as the textarea */ var div; var hidden = jQuery('<input type="hidden" />'); hidden.attr('id', 'AtD_sync_'); hidden.val(container.val()); var name = container.attr('name'); if (navigator.appName == 'Microsoft Internet Explorer') { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&').replace(/[\n\r\f]/gm, '<BR class="atd_remove_me">') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto' } ); options['style']['font-size'] = undefined; options['style']['font-family'] = undefined; } else { container.replaceWith( '<div id="' + id + '">' + container.val().replace(/\&/g, '&') + '</div>' ); div = jQuery('#' + id); div.attr('style', options['node'].attr('style') ); div.attr('class', options['node'].attr('class') ); div.css( { 'overflow' : 'auto', 'white-space' : 'pre-wrap' } ); div.attr('contenteditable', 'true'); div.attr('spellcheck', false); /* ours is better */ div.css({ 'outline' : 'none' }); } /* block the enter key in proofreading mode */ div.keypress(function (event) { return event.keyCode != 13; }); /* setup the hidden attribute that will keep in sync with the contents of the textarea */ hidden.attr('name', name); div.after(hidden); var inProgress = false; var syncContents = function() { if (inProgress) return; inProgress = true; setTimeout(function() { var content; if (navigator.appName == 'Microsoft Internet Explorer') content = div.html().replace(/<BR.*?class.*?atd_remove_me.*?>/gi, "\n"); else content = div.html(); /* strip the AtD markup */ var temp = jQuery('<div></div>'); temp.html(content); AtD.core.removeWords(temp); hidden.val(temp.html().replace(/\<\;/g, '<').replace(/\>\;/, '>').replace(/\&/g, '&')); inProgress = false; }, 1500); }; div.keypress(syncContents); div.mousemove(syncContents); div.mouseout(syncContents); /* update some more CSS properties (the ones that time forgot) */ div.css( options['style'] ); div.height( options['height'] ); AtD_ajax_load('show'); /* check the writing in the textarea */ commChannel(id, { 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); AtD_ajax_load('hide'); }, explain: function(url) { var left = (screen.width / 2) - (480 / 2); var top = (screen.height / 2) - (380 / 2); window.open( url, '', 'width=480,height=380,toolbar=0,status=0,resizable=0,location=0,menuBar=0,left=' + left + ',top=' + top).focus(); }, success: function(errorCount) { if (errorCount == 0) jAlert( AtD.getLang('message_no_errors_found', "No writing errors were found!"), AtD.getLang('message_no_errors', 'No errors!') ); /* once all errors are resolved, this function is called, it's an opportune time to restore the textarea */ AtD.restoreTextArea( id ); }, error: function(reason) { options['link'].unbind('click', disableClick); if (reason == undefined) jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service."), AtD.getLang('message_error', 'Error!') ); else jAlert( AtD.getLang('message_server_error_short', "There was an error communicating with the spell checking service.") + "\n\n" + reason, AtD.getLang('message_error', 'Error!') ); /* restore the text area since there won't be any highlighted spelling errors */ AtD.restoreTextArea( id ); }, editSelection : function(element) { var oldtext = element.text(); jPrompt(AtD.getLang('dialog_replace_selection', "Replace selection with:"), element.text(), AtD.getLang('dialog_replace', 'Replace'), function(text) { if (text != null && oldtext != text) { jQuery(element).html(text); AtD.core.removeParent(element); AtD.counter--; if (AtD.counter == 0) AtD.restoreTextArea( id ); } }); }, ignore: function(word) { AtD_ajax_load('show'); jQuery.ajax({ type : 'POST', url : AtD.rpc_ignore + encodeURI( word ).replace( /&/g, '%26'), data: "action=atd_ignore", format : 'raw', error : function(XHR, status, error) { if (AtD.callback_f != undefined && AtD.callback_f.error != undefined) AtD.callback_f.error(status + ": " + error); }, success : function() { AtD_ajax_load('hide'); } }); } }); }} |
|
if (this._hintNumber > 0 && this._hintNumber * 10 <= this._validHints.length) { | if (this._hintNumber > 0 && this._hintNumber * this.hintKeys.length <= this._validHints.length) { | _checkUnique: function () { if (this._hintNumber == 0) return; dactyl.assert(this._hintNumber <= this._validHints.length); // if we write a numeric part like 3, but we have 45 hints, only follow // the hint after a timeout, as the user might have wanted to follow link 34 if (this._hintNumber > 0 && this._hintNumber * 10 <= this._validHints.length) { let timeout = options["hinttimeout"]; if (timeout > 0) this._activeTimeout = this.timeout(function () { this._processHints(true); }, timeout); } else // we have a unique hint this._processHints(true); }, |
_checkWindowLocation: function() { var loc = this.get('location') ; var cloc = decodeURI(location.hash) ; cloc = (cloc && cloc.length > 0) ? cloc.slice(1,cloc.length) : '' ; if (cloc !== loc) { SC.RunLoop.begin(); this.set('location',(cloc) ? cloc : '') ; SC.RunLoop.end(); } this.invokeCheckWindowLocation(150) ; }, | _checkWindowLocation: function() { var historyDidChange = (history.length - this._lastLength) !== 0; var delta = (historyDidChange) ? (history.length - this._backStack.length) : 0 ; this._lastLength = history.length ; if (historyDidChange) console.log('historyDidChange') ; if (delta) { if (delta < 0) { this._forwardStack.push(this._cloc) ; for(var i=0; i < Math.abs(delta+1);i++) { this._forwardStack.push(this._backStack.pop()) ; } this._cloc = this._backStack.pop() ; } else { this._backStack.push(this._cloc) ; for(i=0; i < (delta-1); i++) { this._backStack.push(this._forwardStack.pop()) ; } this._cloc = this._forwardStack.pop() ; } } else if (historyDidChange && this._locationDidChange) { this.gotoRoute(this._cloc) ; this._locationDidChange = false ; } var cloc = this._cloc ; var loc = this.get('location') ; if (cloc != loc) { this.set('location',(cloc) ? cloc : '') ; this.gotoRoute(cloc) ; } this.invokeCheckWindowLocation(50) ; }, | _checkWindowLocation: function() { var loc = this.get('location') ; var cloc = decodeURI(location.hash) ; cloc = (cloc && cloc.length > 0) ? cloc.slice(1,cloc.length) : '' ; if (cloc !== loc) { SC.RunLoop.begin(); this.set('location',(cloc) ? cloc : '') ; SC.RunLoop.end(); } this.invokeCheckWindowLocation(150) ; }, |
if(!options["jsdebugger"] && !this.context.message) this.context.message = "For better completion data, please enable the JavaScript debugger (:set jsdebugger)"; | _complete: function (objects, key, compl, string, last) { const self = this; let orig = compl; if (!compl) { compl = function (context, obj, recurse) { context.process = [null, function highlight(item, v) template.highlight(v, true)]; // Sort in a logical fashion for object keys: // Numbers are sorted as numbers, rather than strings, and appear first. // Constants are unsorted, and appear before other non-null strings. // Other strings are sorted in the default manner. let compare = context.compare; function isnan(item) item != '' && isNaN(item); context.compare = function (a, b) { if (!isnan(a.item.key) && !isnan(b.item.key)) return a.item.key - b.item.key; return isnan(b.item.key) - isnan(a.item.key) || compare(a, b); }; if (!context.anchored) // We've already listed anchored matches, so don't list them again here. context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter)); if (obj == self.cache.evalContext) context.regenerate = true; context.generate = function () self.objectKeys(obj, !recurse); }; } // TODO: Make this a generic completion helper function. let filter = key + (string || ""); for (let [, obj] in Iterator(objects)) { this.context.fork(obj[1], this._top.offset, this, this._fill, obj[0], obj[1], compl, true, filter, last, key.length); } if (orig) return; for (let [, obj] in Iterator(objects)) { let name = obj[1] + " (prototypes)"; this.context.fork(name, this._top.offset, this, this._fill, obj[0], name, function (a, b) compl(a, b, true), true, filter, last, key.length); } for (let [, obj] in Iterator(objects)) { let name = obj[1] + " (substrings)"; this.context.fork(name, this._top.offset, this, this._fill, obj[0], name, compl, false, filter, last, key.length); } for (let [, obj] in Iterator(objects)) { let name = obj[1] + " (prototype substrings)"; this.context.fork(name, this._top.offset, this, this._fill, obj[0], name, function (a, b) compl(a, b, true), false, filter, last, key.length); } }, |
|
buildUtil.addGuardsAndBaseRequires(copiedFiles, needBaseRequires); | if(kwArgs.addGuards){ buildUtil.addGuardsAndBaseRequires(copiedFiles, needBaseRequires); } | function _copyToRelease(/*String*/prefixName, /*String*/prefixPath, /*Object*/kwArgs, /*Array?*/buildLayers){ //summary: copies modules and supporting files from the prefix path to the release //directory. Also adds code guards to module resources. var prefixSlashName = prefixName.replace(/\./g, "/"); var releasePath = kwArgs.releaseDir + "/" + prefixSlashName; var copyRegExps = { include: /./ }; //Use the copyRegExps to filter out tests if requested. if(!kwArgs.copyTests){ copyRegExps.exclude = /\/tests\//; } if(kwArgs.mini){ copyRegExps.exclude = /\/tests\/|\/demos\/|tests\.js|dijit\/bench|dijit\/themes\/themeTest|(\.php$)/; } logger.info("Copying: " + prefixPath + " to: " + releasePath); var copiedFiles = fileUtil.copyDir(prefixPath, releasePath, copyRegExps, true); //If want a different selector engine, adjust that now. //Copy the new selector js over the dojo._base.query file if(prefixName == "dojo" && kwArgs.query == "sizzle"){ fileUtil.copyFile(releasePath + "/_base/query-sizzle.js", releasePath + "/_base/query.js"); } if(!copiedFiles){ logger.info(" ********** Not Copied: " + prefixPath ); } //Make sure to copy over any "source" files for the layers be targeted by //buildLayers. Otherwise dependencies will not be calculated correctly. if(buildLayers){ for(i = 0; i < buildLayers.length; i++){ var relativeLayerPath = buildLayers[i].replace(/\.\.\//g, ""); //See if relativeLayerPath has teh prefix slash name in it. //This means the layer is probably in this prefix dir (but no guarantee) //This is a bit hacky. if(relativeLayerPath.indexOf(prefixSlashName) == 0){ //Remove the prefix part from the dir and add the prefix path to get a //full path. var layerPathSuffix = relativeLayerPath.replace(prefixSlashName, ""); relativeLayerPath = prefixPath + layerPathSuffix; //If that source path exists, it means we need to copy over the source //layer file. if((new java.io.File(relativeLayerPath)).exists()){ //Need to copy over from the source area. var destPath = releasePath + layerPathSuffix; fileUtil.copyFile(relativeLayerPath, destPath); } } } } //Put in code guards for each resource, to protect against redefinition of //code in the layered build cases. Also inject base require calls if there is //a layer with the customBase attribute. Do this here before the layers are built. if(copiedFiles){ var needBaseRequires = false; var layers = kwArgs.profileProperties.dependencies.layers; if(layers){ for(var i = 0; i < layers.length; i++){ if((needBaseRequires = layers[i].customBase)){ break; } } } buildUtil.addGuardsAndBaseRequires(copiedFiles, needBaseRequires); }} |
}); | _dasherizeStyleName: function(name) { var dasherized = name.dasherize(); if (dasherized.match(/^(webkit|moz|ms|o)-/)) dasherized = '-'+dasherized; return dasherized; } |
|
if (dasherized.match(/^(webkit|moz|msie|o)[A-Z]/)) dasherized = '-'+dasherized; | if (dasherized.match(/^(webkit|moz|ms|o)-/)) dasherized = '-'+dasherized; | _dasherizeStyleName: function(name) { var dasherized = name.dasherize(); if (dasherized.match(/^(webkit|moz|ms|o)-/)) dasherized = '-'+dasherized; return dasherized; Converts camelCased style names to dasherized forms */ _dasherizeStyleName: function(name) { var dasherized = name.dasherize(); if (dasherized.match(/^(webkit|moz|msie|o)[A-Z]/)) dasherized = '-'+dasherized; return dasherized; } }); |
this[this.get('renderStyle')](context, firstTime); | this[this.get('renderStyle') || 'renderDefault'](context, firstTime); | _DEPRECATED_render: function(context, firstTime) { // add href attr if tagName is anchor... var href, toolTip, classes, theme; if (this.get('tagName') === 'a') { href = this.get('href'); if (!href || (href.length === 0)) href = "javascript:;"; context.attr('href', href); } // If there is a toolTip set, grab it and localize if necessary. toolTip = this.get('toolTip') ; if (SC.typeOf(toolTip) === SC.T_STRING) { if (this.get('localize')) toolTip = toolTip.loc() ; context.attr('title', toolTip) ; context.attr('alt', toolTip) ; } // add some standard attributes & classes. classes = this._TEMPORARY_CLASS_HASH; classes.def = this.get('isDefault'); classes.cancel = this.get('isCancel'); classes.icon = !!this.get('icon'); context.attr('role', 'button').setClass(classes); theme = this.get('theme'); if (theme && !context.hasClass(theme)) context.addClass(theme); // render inner html this[this.get('renderStyle')](context, firstTime); }, |
theme = this.get('theme'); | theme = this.get('themeName'); | _DEPRECATED_render: function(context, firstTime) { // add href attr if tagName is anchor... var href, toolTip, classes, theme; if (this.get('tagName') === 'a') { href = this.get('href'); if (!href || (href.length === 0)) href = "javascript:;"; context.attr('href', href); } // If there is a toolTip set, grab it and localize if necessary. toolTip = this.get('toolTip') ; if (SC.typeOf(toolTip) === SC.T_STRING) { if (this.get('localize')) toolTip = toolTip.loc() ; context.attr('title', toolTip) ; context.attr('alt', toolTip) ; } // add some standard attributes & classes. classes = this._TEMPORARY_CLASS_HASH; classes.def = this.get('isDefault'); classes.cancel = this.get('isCancel'); classes.icon = !!this.get('icon'); context.attr('role', 'button').setClass(classes); theme = this.get('theme'); if (theme && !context.hasClass(theme)) context.addClass(theme); // render inner html this[this.get('renderStyle')](context, firstTime); }, |
_each: function(iterator) { this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator); }, | 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])*?\*\ | _each: function(iterator) { this.element.className.split(/\s+/).select(function(name) { return name.length > 0; })._each(iterator); }, |
if (!this.get('isEditing')) return YES ; | _endEditing: function(finalValue, evt, didDiscard) { if (!this.get('isEditing')) return YES ; // get permission from the delegate. var del = this.get('editorDelegate') ; if (!del.inlineEditorShouldCommitEditing(this, finalValue)) { //@if(debug) SC.Logger.warn('InlineTextField._endEditing() cannot end without inlineEditorShouldCommitEditing() on the delegate.'); //@end return NO; } // OK, we are allowed to end editing. Notify delegate of final value // and clean up. del.inlineEditorDidEndEditing(this, finalValue); // If the delegate set a class name, let's clean it up: if(this._className) this.setClassName(this._className, false); // cleanup cached values this._originalValue = this._delegate = this._exampleElement = this._optframe = this._className = null ; this.set('isEditing', NO) ; // resign first responder if not done already. This may call us in a // loop but since isEditing is already NO, nothing will happen. if (this.get('isFirstResponder')) { var pane = this.get('pane'); if (pane && this._previousFirstResponder) { pane.makeFirstResponder(this._previousFirstResponder); } else this.resignFirstResponder(); } this._previousFirstResponder = null ; // clearout no matter what if (this.get('parentNode')) this.removeFromParent() ; return YES ; }, |
|
if (!this.get('isEditing') || !del) return YES ; | _endEditing: function(finalValue, evt, didDiscard) { if (!this.get('isEditing')) return YES ; // get permission from the delegate. var del = this.get('editorDelegate') ; if (!del.inlineEditorShouldCommitEditing(this, finalValue)) { //@if(debug) SC.Logger.warn('InlineTextField._endEditing() cannot end without inlineEditorShouldCommitEditing() on the delegate.'); //@end return NO; } // OK, we are allowed to end editing. Notify delegate of final value // and clean up. del.inlineEditorDidEndEditing(this, finalValue); // If the delegate set a class name, let's clean it up: if(this._className) this.setClassName(this._className, false); // cleanup cached values this._originalValue = this._delegate = this._exampleElement = this._optframe = this._className = null ; this.set('isEditing', NO) ; // resign first responder if not done already. This may call us in a // loop but since isEditing is already NO, nothing will happen. if (this.get('isFirstResponder')) { var pane = this.get('pane'); if (pane && this._previousFirstResponder) { pane.makeFirstResponder(this._previousFirstResponder); } else this.resignFirstResponder(); } this._previousFirstResponder = null ; // clearout no matter what if (this.get('parentNode')) this.removeFromParent() ; return YES ; }, |
|
_expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.mapLeader), | _expandLeader: function (keyString) keyString.replace(/<Leader>/i, options["mapleader"]), | _expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.mapLeader), |
if (args.last != null) context.quote = [args.last, function (text) util.escapeString(text.substr(args.offset), ""), args.last]; else | if (args.last == null) | _fill: function (context, args) { context.title = [args.name]; context.anchored = args.anchored; context.filter = args.filter; context.itemCache = context.parent.itemCache; context.key = args.name + args.last; if (args.last != null) context.quote = [args.last, function (text) util.escapeString(text.substr(args.offset), ""), args.last]; else // We're not looking for a quoted string, so filter out anything that's not a valid identifier context.filters.push(function (item) /^[a-zA-Z_$][\w$]*$/.test(item.text)); args.completer.call(self, context, args.obj); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.