rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
args.completer.call(self, context, args.obj);
args.completer.call(self, context, args);
_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, fu...
context.key = name;
context.key = name + last;
_fill: function (context, obj, name, compl, anchored, key, last, offset) { context.title = [name]; context.anchored = anchored; context.filter = key; context.itemCache = context.parent.itemCache; context.key = name; if (last != null) context.quote = [last, functi...
if (queue && queue.members.length ) {
if (queue && queue.getMembers().length ) {
_flushinvokeLastQueue: function() { var queue = this._invokeLastQueue, hadContent = NO ; if (queue && queue.members.length ) { this._invokeLastQueue = null; // reset queue. hadContent = YES; // has targets! if (hadContent) queue.invokeMethods(); } return hadContent ; }
rect = elem.getClientRects()[0] || rect;
_generate: function (win) { if (!win) win = window.content; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, ...
for (let elem in res) {
let elem; while (elem = res.iterateNext()) {
_generate: function (win) { if (!win) win = window.content; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, ...
if (!this._top) { this._top = win; win.addEventListener("resize", this._resizeTimer.closure.tell, true); }
_generate: function (win) { if (!win) win = window.content; if (!this._top) { this._top = win; win.addEventListener("resize", this._resizeTimer.closure.tell, true); } let doc = win.document; let height = win.innerHeight; let width = win.inn...
let height = win.innerHeight; let width = win.innerWidth;
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
while (elem = res.iterateNext()) {
let that = this; function makeHint (elem) { let rect = elem.getClientRects()[0];
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
rect = elem.getBoundingClientRect(); if (!rect || rect.top > height || rect.bottom < 0 || rect.left > width || rect.right < 0) continue; rect = elem.getClientRects()[0]; if (!rect) continue; let computedStyle = doc.defaultView.getComputedStyle(elem, null); if (computedStyle.getPropertyValue("visibility") != "visible...
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
[hint.text, hint.showText] = this._getInputHint(elem, doc);
[hint.text, hint.showText] = that._getInputHint(elem, doc);
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
[leftPos, topPos] = this._getAreaOffset(elem, leftPos, topPos);
[leftPos, topPos] = that._getAreaOffset(elem, leftPos, topPos);
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
this._pageHints.push(hint);
that._pageHints.push(hint); } while (elem = res.iterateNext()) { let rect = elem.getBoundingClientRect(); if (rect.width == 0 || rect.height == 0) { let hasFloatChild = false; for (let i = 0; i < elem.childNodes.length; i++) { if (elem.childNodes[i].nodeType != 1) continue; let computedStyle = doc.defaultView.get...
_generate: function (win) { if (!win) win = config.browser.contentWindow; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highli...
continue; rect = elem.getClientRects()[0]; if (!rect)
_generate: function (win) { if (!win) win = window.content; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, ...
rect = elem.getBoundingClientRect();
let rect = elem.getBoundingClientRect();
_generate: function (win) { if (!win) win = window.content; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, ...
if (computedStyle.getPropertyValue("visibility") != "visible" || computedStyle.getPropertyValue("display") == "none")
if (computedStyle["visibility"] != "visible" || computedStyle["display"] == "none")
_generate: function (win) { if (!win) win = window.content; let doc = win.document; let height = win.innerHeight; let width = win.innerWidth; let [offsetX, offsetY] = this._getContainerOffsets(doc); let baseNodeAbsolute = util.xmlToDom(<span highlight="Hint"/>, ...
if (this._combo[this._comboKeys[i]]) { codes.push(this._comboCodes[i]);
if (this._combo[this._comboKeys.charAt(i)]) { codes.push(this._comboCodes.charAt(i));
_getComboString: function () { var codes = []; for (var i = 0; i < this._comboMaxLength; ++i) { if (this._combo[this._comboKeys[i]]) { codes.push(this._comboCodes[i]); } } var s = codes.join(""); if (this._xformRules) { // apply tran...
Element._getContentFromAnonymousElement = function(tagName, html) { var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; if (t) { div.innerHTML = t[0] + html + t[1]; t[2].times(function() { div = div.firstChild }); } else div.innerHTML = html; return $A(div.childNodes); };
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(...
Element._getContentFromAnonymousElement = function(tagName, html) { var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; if (t) { div.innerHTML = t[0] + html + t[1]; t[2].times(function() { div = div.firstChild }); } else div.innerHTML = html; return $A(div.childNodes);};
let selController = this.selectionController;
let selController = buffer.selectionController;
function _getCurrentWord (win) { let selection = win.getSelection(); if (selection.rangeCount <= 0) return; let range = selection.getRangeAt(0); if (selection.isCollapsed) { let selController = this.selectionController; let...
if (ret) ret = ret.create();
if (ret && ret.isClass) ret = ret.create();
_getDataSource: function() { var ret = this.get('dataSource'); if (typeof ret === SC.T_STRING) { ret = SC.objectForPropertyPath(ret); if (ret) ret = ret.create(); if (ret) this.set('dataSource', ret); } return ret; },
document._getElementsByXPath = function(expression, parentElement) { var results = []; var query = document.evaluate(expression, $(parentElement) || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0, length = query.snapshotLength; i < length; i++) results.push(Element.extend(query.snapshotIt...
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(...
document._getElementsByXPath = function(expression, parentElement) { var results = []; var query = document.evaluate(expression, $(parentElement) || document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0, length = query.snapshotLength; i < length; i++) results.push(Element.ex...
_getHeaderJSON: function() { var json = this.getHeader('X-JSON'); if (!json) return null; json = decodeURIComponent(escape(json)); try { return json.evalJSON(this.request.options.sanitizeJSON || !this.request.isSameOrigin()); } catch (e) { this.request.dispatchException(e); } },
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(...
_getHeaderJSON: function() { var json = this.getHeader('X-JSON'); if (!json) return null; json = decodeURIComponent(escape(json)); try { return json.evalJSON(this.request.options.sanitizeJSON || !this.request.isSameOrigin()); } catch (e) { this.request.dispatchException(e); } },
return this._input.slice(0);
if (this._xformRules) { var s = this._input.join(""); $.each(this._xformRules, function (i_, r) { s = s.replace(r.pattern, r.repl); }); return s.split(""); } else { return this._input.slice(0); }
_getInput: function() { // TODO: apply transform rules return this._input.slice(0); },
for (let [, option] in Iterator(options["hintinputs"].split(","))) {
for (let [, option] in Iterator(options["hintinputs"])) {
_getInputHint: function (elem, doc) { // <input type="submit|button|reset"/> Always use the value // <input type="radio|checkbox"/> Use the value if it is not numeric or label or name // <input type="password"/> Never use the value, use label or name // <input type=...
if (elem instanceof HTMLInputElement && /(submit|button|this._reset)/.test(type))
if (elem instanceof HTMLInputElement && /(submit|button|reset)/.test(type))
_getInputHint: function (elem, doc) { // <input type="submit|button|reset"/> Always use the value // <input type="radio|checkbox"/> Use the value if it is not numeric or label or name // <input type="password"/> Never use the value, use label or name // <input type=...
let key = this._str.substring(this._get(-2, 0, "statements"), this._get(-1, null, "offset")) + "''";
let key = this._str.substring(this._get(-2, null, "offset") + 1, this._get(-1, null, "offset")) + "''";
_getKey: function () { if (this._last == "") return ""; // After the opening [ upto the opening ", plus '' to take care of any operators before it let key = this._str.substring(this._get(-2, 0, "statements"), this._get(-1, null, "offset")) + "''"; // Now eval the key, to proce...
return $.grep(this._slots, function (e) { return e; }).join("");
var k = this._keyword.join(""); return this._xform ? this._xform(k) : k;
_getKeyword: function () { return $.grep(this._slots, function (e) { return e; }).join(""); },
if (prev != statement && obj == null) { this.context.message = "Error: " + cacheKey.quote() + " is " + String(obj); return []; }
_getObj: function (frame, stop) { let statement = this._get(frame, 0, "statements") || 0; // Current statement. let prev = statement; let obj; let cacheKey; for (let [, dot] in Iterator(this._get(frame).dots.concat(stop))) { if (dot < statement) continue;...
let obj = null;
let obj = window;
_getObj: function (frame, stop) { let statement = this._get(frame, 0, "statements") || 0; // Current statement. let prev = statement; let obj = null; let cacheKey; for (let [, dot] in Iterator(this._get(frame).dots.concat(stop))) { if (dot < statement) co...
_getResponseJSON: function() { var options = this.request.options; if (!options.evalJSON || (options.evalJSON != 'force' && !(this.getHeader('Content-type') || '').include('application/json')) || this.responseText.blank()) return null; try { return this.responseText.evalJSON(options.sanitizeJSON || !this.request.isSame...
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(...
_getResponseJSON: function() { var options = this.request.options; if (!options.evalJSON || (options.evalJSON != 'force' && !(this.getHeader('Content-type') || '').include('application/json')) || this.responseText.blank()) return null; try { return this.responseText.evalJSON(options...
this.debug(e);
this.error(e);
doh._handleFailure = function(groupName, fixture, e){ // this.debug("FAILED test:", fixture.name); // mostly borrowed from JUM this._groups[groupName].failures++; var out = ""; if(e instanceof this._AssertFailure){ this._failureCount++; if(e["fileName"]){ out += e.fileName + ':'; } if(e["lineNumber"]){ out += e.line...
assertOrRenderError(request.method in methods,
logger.debug(request.method); assertOrRenderError(validMethods.contains(request.method),
this._handleRequest = function (request, response) { getRequestBody(request).addCallback(bind(this, function(body) { logger.debug('received request', request.url); try { var uri = nodeUrl.parse(request.url, true), path = uri.pathname, sessionUrl = this._sessionUrl; assertOrRenderError(startswith(pat...
assertOrRenderError(resources.hasOwnProperty(resource),
assertOrRenderError(validResources.contains(resource),
this._handleRequest = function (request, response) { getRequestBody(request).addCallback(bind(this, function(body) { logger.debug('received request', request.url); try { var uri = nodeUrl.parse(request.url, true), path = uri.pathname, sessionUrl = this._sessionUrl; assertOrRenderError(startswith(pat...
debug('INVALID HANDSHAKE, ', request, err);
logger.debug('INVALID HANDSHAKE, ', request, err);
this._handleRequest = function (request, response) { getRequestBody(request).addCallback(bind(this, function(body) { logger.debug('received request', request.url); try { var uri = nodeUrl.parse(request.url, true), path = uri.pathname, sessionUrl = this._sessionUrl; assertOrRenderError(startswith(pat...
var session = new csp.Session(); var connection = new csp.Connection(session);
var session = new exports.Session(); var connection = new exports.Connection(session);
this._handleRequest = function (request, response) { getRequestBody(request).addCallback(bind(this, function(body) { logger.debug('received request', request.url); try { var uri = nodeUrl.parse(request.url, true), path = uri.pathname, sessionUrl = this._sessionUrl; assertOrRenderError(startswith(pat...
debug('Unexpected Error: ', err.message);
logger.debug('Unexpected Error: ', err.message);
this._handleRequest = function (request, response) { getRequestBody(request).addCallback(bind(this, function(body) { logger.debug('received request', request.url); try { var uri = nodeUrl.parse(request.url, true), path = uri.pathname, sessionUrl = this._sessionUrl; assertOrRenderError(startswith(pat...
body.css('overflow', 'hidden');
SC.PICKERS_OPEN++; if(SC.PICKERS_OPEN > 0) body.css('overflow', 'hidden');
_hideOverflow: function(){ var body = SC.$(document.body), main = SC.$('.sc-main'), minWidth = parseInt(main.css('minWidth'),0), minHeight = parseInt(main.css('minHeight'),0), windowSize = SC.RootResponder.responder.get('currentWindowSize'); if(windowSize.width>=minWidth && windowSiz...
completion.history = function _history(context, maxItems) {
completion.history = function _history(context, args, maxItems) {
completion.history = function _history(context, maxItems) { context.format = history.format; context.title = ["History"]; context.compare = CompletionContext.Sort.unsorted; //context.background = true; if (context.maxItems == null) context.ma...
_htmlForTitleAndIcon: function(displayProperties) { var title = displayProperties.title, titleMinWidth = displayProperties.titleMinWidth, hint = displayProperties.hint, escapeHTML = displayProperties.escapeHTML, icon = displayProperties.icon || '';
_htmlForTitleAndIcon: function(dataSource) { var title = dataSource.get('title'), titleMinWidth = dataSource.get('titleMinWidth'), hint = dataSource.get('hint'), escapeHTML = dataSource.get('escapeHTML'), icon = dataSource.get('icon') || '';
_htmlForTitleAndIcon: function(displayProperties) { var title = displayProperties.title, titleMinWidth = displayProperties.titleMinWidth, hint = displayProperties.hint, escapeHTML = displayProperties.escapeHTML, icon = displayProperties.icon || ''; // Escape the title of the button i...
} else { this._setupIdle();
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; // if no recent events (within < 1s) if (Date.now() - last > this.get('minimumIdleDuration')) { SC.run(this.run, this); SC.RunLoop.lastRunLoopEnd = last; // we were never here } else { this._se...
this._setupIdle();
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; // if no recent events (within < 1s) if (Date.now() - last > this.get('minimumIdleDuration')) { SC.run(this.run, this); SC.RunLoop.lastRunLoopEnd = last; // we were never here } else { this._se...
this.run();
SC.run(this.run, this); SC.RunLoop.lastRunLoopEnd = last;
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; if (Date.now() - last > this.get('minimumIdleDuration')) { // if no recent events (within < 1s) this.run(); } else { SC.run(this._doSetupIdle, this); SC.RunLoop.lastRunLoopEnd = last; // we were ...
SC.run(this._doSetupIdle, this); SC.RunLoop.lastRunLoopEnd = last;
this._setupIdle();
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; if (Date.now() - last > this.get('minimumIdleDuration')) { // if no recent events (within < 1s) this.run(); } else { SC.run(this._doSetupIdle, this); SC.RunLoop.lastRunLoopEnd = last; // we were ...
} else { this._setupIdle();
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; // if no recent events (within < 1s) if (Date.now() - last > this.get('minimumIdleDuration')) { SC.run(this.run, this); SC.RunLoop.lastRunLoopEnd = last; // we were never here } else { this._se...
} else { this._setupIdle();
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; // if no recent events (within < 1s) if (Date.now() - last > this.get('minimumIdleDuration')) { SC.run(this.run, this); SC.RunLoop.lastRunLoopEnd = last; // we were never here } // set up idl...
SC.run(function() { this._setupIdle(); }, this);
SC.run(this._doSetupIdle, this);
_idleEntry: function() { this._idleIsScheduled = NO; var last = SC.RunLoop.lastRunLoopEnd; if (Date.now() - last > this.get('minimumIdleDuration')) { // if no recent events (within < 1s) this.run(); } else { SC.run(function() { this._setupIdle(); }, this); SC.RunLoo...
this._queries = {};
var queries = {};
_indexQueries: function (ctx) { var maxKeywordLength = ctx.schema.maxKeywordLength; var maxKeyLength = ctx.schema.maxKeyLength; var a = ctx._segmentation.a; var b = ctx._segmentation.b; this._queries = {}; var q = []; for (var i = 0; i < b.length; ++i) { v...
this._registerQuery(r);
this._registerQuery(queries, r);
_indexQueries: function (ctx) { var maxKeywordLength = ctx.schema.maxKeywordLength; var maxKeyLength = ctx.schema.maxKeyLength; var a = ctx._segmentation.a; var b = ctx._segmentation.b; this._queries = {}; var q = []; for (var i = 0; i < b.length; ++i) { v...
me._registerQuery(r);
me._registerQuery(queries, r);
_indexQueries: function (ctx) { var maxKeywordLength = ctx.schema.maxKeywordLength; var maxKeyLength = ctx.schema.maxKeyLength; var a = ctx._segmentation.a; var b = ctx._segmentation.b; this._queries = {}; var q = []; for (var i = 0; i < b.length; ++i) { v...
return queries;
_indexQueries: function (ctx) { var maxKeywordLength = ctx.schema.maxKeywordLength; var maxKeyLength = ctx.schema.maxKeyLength; var a = ctx._segmentation.a; var b = ctx._segmentation.b; this._queries = {}; var q = []; for (var i = 0; i < b.length; ++i) { v...
div.scrollIntoView(true);
this._div.scrollIntoView(true);
_init: function () { this._div = this._dom( <div class="ex-command-output" highlight="Normal" style="white-space: nowrap"> <div highlight="Completions" key="noCompletions"><span highlight="Title">No Completions</span></div> <div key="completions"/> <div...
util.scrollIntoView(this._div);
util.scrollIntoView(this._div, true);
_init: function () { this._div = this._dom( <div class="ex-command-output" highlight="Normal" style="white-space: nowrap"> <div highlight="Completions" key="noCompletions"><span highlight="Title">No Completions</span></div> <div key="completions"/> <div...
if (!menu.isClass || !menu) return;
if (!menu || !menu.isClass) return;
_instantiateMenu: function() { // get menu var menu = this.get('menu'); // if it is already instantiated or does not exist, we cannot do anything if (!menu.isClass || !menu) return; // create this.menu = menu.create(); // setup this._setupMenu(); },
return this._isInsideElementWithClassName('disclosure', evt);
return this._isInsideElementWithClassName('sc-list-item-disclosure', evt);
_isInsideDisclosure: function(evt) { if (this.get('disclosureState')===SC.LEAF_NODE) return NO; return this._isInsideElementWithClassName('disclosure', evt); },
var cq = this.renderer.$(this.sel);
var cq = this.renderer.$(this.selector); console.error("FINDING " + cq + " " + this.selector + " " + cq[0]);
_layerFinder: function() { var cq = this.renderer.$(this.sel); return cq[0]; },
if (!layout) return;
_layoutDidUpdate: function(){ var layout = this.get('layout'); this.dims = SC._VIEW_DEFAULT_DIMS; this.loc = this.dims.length; var right = this.right = layout.right; this.hasRight = (right != null); var left = this.left = layout.left; this.hasLeft = (left != null); var top = this.top = layout....
this.minWidth = (this.minWidth === undefined) ? null : this.minWidth;
this.minWidth = (layout.minWidth === undefined) ? null : layout.minWidth;
_layoutDidUpdate: function(){ var layout = this.get('layout'); if (!layout) return; this.dims = SC._VIEW_DEFAULT_DIMS; this.loc = this.dims.length; var right = this.right = layout.right; this.hasRight = (right != null); var left = this.left = layout.left; this.hasLeft = (left != null); var ...
var maxWidth = this.maxWidth = layout.maxWidth;
var maxWidth = this.maxWidth = (layout.maxWidth === undefined) ? null : layout.maxWidth;
_layoutDidUpdate: function(){ var layout = this.get('layout'); if (!layout) return; this.dims = SC._VIEW_DEFAULT_DIMS; this.loc = this.dims.length; var right = this.right = layout.right; this.hasRight = (right != null); var left = this.left = layout.left; this.hasLeft = (left != null); var ...
this.minHeight = (this.minHeight === undefined) ? null : this.minHeight;
this.minHeight = (layout.minHeight === undefined) ? null : layout.minHeight;
_layoutDidUpdate: function(){ var layout = this.get('layout'); if (!layout) return; this.dims = SC._VIEW_DEFAULT_DIMS; this.loc = this.dims.length; var right = this.right = layout.right; this.hasRight = (right != null); var left = this.left = layout.left; this.hasLeft = (left != null); var ...
var maxHeight = this.maxHeight = layout.maxHeight;
var maxHeight = this.maxHeight = (layout.maxHeight === undefined) ? null : layout.maxHeight;
_layoutDidUpdate: function(){ var layout = this.get('layout'); if (!layout) return; this.dims = SC._VIEW_DEFAULT_DIMS; this.loc = this.dims.length; var right = this.right = layout.right; this.hasRight = (right != null); var left = this.left = layout.left; this.hasLeft = (left != null); var ...
$.getJSON(this.DATA_DIR + encodeURIComponent(schemaName) + this.CONFIG, null, callback);
$.getJSON(this.DATA_DIR + this.encode(schemaName) + this.CONFIG, null, callback);
_loadConfig: function (schemaName, callback) { $.getJSON(this.DATA_DIR + encodeURIComponent(schemaName) + this.CONFIG, null, callback); },
$.getJSON(this.DATA_DIR + schemaName + this.CONFIG, null, callback);
$.getJSON(this.DATA_DIR + schemaName + this.CONFIG, null, function(config) { for (var k in config.fuzzyMap) { var s = {}; $.each(config.fuzzyMap[k], function(i, e) { s[e] = true; }); config.fuzzyMap[k] = s; } callback(config); });
_loadConfig: function (schemaName, callback) { $.getJSON(this.DATA_DIR + schemaName + this.CONFIG, null, callback); },
$.getJSON(this.DATA_DIR + encodeURIComponent(prefix) + this.JSON, null, function (data) {
$.getJSON(this.DATA_DIR + this.encode(prefix) + this.JSON, null, function (data) {
_loadDict: function (schema, callback) { var me = this; var prefix = schema.prefix; $.getJSON(this.DATA_DIR + encodeURIComponent(prefix) + this.JSON, null, function (data) { data.prefix = prefix; me._dict = data; if (callback) { callback(schema); ...
e.prob = (e.unigram[2] + 0.1) / total * p;
e.prob = (e.unigram[2] + 0.1) / total * p * penalty;
_makePrediction: function (phrase, seg) { var total = this._dict.freqTotal + 0.1; var d = []; for (var j = seg.m; j >= 0; --j) { var p = (j == seg.m) ? 1.0 : (d[j] == undefined) ? 0.0 : d[j].prob; for (var i = 0; i < j; ++i) { var c; if (phras...
some(function (m) m.rhs && m.rhs === map.rhs && m.name === map.name))))
some(function (m) m.rhs && m.rhs === map.rhs && m.name === map.name))));
_mappingsIterator: function (modes, stack) { modes = modes.slice(); return (map for ([i, map] in Iterator(stack[modes.shift()].sort(function (m1, m2) String.localeCompare(m1.name, m2.name)))) if (map.rhs && modes.every(function (mode) stack[mode]. some(function (m) m.rhs ...
if (modes.every(function (mode) stack[mode]. some(function (m) array.equals(m.rhs, map.rhs) && m.name == map.name))))
if (map.rhs && modes.every(function (mode) stack[mode]. some(function (m) m.rhs && array.equals(m.rhs, map.rhs) && m.name == map.name))))
_mappingsIterator: function (modes, stack) { modes = modes.slice(); return (map for ([i, map] in Iterator(stack[modes.shift()].sort(function (m1, m2) String.localeCompare(m1.name, m2.name)))) if (modes.every(function (mode) stack[mode]. some(function (m) array.equals(m.rh...
_matchKey: function (k, i, seg, fuzzyMap) {
_matchKey: function (k, i, a, predict, fuzzyMap) {
_matchKey: function (k, i, seg, fuzzyMap) { if (k.length == 0) { return i; } // predict phrase if (i == seg.n) { return i; } var result = 0; var me = this; $.each(seg.a, function (j, c) { if (c && c[i]) { var fou...
if (i == seg.n) {
if (i == predict) {
_matchKey: function (k, i, seg, fuzzyMap) { if (k.length == 0) { return i; } // predict phrase if (i == seg.n) { return i; } var result = 0; var me = this; $.each(seg.a, function (j, c) { if (c && c[i]) { var fou...
var me = this; $.each(seg.a, function (j, c) { if (c && c[i]) { var found = false; $.each(fuzzyMap[c[i]], function (i_, t) { if (k[0] == t) { found = true; return false; } }); if (found) { var r = me._matchKey(k.slice(1), j, seg, fuzzyMap); if (r) { result = r; return false; }
for (var j = a.length - 1; j > i; --j) { var kw = a[j] && a[j][i]; if (!kw) continue; var s = fuzzyMap[kw]; if (s && s[k[0]]) { var r = this._matchKey(k.slice(1), j, a, predict, fuzzyMap); if (r) { result = r; break;
_matchKey: function (k, i, seg, fuzzyMap) { if (k.length == 0) { return i; } // predict phrase if (i == seg.n) { return i; } var result = 0; var me = this; $.each(seg.a, function (j, c) { if (c && c[i]) { var fou...
});
}
_matchKey: function (k, i, seg, fuzzyMap) { if (k.length == 0) { return i; } // predict phrase if (i == seg.n) { return i; } var result = 0; var me = this; $.each(seg.a, function (j, c) { if (c && c[i]) { var fou...
return this._methodized = function() { return __method.apply(null, [this].concat($A(arguments))); };
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(...
return this._methodized = function() { return __method.apply(null, [this].concat($A(arguments))); };
childViews[idx].notifyPropertyChange("baseTheme");
_notifyThemeDidChange: function() { var len, idx, childViews = this.get("childViews"); len = childViews.length; for (idx = 0; idx < len; idx++){ childViews[idx].notifyPropertyChange("theme"); } },
this._prevInput = "text";
this.prevInput = "text";
_onInput: function (event) { this._prevInput = "text"; // clear any timeout which might be active after pressing a number if (this._activeTimeout) { this._activeTimeout.cancel(); this._activeTimeout = null; } this._hintNumber = 0; this._hintString = co...
if (this.encoding == 'utf8') data = utf8.decode(data);
if (this.encoding == 'utf8') { var raw = utf8.decode(data); var length = raw[1]; if (length != data.length) { throw new Error("Incomplete utf8 codepoint"); } data = raw[0] }
this._onreadraw = function(data) { if (this.encoding == 'utf8') data = utf8.decode(data); loggers.stream.debug('_onreadraw '+data); this.onread(data); }
return;
this._onReadyStateChange = function(rType, cb, eb) { try { var xhr = this._xhr[rType]; if(xhr.readyState != 4) { return; } if(xhr.status != 200) { logger.debug('XHR failed with status ', xhr.status); eb(); } logger.debug('XHR data received'); cb(eval(xhr.responseText)); } catch(e) { var xhr = ...
if (options["focuscontent"]) this.timeout(function () { dactyl.focusContent(true); }, 10);
_onTabSelect: function () { // TODO: is all of that necessary? // I vote no. --Kris modes.reset(); statusline.updateTabCount(true); this.updateSelectionHistory(); if (options["focuscontent"]) this.timeout(function () { dactyl.focusContent(true); }, 10); // ...
var newObj=editor.dom.create(tagname);editor.dom.setAttribs(newObj,args);if(tinymce.isIE){newObj.innerHTML=targetObj.innerHTML;targetObj.parentNode.replaceChild(newObj,targetObj);}else{editor.dom.replace(newObj,targetObj,true);} tagList=doc.getElementsByTagName(org_tagname);}
var newObj=editor.dom.create(tagname);editor.dom.setAttribs(newObj,args);editor.dom.replace(newObj,targetObj,true);tagList=doc.getElementsByTagName(org_tagname);}
id=t.prefix+id;s=tinymce.extend({title:s.title,'class':'mce_'+id,'menu_class':ed.getParam('skin')+'Skin',scope:s.scope},s);c=new tinymce.ui.OpenPNECmdButton(id,s);ed.onPostRender.add(function(){var parentContainer=document.getElementById(c.id).parentNode;parentContainer.style.width="70px";});ed.onRemove.add(function(){...
rep(/<\/?div>/gi,"");if(Prototype.Browser.IE){rep(/<(\/?)op(b|u|s|i|font|large|small|color)/gi,'<$1op:$2');}
rep(/<\/?div>/gi,"");if(Prototype.Browser.IE){rep(/<(\/?):?op(b|u|s|i|font|large|small|color)/gi,'<$1op:$2');}
id=t.prefix+id;s=tinymce.extend({title:s.title,'class':'mce_'+id,'menu_class':ed.getParam('skin')+'Skin',scope:s.scope},s);c=new tinymce.ui.OpenPNECmdButton(id,s);ed.onPostRender.add(function(){var parentContainer=document.getElementById(c.id).parentNode;parentContainer.style.width="70px";});ed.onRemove.add(function(){...
this._hintMode.action(elem, elem.href || "", this._extendedhintCount);
this._hintMode.action(elem, elem.href || "", this._extendedhintCount, top);
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
if (this._continue) {
if (this._continue)
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
if (this._validHints.length <= 1) this._showHints(); } else {
else
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
}
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
else if (!this._top)
else if (!this._validHints.some(function (h) h.elem == elem))
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
if (timeout == 0) events.onFocusChange();
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
let n = 3; (function next() { this._setClass(elem, n % 2); if (n--) this.timeout(next, 50); else if (!this._top) elem.removeAttributeNS(NS, "highlight"); }).call(this);
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
modes.reset();
modes.pop();
_processHints: function (followFirst) { if (this._validHints.length == 0) { dactyl.beep(); return false; } // This "followhints" option is *too* confusing. For me, and // presumably for users, too. --Kris if (options["followhints"] > 0) { if (!foll...
_registerQuery: function (r) {
_registerQuery: function (queries, r) {
_registerQuery: function (r) { //Logger.debug("registerQuery: [" + r.start + ", " + r.end + ") " + r.ikey); var index = r.ikey.slice(0, this._dict.indexingLevel).join("_"); if (this._queries[index]) this._queries[index].push(r); else this._queries[index] = [r]; }...
if (this._queries[index]) this._queries[index].push(r);
if (queries[index]) queries[index].push(r);
_registerQuery: function (r) { //Logger.debug("registerQuery: [" + r.start + ", " + r.end + ") " + r.ikey); var index = r.ikey.slice(0, this._dict.indexingLevel).join("_"); if (this._queries[index]) this._queries[index].push(r); else this._queries[index] = [r]; }...
this._queries[index] = [r];
queries[index] = [r];
_registerQuery: function (r) { //Logger.debug("registerQuery: [" + r.start + ", " + r.end + ") " + r.ikey); var index = r.ikey.slice(0, this._dict.indexingLevel).join("_"); if (this._queries[index]) this._queries[index].push(r); else this._queries[index] = [r]; }...
this._checkboxRenderer.attr('classNames', { 'active': NO }); this._checkboxRenderer.update(this.$('.sc-checkbox-view'));
var source = this._checkboxRenderSource; if (!source) source = this._checkboxRenderSource = SC.Object.create(); source.set('isActive', NO); this._checkboxRenderDelegate.update(source, this.$('.sc-checkbox-view'));
_removeCheckboxActiveState: function() { if (this._checkboxRenderer) { this._checkboxRenderer.attr('classNames', { 'active': NO }); this._checkboxRenderer.update(this.$('.sc-checkbox-view')); } else { // for backwards-compatibility. this.$('.sc-checkbox-view').removeClass('active'); ...
if (!source) source = this._checkboxRenderSource = SC.Object.create();
_removeCheckboxActiveState: function() { if (this._checkboxRenderer) { var source = this._checkboxRenderSource; if (!source) source = this._checkboxRenderSource = SC.Object.create(); source.set('isActive', NO); this._checkboxRenderDelegate.update(source, this.$('.sc-checkbox-view')); }...
this.renderer.attr({ checkboxActive: NO }); this.displayDidChange();
this._checkboxRenderer.attr('classNames', { 'active': NO }); this._checkboxRenderer.update(this.$('.sc-checkbox-view'));
_removeCheckboxActiveState: function() { this.renderer.attr({ checkboxActive: NO }); this.displayDidChange(); },
this._disclosureRenderer.attr('classNames', { 'active': NO }); this._disclosureRenderer.update(this.$('.sc-disclosure-view'));
var source = this._disclosureRenderSource; source.set('isActive', NO); this._disclosureRenderDelegate.update(source, this.$('.sc-disclosure-view'));
_removeDisclosureActiveState: function() { if (this._disclosureRenderer) { this._disclosureRenderer.attr('classNames', { 'active': NO }); this._disclosureRenderer.update(this.$('.sc-disclosure-view')); } else { // for backwards-compatibility. this.$('.sc-disclosure-view').addClass('active');...
this.renderer.attr({ disclosureActive: NO }); this.displayDidChange();
this._disclosureRenderer.attr('classNames', { 'active': NO }); this._disclosureRenderer.update(this.$('.sc-list-item-disclosure'));
_removeDisclosureActiveState: function() { this.renderer.attr({ disclosureActive: NO }); this.displayDidChange(); },
for (let elem in util.evaluateXPath("
let result = util.evaluateXPath(" let hints = new Array(); let elem; while (elem = result.iterateNext()) hints.push(elem); while (elem = hints.pop())
_removeHints: function (timeout) { let firstElem = this._validHints[0] || null; for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let elem in util.evaluateXPath("//*[@liberator:highlight='hints']", doc)) elem.parentNode.removeChild(elem); ...
if (this._top) this._top.removeEventListener("resize", this._resizeTimer.closure.tell, true); this._top = null;
_removeHints: function (timeout, slight) { let firstElem = this._validHints[0] || null; if (this._top) this._top.removeEventListener("resize", this._resizeTimer.closure.tell, true); this._top = null; for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { ...
util.dump(String(doc), start, end);
_removeHints: function (timeout, slight) { for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc)) elem.parentNode.removeChild(elem); for (let i in util.range(start, end + 1)) ...
let firstElem = this._validHints[0] || null;
_removeHints: function (timeout, slight) { let firstElem = this._validHints[0] || null; for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc)) elem.parentNode.removeChild(elem); ...
for (let i in util.range(start, end + 1)) { let hint = this._pageHints[i]; if (!timeout || hint.elem != firstElem) hint.elem.removeAttributeNS(NS.uri, "highlight"); } if (timeout && firstElem) this.timeout(function () { firstElem.removeAttributeNS(NS.uri, "highlight"); }, timeout);
for (let i in util.range(start, end + 1)) this._pageHints[i].elem.removeAttributeNS(NS, "highlight");
_removeHints: function (timeout, slight) { let firstElem = this._validHints[0] || null; for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc)) elem.parentNode.removeChild(elem); ...
this._prevInput = "";
this.prevInput = "";
_reset: function () { statusline.updateInputBuffer(""); this._hintString = ""; this._hintNumber = 0; this._usedTabKey = false; this._prevInput = ""; this._pageHints = []; this._validHints = []; this._canUpdate = false; this._docs = []; hints.escN...
this._error = null;
if (this.pending) { this._backend.abortQuery(this); } this.pending = null; this.error = null;
_reset: function () { this.input = []; this._error = null; this._segmentation = null; this._display = null; this._selected = []; this._current = null; this._candidateList = null; },