repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
partition
stringclasses
1 value
jstransformers/inputformat-to-jstransformer
build.js
finishedInstall
function finishedInstall(err) { if (err) { throw new Error(err) } const dictionary = {} for (const i in list) { if (list[i]) { const name = list[i] const transformer = require('jstransformer-' + name) // eslint-disable-line import/no-dynamic-require const formats = transformer.inputFor...
javascript
function finishedInstall(err) { if (err) { throw new Error(err) } const dictionary = {} for (const i in list) { if (list[i]) { const name = list[i] const transformer = require('jstransformer-' + name) // eslint-disable-line import/no-dynamic-require const formats = transformer.inputFor...
[ "function", "finishedInstall", "(", "err", ")", "{", "if", "(", "err", ")", "{", "throw", "new", "Error", "(", "err", ")", "}", "const", "dictionary", "=", "{", "}", "for", "(", "const", "i", "in", "list", ")", "{", "if", "(", "list", "[", "i", ...
Write the dictionary.json based on the installed modules. @param {string} err The error that was reported.
[ "Write", "the", "dictionary", ".", "json", "based", "on", "the", "installed", "modules", "." ]
6e962561524f0bff7911d64f4be07dbc345800bf
https://github.com/jstransformers/inputformat-to-jstransformer/blob/6e962561524f0bff7911d64f4be07dbc345800bf/build.js#L34-L61
train
koa-modules/swig
index.js
setFilters
function setFilters(swig, filters) { for (var name in filters) { swig.setFilter(name, filters[name]); } }
javascript
function setFilters(swig, filters) { for (var name in filters) { swig.setFilter(name, filters[name]); } }
[ "function", "setFilters", "(", "swig", ",", "filters", ")", "{", "for", "(", "var", "name", "in", "filters", ")", "{", "swig", ".", "setFilter", "(", "name", ",", "filters", "[", "name", "]", ")", ";", "}", "}" ]
Add filters for Swig
[ "Add", "filters", "for", "Swig" ]
bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb
https://github.com/koa-modules/swig/blob/bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb/index.js#L146-L150
train
koa-modules/swig
index.js
setTags
function setTags(swig, tags) { var name, tag; for (name in tags) { tag = tags[name]; swig.setTag(name, tag.parse, tag.compile, tag.ends, tag.blockLevel); } }
javascript
function setTags(swig, tags) { var name, tag; for (name in tags) { tag = tags[name]; swig.setTag(name, tag.parse, tag.compile, tag.ends, tag.blockLevel); } }
[ "function", "setTags", "(", "swig", ",", "tags", ")", "{", "var", "name", ",", "tag", ";", "for", "(", "name", "in", "tags", ")", "{", "tag", "=", "tags", "[", "name", "]", ";", "swig", ".", "setTag", "(", "name", ",", "tag", ".", "parse", ",",...
Add tags for Swig
[ "Add", "tags", "for", "Swig" ]
bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb
https://github.com/koa-modules/swig/blob/bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb/index.js#L156-L162
train
koa-modules/swig
index.js
setExtensions
function setExtensions(swig, extensions) { for (var name in extensions) { swig.setExtension(name, extensions[name]); } }
javascript
function setExtensions(swig, extensions) { for (var name in extensions) { swig.setExtension(name, extensions[name]); } }
[ "function", "setExtensions", "(", "swig", ",", "extensions", ")", "{", "for", "(", "var", "name", "in", "extensions", ")", "{", "swig", ".", "setExtension", "(", "name", ",", "extensions", "[", "name", "]", ")", ";", "}", "}" ]
Add extensions for Swig
[ "Add", "extensions", "for", "Swig" ]
bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb
https://github.com/koa-modules/swig/blob/bcc02c5ef84210d8fc5fbc8ae809579fcecca4cb/index.js#L168-L174
train
stefanullinger/grunt-twig-render
Gruntfile.js
function (token, context, chain) { var // Parse the output without any filter unfiltered = Twig.parse.apply(this, [token.output, context]), // A regular expression to find closing and opening tags with spaces between them rBetweenTagSpaces = />\s+<...
javascript
function (token, context, chain) { var // Parse the output without any filter unfiltered = Twig.parse.apply(this, [token.output, context]), // A regular expression to find closing and opening tags with spaces between them rBetweenTagSpaces = />\s+<...
[ "function", "(", "token", ",", "context", ",", "chain", ")", "{", "var", "// Parse the output without any filter", "unfiltered", "=", "Twig", ".", "parse", ".", "apply", "(", "this", ",", "[", "token", ".", "output", ",", "context", "]", ")", ",", "// A re...
Parse the html and return it without any spaces between tags
[ "Parse", "the", "html", "and", "return", "it", "without", "any", "spaces", "between", "tags" ]
407c1f68026a27801af5445d8c254eb23967094f
https://github.com/stefanullinger/grunt-twig-render/blob/407c1f68026a27801af5445d8c254eb23967094f/Gruntfile.js#L231-L242
train
dannygarcia/grunt-jekyll
tasks/jekyll.js
configContext
function configContext (next) { if (options.raw) { // Tmp file is only available within the context of this function tmp.file({ prefix: '_config.', postfix: '.yml' }, function (err, path, fd) { rawConfigFile = path; if (err) { grunt.fail.warn(err); } // Write raw to file fs....
javascript
function configContext (next) { if (options.raw) { // Tmp file is only available within the context of this function tmp.file({ prefix: '_config.', postfix: '.yml' }, function (err, path, fd) { rawConfigFile = path; if (err) { grunt.fail.warn(err); } // Write raw to file fs....
[ "function", "configContext", "(", "next", ")", "{", "if", "(", "options", ".", "raw", ")", "{", "// Tmp file is only available within the context of this function", "tmp", ".", "file", "(", "{", "prefix", ":", "'_config.'", ",", "postfix", ":", "'.yml'", "}", ",...
Create temporary config file if needed
[ "Create", "temporary", "config", "file", "if", "needed" ]
24009febfb119fc4468710bab462f64f388b030a
https://github.com/dannygarcia/grunt-jekyll/blob/24009febfb119fc4468710bab462f64f388b030a/tasks/jekyll.js#L73-L92
train
filamentgroup/grunticon-lib
static/grunticon.embed.js
function(stylesheet, refresh){ if( icons && !refresh ){ return icons; } icons = {}; // get grunticon stylesheet by its href var svgss, rules, cssText, iconClass, iconSVGEncoded, iconSVGRaw; svgss = stylesheet.sheet; if( !svgss ){ return icons; } rules = svgss.cssRules ? svgss.cssRules : sv...
javascript
function(stylesheet, refresh){ if( icons && !refresh ){ return icons; } icons = {}; // get grunticon stylesheet by its href var svgss, rules, cssText, iconClass, iconSVGEncoded, iconSVGRaw; svgss = stylesheet.sheet; if( !svgss ){ return icons; } rules = svgss.cssRules ? svgss.cssRules : sv...
[ "function", "(", "stylesheet", ",", "refresh", ")", "{", "if", "(", "icons", "&&", "!", "refresh", ")", "{", "return", "icons", ";", "}", "icons", "=", "{", "}", ";", "// get grunticon stylesheet by its href", "var", "svgss", ",", "rules", ",", "cssText", ...
this function can rip the svg markup from the css so we can embed it anywhere
[ "this", "function", "can", "rip", "the", "svg", "markup", "from", "the", "css", "so", "we", "can", "embed", "it", "anywhere" ]
2b7ecfe54a19a8d2429996cb456c7dd4ce04d71f
https://github.com/filamentgroup/grunticon-lib/blob/2b7ecfe54a19a8d2429996cb456c7dd4ce04d71f/static/grunticon.embed.js#L31-L59
train
tunnckoCoreLabs/get-installed-path
src/index.js
getInstalledPathSync
function getInstalledPathSync (name, opts) { if (!isValidString(name)) { throw new TypeError('get-installed-path: expect `name` to be string') } const filePaths = defaults(name, opts) const firstPath = filePaths[0] const modulePath = filePaths.find((filePath) => { let stat = null try { sta...
javascript
function getInstalledPathSync (name, opts) { if (!isValidString(name)) { throw new TypeError('get-installed-path: expect `name` to be string') } const filePaths = defaults(name, opts) const firstPath = filePaths[0] const modulePath = filePaths.find((filePath) => { let stat = null try { sta...
[ "function", "getInstalledPathSync", "(", "name", ",", "opts", ")", "{", "if", "(", "!", "isValidString", "(", "name", ")", ")", "{", "throw", "new", "TypeError", "(", "'get-installed-path: expect `name` to be string'", ")", "}", "const", "filePaths", "=", "defau...
> Get installed path of a `name` package synchronous. Returns `boolean` when `paths` option is used and filepath is directory, otherwise returns a full filepath OR throws error. @example const { getInstalledPathSync } = require('get-installed-path') const npmPath = getInstalledPathSync('npm') console.log(npmPath) // ...
[ ">", "Get", "installed", "path", "of", "a", "name", "package", "synchronous", ".", "Returns", "boolean", "when", "paths", "option", "is", "used", "and", "filepath", "is", "directory", "otherwise", "returns", "a", "full", "filepath", "OR", "throws", "error", ...
e71687df4e972ee98bc8d1d4fe3d13e5f3a750f9
https://github.com/tunnckoCoreLabs/get-installed-path/blob/e71687df4e972ee98bc8d1d4fe3d13e5f3a750f9/src/index.js#L123-L154
train
bpmn-io/drag-tabs
index.js
DragTabs
function DragTabs($el, options) { // we are an event emitter assign(this, createEmitter()); this.options = options || {}; this.$el = $el; this._moveTab = bind(this._moveTab, this); this._onDragstart = bind(this._onDragstart, this); this._onDragend = bind(this._onDragend, this); this._onDrop = bind(th...
javascript
function DragTabs($el, options) { // we are an event emitter assign(this, createEmitter()); this.options = options || {}; this.$el = $el; this._moveTab = bind(this._moveTab, this); this._onDragstart = bind(this._onDragstart, this); this._onDragend = bind(this._onDragend, this); this._onDrop = bind(th...
[ "function", "DragTabs", "(", "$el", ",", "options", ")", "{", "// we are an event emitter", "assign", "(", "this", ",", "createEmitter", "(", ")", ")", ";", "this", ".", "options", "=", "options", "||", "{", "}", ";", "this", ".", "$el", "=", "$el", ";...
This component provides the infrastructure needed to move tabs around by dragging. It's not this component's responsibility to the actual moving of the tab, but exposing an event based interface that communicates when and where the tab dragging should happen. It makes sure all the tabs inside the intended container a...
[ "This", "component", "provides", "the", "infrastructure", "needed", "to", "move", "tabs", "around", "by", "dragging", "." ]
ce9299b969c0d2ed1eaa38195bb002a12a12873a
https://github.com/bpmn-io/drag-tabs/blob/ce9299b969c0d2ed1eaa38195bb002a12a12873a/index.js#L93-L109
train
nodemailer/nodemailer-smtp-pool
lib/smtp-pool.js
SMTPPool
function SMTPPool(options) { EventEmitter.call(this); options = options || {}; if (typeof options === 'string') { options = { url: options }; } var urlData; var service = options.service; if (typeof options.getSocket === 'function') { this.getSocket = o...
javascript
function SMTPPool(options) { EventEmitter.call(this); options = options || {}; if (typeof options === 'string') { options = { url: options }; } var urlData; var service = options.service; if (typeof options.getSocket === 'function') { this.getSocket = o...
[ "function", "SMTPPool", "(", "options", ")", "{", "EventEmitter", ".", "call", "(", "this", ")", ";", "options", "=", "options", "||", "{", "}", ";", "if", "(", "typeof", "options", "===", "'string'", ")", "{", "options", "=", "{", "url", ":", "optio...
Creates a SMTP pool transport object for Nodemailer @constructor @param {Object} options SMTP Connection options
[ "Creates", "a", "SMTP", "pool", "transport", "object", "for", "Nodemailer" ]
db75ef6f16be7cfa05856fe0c66a9b459ec31556
https://github.com/nodemailer/nodemailer-smtp-pool/blob/db75ef6f16be7cfa05856fe0c66a9b459ec31556/lib/smtp-pool.js#L23-L81
train
nodemailer/nodemailer-smtp-pool
lib/pool-resource.js
PoolResource
function PoolResource(pool) { EventEmitter.call(this); this.pool = pool; this.options = pool.options; this.logger = this.options.logger; this._connection = false; this._connected = false; this.messages = 0; this.available = true; }
javascript
function PoolResource(pool) { EventEmitter.call(this); this.pool = pool; this.options = pool.options; this.logger = this.options.logger; this._connection = false; this._connected = false; this.messages = 0; this.available = true; }
[ "function", "PoolResource", "(", "pool", ")", "{", "EventEmitter", ".", "call", "(", "this", ")", ";", "this", ".", "pool", "=", "pool", ";", "this", ".", "options", "=", "pool", ".", "options", ";", "this", ".", "logger", "=", "this", ".", "options"...
Creates an element for the pool @constructor @param {Object} options SMTPPool instance
[ "Creates", "an", "element", "for", "the", "pool" ]
db75ef6f16be7cfa05856fe0c66a9b459ec31556
https://github.com/nodemailer/nodemailer-smtp-pool/blob/db75ef6f16be7cfa05856fe0c66a9b459ec31556/lib/pool-resource.js#L16-L28
train
nolanlawson/chord-magic
src/reverseLookups.js
addReverseLookupsForExtendeds
function addReverseLookupsForExtendeds (reverseDict, dict) { Object.keys(dict).forEach(function (key) { let pair = dict[key] let quality = pair[0] let extendedsArr = pair[1] extendedsArr.forEach(function (element) { reverseDict[element] = { quality: quality, extended: key }...
javascript
function addReverseLookupsForExtendeds (reverseDict, dict) { Object.keys(dict).forEach(function (key) { let pair = dict[key] let quality = pair[0] let extendedsArr = pair[1] extendedsArr.forEach(function (element) { reverseDict[element] = { quality: quality, extended: key }...
[ "function", "addReverseLookupsForExtendeds", "(", "reverseDict", ",", "dict", ")", "{", "Object", ".", "keys", "(", "dict", ")", ".", "forEach", "(", "function", "(", "key", ")", "{", "let", "pair", "=", "dict", "[", "key", "]", "let", "quality", "=", ...
extendeds are a little different, because they contain both the quality and the extendeds
[ "extendeds", "are", "a", "little", "different", "because", "they", "contain", "both", "the", "quality", "and", "the", "extendeds" ]
822446a89737384421e2453c6e3602e8d434473b
https://github.com/nolanlawson/chord-magic/blob/822446a89737384421e2453c6e3602e8d434473b/src/reverseLookups.js#L43-L55
train
scijs/distance-transform
lib/pp.js
dist_p_sep
function dist_p_sep() { i = s[q] gi = array[ptr+i] gu = v var t = bisect(f, i, u+1, 0.25) return Math.floor(t) }
javascript
function dist_p_sep() { i = s[q] gi = array[ptr+i] gu = v var t = bisect(f, i, u+1, 0.25) return Math.floor(t) }
[ "function", "dist_p_sep", "(", ")", "{", "i", "=", "s", "[", "q", "]", "gi", "=", "array", "[", "ptr", "+", "i", "]", "gu", "=", "v", "var", "t", "=", "bisect", "(", "f", ",", "i", ",", "u", "+", "1", ",", "0.25", ")", "return", "Math", "...
Not super efficient, but good enough for now
[ "Not", "super", "efficient", "but", "good", "enough", "for", "now" ]
10d2c34f4b7c9184ee9ce8d0309ce7fffacdc752
https://github.com/scijs/distance-transform/blob/10d2c34f4b7c9184ee9ce8d0309ce7fffacdc752/lib/pp.js#L20-L26
train
NaturalNode/apparatus
lib/apparatus/classifier/randomforest_classifier.js
predictOneDT
function predictOneDT(inst) { var n=0; for(var i=0;i<this.maxDepth;i++) { var dir= this.testFun(inst, this.models[n]); if(dir === 1) n= n*2+1; // descend left else n= n*2+2; // descend right } return (this.leafPositives[n] + 0.5) / (this.leafNegatives[n] + 1.0); // bay...
javascript
function predictOneDT(inst) { var n=0; for(var i=0;i<this.maxDepth;i++) { var dir= this.testFun(inst, this.models[n]); if(dir === 1) n= n*2+1; // descend left else n= n*2+2; // descend right } return (this.leafPositives[n] + 0.5) / (this.leafNegatives[n] + 1.0); // bay...
[ "function", "predictOneDT", "(", "inst", ")", "{", "var", "n", "=", "0", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "maxDepth", ";", "i", "++", ")", "{", "var", "dir", "=", "this", ".", "testFun", "(", "inst", ",", "th...
returns probability that example inst is 1.
[ "returns", "probability", "that", "example", "inst", "is", "1", "." ]
861cf4cbb0775e2fd12ffaf30d01b7d8f9497e12
https://github.com/NaturalNode/apparatus/blob/861cf4cbb0775e2fd12ffaf30d01b7d8f9497e12/lib/apparatus/classifier/randomforest_classifier.js#L166-L176
train
NaturalNode/apparatus
lib/apparatus/classifier/randomforest_classifier.js
entropy
function entropy(labels, ix) { var N= ix.length; var p=0.0; for(var i=0;i<N;i++) { if(labels[ix[i]]==1) p+=1; } p=(1+p)/(N+2); // let's be bayesian about this q=(1+N-p)/(N+2); return (-p*Math.log(p) -q*Math.log(q)); }
javascript
function entropy(labels, ix) { var N= ix.length; var p=0.0; for(var i=0;i<N;i++) { if(labels[ix[i]]==1) p+=1; } p=(1+p)/(N+2); // let's be bayesian about this q=(1+N-p)/(N+2); return (-p*Math.log(p) -q*Math.log(q)); }
[ "function", "entropy", "(", "labels", ",", "ix", ")", "{", "var", "N", "=", "ix", ".", "length", ";", "var", "p", "=", "0.0", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "N", ";", "i", "++", ")", "{", "if", "(", "labels", "[", "...
Misc utility functions
[ "Misc", "utility", "functions" ]
861cf4cbb0775e2fd12ffaf30d01b7d8f9497e12
https://github.com/NaturalNode/apparatus/blob/861cf4cbb0775e2fd12ffaf30d01b7d8f9497e12/lib/apparatus/classifier/randomforest_classifier.js#L341-L350
train
8lueberry/bracket-template
src/node/LayoutTemplate.js
initConfig
function initConfig(conf) { const result = Object.assign({}, conf); if (conf.filename) { result.filepath = path.dirname(conf.filename); } return result; }
javascript
function initConfig(conf) { const result = Object.assign({}, conf); if (conf.filename) { result.filepath = path.dirname(conf.filename); } return result; }
[ "function", "initConfig", "(", "conf", ")", "{", "const", "result", "=", "Object", ".", "assign", "(", "{", "}", ",", "conf", ")", ";", "if", "(", "conf", ".", "filename", ")", "{", "result", ".", "filepath", "=", "path", ".", "dirname", "(", "conf...
Initialize the config @param {object} conf - The configuration
[ "Initialize", "the", "config" ]
b06390cc37f89d356e3e0fc01de3f7d54e49f988
https://github.com/8lueberry/bracket-template/blob/b06390cc37f89d356e3e0fc01de3f7d54e49f988/src/node/LayoutTemplate.js#L84-L90
train
8lueberry/bracket-template
src/node/LayoutTemplate.js
lookupFile
function lookupFile(conf, fileRelative) { const relativeToFile = path.resolve(conf.filepath, fileRelative); if (layoutHelper.store.exist(relativeToFile)) { return relativeToFile; } if (conf.settings && conf.settings.views) { if (!Array.isArray(conf.settings.views)) { const fromView = path.resolve...
javascript
function lookupFile(conf, fileRelative) { const relativeToFile = path.resolve(conf.filepath, fileRelative); if (layoutHelper.store.exist(relativeToFile)) { return relativeToFile; } if (conf.settings && conf.settings.views) { if (!Array.isArray(conf.settings.views)) { const fromView = path.resolve...
[ "function", "lookupFile", "(", "conf", ",", "fileRelative", ")", "{", "const", "relativeToFile", "=", "path", ".", "resolve", "(", "conf", ".", "filepath", ",", "fileRelative", ")", ";", "if", "(", "layoutHelper", ".", "store", ".", "exist", "(", "relative...
Lookup files for express from - relative to current file - relative to views @param {object} conf - The configuration @param {string} fileRelative - The relative path of the file
[ "Lookup", "files", "for", "express", "from", "-", "relative", "to", "current", "file", "-", "relative", "to", "views" ]
b06390cc37f89d356e3e0fc01de3f7d54e49f988
https://github.com/8lueberry/bracket-template/blob/b06390cc37f89d356e3e0fc01de3f7d54e49f988/src/node/LayoutTemplate.js#L141-L164
train
robeio/robe-react-ui
tools/server/MultierImpl.js
function (req, file, cb) { const id = guid(); file.id = id; fs.writeFileSync(path.normalize(tempFolder + "/" + id + ".json"), JSON.stringify(file), "utf8"); cb(null, id); }
javascript
function (req, file, cb) { const id = guid(); file.id = id; fs.writeFileSync(path.normalize(tempFolder + "/" + id + ".json"), JSON.stringify(file), "utf8"); cb(null, id); }
[ "function", "(", "req", ",", "file", ",", "cb", ")", "{", "const", "id", "=", "guid", "(", ")", ";", "file", ".", "id", "=", "id", ";", "fs", ".", "writeFileSync", "(", "path", ".", "normalize", "(", "tempFolder", "+", "\"/\"", "+", "id", "+", ...
Specifies upload location...
[ "Specifies", "upload", "location", "..." ]
46c76e037cbe0b5a6068202c16d4fd1a07c05ade
https://github.com/robeio/robe-react-ui/blob/46c76e037cbe0b5a6068202c16d4fd1a07c05ade/tools/server/MultierImpl.js#L39-L44
train
NoamELB/shouldComponentUpdate-Children
index.es.js
isReactElement
function isReactElement(suspectedElement) { var isElem = false; if (React.isValidElement(suspectedElement)) { isElem = true; } else if (Array.isArray(suspectedElement)) { for (var i = 0, l = suspectedElement.length; i < l; i++) { if (React.isValidElement(suspectedElement[i])) { ...
javascript
function isReactElement(suspectedElement) { var isElem = false; if (React.isValidElement(suspectedElement)) { isElem = true; } else if (Array.isArray(suspectedElement)) { for (var i = 0, l = suspectedElement.length; i < l; i++) { if (React.isValidElement(suspectedElement[i])) { ...
[ "function", "isReactElement", "(", "suspectedElement", ")", "{", "var", "isElem", "=", "false", ";", "if", "(", "React", ".", "isValidElement", "(", "suspectedElement", ")", ")", "{", "isElem", "=", "true", ";", "}", "else", "if", "(", "Array", ".", "isA...
If the provided argument is a valid react element or an array that contains at least one valid react element in it @param {*} suspectedElement @returns {Boolean}
[ "If", "the", "provided", "argument", "is", "a", "valid", "react", "element", "or", "an", "array", "that", "contains", "at", "least", "one", "valid", "react", "element", "in", "it" ]
3eb89296d8df1dc72ce6d862736e1789c13d0ac0
https://github.com/NoamELB/shouldComponentUpdate-Children/blob/3eb89296d8df1dc72ce6d862736e1789c13d0ac0/index.es.js#L130-L143
train
unshiftio/requests
index.js
initialize
function initialize(url) { this.socket = Requests[Requests.method](this); // // Open the socket BEFORE adding any properties to the instance as this might // trigger a thrown `InvalidStateError: An attempt was made to use an object // that is not, or is no longer, usable` error in FireFox: // ...
javascript
function initialize(url) { this.socket = Requests[Requests.method](this); // // Open the socket BEFORE adding any properties to the instance as this might // trigger a thrown `InvalidStateError: An attempt was made to use an object // that is not, or is no longer, usable` error in FireFox: // ...
[ "function", "initialize", "(", "url", ")", "{", "this", ".", "socket", "=", "Requests", "[", "Requests", ".", "method", "]", "(", "this", ")", ";", "//", "// Open the socket BEFORE adding any properties to the instance as this might", "// trigger a thrown `InvalidStateErr...
The requests instance has been fully initialized. @param {String} url The URL we need to connect to. @api private
[ "The", "requests", "instance", "has", "been", "fully", "initialized", "." ]
9f8da43c67381a74b09118703e921302cd45628a
https://github.com/unshiftio/requests/blob/9f8da43c67381a74b09118703e921302cd45628a/index.js#L47-L63
train
unshiftio/requests
index.js
open
function open() { var what , slice = true , requests = this , socket = requests.socket; requests.on('stream', function stream(data) { if (!slice) { return requests.emit('data', data); } // // Please note that we need to use a method here that works on both str...
javascript
function open() { var what , slice = true , requests = this , socket = requests.socket; requests.on('stream', function stream(data) { if (!slice) { return requests.emit('data', data); } // // Please note that we need to use a method here that works on both str...
[ "function", "open", "(", ")", "{", "var", "what", ",", "slice", "=", "true", ",", "requests", "=", "this", ",", "socket", "=", "requests", ".", "socket", ";", "requests", ".", "on", "(", "'stream'", ",", "function", "stream", "(", "data", ")", "{", ...
Initialize and start requesting the supplied resource. @param {Object} options Passed in defaults. @api private
[ "Initialize", "and", "start", "requesting", "the", "supplied", "resource", "." ]
9f8da43c67381a74b09118703e921302cd45628a
https://github.com/unshiftio/requests/blob/9f8da43c67381a74b09118703e921302cd45628a/index.js#L71-L157
train
unshiftio/requests
index.js
destroy
function destroy() { if (!this.socket) return false; this.emit('destroy'); this.socket.abort(); this.removeAllListeners(); this.headers = {}; this.socket = null; this.body = null; delete Requests.active[this.id]; return true; }
javascript
function destroy() { if (!this.socket) return false; this.emit('destroy'); this.socket.abort(); this.removeAllListeners(); this.headers = {}; this.socket = null; this.body = null; delete Requests.active[this.id]; return true; }
[ "function", "destroy", "(", ")", "{", "if", "(", "!", "this", ".", "socket", ")", "return", "false", ";", "this", ".", "emit", "(", "'destroy'", ")", ";", "this", ".", "socket", ".", "abort", "(", ")", ";", "this", ".", "removeAllListeners", "(", "...
Completely destroy the running XHR and release of the internal references. @returns {Boolean} Successful destruction @api public
[ "Completely", "destroy", "the", "running", "XHR", "and", "release", "of", "the", "internal", "references", "." ]
9f8da43c67381a74b09118703e921302cd45628a
https://github.com/unshiftio/requests/blob/9f8da43c67381a74b09118703e921302cd45628a/index.js#L165-L180
train
chenglou/node-huxley
source/record/processActions.js
trimActions
function trimActions(actions) { // TODO: maybe, instead of doing this, add a last screenshot here. It's // mostly due to mistakes var lastScreenshotIndex = _.findLastIndex(actions, function(a) { return a.action === consts.STEP_SCREENSHOT; }); return actions.slice(0, lastScreenshotIndex + 1); }
javascript
function trimActions(actions) { // TODO: maybe, instead of doing this, add a last screenshot here. It's // mostly due to mistakes var lastScreenshotIndex = _.findLastIndex(actions, function(a) { return a.action === consts.STEP_SCREENSHOT; }); return actions.slice(0, lastScreenshotIndex + 1); }
[ "function", "trimActions", "(", "actions", ")", "{", "// TODO: maybe, instead of doing this, add a last screenshot here. It's", "// mostly due to mistakes", "var", "lastScreenshotIndex", "=", "_", ".", "findLastIndex", "(", "actions", ",", "function", "(", "a", ")", "{", ...
every browser event happening after the last screenshot event is useless. Trim them
[ "every", "browser", "event", "happening", "after", "the", "last", "screenshot", "event", "is", "useless", ".", "Trim", "them" ]
fdee34c01cf835fc9571c396497ce48e494de43c
https://github.com/chenglou/node-huxley/blob/fdee34c01cf835fc9571c396497ce48e494de43c/source/record/processActions.js#L9-L16
train
chenglou/node-huxley
source/browser/browser.js
getBrowserName
function getBrowserName(driver) { var prom = new Promise(function(resolve, reject) { driver .getCapabilities() .then(function(res) { // damn it selenium, where's the js api docs var browserName = res.caps_ ? res.caps_.browserName : res.get('browserName') resolve(browserName); ...
javascript
function getBrowserName(driver) { var prom = new Promise(function(resolve, reject) { driver .getCapabilities() .then(function(res) { // damn it selenium, where's the js api docs var browserName = res.caps_ ? res.caps_.browserName : res.get('browserName') resolve(browserName); ...
[ "function", "getBrowserName", "(", "driver", ")", "{", "var", "prom", "=", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "driver", ".", "getCapabilities", "(", ")", ".", "then", "(", "function", "(", "res", ")", "{", "// d...
useful for getting the browser name of the injected driver
[ "useful", "for", "getting", "the", "browser", "name", "of", "the", "injected", "driver" ]
fdee34c01cf835fc9571c396497ce48e494de43c
https://github.com/chenglou/node-huxley/blob/fdee34c01cf835fc9571c396497ce48e494de43c/source/browser/browser.js#L85-L96
train
chenglou/node-huxley
source/defaultWorkflow/defaultWorkflow.js
defaultWorkflow
function defaultWorkflow(opts) { var tasks; var paths; var runnableTasks; var runnablePaths; return execP('git status') .then(function() { return getUnchanged(opts.globs); }) .spread(function(a, b) { tasks = a; paths = b; console.log( 'Executing: ' + '`git stash &&...
javascript
function defaultWorkflow(opts) { var tasks; var paths; var runnableTasks; var runnablePaths; return execP('git status') .then(function() { return getUnchanged(opts.globs); }) .spread(function(a, b) { tasks = a; paths = b; console.log( 'Executing: ' + '`git stash &&...
[ "function", "defaultWorkflow", "(", "opts", ")", "{", "var", "tasks", ";", "var", "paths", ";", "var", "runnableTasks", ";", "var", "runnablePaths", ";", "return", "execP", "(", "'git status'", ")", ".", "then", "(", "function", "(", ")", "{", "return", ...
will support hg in the future
[ "will", "support", "hg", "in", "the", "future" ]
fdee34c01cf835fc9571c396497ce48e494de43c
https://github.com/chenglou/node-huxley/blob/fdee34c01cf835fc9571c396497ce48e494de43c/source/defaultWorkflow/defaultWorkflow.js#L26-L98
train
chenglou/node-huxley
source/defaultWorkflow/filterFilesForUnchangedTasks.js
filterFilesForUnchangedTasks
function filterFilesForUnchangedTasks(before, after, paths) { var pathsRes = []; var tasksRes = []; for (var i = 0; i < before.length; i++) { var unchangedTasks = filterUnchangedTasks(before[i], after[i]); if (unchangedTasks.length > 0) { tasksRes.push(unchangedTasks); pathsRes.push(paths[i])...
javascript
function filterFilesForUnchangedTasks(before, after, paths) { var pathsRes = []; var tasksRes = []; for (var i = 0; i < before.length; i++) { var unchangedTasks = filterUnchangedTasks(before[i], after[i]); if (unchangedTasks.length > 0) { tasksRes.push(unchangedTasks); pathsRes.push(paths[i])...
[ "function", "filterFilesForUnchangedTasks", "(", "before", ",", "after", ",", "paths", ")", "{", "var", "pathsRes", "=", "[", "]", ";", "var", "tasksRes", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "before", ".", "length", ...
trim each of the Huxleyfile content down to only tasks that are identical from the before copy and the after copy. Filter away the empty Huxleyfiles afterward
[ "trim", "each", "of", "the", "Huxleyfile", "content", "down", "to", "only", "tasks", "that", "are", "identical", "from", "the", "before", "copy", "and", "the", "after", "copy", ".", "Filter", "away", "the", "empty", "Huxleyfiles", "afterward" ]
fdee34c01cf835fc9571c396497ce48e494de43c
https://github.com/chenglou/node-huxley/blob/fdee34c01cf835fc9571c396497ce48e494de43c/source/defaultWorkflow/filterFilesForUnchangedTasks.js#L6-L19
train
node-ffi-napi/ref-struct-di
lib/struct.js
Struct
function Struct () { debug('defining new struct "type"') /** * This is the "constructor" of the Struct type that gets returned. * * Invoke it with `new` to create a new Buffer instance backing the struct. * Pass it an existing Buffer instance to use that as the backing buffer. * Pass in an Object co...
javascript
function Struct () { debug('defining new struct "type"') /** * This is the "constructor" of the Struct type that gets returned. * * Invoke it with `new` to create a new Buffer instance backing the struct. * Pass it an existing Buffer instance to use that as the backing buffer. * Pass in an Object co...
[ "function", "Struct", "(", ")", "{", "debug", "(", "'defining new struct \"type\"'", ")", "/**\n * This is the \"constructor\" of the Struct type that gets returned.\n *\n * Invoke it with `new` to create a new Buffer instance backing the struct.\n * Pass it an existing Buffer instance to ...
The Struct "type" meta-constructor.
[ "The", "Struct", "type", "meta", "-", "constructor", "." ]
84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda
https://github.com/node-ffi-napi/ref-struct-di/blob/84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda/lib/struct.js#L63-L146
train
node-ffi-napi/ref-struct-di
lib/struct.js
StructType
function StructType (arg, data) { if (!(this instanceof StructType)) { return new StructType(arg, data) } debug('creating new struct instance') var store if (Buffer.isBuffer(arg)) { debug('using passed-in Buffer instance to back the struct', arg) assert(arg.length >= StructType.siz...
javascript
function StructType (arg, data) { if (!(this instanceof StructType)) { return new StructType(arg, data) } debug('creating new struct instance') var store if (Buffer.isBuffer(arg)) { debug('using passed-in Buffer instance to back the struct', arg) assert(arg.length >= StructType.siz...
[ "function", "StructType", "(", "arg", ",", "data", ")", "{", "if", "(", "!", "(", "this", "instanceof", "StructType", ")", ")", "{", "return", "new", "StructType", "(", "arg", ",", "data", ")", "}", "debug", "(", "'creating new struct instance'", ")", "v...
This is the "constructor" of the Struct type that gets returned. Invoke it with `new` to create a new Buffer instance backing the struct. Pass it an existing Buffer instance to use that as the backing buffer. Pass in an Object containing the struct fields to auto-populate the struct with the data.
[ "This", "is", "the", "constructor", "of", "the", "Struct", "type", "that", "gets", "returned", "." ]
84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda
https://github.com/node-ffi-napi/ref-struct-di/blob/84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda/lib/struct.js#L75-L103
train
node-ffi-napi/ref-struct-di
lib/struct.js
set
function set (buffer, offset, value) { debug('Struct "type" setter for buffer at offset', buffer, offset, value) var isStruct = value instanceof this if (isStruct) { // optimization: copy the buffer contents directly rather // than going through the ref-struct constructor value['ref.buffer'].copy(buff...
javascript
function set (buffer, offset, value) { debug('Struct "type" setter for buffer at offset', buffer, offset, value) var isStruct = value instanceof this if (isStruct) { // optimization: copy the buffer contents directly rather // than going through the ref-struct constructor value['ref.buffer'].copy(buff...
[ "function", "set", "(", "buffer", ",", "offset", ",", "value", ")", "{", "debug", "(", "'Struct \"type\" setter for buffer at offset'", ",", "buffer", ",", "offset", ",", "value", ")", "var", "isStruct", "=", "value", "instanceof", "this", "if", "(", "isStruct...
The "set" function of the Struct "type" interface
[ "The", "set", "function", "of", "the", "Struct", "type", "interface" ]
84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda
https://github.com/node-ffi-napi/ref-struct-di/blob/84fbaa8cdefbe24be76e8f5c3cbf5ae306965cda/lib/struct.js#L164-L177
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function (out) { var skinObj = this._skinObj, cfg = this._cfg; out.write(['<div class="x', this._skinnableClass, '_', cfg.sclass, '" style="float:left;position:relative', skinObj.border ? ';border:' + skinObj.border : '', skinObj.borderPadding ? ';padding:...
javascript
function (out) { var skinObj = this._skinObj, cfg = this._cfg; out.write(['<div class="x', this._skinnableClass, '_', cfg.sclass, '" style="float:left;position:relative', skinObj.border ? ';border:' + skinObj.border : '', skinObj.borderPadding ? ';padding:...
[ "function", "(", "out", ")", "{", "var", "skinObj", "=", "this", ".", "_skinObj", ",", "cfg", "=", "this", ".", "_cfg", ";", "out", ".", "write", "(", "[", "'<div class=\"x'", ",", "this", ".", "_skinnableClass", ",", "'_'", ",", "cfg", ".", "sclass"...
Internal function to generate the internal widget begin markup @param {aria.templates.MarkupWriter} out @protected
[ "Internal", "function", "to", "generate", "the", "internal", "widget", "begin", "markup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L87-L93
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function (out) { var skinObj = this._skinObj, cfg = this._cfg; out.write(['<span style="float:left;text-align:', cfg.labelAlign, skinObj.labelMargins ? ';margin:' + skinObj.labelMargins : '', skinObj.labelFontSize ? ';font-size:' + skinObj.labelFontSize + ...
javascript
function (out) { var skinObj = this._skinObj, cfg = this._cfg; out.write(['<span style="float:left;text-align:', cfg.labelAlign, skinObj.labelMargins ? ';margin:' + skinObj.labelMargins : '', skinObj.labelFontSize ? ';font-size:' + skinObj.labelFontSize + ...
[ "function", "(", "out", ")", "{", "var", "skinObj", "=", "this", ".", "_skinObj", ",", "cfg", "=", "this", ".", "_cfg", ";", "out", ".", "write", "(", "[", "'<span style=\"float:left;text-align:'", ",", "cfg", ".", "labelAlign", ",", "skinObj", ".", "lab...
Internal function to generate the laebl markup @param {aria.templates.MarkupWriter} out @protected
[ "Internal", "function", "to", "generate", "the", "laebl", "markup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L100-L107
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function () { if (!this._cfgOk) { return; } var cfg = this._cfg; if (cfg !== null) { if (cfg.minValue >= cfg.maxValue) { this.$logError(this.WIDGET_GAUGE_CFG_MIN_EQUAL_GREATER_MAX, []); this._cfgOk =...
javascript
function () { if (!this._cfgOk) { return; } var cfg = this._cfg; if (cfg !== null) { if (cfg.minValue >= cfg.maxValue) { this.$logError(this.WIDGET_GAUGE_CFG_MIN_EQUAL_GREATER_MAX, []); this._cfgOk =...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_cfgOk", ")", "{", "return", ";", "}", "var", "cfg", "=", "this", ".", "_cfg", ";", "if", "(", "cfg", "!==", "null", ")", "{", "if", "(", "cfg", ".", "minValue", ">=", "cfg", ".", "maxV...
Internal function to verify consistency of cfg @protected
[ "Internal", "function", "to", "verify", "consistency", "of", "cfg" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L121-L134
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function (newValue) { var gaugeSpanIndex = this.showLabel ? 1 : 0; var barEl = this.getDom().childNodes[gaugeSpanIndex].firstChild; var calcValue = this.__calculateBarWidth(newValue); if (barEl !== null && calcValue !== null && calcValue != -1) { barEl.sty...
javascript
function (newValue) { var gaugeSpanIndex = this.showLabel ? 1 : 0; var barEl = this.getDom().childNodes[gaugeSpanIndex].firstChild; var calcValue = this.__calculateBarWidth(newValue); if (barEl !== null && calcValue !== null && calcValue != -1) { barEl.sty...
[ "function", "(", "newValue", ")", "{", "var", "gaugeSpanIndex", "=", "this", ".", "showLabel", "?", "1", ":", "0", ";", "var", "barEl", "=", "this", ".", "getDom", "(", ")", ".", "childNodes", "[", "gaugeSpanIndex", "]", ".", "firstChild", ";", "var", ...
A private method to set the current value of the gauge @param {Integer} newValue The new value of the gauge @private
[ "A", "private", "method", "to", "set", "the", "current", "value", "of", "the", "gauge" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L170-L178
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function (newValue) { var barEl = this.getDom().childNodes[0]; if (barEl !== null) { barEl.innerHTML = newValue; } barEl = null; }
javascript
function (newValue) { var barEl = this.getDom().childNodes[0]; if (barEl !== null) { barEl.innerHTML = newValue; } barEl = null; }
[ "function", "(", "newValue", ")", "{", "var", "barEl", "=", "this", ".", "getDom", "(", ")", ".", "childNodes", "[", "0", "]", ";", "if", "(", "barEl", "!==", "null", ")", "{", "barEl", ".", "innerHTML", "=", "newValue", ";", "}", "barEl", "=", "...
A private method to set the label text @param {String} newValue Label text @private
[ "A", "private", "method", "to", "set", "the", "label", "text" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L184-L190
train
ariatemplates/ariatemplates
src/aria/widgets/form/Gauge.js
function (newValue) { if (!this._cfgOk) { return -1; } var cfg = this._cfg; var res = null; if (cfg !== null) { if (newValue !== null && newValue !== "" && newValue >= cfg.minValue && newValue <= cfg.maxValue) { ...
javascript
function (newValue) { if (!this._cfgOk) { return -1; } var cfg = this._cfg; var res = null; if (cfg !== null) { if (newValue !== null && newValue !== "" && newValue >= cfg.minValue && newValue <= cfg.maxValue) { ...
[ "function", "(", "newValue", ")", "{", "if", "(", "!", "this", ".", "_cfgOk", ")", "{", "return", "-", "1", ";", "}", "var", "cfg", "=", "this", ".", "_cfg", ";", "var", "res", "=", "null", ";", "if", "(", "cfg", "!==", "null", ")", "{", "if"...
A private method to calculate the progress bar width @param {Integer} newValue The new value of the gauge @return {Integer} The new bar width in percentage. If -1 the new width could not be calculated @private
[ "A", "private", "method", "to", "calculate", "the", "progress", "bar", "width" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Gauge.js#L197-L213
train
ariatemplates/ariatemplates
src/aria/widgets/container/Tab.js
function (skipChangeState) { var state = "normal"; var cfg = this._cfg; if (cfg.disabled) { state = "disabled"; } else if (cfg.tabId === cfg.selectedTab) { state = "selected"; } else { if (this._mouseOver) { ...
javascript
function (skipChangeState) { var state = "normal"; var cfg = this._cfg; if (cfg.disabled) { state = "disabled"; } else if (cfg.tabId === cfg.selectedTab) { state = "selected"; } else { if (this._mouseOver) { ...
[ "function", "(", "skipChangeState", ")", "{", "var", "state", "=", "\"normal\"", ";", "var", "cfg", "=", "this", ".", "_cfg", ";", "if", "(", "cfg", ".", "disabled", ")", "{", "state", "=", "\"disabled\"", ";", "}", "else", "if", "(", "cfg", ".", "...
Internal method to update the state of the tab, from the config and the mouse over variable @param {Boolean} skipChangeState - If true we don't update the state in the frame as the frame may not be initialized @protected
[ "Internal", "method", "to", "update", "the", "state", "of", "the", "tab", "from", "the", "config", "and", "the", "mouse", "over", "variable" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Tab.js#L481-L505
train
ariatemplates/ariatemplates
src/aria/widgets/container/Tab.js
function () { this.changeProperty("selectedTab", this._cfg.tabId); if (this._cfg.waiAria) { // Focusing the Tab before focusing the TabPanel is not enough to make the screen reader read the tab's title first // A sufficient timeout would be necessary, but we can't...
javascript
function () { this.changeProperty("selectedTab", this._cfg.tabId); if (this._cfg.waiAria) { // Focusing the Tab before focusing the TabPanel is not enough to make the screen reader read the tab's title first // A sufficient timeout would be necessary, but we can't...
[ "function", "(", ")", "{", "this", ".", "changeProperty", "(", "\"selectedTab\"", ",", "this", ".", "_cfg", ".", "tabId", ")", ";", "if", "(", "this", ".", "_cfg", ".", "waiAria", ")", "{", "// Focusing the Tab before focusing the TabPanel is not enough to make th...
Set the current tab as selected @protected
[ "Set", "the", "current", "tab", "as", "selected" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Tab.js#L511-L523
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
PromisedHandler
function PromisedHandler () { this.getSuggestions = function (entry, callback) { this.pendingSuggestion = { entry : entry, callback : callback }; }; this.getAllSuggestions = function (callback) { this.pendingSuggestion = { ...
javascript
function PromisedHandler () { this.getSuggestions = function (entry, callback) { this.pendingSuggestion = { entry : entry, callback : callback }; }; this.getAllSuggestions = function (callback) { this.pendingSuggestion = { ...
[ "function", "PromisedHandler", "(", ")", "{", "this", ".", "getSuggestions", "=", "function", "(", "entry", ",", "callback", ")", "{", "this", ".", "pendingSuggestion", "=", "{", "entry", ":", "entry", ",", "callback", ":", "callback", "}", ";", "}", ";"...
Mock for the resources handler. This is needed because loadResourcesHandler is called synchronously. This handler has only methods to get suggestions. These methods queue the latest suggestValue in order to replay it when the correct resources handler is loaded. @private
[ "Mock", "for", "the", "resources", "handler", ".", "This", "is", "needed", "because", "loadResourcesHandler", "is", "called", "synchronously", ".", "This", "handler", "has", "only", "methods", "to", "get", "suggestions", ".", "These", "methods", "queue", "the", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L28-L42
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
resourcesHandlerError
function resourcesHandlerError (args) { var scope = args.scope; // resources handler is not an AT class, no need to dispose scope._autoDisposeHandler = false; scope.$logError(scope.INVALID_RESOURCES_HANDLER, args.classpath); }
javascript
function resourcesHandlerError (args) { var scope = args.scope; // resources handler is not an AT class, no need to dispose scope._autoDisposeHandler = false; scope.$logError(scope.INVALID_RESOURCES_HANDLER, args.classpath); }
[ "function", "resourcesHandlerError", "(", "args", ")", "{", "var", "scope", "=", "args", ".", "scope", ";", "// resources handler is not an AT class, no need to dispose", "scope", ".", "_autoDisposeHandler", "=", "false", ";", "scope", ".", "$logError", "(", "scope", ...
Error callback for Aria.load. @param {Object} args Callback arguments @private
[ "Error", "callback", "for", "Aria", ".", "load", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L49-L56
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
resourcesHandlerLoaded
function resourcesHandlerLoaded (args) { var scope = args.scope, handler = Aria.getClassInstance(args.classpath); var pendingSuggestion = scope._resourcesHandler.pendingSuggestion; scope._resourcesHandler = handler; scope._autoDisposeHandler = true; if (pendingSuggestion) { ...
javascript
function resourcesHandlerLoaded (args) { var scope = args.scope, handler = Aria.getClassInstance(args.classpath); var pendingSuggestion = scope._resourcesHandler.pendingSuggestion; scope._resourcesHandler = handler; scope._autoDisposeHandler = true; if (pendingSuggestion) { ...
[ "function", "resourcesHandlerLoaded", "(", "args", ")", "{", "var", "scope", "=", "args", ".", "scope", ",", "handler", "=", "Aria", ".", "getClassInstance", "(", "args", ".", "classpath", ")", ";", "var", "pendingSuggestion", "=", "scope", ".", "_resourcesH...
Callback for Aria.load. Instantiate the ResourcesHandler class and set it on Suggestions controller @param {Object} args Callback arguments @private
[ "Callback", "for", "Aria", ".", "load", ".", "Instantiate", "the", "ResourcesHandler", "class", "and", "set", "it", "on", "Suggestions", "controller" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L63-L77
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
delayLoading
function delayLoading (args) { ariaCoreTimer.addCallback({ fn : resourcesHandlerLoaded, args : args, scope : {}, delay : 12 }); }
javascript
function delayLoading (args) { ariaCoreTimer.addCallback({ fn : resourcesHandlerLoaded, args : args, scope : {}, delay : 12 }); }
[ "function", "delayLoading", "(", "args", ")", "{", "ariaCoreTimer", ".", "addCallback", "(", "{", "fn", ":", "resourcesHandlerLoaded", ",", "args", ":", "args", ",", "scope", ":", "{", "}", ",", "delay", ":", "12", "}", ")", ";", "}" ]
Intermediate callback to make sure that Aria.load is always async. @param {Object} args Callback arguments @private
[ "Intermediate", "callback", "to", "make", "sure", "that", "Aria", ".", "load", "is", "always", "async", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L84-L91
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
loadResourcesHandler
function loadResourcesHandler (classpath, self) { var Handler = Aria.getClassRef(classpath); if (Handler) { return new Handler(); } else { var callbackArgs = { scope : self, classpath : classpath }; Aria.load({ ...
javascript
function loadResourcesHandler (classpath, self) { var Handler = Aria.getClassRef(classpath); if (Handler) { return new Handler(); } else { var callbackArgs = { scope : self, classpath : classpath }; Aria.load({ ...
[ "function", "loadResourcesHandler", "(", "classpath", ",", "self", ")", "{", "var", "Handler", "=", "Aria", ".", "getClassRef", "(", "classpath", ")", ";", "if", "(", "Handler", ")", "{", "return", "new", "Handler", "(", ")", ";", "}", "else", "{", "va...
Load and instantiate the resources handler. @param {String} classpath Resources Handler classpath @param {aria.html.controllers.Suggestions} self Suggestions controller instance @private
[ "Load", "and", "instantiate", "the", "resources", "handler", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L99-L124
train
ariatemplates/ariatemplates
src/aria/html/controllers/Suggestions.js
function (resourcesHandler) { if (ariaUtilsType.isString(resourcesHandler)) { resourcesHandler = loadResourcesHandler(resourcesHandler, this); this._autoDisposeHandler = true; } this._resourcesHandler = resourcesHandler; ...
javascript
function (resourcesHandler) { if (ariaUtilsType.isString(resourcesHandler)) { resourcesHandler = loadResourcesHandler(resourcesHandler, this); this._autoDisposeHandler = true; } this._resourcesHandler = resourcesHandler; ...
[ "function", "(", "resourcesHandler", ")", "{", "if", "(", "ariaUtilsType", ".", "isString", "(", "resourcesHandler", ")", ")", "{", "resourcesHandler", "=", "loadResourcesHandler", "(", "resourcesHandler", ",", "this", ")", ";", "this", ".", "_autoDisposeHandler",...
Set the resourceHandler for this controller. If it's a classpath the class will be loaded and instantiated. @param {String|Object} resourcesHandler classpath or instance
[ "Set", "the", "resourceHandler", "for", "this", "controller", ".", "If", "it", "s", "a", "classpath", "the", "class", "will", "be", "loaded", "and", "instantiated", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/controllers/Suggestions.js#L203-L209
train
ariatemplates/ariatemplates
src/aria/widgets/controllers/DateController.js
function (internalValue) { var report = new ariaWidgetsControllersReportsControllerReport(); if (internalValue == null) { report.ok = true; this._dataModel.jsDate = null; this._dataModel.displayText = ""; } else if (!ariaUtilsType.isDat...
javascript
function (internalValue) { var report = new ariaWidgetsControllersReportsControllerReport(); if (internalValue == null) { report.ok = true; this._dataModel.jsDate = null; this._dataModel.displayText = ""; } else if (!ariaUtilsType.isDat...
[ "function", "(", "internalValue", ")", "{", "var", "report", "=", "new", "ariaWidgetsControllersReportsControllerReport", "(", ")", ";", "if", "(", "internalValue", "==", "null", ")", "{", "report", ".", "ok", "=", "true", ";", "this", ".", "_dataModel", "."...
override TextDataController.checkValue @param {String} internalValue - Internal value of to be validated @return {aria.widgets.controllers.reports.ControllerReport}
[ "override", "TextDataController", ".", "checkValue" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/controllers/DateController.js#L136-L165
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function(receiver, name, state) { if (state == null) { state = true; } var flagName = this._buildFlagName(name); receiver[flagName] = state; return state; }
javascript
function(receiver, name, state) { if (state == null) { state = true; } var flagName = this._buildFlagName(name); receiver[flagName] = state; return state; }
[ "function", "(", "receiver", ",", "name", ",", "state", ")", "{", "if", "(", "state", "==", "null", ")", "{", "state", "=", "true", ";", "}", "var", "flagName", "=", "this", ".", "_buildFlagName", "(", "name", ")", ";", "receiver", "[", "flagName", ...
Sets the flag corresponding to the given name to the given state. <p> Setting a flag corresponds to assigning its state value to a property whose name is built with <em>_buildFlagName</em>. </p> <p> If no explicit state is given, true is assumed. </p> @param {Object} receiver The object receiving the resulting prope...
[ "Sets", "the", "flag", "corresponding", "to", "the", "given", "name", "to", "the", "given", "state", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L706-L715
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function(source, destination) { // -------------------------------------------- arguments processing if (destination == null) { destination = this; } // ------------------------------------------------------ processing for (var key in source...
javascript
function(source, destination) { // -------------------------------------------- arguments processing if (destination == null) { destination = this; } // ------------------------------------------------------ processing for (var key in source...
[ "function", "(", "source", ",", "destination", ")", "{", "// -------------------------------------------- arguments processing", "if", "(", "destination", "==", "null", ")", "{", "destination", "=", "this", ";", "}", "// ------------------------------------------------------ ...
Imports an object into another. <p> Own properties from given source are copied into given destination. </p> @param {Object} source The source object from which properties should be read. @param {Object} destination The object receiving the properties. Defaults to <em>this</em>. @return {Object} The destination obje...
[ "Imports", "an", "object", "into", "another", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L769-L787
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function(userAgentWrapper) { // ----------------------------------------------- early termination var cacheKey = userAgentWrapper.ua.toLowerCase(); var values; if (this._propertiesCache.hasOwnProperty(cacheKey)) { values = this._propertiesCache[cacheKey]...
javascript
function(userAgentWrapper) { // ----------------------------------------------- early termination var cacheKey = userAgentWrapper.ua.toLowerCase(); var values; if (this._propertiesCache.hasOwnProperty(cacheKey)) { values = this._propertiesCache[cacheKey]...
[ "function", "(", "userAgentWrapper", ")", "{", "// ----------------------------------------------- early termination", "var", "cacheKey", "=", "userAgentWrapper", ".", "ua", ".", "toLowerCase", "(", ")", ";", "var", "values", ";", "if", "(", "this", ".", "_propertiesC...
Returns properties corresponding to given user agent information. <p> The returned properties match a particular API: the one finally exposed by this class. Also, they benefit from a cache mechanism. </p> @param {Object} userAgentWrapper The user agent wrapper to use (see <em>aria.core.useragent.UserAgent.getUserAgen...
[ "Returns", "properties", "corresponding", "to", "given", "user", "agent", "information", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L800-L822
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function() { this._styleCache = {}; // ----------------------------------------------------------------- this.ua = ""; this.name = ""; this.version = ""; this.majorVersion = 0; /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */ ...
javascript
function() { this._styleCache = {}; // ----------------------------------------------------------------- this.ua = ""; this.name = ""; this.version = ""; this.majorVersion = 0; /* BACKWARD-COMPATIBILITY-BEGIN (GitHub #1397) */ ...
[ "function", "(", ")", "{", "this", ".", "_styleCache", "=", "{", "}", ";", "// -----------------------------------------------------------------", "this", ".", "ua", "=", "\"\"", ";", "this", ".", "name", "=", "\"\"", ";", "this", ".", "version", "=", "\"\"", ...
Resets all properties to their default values. @private
[ "Resets", "all", "properties", "to", "their", "default", "values", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L1216-L1291
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function(userAgent) { var userAgentWrapper = UserAgent.getUserAgentInfo(userAgent); // ----------------------------------------- reset /apply properties this._resetProperties(); var properties = this._getProperties(userAgentWrapper); this._import(properties...
javascript
function(userAgent) { var userAgentWrapper = UserAgent.getUserAgentInfo(userAgent); // ----------------------------------------- reset /apply properties this._resetProperties(); var properties = this._getProperties(userAgentWrapper); this._import(properties...
[ "function", "(", "userAgent", ")", "{", "var", "userAgentWrapper", "=", "UserAgent", ".", "getUserAgentInfo", "(", "userAgent", ")", ";", "// ----------------------------------------- reset /apply properties", "this", ".", "_resetProperties", "(", ")", ";", "var", "prop...
Makes the class work with the given user agent. <p> If no user agent is given, current browser's one is taken. </p> <p> Not that providing a user agent different than the running browser's one will not make all functions return values corresponding to the browser associated to this custom user agent. Feature detectio...
[ "Makes", "the", "class", "work", "with", "the", "given", "user", "agent", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L1308-L1325
train
ariatemplates/ariatemplates
src/aria/core/Browser.js
function (property) { // ----------------------------------------------------------- cache if (this._styleCache.hasOwnProperty(property)) { return this._styleCache[property]; } // ------------------------------------------------------ processing ...
javascript
function (property) { // ----------------------------------------------------------- cache if (this._styleCache.hasOwnProperty(property)) { return this._styleCache[property]; } // ------------------------------------------------------ processing ...
[ "function", "(", "property", ")", "{", "// ----------------------------------------------------------- cache", "if", "(", "this", ".", "_styleCache", ".", "hasOwnProperty", "(", "property", ")", ")", "{", "return", "this", ".", "_styleCache", "[", "property", "]", "...
Check whether the given CSS property is supported by the browser or not. @param {String} property a CSS Property @return {Boolean} <em>true</em> if given style is supported, <em>false</em> otherwise. @private
[ "Check", "whether", "the", "given", "CSS", "property", "is", "supported", "by", "the", "browser", "or", "not", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Browser.js#L1364-L1404
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function (coord) { this.posX = coord.x; this.posY = coord.y; this._mouseInitialPosition = { left : coord.x, top : coord.y }; var element = this.getElement(true), movable, document = Aria.$window.document; // This wil...
javascript
function (coord) { this.posX = coord.x; this.posY = coord.y; this._mouseInitialPosition = { left : coord.x, top : coord.y }; var element = this.getElement(true), movable, document = Aria.$window.document; // This wil...
[ "function", "(", "coord", ")", "{", "this", ".", "posX", "=", "coord", ".", "x", ";", "this", ".", "posY", "=", "coord", ".", "y", ";", "this", ".", "_mouseInitialPosition", "=", "{", "left", ":", "coord", ".", "x", ",", "top", ":", "coord", ".",...
Handle the resize start. Initialize some reference geometries and raise the beforeresize event @param {Object} coord Contains the x and y coordinates of the mouse when a drag start has been detected on resize handle
[ "Handle", "the", "resize", "start", ".", "Initialize", "some", "reference", "geometries", "and", "raise", "the", "beforeresize", "event" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L63-L90
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function (evt) { var movable = this.getMovable(); if (movable && movable.style) { var mouseInitPos = this._mouseInitialPosition; var movableInitPos = this._movableInitialGeometry; var offsetX = this._vertical ? 0 : evt.clientX - mouseInitPos.left...
javascript
function (evt) { var movable = this.getMovable(); if (movable && movable.style) { var mouseInitPos = this._mouseInitialPosition; var movableInitPos = this._movableInitialGeometry; var offsetX = this._vertical ? 0 : evt.clientX - mouseInitPos.left...
[ "function", "(", "evt", ")", "{", "var", "movable", "=", "this", ".", "getMovable", "(", ")", ";", "if", "(", "movable", "&&", "movable", ".", "style", ")", "{", "var", "mouseInitPos", "=", "this", ".", "_mouseInitialPosition", ";", "var", "movableInitPo...
Handle the mouse move during a drag by setting the correct position on the resize handle element. It will Raise the resize event @param {aria.DomEvent} evt
[ "Handle", "the", "mouse", "move", "during", "a", "drag", "by", "setting", "the", "correct", "position", "on", "the", "resize", "handle", "element", ".", "It", "will", "Raise", "the", "resize", "event" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L96-L138
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function () { var element = this.getElement(); var document = Aria.$window.document; document.onselectstart = Aria.returnTrue; element.onselectstart = Aria.returnTrue; if (this.proxy && this.proxy.overlay) { element.style.top = (this._elementI...
javascript
function () { var element = this.getElement(); var document = Aria.$window.document; document.onselectstart = Aria.returnTrue; element.onselectstart = Aria.returnTrue; if (this.proxy && this.proxy.overlay) { element.style.top = (this._elementI...
[ "function", "(", ")", "{", "var", "element", "=", "this", ".", "getElement", "(", ")", ";", "var", "document", "=", "Aria", ".", "$window", ".", "document", ";", "document", ".", "onselectstart", "=", "Aria", ".", "returnTrue", ";", "element", ".", "on...
Handle the resize end. Apply the correct positioning to the height and width to the resizable element
[ "Handle", "the", "resize", "end", ".", "Apply", "the", "correct", "positioning", "to", "the", "height", "and", "width", "to", "the", "resizable", "element" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L142-L162
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function (geometry, cursor, offX, offY) { var geometry = ariaUtilsJson.copy(geometry), trim = ariaUtilsString.trim; cursor = trim(cursor); var offsetX = geometry.width >= this.minWidth ? offX : 0; var offsetY = geometry.height >= this.minHeight ? offY : 0; sw...
javascript
function (geometry, cursor, offX, offY) { var geometry = ariaUtilsJson.copy(geometry), trim = ariaUtilsString.trim; cursor = trim(cursor); var offsetX = geometry.width >= this.minWidth ? offX : 0; var offsetY = geometry.height >= this.minHeight ? offY : 0; sw...
[ "function", "(", "geometry", ",", "cursor", ",", "offX", ",", "offY", ")", "{", "var", "geometry", "=", "ariaUtilsJson", ".", "copy", "(", "geometry", ")", ",", "trim", "=", "ariaUtilsString", ".", "trim", ";", "cursor", "=", "trim", "(", "cursor", ")"...
Calculates the top, left position and size of the resizable element and new position of resize cursor. @param {Object} geometry initial position and size of the resizable element @param {String} cursor css class of resizable handle element @param {Number} offX left position which resizable handle element has moved from...
[ "Calculates", "the", "top", "left", "position", "and", "size", "of", "the", "resizable", "element", "and", "new", "position", "of", "resize", "cursor", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L172-L223
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function (geometry) { var boundary = this._boundary; if (boundary) { var boundaryGeometry = boundary; if (boundary == ariaUtilsDom.VIEWPORT) { var viewportSize = ariaUtilsDom._getViewportSize(); boundaryGeometry = { ...
javascript
function (geometry) { var boundary = this._boundary; if (boundary) { var boundaryGeometry = boundary; if (boundary == ariaUtilsDom.VIEWPORT) { var viewportSize = ariaUtilsDom._getViewportSize(); boundaryGeometry = { ...
[ "function", "(", "geometry", ")", "{", "var", "boundary", "=", "this", ".", "_boundary", ";", "if", "(", "boundary", ")", "{", "var", "boundaryGeometry", "=", "boundary", ";", "if", "(", "boundary", "==", "ariaUtilsDom", ".", "VIEWPORT", ")", "{", "var",...
Fits the resized element within viewport @param {aria.utils.DomBeans:Geometry} geometry @return {aria.utils.DomBeans:Geometry} fitted geometry
[ "Fits", "the", "resized", "element", "within", "viewport" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L230-L263
train
ariatemplates/ariatemplates
src/aria/utils/resize/Resize.js
function (element) { var position = ariaUtilsDom.getOffset(element); position.width = element.offsetWidth; position.height = element.offsetHeight; var style = element.style; this._elementInitialPosition = position; style.position = "absolute"; ...
javascript
function (element) { var position = ariaUtilsDom.getOffset(element); position.width = element.offsetWidth; position.height = element.offsetHeight; var style = element.style; this._elementInitialPosition = position; style.position = "absolute"; ...
[ "function", "(", "element", ")", "{", "var", "position", "=", "ariaUtilsDom", ".", "getOffset", "(", "element", ")", ";", "position", ".", "width", "=", "element", ".", "offsetWidth", ";", "position", ".", "height", "=", "element", ".", "offsetHeight", ";"...
Compute the initial position and initial size of the element and set its style properties @protected @param {HTMLElement} element
[ "Compute", "the", "initial", "position", "and", "initial", "size", "of", "the", "element", "and", "set", "its", "style", "properties" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/resize/Resize.js#L269-L280
train
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorDisplayScript.js
function (event, template) { this.moduleCtrl.displayHighlight(template.templateCtxt.getContainerDiv()); this.data.overModuleCtrl = template.moduleCtrl; this.mouseOver(event); this._refreshModulesDisplay(); // prevent propagation event.stopPropagati...
javascript
function (event, template) { this.moduleCtrl.displayHighlight(template.templateCtxt.getContainerDiv()); this.data.overModuleCtrl = template.moduleCtrl; this.mouseOver(event); this._refreshModulesDisplay(); // prevent propagation event.stopPropagati...
[ "function", "(", "event", ",", "template", ")", "{", "this", ".", "moduleCtrl", ".", "displayHighlight", "(", "template", ".", "templateCtxt", ".", "getContainerDiv", "(", ")", ")", ";", "this", ".", "data", ".", "overModuleCtrl", "=", "template", ".", "mo...
Highlight a template in the application on mouseover @param {Object} event @param {Object} template description
[ "Highlight", "a", "template", "in", "the", "application", "on", "mouseover" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorDisplayScript.js#L30-L37
train
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorDisplayScript.js
function (event, template) { // this.moduleCtrl.clearHighlight(); this.data.overModuleCtrl = null; this.mouseOut(event); this._refreshModulesDisplay(); // prevent propagation event.stopPropagation(); }
javascript
function (event, template) { // this.moduleCtrl.clearHighlight(); this.data.overModuleCtrl = null; this.mouseOut(event); this._refreshModulesDisplay(); // prevent propagation event.stopPropagation(); }
[ "function", "(", "event", ",", "template", ")", "{", "// this.moduleCtrl.clearHighlight();", "this", ".", "data", ".", "overModuleCtrl", "=", "null", ";", "this", ".", "mouseOut", "(", "event", ")", ";", "this", ".", "_refreshModulesDisplay", "(", ")", ";", ...
Remove highlight from a template link on mouseout @param {Object} event
[ "Remove", "highlight", "from", "a", "template", "link", "on", "mouseout" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorDisplayScript.js#L43-L50
train
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorDisplayScript.js
function (event, module) { this.data.overTemplates = module.outerTemplateCtxts; this.mouseOver(event); this._refreshTemplatesDisplay(); // prevent propagation event.stopPropagation(); }
javascript
function (event, module) { this.data.overTemplates = module.outerTemplateCtxts; this.mouseOver(event); this._refreshTemplatesDisplay(); // prevent propagation event.stopPropagation(); }
[ "function", "(", "event", ",", "module", ")", "{", "this", ".", "data", ".", "overTemplates", "=", "module", ".", "outerTemplateCtxts", ";", "this", ".", "mouseOver", "(", "event", ")", ";", "this", ".", "_refreshTemplatesDisplay", "(", ")", ";", "// preve...
Highlight the template associated with a module @param {Object} event @param {Object} module description
[ "Highlight", "the", "template", "associated", "with", "a", "module" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorDisplayScript.js#L57-L63
train
ariatemplates/ariatemplates
src/aria/core/Cache.js
function (classpath) { var basePath = Aria.getLogicalPath(classpath); for (var i = 0, l = atExtensions.length; i < l; i++) { try { var logicalPath = basePath + atExtensions[i]; var cacheItem = require.cache[require.resolve(logicalPath)]; ...
javascript
function (classpath) { var basePath = Aria.getLogicalPath(classpath); for (var i = 0, l = atExtensions.length; i < l; i++) { try { var logicalPath = basePath + atExtensions[i]; var cacheItem = require.cache[require.resolve(logicalPath)]; ...
[ "function", "(", "classpath", ")", "{", "var", "basePath", "=", "Aria", ".", "getLogicalPath", "(", "classpath", ")", ";", "for", "(", "var", "i", "=", "0", ",", "l", "=", "atExtensions", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "{...
Get the logical filename from the classpath. Returns null if the classpath is not inside the cache. @param {String} classpath e.g x.y.MyClass @return {String} logical path e.g x/y/MyClass.tpl
[ "Get", "the", "logical", "filename", "from", "the", "classpath", ".", "Returns", "null", "if", "the", "classpath", "is", "not", "inside", "the", "cache", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Cache.js#L118-L137
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (id) { if (ariaCoreBrowser.isIE7) { this.getElementById = function (id) { var document = Aria.$window.document; var el = document.getElementById(id); if (el) { // If id match, return element ...
javascript
function (id) { if (ariaCoreBrowser.isIE7) { this.getElementById = function (id) { var document = Aria.$window.document; var el = document.getElementById(id); if (el) { // If id match, return element ...
[ "function", "(", "id", ")", "{", "if", "(", "ariaCoreBrowser", ".", "isIE7", ")", "{", "this", ".", "getElementById", "=", "function", "(", "id", ")", "{", "var", "document", "=", "Aria", ".", "$window", ".", "document", ";", "var", "el", "=", "docum...
To be used instead of document.getElementById because IE7 does not retrieve correctly the elements in some cases @param {String} id the 'id' parameter of the element to find @return {HTMLElement}
[ "To", "be", "used", "instead", "of", "document", ".", "getElementById", "because", "IE7", "does", "not", "retrieve", "correctly", "the", "elements", "in", "some", "cases" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L45-L71
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (domElt, count) { if (count == null) { count = 1; } while (domElt && count > 0) { domElt = domElt.nextSibling; if (domElt && domElt.nodeType == 1) { count--; } } retur...
javascript
function (domElt, count) { if (count == null) { count = 1; } while (domElt && count > 0) { domElt = domElt.nextSibling; if (domElt && domElt.nodeType == 1) { count--; } } retur...
[ "function", "(", "domElt", ",", "count", ")", "{", "if", "(", "count", "==", "null", ")", "{", "count", "=", "1", ";", "}", "while", "(", "domElt", "&&", "count", ">", "0", ")", "{", "domElt", "=", "domElt", ".", "nextSibling", ";", "if", "(", ...
Get one of the elements in the DOM which follows the given DOM element. @param {HTMLElement} domElt reference DOM element @param {Number} count [optional, default: 1], number of the following DOM element (1 for the immediately following DOM element) @return {HTMLElement}
[ "Get", "one", "of", "the", "elements", "in", "the", "DOM", "which", "follows", "the", "given", "DOM", "element", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L80-L91
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (domElt, count) { if (count == null) { count = 1; } while (domElt && count > 0) { domElt = domElt.previousSibling; if (domElt && domElt.nodeType == 1) { count--; } } r...
javascript
function (domElt, count) { if (count == null) { count = 1; } while (domElt && count > 0) { domElt = domElt.previousSibling; if (domElt && domElt.nodeType == 1) { count--; } } r...
[ "function", "(", "domElt", ",", "count", ")", "{", "if", "(", "count", "==", "null", ")", "{", "count", "=", "1", ";", "}", "while", "(", "domElt", "&&", "count", ">", "0", ")", "{", "domElt", "=", "domElt", ".", "previousSibling", ";", "if", "("...
Get one of the elements in the DOM which precedes the given DOM element. @param {HTMLElement} domElt reference DOM element @param {Number} count [optional, default: 1], number of the preceding DOM element (1 for the immediately preceding DOM element)
[ "Get", "one", "of", "the", "elements", "in", "the", "DOM", "which", "precedes", "the", "given", "DOM", "element", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L99-L110
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (parentNode, index, reverse) { if (!parentNode) { return null; } var childNodes = parentNode.childNodes, count = 0, l = childNodes.length; for (var i = (reverse) ? l - 1 : 0; (reverse) ? i >= 0 : i < l; (reverse) ? i-- : i++) { if ...
javascript
function (parentNode, index, reverse) { if (!parentNode) { return null; } var childNodes = parentNode.childNodes, count = 0, l = childNodes.length; for (var i = (reverse) ? l - 1 : 0; (reverse) ? i >= 0 : i < l; (reverse) ? i-- : i++) { if ...
[ "function", "(", "parentNode", ",", "index", ",", "reverse", ")", "{", "if", "(", "!", "parentNode", ")", "{", "return", "null", ";", "}", "var", "childNodes", "=", "parentNode", ".", "childNodes", ",", "count", "=", "0", ",", "l", "=", "childNodes", ...
Used to retrieve a node element of type ELEMENT @param {HTMLElement} parentNode @param {Integer} index the expected index in the list (0=first) @param {Boolean} reverse true to start from the last child with reverse order @return {HTMLElement} the dom elt or null if not found @public
[ "Used", "to", "retrieve", "a", "node", "element", "of", "type", "ELEMENT" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L120-L135
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (idOrElt, newHTML) { // PROFILING // var msr1 = this.$startMeasure("ReplaceHTML"); var domElt = idOrElt; if (typeof(domElt) == "string") { domElt = this.getElementById(domElt); } if (domElt) { if ((ariaCoreBrowser.isIE...
javascript
function (idOrElt, newHTML) { // PROFILING // var msr1 = this.$startMeasure("ReplaceHTML"); var domElt = idOrElt; if (typeof(domElt) == "string") { domElt = this.getElementById(domElt); } if (domElt) { if ((ariaCoreBrowser.isIE...
[ "function", "(", "idOrElt", ",", "newHTML", ")", "{", "// PROFILING // var msr1 = this.$startMeasure(\"ReplaceHTML\");", "var", "domElt", "=", "idOrElt", ";", "if", "(", "typeof", "(", "domElt", ")", "==", "\"string\"", ")", "{", "domElt", "=", "this", ".", "get...
Replace the HTML contained in an element by another piece of HTML. @param {aria.templates.CfgBeans:Div} idOrElt div whose content have to be replaced @param {String} newHTML html to set @return {Object} Reference to the html element, or null if the element was not found in the DOM. If the element was not found in the D...
[ "Replace", "the", "HTML", "contained", "in", "an", "element", "by", "another", "piece", "of", "HTML", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L218-L275
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (oldElt, newElt) { var parentNode = oldElt.parentNode; parentNode.insertBefore(newElt, oldElt); parentNode.removeChild(oldElt); }
javascript
function (oldElt, newElt) { var parentNode = oldElt.parentNode; parentNode.insertBefore(newElt, oldElt); parentNode.removeChild(oldElt); }
[ "function", "(", "oldElt", ",", "newElt", ")", "{", "var", "parentNode", "=", "oldElt", ".", "parentNode", ";", "parentNode", ".", "insertBefore", "(", "newElt", ",", "oldElt", ")", ";", "parentNode", ".", "removeChild", "(", "oldElt", ")", ";", "}" ]
Simple utility method which replaces a dom element by another. @param {HTMLElement} oldElt @param {HTMLElement} newElt
[ "Simple", "utility", "method", "which", "replaces", "a", "dom", "element", "by", "another", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L311-L315
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (domElt, where, html) { if (Aria.$window.document.body.insertAdjacentHTML) { this.insertAdjacentHTML = function (domElt, where, html) { // PROFILING // var msr = this.$startMeasure("insertAdjacentHTML"); // IE, Chrome, Safari, Opera ...
javascript
function (domElt, where, html) { if (Aria.$window.document.body.insertAdjacentHTML) { this.insertAdjacentHTML = function (domElt, where, html) { // PROFILING // var msr = this.$startMeasure("insertAdjacentHTML"); // IE, Chrome, Safari, Opera ...
[ "function", "(", "domElt", ",", "where", ",", "html", ")", "{", "if", "(", "Aria", ".", "$window", ".", "document", ".", "body", ".", "insertAdjacentHTML", ")", "{", "this", ".", "insertAdjacentHTML", "=", "function", "(", "domElt", ",", "where", ",", ...
Insert the given HTML markup into the document at the specified location. This method is cross-browser compatbile. When possible, it relies on the insertAdjacentHTML method, otherwise, it relies on ranges. @param {HTMLElement} domElt Reference DOM element @param {String} where maybe beforeBegin, afterBegin, beforeEnd o...
[ "Insert", "the", "given", "HTML", "markup", "into", "the", "document", "at", "the", "specified", "location", ".", "This", "method", "is", "cross", "-", "browser", "compatbile", ".", "When", "possible", "it", "relies", "on", "the", "insertAdjacentHTML", "method...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L324-L387
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (domElt, where, newElement) { if (Aria.$window.document.body.insertAdjacentElement) { this.insertAdjacentElement = function (domElt, where, newElement) { domElt.insertAdjacentElement(where, newElement); }; } else { // F...
javascript
function (domElt, where, newElement) { if (Aria.$window.document.body.insertAdjacentElement) { this.insertAdjacentElement = function (domElt, where, newElement) { domElt.insertAdjacentElement(where, newElement); }; } else { // F...
[ "function", "(", "domElt", ",", "where", ",", "newElement", ")", "{", "if", "(", "Aria", ".", "$window", ".", "document", ".", "body", ".", "insertAdjacentElement", ")", "{", "this", ".", "insertAdjacentElement", "=", "function", "(", "domElt", ",", "where...
Insert the given HTML element into the document at the specified location. This method is cross-browser compatbile. When possible, it relies on the insertAdjacentElement method, otherwise, it relies on insertBefore and appendChild. @param {HTMLElement} domElt Reference DOM element @param {String} where maybe beforeBegi...
[ "Insert", "the", "given", "HTML", "element", "into", "the", "document", "at", "the", "specified", "location", ".", "This", "method", "is", "cross", "-", "browser", "compatbile", ".", "When", "possible", "it", "relies", "on", "the", "insertAdjacentElement", "me...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L397-L420
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (src, dest) { // IE has a mergeAttributes method which does exactly that. Let's use it directly. // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for // example, a TR can appear as disabled) if (Aria.$window....
javascript
function (src, dest) { // IE has a mergeAttributes method which does exactly that. Let's use it directly. // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for // example, a TR can appear as disabled) if (Aria.$window....
[ "function", "(", "src", ",", "dest", ")", "{", "// IE has a mergeAttributes method which does exactly that. Let's use it directly.", "// Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for", "// example, a TR can appear as disabled)", "if", ...
Copy attributes from one dom element to another. @param {HTMLElement} src Source element @param {HTMLElement} dest Destination element
[ "Copy", "attributes", "from", "one", "dom", "element", "to", "another", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L427-L447
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function () { if (ariaCoreBrowser.isIOS || ariaCoreBrowser.isAndroid) { // Initially (without user-initiated zoom) window's dimensions are the same or nearly the same as // documentElement's. // Note however that documentElement's clientWidth/Height is unaffec...
javascript
function () { if (ariaCoreBrowser.isIOS || ariaCoreBrowser.isAndroid) { // Initially (without user-initiated zoom) window's dimensions are the same or nearly the same as // documentElement's. // Note however that documentElement's clientWidth/Height is unaffec...
[ "function", "(", ")", "{", "if", "(", "ariaCoreBrowser", ".", "isIOS", "||", "ariaCoreBrowser", ".", "isAndroid", ")", "{", "// Initially (without user-initiated zoom) window's dimensions are the same or nearly the same as", "// documentElement's.", "// Note however that documentEl...
Gets the dimensions of the viewport. Extracted from Closure's documentation. <pre> * Gecko standards mode: docEl.clientWidth Width of viewport excluding scrollbar. win.innerWidth Width of viewport including scrollbar. body.clientWidth Width of body element. docEl.clientHeight Height of viewport excluding scrol...
[ "Gets", "the", "dimensions", "of", "the", "viewport", ".", "Extracted", "from", "Closure", "s", "documentation", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L517-L539
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (base) { var document = base && base.ownerDocument ? base.ownerDocument : Aria.$window.document; var scrollLeft = 0; var scrollTop = 0; var documentScroll = this.getDocumentScrollElement(document); if (base != null) { var next = base;...
javascript
function (base) { var document = base && base.ownerDocument ? base.ownerDocument : Aria.$window.document; var scrollLeft = 0; var scrollTop = 0; var documentScroll = this.getDocumentScrollElement(document); if (base != null) { var next = base;...
[ "function", "(", "base", ")", "{", "var", "document", "=", "base", "&&", "base", ".", "ownerDocument", "?", "base", ".", "ownerDocument", ":", "Aria", ".", "$window", ".", "document", ";", "var", "scrollLeft", "=", "0", ";", "var", "scrollTop", "=", "0...
Gets the document scroll distance as a coordinate object. @parameter {Object} base If provided, the total scrolling offset of the base element is calculated, minus the scrolling offset of the document element @return {Object} Object with values 'scrollLeft' and 'scrollTop'. @protected
[ "Gets", "the", "document", "scroll", "distance", "as", "a", "coordinate", "object", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L569-L606
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function () { // https://developer.mozilla.org/en/DOM/window.scrollMaxY suggests not to use scrollMaxY // Take the maximum between the document and the viewport srollWidth/Height // PTR 04677501 AT-Release1.0-36 release bug fixing: Safari has the correct scrollWidth and scrollHeight ...
javascript
function () { // https://developer.mozilla.org/en/DOM/window.scrollMaxY suggests not to use scrollMaxY // Take the maximum between the document and the viewport srollWidth/Height // PTR 04677501 AT-Release1.0-36 release bug fixing: Safari has the correct scrollWidth and scrollHeight ...
[ "function", "(", ")", "{", "// https://developer.mozilla.org/en/DOM/window.scrollMaxY suggests not to use scrollMaxY", "// Take the maximum between the document and the viewport srollWidth/Height", "// PTR 04677501 AT-Release1.0-36 release bug fixing: Safari has the correct scrollWidth and scrollHeight ...
Get the full size of the page. It is bigger than the viewport size if there are scrollbars, otherwise it's the viewport size @return {aria.utils.DomBeans:Size} Size object
[ "Get", "the", "full", "size", "of", "the", "page", ".", "It", "is", "bigger", "than", "the", "viewport", "size", "if", "there", "are", "scrollbars", "otherwise", "it", "s", "the", "viewport", "size" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L613-L631
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (element, property) { var browser = ariaCoreBrowser; var isIE8orLess = browser.isIE8 || browser.isIE7; if (isIE8orLess) { this.getStyle = function (element, property) { if (property == 'opacity') {// IE<=8 opacity uses filter ...
javascript
function (element, property) { var browser = ariaCoreBrowser; var isIE8orLess = browser.isIE8 || browser.isIE7; if (isIE8orLess) { this.getStyle = function (element, property) { if (property == 'opacity') {// IE<=8 opacity uses filter ...
[ "function", "(", "element", ",", "property", ")", "{", "var", "browser", "=", "ariaCoreBrowser", ";", "var", "isIE8orLess", "=", "browser", ".", "isIE8", "||", "browser", ".", "isIE7", ";", "if", "(", "isIE8orLess", ")", "{", "this", ".", "getStyle", "="...
Retrieve the computed style for a given CSS property on a given DOM element. @param {HTMLElement} element The DOM element on which to retrieve a CSS property @param {String} property The CSS property to retrieve. For maximum portability, it should be in camel case (for instance <code>backgroundImage</code>)
[ "Retrieve", "the", "computed", "style", "for", "a", "given", "CSS", "property", "on", "a", "given", "DOM", "element", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L908-L966
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); return { left : parseInt(documentScroll.scrollLeft + (viewportSize.width - size.width) / 2, 10), top : parseInt(documentScroll.scrol...
javascript
function (size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); return { left : parseInt(documentScroll.scrollLeft + (viewportSize.width - size.width) / 2, 10), top : parseInt(documentScroll.scrol...
[ "function", "(", "size", ",", "base", ")", "{", "var", "viewportSize", "=", "this", ".", "_getViewportSize", "(", ")", ";", "var", "documentScroll", "=", "this", ".", "_getDocumentScroll", "(", "base", ")", ";", "return", "{", "left", ":", "parseInt", "(...
Center the given size in the viewport. @param {aria.utils.DomBeans:Size} size size of the element to center in the viewport @param {Object} base The base element used to account for scrolling offsets @return {aria.utils.DomBeans:Position} position of the element when centered in the viewport
[ "Center", "the", "given", "size", "in", "the", "viewport", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L974-L981
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (position, size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); if (position.top < documentScroll.scrollTop || position.left < documentScroll.scrollLeft || position.top + size.height > documentScro...
javascript
function (position, size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); if (position.top < documentScroll.scrollTop || position.left < documentScroll.scrollLeft || position.top + size.height > documentScro...
[ "function", "(", "position", ",", "size", ",", "base", ")", "{", "var", "viewportSize", "=", "this", ".", "_getViewportSize", "(", ")", ";", "var", "documentScroll", "=", "this", ".", "_getDocumentScroll", "(", "base", ")", ";", "if", "(", "position", "....
Check if a given position + size couple can fit in the current viewport @param {aria.utils.DomBeans:Position} position @param {aria.utils.DomBeans:Size} size @param {Object} base The base element used to account for scrolling offsets @return {Boolean} True if the given position+size couple can fit in the current viewpo...
[ "Check", "if", "a", "given", "position", "+", "size", "couple", "can", "fit", "in", "the", "current", "viewport" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L990-L1001
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (needle, haystack) { needle.width = needle.width || 0; needle.height = needle.height || 0; if (haystack == this.VIEWPORT) { return this.isInViewport({ left : needle.x, top : needle.y }, { ...
javascript
function (needle, haystack) { needle.width = needle.width || 0; needle.height = needle.height || 0; if (haystack == this.VIEWPORT) { return this.isInViewport({ left : needle.x, top : needle.y }, { ...
[ "function", "(", "needle", ",", "haystack", ")", "{", "needle", ".", "width", "=", "needle", ".", "width", "||", "0", ";", "needle", ".", "height", "=", "needle", ".", "height", "||", "0", ";", "if", "(", "haystack", "==", "this", ".", "VIEWPORT", ...
Compares two geometries to ascertain whether an element is inside another one @param {aria.utils.DomBeans:Geometry} needle @param {aria.utils.DomBeans:Geometry|aria.utils.Dom:VIEWPORT:property} haystack @return {Boolean}
[ "Compares", "two", "geometries", "to", "ascertain", "whether", "an", "element", "is", "inside", "another", "one" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1009-L1028
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (position, size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); var minTopValue = documentScroll.scrollTop; var maxTopValue = Math.max(0, documentScroll.scrollTop + viewportSize.height - size.height); ...
javascript
function (position, size, base) { var viewportSize = this._getViewportSize(); var documentScroll = this._getDocumentScroll(base); var minTopValue = documentScroll.scrollTop; var maxTopValue = Math.max(0, documentScroll.scrollTop + viewportSize.height - size.height); ...
[ "function", "(", "position", ",", "size", ",", "base", ")", "{", "var", "viewportSize", "=", "this", ".", "_getViewportSize", "(", ")", ";", "var", "documentScroll", "=", "this", ".", "_getDocumentScroll", "(", "base", ")", ";", "var", "minTopValue", "=", ...
Given a position + size couple, return a corrected position that should fit in the viewport. If the size is bigger than the vieport it returns a position such that the top left corner of the element to be fit is in the viewport. @param {aria.utils.DomBeans:Position} position @param {aria.utils.DomBeans:Size} size @para...
[ "Given", "a", "position", "+", "size", "couple", "return", "a", "corrected", "position", "that", "should", "fit", "in", "the", "viewport", ".", "If", "the", "size", "is", "bigger", "than", "the", "vieport", "it", "returns", "a", "position", "such", "that",...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1039-L1055
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (geometry, container) { geometry.width = geometry.width || 0; geometry.height = geometry.height || 0; if (container == this.VIEWPORT) { container = this.getViewportSize(); container.x = container.y = 0; } container.widt...
javascript
function (geometry, container) { geometry.width = geometry.width || 0; geometry.height = geometry.height || 0; if (container == this.VIEWPORT) { container = this.getViewportSize(); container.x = container.y = 0; } container.widt...
[ "function", "(", "geometry", ",", "container", ")", "{", "geometry", ".", "width", "=", "geometry", ".", "width", "||", "0", ";", "geometry", ".", "height", "=", "geometry", ".", "height", "||", "0", ";", "if", "(", "container", "==", "this", ".", "V...
Fits a geometry into another geometry @param {aria.utils.DomBeans:Geometry} geometry @param {aria.utils.DomBeans:Geometry|aria.utils.Dom:VIEWPORT:property} container @return {aria.utils.DomBeans:Position} top and left values of the fitted geometry
[ "Fits", "a", "geometry", "into", "another", "geometry" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1063-L1085
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (child, parent) { if (!(child && child.ownerDocument)) { return false; } var document = child.ownerDocument; var body = document.body; var element = child; while (element && element != body) { if (element ==...
javascript
function (child, parent) { if (!(child && child.ownerDocument)) { return false; } var document = child.ownerDocument; var body = document.body; var element = child; while (element && element != body) { if (element ==...
[ "function", "(", "child", ",", "parent", ")", "{", "if", "(", "!", "(", "child", "&&", "child", ".", "ownerDocument", ")", ")", "{", "return", "false", ";", "}", "var", "document", "=", "child", ".", "ownerDocument", ";", "var", "body", "=", "documen...
Check whether a child element is a child element of a particular parentNode @param {HTMLElement} child The child DOM element to check @param {HTMLElement} parent The parent DOM element to check @return {Boolean} True if the given child is a child of the given parent
[ "Check", "whether", "a", "child", "element", "is", "a", "child", "element", "of", "a", "particular", "parentNode" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1093-L1107
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (element, alignTop) { var document = element.ownerDocument; var origin = element, originRect = origin.getBoundingClientRect(); var hasScroll = false; var documentScroll = this.getDocumentScrollElement(document); while (element) { if ...
javascript
function (element, alignTop) { var document = element.ownerDocument; var origin = element, originRect = origin.getBoundingClientRect(); var hasScroll = false; var documentScroll = this.getDocumentScrollElement(document); while (element) { if ...
[ "function", "(", "element", ",", "alignTop", ")", "{", "var", "document", "=", "element", ".", "ownerDocument", ";", "var", "origin", "=", "element", ",", "originRect", "=", "origin", ".", "getBoundingClientRect", "(", ")", ";", "var", "hasScroll", "=", "f...
Change scrollbar positions to ensure that an item is visible. @param {HTMLElement} element element which is to be made visible @param {Boolean} alignTop if true align top of the element with top of container. if false, align bottom. If not specified, does "minimal job".
[ "Change", "scrollbar", "positions", "to", "ensure", "that", "an", "item", "is", "visible", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1135-L1217
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (element, opacity) { var browser = ariaCoreBrowser; var isIE8OrLess = (browser.isIE8 || browser.isIE7); this.setOpacity = isIE8OrLess ? this._setOpacityLegacyIE : this._setOpacityW3C; this.setOpacity(element, opacity); }
javascript
function (element, opacity) { var browser = ariaCoreBrowser; var isIE8OrLess = (browser.isIE8 || browser.isIE7); this.setOpacity = isIE8OrLess ? this._setOpacityLegacyIE : this._setOpacityW3C; this.setOpacity(element, opacity); }
[ "function", "(", "element", ",", "opacity", ")", "{", "var", "browser", "=", "ariaCoreBrowser", ";", "var", "isIE8OrLess", "=", "(", "browser", ".", "isIE8", "||", "browser", ".", "isIE7", ")", ";", "this", ".", "setOpacity", "=", "isIE8OrLess", "?", "th...
Set the opacity of an element @param {HTMLElement} element @param {Number} opacity must be between 0 and 1
[ "Set", "the", "opacity", "of", "an", "element" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1242-L1247
train
ariatemplates/ariatemplates
src/aria/utils/Dom.js
function (domElt) { // work-around for http://crbug.com/240772 var values = []; var parent = domElt; while (parent && parent.style) { values.push(parent.style.cssText); parent.style.overflow = "hidden"; parent = parent.paren...
javascript
function (domElt) { // work-around for http://crbug.com/240772 var values = []; var parent = domElt; while (parent && parent.style) { values.push(parent.style.cssText); parent.style.overflow = "hidden"; parent = parent.paren...
[ "function", "(", "domElt", ")", "{", "// work-around for http://crbug.com/240772", "var", "values", "=", "[", "]", ";", "var", "parent", "=", "domElt", ";", "while", "(", "parent", "&&", "parent", ".", "style", ")", "{", "values", ".", "push", "(", "parent...
Refreshes scrollbars for the specified DOM element and all its parents. @see refreshScrollbars @param {HTMLElement} domElt
[ "Refreshes", "scrollbars", "for", "the", "specified", "DOM", "element", "and", "all", "its", "parents", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Dom.js#L1274-L1289
train
ariatemplates/ariatemplates
src/aria/widgetLibs/BaseWidget.js
function (widget, msgArgs) { if (widget._context) { if (!msgArgs) { msgArgs = []; } msgArgs.unshift("Template: " + widget._context.tplClasspath + ", Line: " + widget._lineNumber + "\n"); } return msgArgs; }
javascript
function (widget, msgArgs) { if (widget._context) { if (!msgArgs) { msgArgs = []; } msgArgs.unshift("Template: " + widget._context.tplClasspath + ", Line: " + widget._lineNumber + "\n"); } return msgArgs; }
[ "function", "(", "widget", ",", "msgArgs", ")", "{", "if", "(", "widget", ".", "_context", ")", "{", "if", "(", "!", "msgArgs", ")", "{", "msgArgs", "=", "[", "]", ";", "}", "msgArgs", ".", "unshift", "(", "\"Template: \"", "+", "widget", ".", "_co...
Add template and line number information to the msgArgs array to be used for logs functions. Return the modified array. @param {aria.widgetLibs.BaseWidget} widget widget instance @param {Array} msgArgs array @return {Array} @private
[ "Add", "template", "and", "line", "number", "information", "to", "the", "msgArgs", "array", "to", "be", "used", "for", "logs", "functions", ".", "Return", "the", "modified", "array", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgetLibs/BaseWidget.js#L33-L41
train
ariatemplates/ariatemplates
src/aria/widgetLibs/BaseWidget.js
function (id) { var dynamicIds = this._dynamicIds; if (dynamicIds) { var index = arrayUtils.indexOf(dynamicIds, id); if (index != -1) { idMgr.releaseId(id); if (dynamicIds.length == 1) { ...
javascript
function (id) { var dynamicIds = this._dynamicIds; if (dynamicIds) { var index = arrayUtils.indexOf(dynamicIds, id); if (index != -1) { idMgr.releaseId(id); if (dynamicIds.length == 1) { ...
[ "function", "(", "id", ")", "{", "var", "dynamicIds", "=", "this", ".", "_dynamicIds", ";", "if", "(", "dynamicIds", ")", "{", "var", "index", "=", "arrayUtils", ".", "indexOf", "(", "dynamicIds", ",", "id", ")", ";", "if", "(", "index", "!=", "-", ...
Release a dynamic id created with _createDynamicId, so that it can be reused for another widget. If the id was not created with _createDynamicId or already released, the function does nothing. @param {String} id id to be released.
[ "Release", "a", "dynamic", "id", "created", "with", "_createDynamicId", "so", "that", "it", "can", "be", "reused", "for", "another", "widget", ".", "If", "the", "id", "was", "not", "created", "with", "_createDynamicId", "or", "already", "released", "the", "f...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgetLibs/BaseWidget.js#L238-L251
train
ariatemplates/ariatemplates
src/aria/widgetLibs/BaseWidget.js
function () { var dynamicIds = this._dynamicIds; if (dynamicIds) { for (var i = dynamicIds.length - 1; i >= 0; i--) { idMgr.releaseId(dynamicIds[i]); } this._dynamicIds = null; } ...
javascript
function () { var dynamicIds = this._dynamicIds; if (dynamicIds) { for (var i = dynamicIds.length - 1; i >= 0; i--) { idMgr.releaseId(dynamicIds[i]); } this._dynamicIds = null; } ...
[ "function", "(", ")", "{", "var", "dynamicIds", "=", "this", ".", "_dynamicIds", ";", "if", "(", "dynamicIds", ")", "{", "for", "(", "var", "i", "=", "dynamicIds", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "idMgr", ...
Release all dynamic ids created with _createDynamicId, so that they can be reused for other widgets.
[ "Release", "all", "dynamic", "ids", "created", "with", "_createDynamicId", "so", "that", "they", "can", "be", "reused", "for", "other", "widgets", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgetLibs/BaseWidget.js#L256-L264
train
ariatemplates/ariatemplates
src/aria/templates/MarkupWriter.js
function (m) { if (this._delegateMap) { if (m || m === 0) { // String cast m = '' + m; var closingIndex = m.indexOf(">"); if (closingIndex != -1) { var delegate...
javascript
function (m) { if (this._delegateMap) { if (m || m === 0) { // String cast m = '' + m; var closingIndex = m.indexOf(">"); if (closingIndex != -1) { var delegate...
[ "function", "(", "m", ")", "{", "if", "(", "this", ".", "_delegateMap", ")", "{", "if", "(", "m", "||", "m", "===", "0", ")", "{", "// String cast", "m", "=", "''", "+", "m", ";", "var", "closingIndex", "=", "m", ".", "indexOf", "(", "\">\"", "...
Put markup in current output stream @param {String} m the HTML markup to write in the current output
[ "Put", "markup", "in", "current", "output", "stream" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/MarkupWriter.js#L163-L197
train
ariatemplates/ariatemplates
src/aria/templates/MarkupWriter.js
function (event) { var eventWrapper = new ariaTemplatesDomEventWrapper(event), result = true; var targetCallback = delegateMap[event.type]; if (targetCallback) { if (event.type == "safetap...
javascript
function (event) { var eventWrapper = new ariaTemplatesDomEventWrapper(event), result = true; var targetCallback = delegateMap[event.type]; if (targetCallback) { if (event.type == "safetap...
[ "function", "(", "event", ")", "{", "var", "eventWrapper", "=", "new", "ariaTemplatesDomEventWrapper", "(", "event", ")", ",", "result", "=", "true", ";", "var", "targetCallback", "=", "delegateMap", "[", "event", ".", "type", "]", ";", "if", "(", "targetC...
delegate function that will call the good callback for the good event
[ "delegate", "function", "that", "will", "call", "the", "good", "callback", "for", "the", "good", "event" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/MarkupWriter.js#L173-L184
train
ariatemplates/ariatemplates
src/aria/templates/MarkupWriter.js
function (eventName, callback) { // do nothing if no section is defined (partial refresh usecase) if (!this._currentSection) { return; } var delegate = ariaUtilsDelegate; // Fallback mechanism for event that can not b...
javascript
function (eventName, callback) { // do nothing if no section is defined (partial refresh usecase) if (!this._currentSection) { return; } var delegate = ariaUtilsDelegate; // Fallback mechanism for event that can not b...
[ "function", "(", "eventName", ",", "callback", ")", "{", "// do nothing if no section is defined (partial refresh usecase)", "if", "(", "!", "this", ".", "_currentSection", ")", "{", "return", ";", "}", "var", "delegate", "=", "ariaUtilsDelegate", ";", "// Fallback me...
Add a delegate function on current markup @param {String} eventName @param {aria.core.CfgBeans:Callback} callback
[ "Add", "a", "delegate", "function", "on", "current", "markup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/MarkupWriter.js#L204-L231
train
ariatemplates/ariatemplates
src/aria/templates/MarkupWriter.js
function () { var res = this._topSection; res.html = this._out.join(""); this._delegate = null; this._out = null; this._topSection = null; // so that the section is not disposed in the MarkupWriter destructor return res; ...
javascript
function () { var res = this._topSection; res.html = this._out.join(""); this._delegate = null; this._out = null; this._topSection = null; // so that the section is not disposed in the MarkupWriter destructor return res; ...
[ "function", "(", ")", "{", "var", "res", "=", "this", ".", "_topSection", ";", "res", ".", "html", "=", "this", ".", "_out", ".", "join", "(", "\"\"", ")", ";", "this", ".", "_delegate", "=", "null", ";", "this", ".", "_out", "=", "null", ";", ...
Return the top section. In the context of a partial refresh, this will be the section to refresh only @return {aria.templates.Section}
[ "Return", "the", "top", "section", ".", "In", "the", "context", "of", "a", "partial", "refresh", "this", "will", "be", "the", "section", "to", "refresh", "only" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/MarkupWriter.js#L255-L262
train
ariatemplates/ariatemplates
src/aria/widgets/action/Link.js
function (domEvt) { if (domEvt.keyCode == aria.DomEvent.KC_ENTER) { if (this._keyPressed) { this._keyPressed = false; if (!this._performAction(domEvt)) { domEvt.stopPropagation(); return false; ...
javascript
function (domEvt) { if (domEvt.keyCode == aria.DomEvent.KC_ENTER) { if (this._keyPressed) { this._keyPressed = false; if (!this._performAction(domEvt)) { domEvt.stopPropagation(); return false; ...
[ "function", "(", "domEvt", ")", "{", "if", "(", "domEvt", ".", "keyCode", "==", "aria", ".", "DomEvent", ".", "KC_ENTER", ")", "{", "if", "(", "this", ".", "_keyPressed", ")", "{", "this", ".", "_keyPressed", "=", "false", ";", "if", "(", "!", "thi...
React to delegated key up events @protected @param {aria.DomEvent} domEvt Event
[ "React", "to", "delegated", "key", "up", "events" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/Link.js#L129-L140
train
ariatemplates/ariatemplates
src/aria/templates/Layout.js
function () { if (__scrollBarsWidth != null) { return __scrollBarsWidth; } var document = Aria.$window.document; var o = document.createElement("div"); // outer div var i = document.createElement("div"); // inner div ...
javascript
function () { if (__scrollBarsWidth != null) { return __scrollBarsWidth; } var document = Aria.$window.document; var o = document.createElement("div"); // outer div var i = document.createElement("div"); // inner div ...
[ "function", "(", ")", "{", "if", "(", "__scrollBarsWidth", "!=", "null", ")", "{", "return", "__scrollBarsWidth", ";", "}", "var", "document", "=", "Aria", ".", "$window", ".", "document", ";", "var", "o", "=", "document", ".", "createElement", "(", "\"d...
Returns the width of scrollbars in pixels, as measured in the current browser. @return {Number}
[ "Returns", "the", "width", "of", "scrollbars", "in", "pixels", "as", "measured", "in", "the", "current", "browser", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Layout.js#L352-L380
train
ariatemplates/ariatemplates
src/aria/core/transport/IFrame.js
function (request) { var iFrame; var browser = ariaCoreBrowser; var document = Aria.$frameworkWindow.document; // Issue when using document.createElement("iframe") in IE7 if (browser.isIE7) { var container = document.createElement("div"); ...
javascript
function (request) { var iFrame; var browser = ariaCoreBrowser; var document = Aria.$frameworkWindow.document; // Issue when using document.createElement("iframe") in IE7 if (browser.isIE7) { var container = document.createElement("div"); ...
[ "function", "(", "request", ")", "{", "var", "iFrame", ";", "var", "browser", "=", "ariaCoreBrowser", ";", "var", "document", "=", "Aria", ".", "$frameworkWindow", ".", "document", ";", "// Issue when using document.createElement(\"iframe\") in IE7", "if", "(", "bro...
Creates an iFrame to load the response of the request. @param {aria.core.CfgBeans:IOAsyncRequestCfg} request @protected
[ "Creates", "an", "iFrame", "to", "load", "the", "response", "of", "the", "request", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/IFrame.js#L75-L100
train
ariatemplates/ariatemplates
src/aria/core/transport/IFrame.js
function (request, callback) { var form = request.form; form.target = "xIFrame" + request.id; form.action = request.url; form.method = request.method; if (request.headers["Content-Type"]) { try { // in IE 8, setting form.enc...
javascript
function (request, callback) { var form = request.form; form.target = "xIFrame" + request.id; form.action = request.url; form.method = request.method; if (request.headers["Content-Type"]) { try { // in IE 8, setting form.enc...
[ "function", "(", "request", ",", "callback", ")", "{", "var", "form", "=", "request", ".", "form", ";", "form", ".", "target", "=", "\"xIFrame\"", "+", "request", ".", "id", ";", "form", ".", "action", "=", "request", ".", "url", ";", "form", ".", ...
Updates the form to target the iframe then calls the forms submit method. @param {aria.core.CfgBeans:IOAsyncRequestCfg} request @param {Object} callback Internal callback description @protected
[ "Updates", "the", "form", "to", "target", "the", "iframe", "then", "calls", "the", "forms", "submit", "method", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/IFrame.js#L108-L136
train
ariatemplates/ariatemplates
src/aria/core/transport/IFrame.js
function (event) { // This method cannot use 'this' because the scope is not aria.core.transport.IFrame when this method is // called. It uses oSelf instead. var event = event || Aria.$frameworkWindow.event; var iFrame = event.target || event.srcElement; if (!...
javascript
function (event) { // This method cannot use 'this' because the scope is not aria.core.transport.IFrame when this method is // called. It uses oSelf instead. var event = event || Aria.$frameworkWindow.event; var iFrame = event.target || event.srcElement; if (!...
[ "function", "(", "event", ")", "{", "// This method cannot use 'this' because the scope is not aria.core.transport.IFrame when this method is", "// called. It uses oSelf instead.", "var", "event", "=", "event", "||", "Aria", ".", "$frameworkWindow", ".", "event", ";", "var", "i...
load and readystatechange event handler on the iFrame. @param {DOMEvent} event
[ "load", "and", "readystatechange", "event", "handler", "on", "the", "iFrame", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/IFrame.js#L142-L154
train
ariatemplates/ariatemplates
src/aria/core/transport/IFrame.js
function (id) { var description = this._requests[id]; if (!description) { // The request was aborted return; } var request = description.request; var callback = description.cb; var iFrame = request.iFrame; ...
javascript
function (id) { var description = this._requests[id]; if (!description) { // The request was aborted return; } var request = description.request; var callback = description.cb; var iFrame = request.iFrame; ...
[ "function", "(", "id", ")", "{", "var", "description", "=", "this", ".", "_requests", "[", "id", "]", ";", "if", "(", "!", "description", ")", "{", "// The request was aborted", "return", ";", "}", "var", "request", "=", "description", ".", "request", ";...
Sends back the results of the request @param {String} id Request id @protected
[ "Sends", "back", "the", "results", "of", "the", "request" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/IFrame.js#L161-L202
train
ariatemplates/ariatemplates
src/aria/core/transport/IFrame.js
function (request) { var iFrame = request.iFrame; if (iFrame) { var domEltToRemove = request.iFrameContainer || iFrame; domEltToRemove.parentNode.removeChild(domEltToRemove); // avoid leaks: request.iFrameContainer = null; ...
javascript
function (request) { var iFrame = request.iFrame; if (iFrame) { var domEltToRemove = request.iFrameContainer || iFrame; domEltToRemove.parentNode.removeChild(domEltToRemove); // avoid leaks: request.iFrameContainer = null; ...
[ "function", "(", "request", ")", "{", "var", "iFrame", "=", "request", ".", "iFrame", ";", "if", "(", "iFrame", ")", "{", "var", "domEltToRemove", "=", "request", ".", "iFrameContainer", "||", "iFrame", ";", "domEltToRemove", ".", "parentNode", ".", "remov...
Delete a request freing up memory @param {aria.core.CfgBeans:IOAsyncRequestCfg} request
[ "Delete", "a", "request", "freing", "up", "memory" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/IFrame.js#L208-L220
train
ariatemplates/ariatemplates
src/aria/utils/Callback.js
function (evt) { var args = (this._apply === true && ariaUtilsType.isArray(this._args)) ? this._args.slice() : [this._args]; var resIndex = (this._resIndex === undefined) ? 0 : this._resIndex; if (resIndex > -1) { args.splice(resIndex, 0, evt); } ...
javascript
function (evt) { var args = (this._apply === true && ariaUtilsType.isArray(this._args)) ? this._args.slice() : [this._args]; var resIndex = (this._resIndex === undefined) ? 0 : this._resIndex; if (resIndex > -1) { args.splice(resIndex, 0, evt); } ...
[ "function", "(", "evt", ")", "{", "var", "args", "=", "(", "this", ".", "_apply", "===", "true", "&&", "ariaUtilsType", ".", "isArray", "(", "this", ".", "_args", ")", ")", "?", "this", ".", "_args", ".", "slice", "(", ")", ":", "[", "this", ".",...
Execute the callback. It is equivalent to Callback.apply @param {Object} event
[ "Execute", "the", "callback", ".", "It", "is", "equivalent", "to", "Callback", ".", "apply" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Callback.js#L160-L169
train
ariatemplates/ariatemplates
src/aria/widgets/container/Fieldset.js
function (domEvt) { if (domEvt.keyCode == domEvt.KC_ENTER) { if (this._checkTargetBeforeSubmit(domEvt.target)) { var onSubmit = this._cfg.onSubmit; if (onSubmit) { return this.evalCallback(this._cfg.onSubmit) === true; ...
javascript
function (domEvt) { if (domEvt.keyCode == domEvt.KC_ENTER) { if (this._checkTargetBeforeSubmit(domEvt.target)) { var onSubmit = this._cfg.onSubmit; if (onSubmit) { return this.evalCallback(this._cfg.onSubmit) === true; ...
[ "function", "(", "domEvt", ")", "{", "if", "(", "domEvt", ".", "keyCode", "==", "domEvt", ".", "KC_ENTER", ")", "{", "if", "(", "this", ".", "_checkTargetBeforeSubmit", "(", "domEvt", ".", "target", ")", ")", "{", "var", "onSubmit", "=", "this", ".", ...
Called from the DOM when a key is pressed inside the fieldset. @param {aria.DomEvent} domEvt event @protected
[ "Called", "from", "the", "DOM", "when", "a", "key", "is", "pressed", "inside", "the", "fieldset", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Fieldset.js#L99-L108
train
ariatemplates/ariatemplates
src/aria/widgets/container/Fieldset.js
function (out) { var label = this._cfg.label; if (label && this._cfg.waiAria) { out.write('<span class="xSROnly">' + ariaUtilsString.escapeHTML(label) + '</span>'); } this._frame.writeMarkupBegin(out); }
javascript
function (out) { var label = this._cfg.label; if (label && this._cfg.waiAria) { out.write('<span class="xSROnly">' + ariaUtilsString.escapeHTML(label) + '</span>'); } this._frame.writeMarkupBegin(out); }
[ "function", "(", "out", ")", "{", "var", "label", "=", "this", ".", "_cfg", ".", "label", ";", "if", "(", "label", "&&", "this", ".", "_cfg", ".", "waiAria", ")", "{", "out", ".", "write", "(", "'<span class=\"xSROnly\">'", "+", "ariaUtilsString", ".",...
Generate the internal widget begin markup @param {aria.templates.MarkupWriter} out the writer Object to use to output markup @protected
[ "Generate", "the", "internal", "widget", "begin", "markup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Fieldset.js#L115-L121
train
ariatemplates/ariatemplates
src/aria/widgets/container/Fieldset.js
function (out) { this._frame.writeMarkupEnd(out); var label = this._cfg.label; if (label) { var ariaHidden = this._cfg.waiAria ? ' aria-hidden="true"' : ''; out.write('<span class="xFieldset_' + this._cfg.sclass + '_normal_label"' + ariaHidden + '>' + ...
javascript
function (out) { this._frame.writeMarkupEnd(out); var label = this._cfg.label; if (label) { var ariaHidden = this._cfg.waiAria ? ' aria-hidden="true"' : ''; out.write('<span class="xFieldset_' + this._cfg.sclass + '_normal_label"' + ariaHidden + '>' + ...
[ "function", "(", "out", ")", "{", "this", ".", "_frame", ".", "writeMarkupEnd", "(", "out", ")", ";", "var", "label", "=", "this", ".", "_cfg", ".", "label", ";", "if", "(", "label", ")", "{", "var", "ariaHidden", "=", "this", ".", "_cfg", ".", "...
Generate the internal widget end markup @param {aria.templates.MarkupWriter} out the writer Object to use to output markup @protected
[ "Generate", "the", "internal", "widget", "end", "markup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Fieldset.js#L128-L135
train