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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(callback) {
// everything is copied in case the collection is modified during the cycle
var values = this._data_values.slice(),
uids = this._data_uids.slice(),
names = this._data_names.slice(),
i = 0,
count = this._count;
for (; i < count; i++) {
if (callback(values[i], names[i], uids[i... | javascript | function(callback) {
// everything is copied in case the collection is modified during the cycle
var values = this._data_values.slice(),
uids = this._data_uids.slice(),
names = this._data_names.slice(),
i = 0,
count = this._count;
for (; i < count; i++) {
if (callback(values[i], names[i], uids[i... | [
"function",
"(",
"callback",
")",
"{",
"// everything is copied in case the collection is modified during the cycle",
"var",
"values",
"=",
"this",
".",
"_data_values",
".",
"slice",
"(",
")",
",",
"uids",
"=",
"this",
".",
"_data_uids",
".",
"slice",
"(",
")",
",... | Execute the `callback` for each item in collection
@param {_tEnumerableEachCallback} callback | [
"Execute",
"the",
"callback",
"for",
"each",
"item",
"in",
"collection"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2083-L2100 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(new_indices) {
var i = 0,
result = this._createHelperStorage(),
index,
verification = {};
if (Lava.schema.DEBUG && new_indices.length != this._count) throw "reorder: new item count is less than current";
for (; i < this._count; i++) {
index = new_indices[i];
result.push(this._data_uids... | javascript | function(new_indices) {
var i = 0,
result = this._createHelperStorage(),
index,
verification = {};
if (Lava.schema.DEBUG && new_indices.length != this._count) throw "reorder: new item count is less than current";
for (; i < this._count; i++) {
index = new_indices[i];
result.push(this._data_uids... | [
"function",
"(",
"new_indices",
")",
"{",
"var",
"i",
"=",
"0",
",",
"result",
"=",
"this",
".",
"_createHelperStorage",
"(",
")",
",",
"index",
",",
"verification",
"=",
"{",
"}",
";",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"new_indic... | Sort items by premade array of new item indices
@param {Array.<number>} new_indices | [
"Sort",
"items",
"by",
"premade",
"array",
"of",
"new",
"item",
"indices"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2195-L2220 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(start_index, count) {
if (count <= 0) Lava.t("Invalid item count supplied for removeRange");
if (start_index + count >= this._count + 1) Lava.t("Index is out of range");
var removed_uids = this._data_uids.splice(start_index, count),
removed_values = this._data_values.splice(start_index, count),
r... | javascript | function(start_index, count) {
if (count <= 0) Lava.t("Invalid item count supplied for removeRange");
if (start_index + count >= this._count + 1) Lava.t("Index is out of range");
var removed_uids = this._data_uids.splice(start_index, count),
removed_values = this._data_values.splice(start_index, count),
r... | [
"function",
"(",
"start_index",
",",
"count",
")",
"{",
"if",
"(",
"count",
"<=",
"0",
")",
"Lava",
".",
"t",
"(",
"\"Invalid item count supplied for removeRange\"",
")",
";",
"if",
"(",
"start_index",
"+",
"count",
">=",
"this",
".",
"_count",
"+",
"1",
... | Remove range of indices from collection and return removed values
@param {number} start_index
@param {number} count
@returns {Array} Removed values | [
"Remove",
"range",
"of",
"indices",
"from",
"collection",
"and",
"return",
"removed",
"values"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2228-L2249 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
return {
uids: [],
values: [],
names: [],
push: function(uid, value, name) {
this.uids.push(uid);
this.values.push(value);
this.names.push(name);
},
getObject: function() {
return {
uids: this.uids,
values: this.values,
names: this.names
}
}
}
... | javascript | function() {
return {
uids: [],
values: [],
names: [],
push: function(uid, value, name) {
this.uids.push(uid);
this.values.push(value);
this.names.push(name);
},
getObject: function() {
return {
uids: this.uids,
values: this.values,
names: this.names
}
}
}
... | [
"function",
"(",
")",
"{",
"return",
"{",
"uids",
":",
"[",
"]",
",",
"values",
":",
"[",
"]",
",",
"names",
":",
"[",
"]",
",",
"push",
":",
"function",
"(",
"uid",
",",
"value",
",",
"name",
")",
"{",
"this",
".",
"uids",
".",
"push",
"(",
... | Create an internal helper object, which allows to write less code
@returns {_cEnumerableHelperStorage} Helper object | [
"Create",
"an",
"internal",
"helper",
"object",
"which",
"allows",
"to",
"write",
"less",
"code"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2286-L2306 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(data_source) {
this.guid = Lava.guid++;
if (data_source) {
var count = 0,
i = 0,
name;
if (Array.isArray(data_source)) {
for (count = data_source.length; i < count; i++) {
this._push(this._uid++, data_source[i], null);
}
} else if (data_source.isCollection) {
this... | javascript | function(data_source) {
this.guid = Lava.guid++;
if (data_source) {
var count = 0,
i = 0,
name;
if (Array.isArray(data_source)) {
for (count = data_source.length; i < count; i++) {
this._push(this._uid++, data_source[i], null);
}
} else if (data_source.isCollection) {
this... | [
"function",
"(",
"data_source",
")",
"{",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"if",
"(",
"data_source",
")",
"{",
"var",
"count",
"=",
"0",
",",
"i",
"=",
"0",
",",
"name",
";",
"if",
"(",
"Array",
".",
"isArray",
"(",
"da... | Creates Enumerable instance and fills initial data from `data_source`
@param {(Array|Object|Lava.mixin.Properties|Lava.system.Enumerable)} data_source | [
"Creates",
"Enumerable",
"instance",
"and",
"fills",
"initial",
"data",
"from",
"data_source"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2369-L2417 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(data_source) {
if (Lava.schema.DEBUG && typeof(data_source) != 'object') Lava.t("Wrong argument passed to updateFromSourceObject");
if (Array.isArray(data_source)) {
this._updateFromArray(data_source, []);
} else if (data_source.isCollection) {
this._updateFromEnumerable(data_source);
} els... | javascript | function(data_source) {
if (Lava.schema.DEBUG && typeof(data_source) != 'object') Lava.t("Wrong argument passed to updateFromSourceObject");
if (Array.isArray(data_source)) {
this._updateFromArray(data_source, []);
} else if (data_source.isCollection) {
this._updateFromEnumerable(data_source);
} els... | [
"function",
"(",
"data_source",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"typeof",
"(",
"data_source",
")",
"!=",
"'object'",
")",
"Lava",
".",
"t",
"(",
"\"Wrong argument passed to updateFromSourceObject\"",
")",
";",
"if",
"(",
"Arra... | Update the collection from `data_source`
@param {(Array|Object|Lava.mixin.Properties|Lava.system.Enumerable)} data_source | [
"Update",
"the",
"collection",
"from",
"data_source"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2423-L2441 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(source_array, names) {
var i = 0,
count = source_array.length,
items_removed_argument = {
uids: this._data_uids,
values: this._data_values,
names: this._data_names
};
this._data_uids = [];
this._data_values = [];
this._data_names = [];
for (; i < count; i++) {
this._push(th... | javascript | function(source_array, names) {
var i = 0,
count = source_array.length,
items_removed_argument = {
uids: this._data_uids,
values: this._data_values,
names: this._data_names
};
this._data_uids = [];
this._data_values = [];
this._data_names = [];
for (; i < count; i++) {
this._push(th... | [
"function",
"(",
"source_array",
",",
"names",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"source_array",
".",
"length",
",",
"items_removed_argument",
"=",
"{",
"uids",
":",
"this",
".",
"_data_uids",
",",
"values",
":",
"this",
".",
"_data_valu... | Remove all current values and add values from array
@param {Array} source_array
@param {Array.<string>} names | [
"Remove",
"all",
"current",
"values",
"and",
"add",
"values",
"from",
"array"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2448-L2478 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(source_object) {
var i = 0,
name,
uid,
result = this._createHelperStorage(),
removed = this._createHelperStorage(),
added = this._createHelperStorage();
for (; i < this._count; i++) {
name = this._data_names[i];
if (name != null && (name in source_object)) {
if (source_object[n... | javascript | function(source_object) {
var i = 0,
name,
uid,
result = this._createHelperStorage(),
removed = this._createHelperStorage(),
added = this._createHelperStorage();
for (; i < this._count; i++) {
name = this._data_names[i];
if (name != null && (name in source_object)) {
if (source_object[n... | [
"function",
"(",
"source_object",
")",
"{",
"var",
"i",
"=",
"0",
",",
"name",
",",
"uid",
",",
"result",
"=",
"this",
".",
"_createHelperStorage",
"(",
")",
",",
"removed",
"=",
"this",
".",
"_createHelperStorage",
"(",
")",
",",
"added",
"=",
"this",... | Compares item names with object keys, removing values without names and values that do not match.
Adds new values from `source_object`
@param {Object} source_object | [
"Compares",
"item",
"names",
"with",
"object",
"keys",
"removing",
"values",
"without",
"names",
"and",
"values",
"that",
"do",
"not",
"match",
".",
"Adds",
"new",
"values",
"from",
"source_object"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2495-L2550 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(index, value, name) {
if (index > this._count) Lava.t("Index is out of range");
var old_uid = this._data_uids[index],
old_value = this._data_values[index],
old_name = this._data_names[index],
new_uid = this._uid++;
this._data_uids[index] = new_uid;
this._data_values[index] = value;
if (na... | javascript | function(index, value, name) {
if (index > this._count) Lava.t("Index is out of range");
var old_uid = this._data_uids[index],
old_value = this._data_values[index],
old_name = this._data_names[index],
new_uid = this._uid++;
this._data_uids[index] = new_uid;
this._data_values[index] = value;
if (na... | [
"function",
"(",
"index",
",",
"value",
",",
"name",
")",
"{",
"if",
"(",
"index",
">",
"this",
".",
"_count",
")",
"Lava",
".",
"t",
"(",
"\"Index is out of range\"",
")",
";",
"var",
"old_uid",
"=",
"this",
".",
"_data_uids",
"[",
"index",
"]",
","... | Replace the corresponding `value` and `name` at specified `index`, generating a new UID
@param {number} index Index of value in Enumerable
@param {*} value New value for given index
@param {number} [name] New name for the value | [
"Replace",
"the",
"corresponding",
"value",
"and",
"name",
"at",
"specified",
"index",
"generating",
"a",
"new",
"UID"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2572-L2601 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(value, name) {
var result = false,
index = this._data_values.indexOf(value);
if (index == -1) {
this.push(value, name);
result = true;
}
return result;
} | javascript | function(value, name) {
var result = false,
index = this._data_values.indexOf(value);
if (index == -1) {
this.push(value, name);
result = true;
}
return result;
} | [
"function",
"(",
"value",
",",
"name",
")",
"{",
"var",
"result",
"=",
"false",
",",
"index",
"=",
"this",
".",
"_data_values",
".",
"indexOf",
"(",
"value",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"this",
".",
"push",
"(",
"value... | If value does not exist - push it into collection
@param {*} value New value
@param {string} [name] New name
@returns {boolean} <kw>true</kw>, if value did not exist and was included | [
"If",
"value",
"does",
"not",
"exist",
"-",
"push",
"it",
"into",
"collection"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2636-L2648 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(start_index, values, names) {
if (start_index >= this._count) Lava.t("Index is out of range");
var i = 0,
count = values.length,
added_uids = [],
added_names = [];
if (names) {
if (count != names.length) Lava.t("If names array is provided, it must be equal length with values array.");
... | javascript | function(start_index, values, names) {
if (start_index >= this._count) Lava.t("Index is out of range");
var i = 0,
count = values.length,
added_uids = [],
added_names = [];
if (names) {
if (count != names.length) Lava.t("If names array is provided, it must be equal length with values array.");
... | [
"function",
"(",
"start_index",
",",
"values",
",",
"names",
")",
"{",
"if",
"(",
"start_index",
">=",
"this",
".",
"_count",
")",
"Lava",
".",
"t",
"(",
"\"Index is out of range\"",
")",
";",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"values",
".",
"... | Insert a sequence of values into collection
@param {number} start_index Index of the beginning of new values. Must be less or equal to collection's `_count`
@param {Array.<*>} values New values
@param [names] Names that correspond to each value | [
"Insert",
"a",
"sequence",
"of",
"values",
"into",
"collection"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2656-L2718 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
this._data_names = this._data_source.getNames();
this._data_values = this._data_source.getValues();
this._data_uids = this._data_source.getUIDs();
this._count = this._data_uids.length;
this._fire('collection_changed');
} | javascript | function() {
this._data_names = this._data_source.getNames();
this._data_values = this._data_source.getValues();
this._data_uids = this._data_source.getUIDs();
this._count = this._data_uids.length;
this._fire('collection_changed');
} | [
"function",
"(",
")",
"{",
"this",
".",
"_data_names",
"=",
"this",
".",
"_data_source",
".",
"getNames",
"(",
")",
";",
"this",
".",
"_data_values",
"=",
"this",
".",
"_data_source",
".",
"getValues",
"(",
")",
";",
"this",
".",
"_data_uids",
"=",
"th... | Refresh the DataView from it's Enumerable | [
"Refresh",
"the",
"DataView",
"from",
"it",
"s",
"Enumerable"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2796-L2804 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(data_source) {
if (Lava.schema.DEBUG && !data_source.isCollection) Lava.t("Wrong argument supplied for DataView constructor");
this._data_source = data_source;
} | javascript | function(data_source) {
if (Lava.schema.DEBUG && !data_source.isCollection) Lava.t("Wrong argument supplied for DataView constructor");
this._data_source = data_source;
} | [
"function",
"(",
"data_source",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"data_source",
".",
"isCollection",
")",
"Lava",
".",
"t",
"(",
"\"Wrong argument supplied for DataView constructor\"",
")",
";",
"this",
".",
"_data_source",
... | Set new `_data_source`
@param {Lava.system.CollectionAbstract} data_source | [
"Set",
"new",
"_data_source"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2810-L2815 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(template_config, widget, parent_view, child_properties) {
this.guid = Lava.guid++;
this._parent_view = parent_view;
this._widget = widget;
this._config = template_config;
this._createChildren(this._content, template_config, [], child_properties);
this._count = this._content.length;
} | javascript | function(template_config, widget, parent_view, child_properties) {
this.guid = Lava.guid++;
this._parent_view = parent_view;
this._widget = widget;
this._config = template_config;
this._createChildren(this._content, template_config, [], child_properties);
this._count = this._content.length;
} | [
"function",
"(",
"template_config",
",",
"widget",
",",
"parent_view",
",",
"child_properties",
")",
"{",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"this",
".",
"_parent_view",
"=",
"parent_view",
";",
"this",
".",
"_widget",
"=",
"widget",... | Create an instance of Template. Create content from config
@param {_tTemplate} template_config Config for content
@param {Lava.widget.Standard} widget Nearest widget in hierarchy
@param {Lava.view.Abstract} parent_view Owner (parent) view
@param {Object} [child_properties] The properties to set to child views | [
"Create",
"an",
"instance",
"of",
"Template",
".",
"Create",
"content",
"from",
"config"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2915-L2925 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(result, children_config, include_name_stack, properties) {
var i = 0,
count = children_config.length,
childConfig,
type;
for (; i < count; i++) {
childConfig = children_config[i];
type = typeof(childConfig);
if (type == 'object') type = childConfig.type;
if (Lava.schema.DEBUG && !(... | javascript | function(result, children_config, include_name_stack, properties) {
var i = 0,
count = children_config.length,
childConfig,
type;
for (; i < count; i++) {
childConfig = children_config[i];
type = typeof(childConfig);
if (type == 'object') type = childConfig.type;
if (Lava.schema.DEBUG && !(... | [
"function",
"(",
"result",
",",
"children_config",
",",
"include_name_stack",
",",
"properties",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"children_config",
".",
"length",
",",
"childConfig",
",",
"type",
";",
"for",
"(",
";",
"i",
"<",
"count"... | Create items from config and put them in `result`
@param {Array.<_tRenderable>} result Where to put created items
@param {_tTemplate} children_config Config for the Template
@param {Array.<string>} include_name_stack Used to protect from recursive includes
@param {Object} properties The properties for child views | [
"Create",
"items",
"from",
"config",
"and",
"put",
"them",
"in",
"result"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2934-L2952 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(result, childConfig, include_name_stack, properties) {
var constructor = Lava.ClassManager.getConstructor(childConfig['class'], 'Lava.view'),
view = new constructor(
childConfig,
this._widget,
this._parent_view,
this, // template
properties
);
view.template_index = result.push(v... | javascript | function(result, childConfig, include_name_stack, properties) {
var constructor = Lava.ClassManager.getConstructor(childConfig['class'], 'Lava.view'),
view = new constructor(
childConfig,
this._widget,
this._parent_view,
this, // template
properties
);
view.template_index = result.push(v... | [
"function",
"(",
"result",
",",
"childConfig",
",",
"include_name_stack",
",",
"properties",
")",
"{",
"var",
"constructor",
"=",
"Lava",
".",
"ClassManager",
".",
"getConstructor",
"(",
"childConfig",
"[",
"'class'",
"]",
",",
"'Lava.view'",
")",
",",
"view",... | Handler for views. Create a view and push it into result
@param {Array.<_tRenderable>} result
@param {(_cView|_cWidget)} childConfig Config vor the view
@param {Array.<string>} include_name_stack Used to protect from recursive includes
@param {Object} properties Properties for that view | [
"Handler",
"for",
"views",
".",
"Create",
"a",
"view",
"and",
"push",
"it",
"into",
"result"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2972-L2985 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(result, child_config, include_name_stack, properties) {
if (include_name_stack.indexOf(child_config.name) != -1) Lava.t("Infinite include recursion");
var include = Lava.view_manager.getInclude(this._parent_view, child_config);
if (Lava.schema.DEBUG && include == null) Lava.t("Include not found: " + chi... | javascript | function(result, child_config, include_name_stack, properties) {
if (include_name_stack.indexOf(child_config.name) != -1) Lava.t("Infinite include recursion");
var include = Lava.view_manager.getInclude(this._parent_view, child_config);
if (Lava.schema.DEBUG && include == null) Lava.t("Include not found: " + chi... | [
"function",
"(",
"result",
",",
"child_config",
",",
"include_name_stack",
",",
"properties",
")",
"{",
"if",
"(",
"include_name_stack",
".",
"indexOf",
"(",
"child_config",
".",
"name",
")",
"!=",
"-",
"1",
")",
"Lava",
".",
"t",
"(",
"\"Infinite include re... | Handler for includes. Get include from widget, then create and append all items from include
@param {Array.<_tRenderable>} result
@param {_cInclude} child_config
@param {Array.<string>} include_name_stack
@param {Object} properties | [
"Handler",
"for",
"includes",
".",
"Get",
"include",
"from",
"widget",
"then",
"create",
"and",
"append",
"all",
"items",
"from",
"include"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L2994-L3004 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name, value) {
for (var i = 0; i < this._count; i++) {
if (this._content[i].isView) {
this._content[i].set(name, value);
}
}
} | javascript | function(name, value) {
for (var i = 0; i < this._count; i++) {
if (this._content[i].isView) {
this._content[i].set(name, value);
}
}
} | [
"function",
"(",
"name",
",",
"value",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"_count",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"_content",
"[",
"i",
"]",
".",
"isView",
")",
"{",
"this",
".",
"_co... | Set this property to all views inside `_content`
@param {string} name Property name
@param {*} value Property value | [
"Set",
"this",
"property",
"to",
"all",
"views",
"inside",
"_content"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3199-L3211 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(properties_object) {
for (var i = 0; i < this._count; i++) {
if (this._content[i].isView) {
this._content[i].setProperties(properties_object);
}
}
} | javascript | function(properties_object) {
for (var i = 0; i < this._count; i++) {
if (this._content[i].isView) {
this._content[i].setProperties(properties_object);
}
}
} | [
"function",
"(",
"properties_object",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"_count",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"_content",
"[",
"i",
"]",
".",
"isView",
")",
"{",
"this",
".",
"_content... | Set properties to all views inside `_content`
@param {Object} properties_object | [
"Set",
"properties",
"to",
"all",
"views",
"inside",
"_content"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3217-L3229 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(i) {
var result = null;
while (i < this._count) {
if (this._content[i].isView) {
result = this._content[i];
break;
}
i++;
}
return result;
} | javascript | function(i) {
var result = null;
while (i < this._count) {
if (this._content[i].isView) {
result = this._content[i];
break;
}
i++;
}
return result;
} | [
"function",
"(",
"i",
")",
"{",
"var",
"result",
"=",
"null",
";",
"while",
"(",
"i",
"<",
"this",
".",
"_count",
")",
"{",
"if",
"(",
"this",
".",
"_content",
"[",
"i",
"]",
".",
"isView",
")",
"{",
"result",
"=",
"this",
".",
"_content",
"[",... | Algorithm to find next view
@returns {Lava.view.Abstract} Next view from index `i` | [
"Algorithm",
"to",
"find",
"next",
"view"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3277-L3291 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(label) {
var result = [],
i = 0;
for (; i < this._count; i++) {
if (this._content[i].isView && this._content[i].label == label) {
result.push(this._content[i]);
}
}
return result;
} | javascript | function(label) {
var result = [],
i = 0;
for (; i < this._count; i++) {
if (this._content[i].isView && this._content[i].label == label) {
result.push(this._content[i]);
}
}
return result;
} | [
"function",
"(",
"label",
")",
"{",
"var",
"result",
"=",
"[",
"]",
",",
"i",
"=",
"0",
";",
"for",
"(",
";",
"i",
"<",
"this",
".",
"_count",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"_content",
"[",
"i",
"]",
".",
"isView",
"&&",... | Search `_content` and find all views with given label
@param {string} label Label to search for
@returns {Array.<Lava.view.Abstract>} Views with given label | [
"Search",
"_content",
"and",
"find",
"all",
"views",
"with",
"given",
"label"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3318-L3335 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name) {
var result = [],
i = 0;
for (; i < this._count; i++) {
if (this._content[i].isWidget && this._content[i].name == name) {
result.push(this._content[i]);
}
}
return result;
} | javascript | function(name) {
var result = [],
i = 0;
for (; i < this._count; i++) {
if (this._content[i].isWidget && this._content[i].name == name) {
result.push(this._content[i]);
}
}
return result;
} | [
"function",
"(",
"name",
")",
"{",
"var",
"result",
"=",
"[",
"]",
",",
"i",
"=",
"0",
";",
"for",
"(",
";",
"i",
"<",
"this",
".",
"_count",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"_content",
"[",
"i",
"]",
".",
"isWidget",
"&&"... | Find all widgets with given name inside `_content`
@param {string} name Name to search for
@returns {Array.<Lava.widget.Standard>} Found widgets | [
"Find",
"all",
"widgets",
"with",
"given",
"name",
"inside",
"_content"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3342-L3359 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
var default_events = Lava.schema.system.DEFAULT_EVENTS,
i = 0,
count = default_events.length;
for (; i < count; i++) {
this._event_usage_counters[default_events[i]] = 1;
this._initEvent(default_events[i]);
}
} | javascript | function() {
var default_events = Lava.schema.system.DEFAULT_EVENTS,
i = 0,
count = default_events.length;
for (; i < count; i++) {
this._event_usage_counters[default_events[i]] = 1;
this._initEvent(default_events[i]);
}
} | [
"function",
"(",
")",
"{",
"var",
"default_events",
"=",
"Lava",
".",
"schema",
".",
"system",
".",
"DEFAULT_EVENTS",
",",
"i",
"=",
"0",
",",
"count",
"=",
"default_events",
".",
"length",
";",
"for",
"(",
";",
"i",
"<",
"count",
";",
"i",
"++",
"... | Create an instance of the class, acquire event listeners | [
"Create",
"an",
"instance",
"of",
"the",
"class",
"acquire",
"event",
"listeners"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3514-L3527 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view) {
if (view.depth in this._dirty_views) {
this._dirty_views[view.depth].push(view);
} else {
this._dirty_views[view.depth] = [view];
}
} | javascript | function(view) {
if (view.depth in this._dirty_views) {
this._dirty_views[view.depth].push(view);
} else {
this._dirty_views[view.depth] = [view];
}
} | [
"function",
"(",
"view",
")",
"{",
"if",
"(",
"view",
".",
"depth",
"in",
"this",
".",
"_dirty_views",
")",
"{",
"this",
".",
"_dirty_views",
"[",
"view",
".",
"depth",
"]",
".",
"push",
"(",
"view",
")",
";",
"}",
"else",
"{",
"this",
".",
"_dir... | Place a view into queue for refresh
@param {Lava.view.Abstract} view | [
"Place",
"a",
"view",
"into",
"queue",
"for",
"refresh"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3533-L3545 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(dirty_views) {
var level = 0,
deepness,
views_list,
has_exceptions = false,
i,
count;
deepness = dirty_views.length; // this line must be after ScopeManager#refresh()
for (; level < deepness; level++) {
if (level in dirty_views) {
views_list = dirty_views[level];
for (i = ... | javascript | function(dirty_views) {
var level = 0,
deepness,
views_list,
has_exceptions = false,
i,
count;
deepness = dirty_views.length; // this line must be after ScopeManager#refresh()
for (; level < deepness; level++) {
if (level in dirty_views) {
views_list = dirty_views[level];
for (i = ... | [
"function",
"(",
"dirty_views",
")",
"{",
"var",
"level",
"=",
"0",
",",
"deepness",
",",
"views_list",
",",
"has_exceptions",
"=",
"false",
",",
"i",
",",
"count",
";",
"deepness",
"=",
"dirty_views",
".",
"length",
";",
"// this line must be after ScopeManag... | Repeatable callback, that performs refresh of dirty views
@param {Array.<Array.<Lava.view.Abstract>>} dirty_views | [
"Repeatable",
"callback",
"that",
"performs",
"refresh",
"of",
"dirty",
"views"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3588-L3620 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(starting_widget, id) {
if (Lava.schema.DEBUG && !id) Lava.t();
return this._views_by_id[id];
} | javascript | function(starting_widget, id) {
if (Lava.schema.DEBUG && !id) Lava.t();
return this._views_by_id[id];
} | [
"function",
"(",
"starting_widget",
",",
"id",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"id",
")",
"Lava",
".",
"t",
"(",
")",
";",
"return",
"this",
".",
"_views_by_id",
"[",
"id",
"]",
";",
"}"
] | Get widget by id. Does not take hierarchy into account
@param {Lava.widget.Standard} starting_widget
@param {string} id
@returns {Lava.view.Abstract} | [
"Get",
"widget",
"by",
"id",
".",
"Does",
"not",
"take",
"hierarchy",
"into",
"account"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3693-L3699 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(starting_widget, guid) {
if (Lava.schema.DEBUG && !guid) Lava.t();
return this._views_by_guid[guid];
} | javascript | function(starting_widget, guid) {
if (Lava.schema.DEBUG && !guid) Lava.t();
return this._views_by_guid[guid];
} | [
"function",
"(",
"starting_widget",
",",
"guid",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"guid",
")",
"Lava",
".",
"t",
"(",
")",
";",
"return",
"this",
".",
"_views_by_guid",
"[",
"guid",
"]",
";",
"}"
] | Get widget by GUID. Does not consider hierarchy
@param {Lava.widget.Standard} starting_widget
@param {_tGUID} guid
@returns {Lava.view.Abstract} | [
"Get",
"widget",
"by",
"GUID",
".",
"Does",
"not",
"consider",
"hierarchy"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3707-L3713 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, targets, callback, callback_arguments, global_targets_object) {
var i = 0,
count = targets.length,
target,
target_name,
widget,
template_arguments,
bubble_index = 0,
bubble_targets_copy,
bubble_targets_count;
this._nested_dispatch_count++;
for (; i < count; i++) {
tar... | javascript | function(view, targets, callback, callback_arguments, global_targets_object) {
var i = 0,
count = targets.length,
target,
target_name,
widget,
template_arguments,
bubble_index = 0,
bubble_targets_copy,
bubble_targets_count;
this._nested_dispatch_count++;
for (; i < count; i++) {
tar... | [
"function",
"(",
"view",
",",
"targets",
",",
"callback",
",",
"callback_arguments",
",",
"global_targets_object",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"targets",
".",
"length",
",",
"target",
",",
"target_name",
",",
"widget",
",",
"template... | Dispatch events and roles to their targets.
Warning! Violates codestyle with multiple return statements
@param {Lava.view.Abstract} view The source of events or roles
@param {Array.<_cTarget>} targets The target routes
@param {function} callback The ViewManager callback that will perform dispatching
@param {*} callbac... | [
"Dispatch",
"events",
"and",
"roles",
"to",
"their",
"targets",
".",
"Warning!",
"Violates",
"codestyle",
"with",
"multiple",
"return",
"statements"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3795-L3888 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, event_name, event_object) {
var targets = view.getContainer().getEventTargets(event_name);
if (targets) {
this.dispatchEvent(view, event_name, event_object, targets);
}
} | javascript | function(view, event_name, event_object) {
var targets = view.getContainer().getEventTargets(event_name);
if (targets) {
this.dispatchEvent(view, event_name, event_object, targets);
}
} | [
"function",
"(",
"view",
",",
"event_name",
",",
"event_object",
")",
"{",
"var",
"targets",
"=",
"view",
".",
"getContainer",
"(",
")",
".",
"getEventTargets",
"(",
"event_name",
")",
";",
"if",
"(",
"targets",
")",
"{",
"this",
".",
"dispatchEvent",
"(... | Helper method which checks for events presence on container and dispatches them
@param {Lava.view.Abstract} view
@param {string} event_name
@param {Object} event_object | [
"Helper",
"method",
"which",
"checks",
"for",
"events",
"presence",
"on",
"container",
"and",
"dispatches",
"them"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3949-L3959 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, event_name, event_object, targets) {
this._dispatchCallback(
view,
targets,
this._callHandleEvent,
{
event_name: event_name,
event_object: event_object
},
this._global_event_targets
);
} | javascript | function(view, event_name, event_object, targets) {
this._dispatchCallback(
view,
targets,
this._callHandleEvent,
{
event_name: event_name,
event_object: event_object
},
this._global_event_targets
);
} | [
"function",
"(",
"view",
",",
"event_name",
",",
"event_object",
",",
"targets",
")",
"{",
"this",
".",
"_dispatchCallback",
"(",
"view",
",",
"targets",
",",
"this",
".",
"_callHandleEvent",
",",
"{",
"event_name",
":",
"event_name",
",",
"event_object",
":... | Dispatch DOM events to targets
@param {Lava.view.Abstract} view View, that owns the container, which raised the events
@param {string} event_name
@param {Object} event_object DOM event object
@param {Array.<_cTarget>} targets | [
"Dispatch",
"DOM",
"events",
"to",
"targets"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3969-L3982 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, target) {
var result = [];
for (var i = 0, count = target.arguments.length; i < count; i++) {
if (target.arguments[i].type == Lava.TARGET_ARGUMENT_TYPES.VALUE) {
result.push(target.arguments[i].data);
} else {
if (target.arguments[i].type != Lava.TARGET_ARGUMENT_TYPES.BIND) Lava.t... | javascript | function(view, target) {
var result = [];
for (var i = 0, count = target.arguments.length; i < count; i++) {
if (target.arguments[i].type == Lava.TARGET_ARGUMENT_TYPES.VALUE) {
result.push(target.arguments[i].data);
} else {
if (target.arguments[i].type != Lava.TARGET_ARGUMENT_TYPES.BIND) Lava.t... | [
"function",
"(",
"view",
",",
"target",
")",
"{",
"var",
"result",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"target",
".",
"arguments",
".",
"length",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{",
"if",
"("... | Evaluate template arguments
@param {Lava.view.Abstract} view
@param {_cTarget} target
@returns {Array.<*>} | [
"Evaluate",
"template",
"arguments"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L3990-L4012 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(starting_view, config) {
var widget = starting_view.getWidget(),
template_arguments = ('arguments' in config) ? this._evalTargetArguments(starting_view, config) : null;
if ('locator_type' in config) {
widget = this['_locateWidgetBy' + config.locator_type](widget, config.locator);
if (!widget |... | javascript | function(starting_view, config) {
var widget = starting_view.getWidget(),
template_arguments = ('arguments' in config) ? this._evalTargetArguments(starting_view, config) : null;
if ('locator_type' in config) {
widget = this['_locateWidgetBy' + config.locator_type](widget, config.locator);
if (!widget |... | [
"function",
"(",
"starting_view",
",",
"config",
")",
"{",
"var",
"widget",
"=",
"starting_view",
".",
"getWidget",
"(",
")",
",",
"template_arguments",
"=",
"(",
"'arguments'",
"in",
"config",
")",
"?",
"this",
".",
"_evalTargetArguments",
"(",
"starting_view... | Get include from widget
@param {Lava.view.Abstract} starting_view
@param {_cInclude} config
@returns {_tTemplate} | [
"Get",
"include",
"from",
"widget"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4020-L4035 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(element) {
var id = Firestorm.Element.getProperty(element, 'id'),
result = null;
if (id) {
if (id.indexOf(Lava.ELEMENT_ID_PREFIX) == 0) {
result = this.getViewByGuid(id.substr(Lava.ELEMENT_ID_PREFIX.length));
}
}
return result;
} | javascript | function(element) {
var id = Firestorm.Element.getProperty(element, 'id'),
result = null;
if (id) {
if (id.indexOf(Lava.ELEMENT_ID_PREFIX) == 0) {
result = this.getViewByGuid(id.substr(Lava.ELEMENT_ID_PREFIX.length));
}
}
return result;
} | [
"function",
"(",
"element",
")",
"{",
"var",
"id",
"=",
"Firestorm",
".",
"Element",
".",
"getProperty",
"(",
"element",
",",
"'id'",
")",
",",
"result",
"=",
"null",
";",
"if",
"(",
"id",
")",
"{",
"if",
"(",
"id",
".",
"indexOf",
"(",
"Lava",
"... | Get the view, the container of which owns the given element
@param {HTMLElement} element
@returns {Lava.view.Abstract} | [
"Get",
"the",
"view",
"the",
"container",
"of",
"which",
"owns",
"the",
"given",
"element"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4134-L4151 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(label) {
var result = [];
for (var guid in this._views_by_guid) {
if (this._views_by_guid[guid].label == label) {
result.push(this._views_by_guid[guid]);
}
}
return result;
} | javascript | function(label) {
var result = [];
for (var guid in this._views_by_guid) {
if (this._views_by_guid[guid].label == label) {
result.push(this._views_by_guid[guid]);
}
}
return result;
} | [
"function",
"(",
"label",
")",
"{",
"var",
"result",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"guid",
"in",
"this",
".",
"_views_by_guid",
")",
"{",
"if",
"(",
"this",
".",
"_views_by_guid",
"[",
"guid",
"]",
".",
"label",
"==",
"label",
")",
"{",
... | Filter all created views and find those with `label`. Slow!
@param {string} label
@returns {Array.<Lava.view.Abstract>} | [
"Filter",
"all",
"created",
"views",
"and",
"find",
"those",
"with",
"label",
".",
"Slow!"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4158-L4174 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(element) {
// note: target of some events can be the root html tag (for example, mousedown on a scroll bar)
var document_ref = window.document, // document > html > body > ...
result = [];
while (element && element != document_ref) {
result.push(element);
element = element.parentNode;
}
... | javascript | function(element) {
// note: target of some events can be the root html tag (for example, mousedown on a scroll bar)
var document_ref = window.document, // document > html > body > ...
result = [];
while (element && element != document_ref) {
result.push(element);
element = element.parentNode;
}
... | [
"function",
"(",
"element",
")",
"{",
"// note: target of some events can be the root html tag (for example, mousedown on a scroll bar)",
"var",
"document_ref",
"=",
"window",
".",
"document",
",",
"// document > html > body > ...",
"result",
"=",
"[",
"]",
";",
"while",
"(",... | Create an array from element and all it's parents
@param {HTMLElement} element
@returns {Array.<HTMLElement>} | [
"Create",
"an",
"array",
"from",
"element",
"and",
"all",
"it",
"s",
"parents"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4255-L4275 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name, event_object) {
var target = event_object.target,
view,
container,
stack_changed_event_name = event_name + '_stack_changed',
stack = target ? this._buildElementStack(target) : [],
i = 0,
count = stack.length;
// Warning! You must not modify the `stack` array!
this._fire(st... | javascript | function(event_name, event_object) {
var target = event_object.target,
view,
container,
stack_changed_event_name = event_name + '_stack_changed',
stack = target ? this._buildElementStack(target) : [],
i = 0,
count = stack.length;
// Warning! You must not modify the `stack` array!
this._fire(st... | [
"function",
"(",
"event_name",
",",
"event_object",
")",
"{",
"var",
"target",
"=",
"event_object",
".",
"target",
",",
"view",
",",
"container",
",",
"stack_changed_event_name",
"=",
"event_name",
"+",
"'_stack_changed'",
",",
"stack",
"=",
"target",
"?",
"th... | Dispatch DOM events to views
@param {string} event_name
@param {Object} event_object | [
"Dispatch",
"DOM",
"events",
"to",
"views"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4282-L4307 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name) {
if (Lava.schema.DEBUG && ['mouseenter', 'mouseleave', 'mouseover', 'mouseout'].indexOf(event_name) != -1)
Lava.t("The following events: mouseenter, mouseleave, mouseover and mouseout are served by common alias - mouse_events");
if (this._event_usage_counters[event_name]) {
this._even... | javascript | function(event_name) {
if (Lava.schema.DEBUG && ['mouseenter', 'mouseleave', 'mouseover', 'mouseout'].indexOf(event_name) != -1)
Lava.t("The following events: mouseenter, mouseleave, mouseover and mouseout are served by common alias - mouse_events");
if (this._event_usage_counters[event_name]) {
this._even... | [
"function",
"(",
"event_name",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"[",
"'mouseenter'",
",",
"'mouseleave'",
",",
"'mouseover'",
",",
"'mouseout'",
"]",
".",
"indexOf",
"(",
"event_name",
")",
"!=",
"-",
"1",
")",
"Lava",
".... | Register an event consumer and start routing that event
@param {string} event_name | [
"Register",
"an",
"event",
"consumer",
"and",
"start",
"routing",
"that",
"event"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4313-L4329 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name) {
if (event_name == 'mouse_events') {
this._events_listeners['mouseover'] =
Lava.Core.addGlobalHandler('mouseover', this.handleMouseMovement, this);
this._events_listeners['mouseout'] =
Lava.Core.addGlobalHandler('mouseout', this.handleMouseMovement, this);
} else {
this._e... | javascript | function(event_name) {
if (event_name == 'mouse_events') {
this._events_listeners['mouseover'] =
Lava.Core.addGlobalHandler('mouseover', this.handleMouseMovement, this);
this._events_listeners['mouseout'] =
Lava.Core.addGlobalHandler('mouseout', this.handleMouseMovement, this);
} else {
this._e... | [
"function",
"(",
"event_name",
")",
"{",
"if",
"(",
"event_name",
"==",
"'mouse_events'",
")",
"{",
"this",
".",
"_events_listeners",
"[",
"'mouseover'",
"]",
"=",
"Lava",
".",
"Core",
".",
"addGlobalHandler",
"(",
"'mouseover'",
",",
"this",
".",
"handleMou... | Start listening to an event
@param {string} event_name | [
"Start",
"listening",
"to",
"an",
"event"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4335-L4351 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name) {
if (this._event_usage_counters[event_name] == 0) {
Lava.logError("ViewManager: trying to release an event with zero usage.");
return;
}
this._event_usage_counters[event_name]--;
if (this._event_usage_counters[event_name] == 0) {
this._shutdownEvent(event_name);
}
} | javascript | function(event_name) {
if (this._event_usage_counters[event_name] == 0) {
Lava.logError("ViewManager: trying to release an event with zero usage.");
return;
}
this._event_usage_counters[event_name]--;
if (this._event_usage_counters[event_name] == 0) {
this._shutdownEvent(event_name);
}
} | [
"function",
"(",
"event_name",
")",
"{",
"if",
"(",
"this",
".",
"_event_usage_counters",
"[",
"event_name",
"]",
"==",
"0",
")",
"{",
"Lava",
".",
"logError",
"(",
"\"ViewManager: trying to release an event with zero usage.\"",
")",
";",
"return",
";",
"}",
"th... | Inform that event consumer does not need that event anymore
@param {string} event_name | [
"Inform",
"that",
"event",
"consumer",
"does",
"not",
"need",
"that",
"event",
"anymore"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4357-L4372 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name) {
if (event_name == 'mouse_events') {
Lava.Core.removeGlobalHandler(this._events_listeners['mouseover']);
this._events_listeners['mouseover'] = null;
Lava.Core.removeGlobalHandler(this._events_listeners['mouseout']);
this._events_listeners['mouseout'] = null;
} else {
Lava.Co... | javascript | function(event_name) {
if (event_name == 'mouse_events') {
Lava.Core.removeGlobalHandler(this._events_listeners['mouseover']);
this._events_listeners['mouseover'] = null;
Lava.Core.removeGlobalHandler(this._events_listeners['mouseout']);
this._events_listeners['mouseout'] = null;
} else {
Lava.Co... | [
"function",
"(",
"event_name",
")",
"{",
"if",
"(",
"event_name",
"==",
"'mouse_events'",
")",
"{",
"Lava",
".",
"Core",
".",
"removeGlobalHandler",
"(",
"this",
".",
"_events_listeners",
"[",
"'mouseover'",
"]",
")",
";",
"this",
".",
"_events_listeners",
"... | Stop listening to an event
@param {string} event_name | [
"Stop",
"listening",
"to",
"an",
"event"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4389-L4405 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name) {
if (!(name in this._modules)) {
var config = Lava.schema.modules[name],
className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS,
constructor = Lava.ClassManager.getConstructor(className, 'Lava.data');
// construction is split into two phases, cause initFields() may reference... | javascript | function(name) {
if (!(name in this._modules)) {
var config = Lava.schema.modules[name],
className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS,
constructor = Lava.ClassManager.getConstructor(className, 'Lava.data');
// construction is split into two phases, cause initFields() may reference... | [
"function",
"(",
"name",
")",
"{",
"if",
"(",
"!",
"(",
"name",
"in",
"this",
".",
"_modules",
")",
")",
"{",
"var",
"config",
"=",
"Lava",
".",
"schema",
".",
"modules",
"[",
"name",
"]",
",",
"className",
"=",
"config",
".",
"type",
"||",
"Lava... | Get a global named module instance
@param {string} name Module name
@returns {Lava.data.Module} | [
"Get",
"a",
"global",
"named",
"module",
"instance"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4464-L4482 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(schema, raw_tag, parent_title) {
var widget_config = Lava.parsers.Common.createDefaultWidgetConfig(),
tags,
name,
x = raw_tag.x;
widget_config['extends'] = parent_title;
if (raw_tag.content) {
// Lava.isVoidTag is a workaround for <x:attach_directives>
// It's highly discouraged to mak... | javascript | function(schema, raw_tag, parent_title) {
var widget_config = Lava.parsers.Common.createDefaultWidgetConfig(),
tags,
name,
x = raw_tag.x;
widget_config['extends'] = parent_title;
if (raw_tag.content) {
// Lava.isVoidTag is a workaround for <x:attach_directives>
// It's highly discouraged to mak... | [
"function",
"(",
"schema",
",",
"raw_tag",
",",
"parent_title",
")",
"{",
"var",
"widget_config",
"=",
"Lava",
".",
"parsers",
".",
"Common",
".",
"createDefaultWidgetConfig",
"(",
")",
",",
"tags",
",",
"name",
",",
"x",
"=",
"raw_tag",
".",
"x",
";",
... | Parse raw tag as a widget
@param {_cSugar} schema
@param {_cRawTag} raw_tag
@param {string} parent_title | [
"Parse",
"raw",
"tag",
"as",
"a",
"widget"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4556-L4607 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(raw_blocks, widget_config) {
var i = 0,
count = raw_blocks.length,
result = [];
for (; i < count; i++) {
if (raw_blocks[i].type == 'directive') {
if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_bl... | javascript | function(raw_blocks, widget_config) {
var i = 0,
count = raw_blocks.length,
result = [];
for (; i < count; i++) {
if (raw_blocks[i].type == 'directive') {
if (Lava.parsers.Directives.processDirective(raw_blocks[i], widget_config, true)) Lava.t("Directive inside sugar has returned a value: " + raw_bl... | [
"function",
"(",
"raw_blocks",
",",
"widget_config",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"raw_blocks",
".",
"length",
",",
"result",
"=",
"[",
"]",
";",
"for",
"(",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{",
"if",
"(",
"ra... | Inside sugar tag there may be directives at the top. Apply them to widget config and cut away
@param {_tRawTemplate} raw_blocks The content inside widget's sugar tag
@param {_cWidget} widget_config The config of the widget being parsed
@returns {_tRawTemplate} New content without directives | [
"Inside",
"sugar",
"tag",
"there",
"may",
"be",
"directives",
"at",
"the",
"top",
".",
"Apply",
"them",
"to",
"widget",
"config",
"and",
"cut",
"away"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4615-L4634 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(content_schema, raw_tag, widget_config) {
var tags = Lava.parsers.Common.asBlocks(raw_tag.content),
i = 0,
count,
tag_roles_map = content_schema.tag_roles,
tag_schema,
storage_tags = [];
tags = this._applyTopDirectives(tags, widget_config);
count = tags.length;
for (; i < count; i++) ... | javascript | function(content_schema, raw_tag, widget_config) {
var tags = Lava.parsers.Common.asBlocks(raw_tag.content),
i = 0,
count,
tag_roles_map = content_schema.tag_roles,
tag_schema,
storage_tags = [];
tags = this._applyTopDirectives(tags, widget_config);
count = tags.length;
for (; i < count; i++) ... | [
"function",
"(",
"content_schema",
",",
"raw_tag",
",",
"widget_config",
")",
"{",
"var",
"tags",
"=",
"Lava",
".",
"parsers",
".",
"Common",
".",
"asBlocks",
"(",
"raw_tag",
".",
"content",
")",
",",
"i",
"=",
"0",
",",
"count",
",",
"tag_roles_map",
... | The content of `raw_tag` is storage tags, mixed with includes
@param {_cSugarContent} content_schema
@param {_cRawTag} raw_tag
@param {_cWidget} widget_config | [
"The",
"content",
"of",
"raw_tag",
"is",
"storage",
"tags",
"mixed",
"with",
"includes"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4680-L4713 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(widget_config, unknown_attributes, resource_name) {
var value = {
type: 'container_stack',
value: []
},
operations_stack = value.value;
if (!widget_config.resources) {
widget_config.resources = {};
}
if (!widget_config.resources['default']) {
widget_config.resources['default']... | javascript | function(widget_config, unknown_attributes, resource_name) {
var value = {
type: 'container_stack',
value: []
},
operations_stack = value.value;
if (!widget_config.resources) {
widget_config.resources = {};
}
if (!widget_config.resources['default']) {
widget_config.resources['default']... | [
"function",
"(",
"widget_config",
",",
"unknown_attributes",
",",
"resource_name",
")",
"{",
"var",
"value",
"=",
"{",
"type",
":",
"'container_stack'",
",",
"value",
":",
"[",
"]",
"}",
",",
"operations_stack",
"=",
"value",
".",
"value",
";",
"if",
"(",
... | Store root attributes that are not described in Sugar config as 'container_stack' resource
@param {_cWidget} widget_config
@param {Object} unknown_attributes
@param {string} resource_name | [
"Store",
"root",
"attributes",
"that",
"are",
"not",
"described",
"in",
"Sugar",
"config",
"as",
"container_stack",
"resource"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4779-L4830 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(widget_config, attribute_value, descriptor, name) {
Lava.store(
widget_config,
'options',
name,
Lava.ExpressionParser.parse(attribute_value, Lava.ExpressionParser.SEPARATORS.SEMICOLON)
);
} | javascript | function(widget_config, attribute_value, descriptor, name) {
Lava.store(
widget_config,
'options',
name,
Lava.ExpressionParser.parse(attribute_value, Lava.ExpressionParser.SEPARATORS.SEMICOLON)
);
} | [
"function",
"(",
"widget_config",
",",
"attribute_value",
",",
"descriptor",
",",
"name",
")",
"{",
"Lava",
".",
"store",
"(",
"widget_config",
",",
"'options'",
",",
"name",
",",
"Lava",
".",
"ExpressionParser",
".",
"parse",
"(",
"attribute_value",
",",
"L... | Parse attribute value as expression and store it as an option
@param {_cWidget} widget_config
@param {string} attribute_value
@param {_cSugarRootAttribute} descriptor
@param {string} name | [
"Parse",
"attribute",
"value",
"as",
"expression",
"and",
"store",
"it",
"as",
"an",
"option"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4906-L4915 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
if (!this._mouseover_stack_changed_listener) {
Lava.view_manager.lendEvent('mouse_events');
this._mouseover_stack_changed_listener = Lava.view_manager.on('mouseover_stack_changed', this._onMouseoverStackChanged, this);
if (!this._tooltip) this._tooltip = Lava.createWidget(this.DEFAULT_TOOLTIP_W... | javascript | function() {
if (!this._mouseover_stack_changed_listener) {
Lava.view_manager.lendEvent('mouse_events');
this._mouseover_stack_changed_listener = Lava.view_manager.on('mouseover_stack_changed', this._onMouseoverStackChanged, this);
if (!this._tooltip) this._tooltip = Lava.createWidget(this.DEFAULT_TOOLTIP_W... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_mouseover_stack_changed_listener",
")",
"{",
"Lava",
".",
"view_manager",
".",
"lendEvent",
"(",
"'mouse_events'",
")",
";",
"this",
".",
"_mouseover_stack_changed_listener",
"=",
"Lava",
".",
"view_manag... | Create tooltip widget instance and start listening to mouse events | [
"Create",
"tooltip",
"widget",
"instance",
"and",
"start",
"listening",
"to",
"mouse",
"events"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4970-L4979 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
if (this._mouseover_stack_changed_listener) {
Lava.view_manager.releaseEvent('mouse_events');
Lava.view_manager.removeListener(this._mouseover_stack_changed_listener);
this._mouseover_stack_changed_listener = null;
if (this._mousemove_listener) {
Lava.Core.removeGlobalHandler(this._mouse... | javascript | function() {
if (this._mouseover_stack_changed_listener) {
Lava.view_manager.releaseEvent('mouse_events');
Lava.view_manager.removeListener(this._mouseover_stack_changed_listener);
this._mouseover_stack_changed_listener = null;
if (this._mousemove_listener) {
Lava.Core.removeGlobalHandler(this._mouse... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_mouseover_stack_changed_listener",
")",
"{",
"Lava",
".",
"view_manager",
".",
"releaseEvent",
"(",
"'mouse_events'",
")",
";",
"Lava",
".",
"view_manager",
".",
"removeListener",
"(",
"this",
".",
"_mouseov... | Remove tooltip widget from DOM and stop responding to events | [
"Remove",
"tooltip",
"widget",
"from",
"DOM",
"and",
"stop",
"responding",
"to",
"events"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L4984-L4998 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view_manager, stack) {
var new_tooltip_target = null,
html;
for (var i = 0, count = stack.length; i < count; i++) {
if (Firestorm.Element.hasAttribute(stack[i], this._attribute_name)) {
new_tooltip_target = stack[i];
break;
}
}
if (new_tooltip_target != this._tooltip_target) {
... | javascript | function(view_manager, stack) {
var new_tooltip_target = null,
html;
for (var i = 0, count = stack.length; i < count; i++) {
if (Firestorm.Element.hasAttribute(stack[i], this._attribute_name)) {
new_tooltip_target = stack[i];
break;
}
}
if (new_tooltip_target != this._tooltip_target) {
... | [
"function",
"(",
"view_manager",
",",
"stack",
")",
"{",
"var",
"new_tooltip_target",
"=",
"null",
",",
"html",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"stack",
".",
"length",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{",
"i... | Mouse has crossed an element boundary. Find new element with tooltip and show new content
@param {Lava.system.ViewManager} view_manager
@param {Array.<HTMLElement>} stack | [
"Mouse",
"has",
"crossed",
"an",
"element",
"boundary",
".",
"Find",
"new",
"element",
"with",
"tooltip",
"and",
"show",
"new",
"content"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5015-L5059 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name, event_object) {
this._tooltip.set('x', event_object.page.x); // left
this._tooltip.set('y', event_object.page.y); // top
} | javascript | function(event_name, event_object) {
this._tooltip.set('x', event_object.page.x); // left
this._tooltip.set('y', event_object.page.y); // top
} | [
"function",
"(",
"event_name",
",",
"event_object",
")",
"{",
"this",
".",
"_tooltip",
".",
"set",
"(",
"'x'",
",",
"event_object",
".",
"page",
".",
"x",
")",
";",
"// left",
"this",
".",
"_tooltip",
".",
"set",
"(",
"'y'",
",",
"event_object",
".",
... | Mouse has changed position. Move tooltip accordingly
@param {string} event_name
@param {Object} event_object | [
"Mouse",
"has",
"changed",
"position",
".",
"Move",
"tooltip",
"accordingly"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5066-L5071 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function () {
if (!this._focus_acquired_listener) {
this._focus_acquired_listener = Lava.app.on('focus_acquired', this._onFocusTargetAcquired, this);
this._focus_lost_listener = Lava.app.on('focus_lost', this.clearFocusedTarget, this);
this._focus_listener = Lava.Core.addGlobalHandler('blur', this._onElemen... | javascript | function () {
if (!this._focus_acquired_listener) {
this._focus_acquired_listener = Lava.app.on('focus_acquired', this._onFocusTargetAcquired, this);
this._focus_lost_listener = Lava.app.on('focus_lost', this.clearFocusedTarget, this);
this._focus_listener = Lava.Core.addGlobalHandler('blur', this._onElemen... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_focus_acquired_listener",
")",
"{",
"this",
".",
"_focus_acquired_listener",
"=",
"Lava",
".",
"app",
".",
"on",
"(",
"'focus_acquired'",
",",
"this",
".",
"_onFocusTargetAcquired",
",",
"this",
")",
... | Start listening to global focus-related events | [
"Start",
"listening",
"to",
"global",
"focus",
"-",
"related",
"events"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5137-L5146 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
if (this._focus_acquired_listener) {
Lava.app.removeListener(this._focus_acquired_listener);
Lava.app.removeListener(this._focus_lost_listener);
Lava.Core.removeGlobalHandler(this._focus_listener);
Lava.Core.removeGlobalHandler(this._blur_listener);
this._focus_acquired_listener
= thi... | javascript | function() {
if (this._focus_acquired_listener) {
Lava.app.removeListener(this._focus_acquired_listener);
Lava.app.removeListener(this._focus_lost_listener);
Lava.Core.removeGlobalHandler(this._focus_listener);
Lava.Core.removeGlobalHandler(this._blur_listener);
this._focus_acquired_listener
= thi... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_focus_acquired_listener",
")",
"{",
"Lava",
".",
"app",
".",
"removeListener",
"(",
"this",
".",
"_focus_acquired_listener",
")",
";",
"Lava",
".",
"app",
".",
"removeListener",
"(",
"this",
".",
"_focus... | Stop listening to all focus-related events | [
"Stop",
"listening",
"to",
"all",
"focus",
"-",
"related",
"events"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5151-L5164 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name, event_object) {
if (this._focused_element != event_object.target) {
this._setTarget(null);
this._focused_element = event_object.target;
}
} | javascript | function(event_name, event_object) {
if (this._focused_element != event_object.target) {
this._setTarget(null);
this._focused_element = event_object.target;
}
} | [
"function",
"(",
"event_name",
",",
"event_object",
")",
"{",
"if",
"(",
"this",
".",
"_focused_element",
"!=",
"event_object",
".",
"target",
")",
"{",
"this",
".",
"_setTarget",
"(",
"null",
")",
";",
"this",
".",
"_focused_element",
"=",
"event_object",
... | Clear old virtual focus target and set new `_focused_element`.
@param event_name
@param event_object | [
"Clear",
"old",
"virtual",
"focus",
"target",
"and",
"set",
"new",
"_focused_element",
"."
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5229-L5236 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(module, name, config, module_storage) {
this._module = module;
this._name = name;
this._config = config;
this._properties_by_guid = module_storage;
if ('is_nullable' in config) this._is_nullable = config.is_nullable;
} | javascript | function(module, name, config, module_storage) {
this._module = module;
this._name = name;
this._config = config;
this._properties_by_guid = module_storage;
if ('is_nullable' in config) this._is_nullable = config.is_nullable;
} | [
"function",
"(",
"module",
",",
"name",
",",
"config",
",",
"module_storage",
")",
"{",
"this",
".",
"_module",
"=",
"module",
";",
"this",
".",
"_name",
"=",
"name",
";",
"this",
".",
"_config",
"=",
"config",
";",
"this",
".",
"_properties_by_guid",
... | Create the instance of a field
@param {Lava.data.Module} module
@param {string} name Field name
@param {_cField} config
@param {object} module_storage Reference to object from module with properties of all records | [
"Create",
"the",
"instance",
"of",
"a",
"field"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5335-L5343 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(properties, raw_properties) {
if (Lava.schema.data.VALIDATE_IMPORT_DATA && !this.isValidValue(raw_properties[this._name]))
Lava.t('Invalid value in import data (' + this._name + '): ' + raw_properties[this._name]);
return raw_properties[this._name];
} | javascript | function(properties, raw_properties) {
if (Lava.schema.data.VALIDATE_IMPORT_DATA && !this.isValidValue(raw_properties[this._name]))
Lava.t('Invalid value in import data (' + this._name + '): ' + raw_properties[this._name]);
return raw_properties[this._name];
} | [
"function",
"(",
"properties",
",",
"raw_properties",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"data",
".",
"VALIDATE_IMPORT_DATA",
"&&",
"!",
"this",
".",
"isValidValue",
"(",
"raw_properties",
"[",
"this",
".",
"_name",
"]",
")",
")",
"Lava",
"... | Helper method for importing values from server-side data. Performs validation
@param {Object} properties
@param {Object} raw_properties
@returns {*} | [
"Helper",
"method",
"for",
"importing",
"values",
"from",
"server",
"-",
"side",
"data",
".",
"Performs",
"validation"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5456-L5463 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(record_a, record_b) {
return this._properties_by_guid[record_a.guid][this._name] < this._properties_by_guid[record_b.guid][this._name];
} | javascript | function(record_a, record_b) {
return this._properties_by_guid[record_a.guid][this._name] < this._properties_by_guid[record_b.guid][this._name];
} | [
"function",
"(",
"record_a",
",",
"record_b",
")",
"{",
"return",
"this",
".",
"_properties_by_guid",
"[",
"record_a",
".",
"guid",
"]",
"[",
"this",
".",
"_name",
"]",
"<",
"this",
".",
"_properties_by_guid",
"[",
"record_b",
".",
"guid",
"]",
"[",
"thi... | Compare values of this field in two records
@param {Lava.data.Record} record_a
@param {Lava.data.Record} record_b
@returns {boolean} True, in case the value of this field in `record_a` is less than value in `record_b` | [
"Compare",
"values",
"of",
"this",
"field",
"in",
"two",
"records"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5471-L5475 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(field, event_args) {
var local_record = event_args.collection_owner;
if (local_record.guid in this._collections_by_record_guid) {
Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].removed);
this._collections_by_record_guid[local_record.guid].removeValue(event_args.child);
... | javascript | function(field, event_args) {
var local_record = event_args.collection_owner;
if (local_record.guid in this._collections_by_record_guid) {
Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].removed);
this._collections_by_record_guid[local_record.guid].removeValue(event_args.child);
... | [
"function",
"(",
"field",
",",
"event_args",
")",
"{",
"var",
"local_record",
"=",
"event_args",
".",
"collection_owner",
";",
"if",
"(",
"local_record",
".",
"guid",
"in",
"this",
".",
"_collections_by_record_guid",
")",
"{",
"Lava",
".",
"suspendListener",
"... | Record was removed from collection by setting it's related Record field. Update local collection
@param {Lava.data.field.Record} field
@param {Lava.data.field.Record#event:removed_child} event_args | [
"Record",
"was",
"removed",
"from",
"collection",
"by",
"setting",
"it",
"s",
"related",
"Record",
"field",
".",
"Update",
"local",
"collection"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5682-L5691 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(field, event_args) {
var local_record = event_args.collection_owner;
if (local_record.guid in this._collections_by_record_guid) {
Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added);
this._collections_by_record_guid[local_record.guid].includeValue(event_args.child);
... | javascript | function(field, event_args) {
var local_record = event_args.collection_owner;
if (local_record.guid in this._collections_by_record_guid) {
Lava.suspendListener(this._collection_listeners_by_guid[local_record.guid].added);
this._collections_by_record_guid[local_record.guid].includeValue(event_args.child);
... | [
"function",
"(",
"field",
",",
"event_args",
")",
"{",
"var",
"local_record",
"=",
"event_args",
".",
"collection_owner",
";",
"if",
"(",
"local_record",
".",
"guid",
"in",
"this",
".",
"_collections_by_record_guid",
")",
"{",
"Lava",
".",
"suspendListener",
"... | Record was added to collection by setting it's related Record field. Update local collection
@param {Lava.data.field.Record} field
@param {Lava.data.field.Record#event:removed_child} event_args | [
"Record",
"was",
"added",
"to",
"collection",
"by",
"setting",
"it",
"s",
"related",
"Record",
"field",
".",
"Update",
"local",
"collection"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L5698-L5707 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(record, foreign_key) {
if (foreign_key in this._collections_by_foreign_id) {
this._collections_by_foreign_id[foreign_key].push(record);
} else {
this._collections_by_foreign_id[foreign_key] = [record];
}
} | javascript | function(record, foreign_key) {
if (foreign_key in this._collections_by_foreign_id) {
this._collections_by_foreign_id[foreign_key].push(record);
} else {
this._collections_by_foreign_id[foreign_key] = [record];
}
} | [
"function",
"(",
"record",
",",
"foreign_key",
")",
"{",
"if",
"(",
"foreign_key",
"in",
"this",
".",
"_collections_by_foreign_id",
")",
"{",
"this",
".",
"_collections_by_foreign_id",
"[",
"foreign_key",
"]",
".",
"push",
"(",
"record",
")",
";",
"}",
"else... | Add record to local collection of records, grouped by this field
@param {Lava.data.Record} record
@param {string} foreign_key | [
"Add",
"record",
"to",
"local",
"collection",
"of",
"records",
"grouped",
"by",
"this",
"field"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6069-L6081 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(foreign_module_id_field, event_args) {
var referenced_record = event_args.record, // record belongs to foreign module
new_referenced_id = referenced_record.get('id'),
collection,
i = 0,
count;
if (referenced_record.guid in this._collections_by_foreign_guid) {
collection = this._collection... | javascript | function(foreign_module_id_field, event_args) {
var referenced_record = event_args.record, // record belongs to foreign module
new_referenced_id = referenced_record.get('id'),
collection,
i = 0,
count;
if (referenced_record.guid in this._collections_by_foreign_guid) {
collection = this._collection... | [
"function",
"(",
"foreign_module_id_field",
",",
"event_args",
")",
"{",
"var",
"referenced_record",
"=",
"event_args",
".",
"record",
",",
"// record belongs to foreign module",
"new_referenced_id",
"=",
"referenced_record",
".",
"get",
"(",
"'id'",
")",
",",
"collec... | A record was saved to the database and assigned an id. Need to assign foreign keys for local records
@param {Lava.data.field.Id} foreign_module_id_field
@param {Lava.data.field.Abstract#event:changed} event_args | [
"A",
"record",
"was",
"saved",
"to",
"the",
"database",
"and",
"assigned",
"an",
"id",
".",
"Need",
"to",
"assign",
"foreign",
"keys",
"for",
"local",
"records"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6273-L6304 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(record, properties, referenced_record_id) {
properties[this._name] = this._referenced_module.getRecordById(referenced_record_id) || null;
if (properties[this._name]) {
this._registerRecord(record, properties[this._name]);
}
} | javascript | function(record, properties, referenced_record_id) {
properties[this._name] = this._referenced_module.getRecordById(referenced_record_id) || null;
if (properties[this._name]) {
this._registerRecord(record, properties[this._name]);
}
} | [
"function",
"(",
"record",
",",
"properties",
",",
"referenced_record_id",
")",
"{",
"properties",
"[",
"this",
".",
"_name",
"]",
"=",
"this",
".",
"_referenced_module",
".",
"getRecordById",
"(",
"referenced_record_id",
")",
"||",
"null",
";",
"if",
"(",
"... | Update value of this field in local `record` and add the record to field's internal collections
@param {Lava.data.Record} record The local record
@param {Object} properties The properties of local record
@param {string} referenced_record_id The id of foreign record, which it belongs to | [
"Update",
"value",
"of",
"this",
"field",
"in",
"local",
"record",
"and",
"add",
"the",
"record",
"to",
"field",
"s",
"internal",
"collections"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6406-L6416 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(local_record, referenced_record) {
if (!Firestorm.Array.exclude(this._collections_by_foreign_guid[referenced_record.guid], local_record)) Lava.t();
this._fire('removed_child', {
collection_owner: referenced_record,
child: local_record
});
} | javascript | function(local_record, referenced_record) {
if (!Firestorm.Array.exclude(this._collections_by_foreign_guid[referenced_record.guid], local_record)) Lava.t();
this._fire('removed_child', {
collection_owner: referenced_record,
child: local_record
});
} | [
"function",
"(",
"local_record",
",",
"referenced_record",
")",
"{",
"if",
"(",
"!",
"Firestorm",
".",
"Array",
".",
"exclude",
"(",
"this",
".",
"_collections_by_foreign_guid",
"[",
"referenced_record",
".",
"guid",
"]",
",",
"local_record",
")",
")",
"Lava",... | Remove `local_record` from field's internal collection referenced by `referenced_record`
@param {Lava.data.Record} local_record
@param {Lava.data.Record} referenced_record | [
"Remove",
"local_record",
"from",
"field",
"s",
"internal",
"collection",
"referenced",
"by",
"referenced_record"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6475-L6483 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(local_record, referenced_record) {
var referenced_guid = referenced_record.guid;
if (referenced_guid in this._collections_by_foreign_guid) {
if (Lava.schema.DEBUG && this._collections_by_foreign_guid[referenced_guid].indexOf(local_record) != -1)
Lava.t("Duplicate record");
this._collections_by... | javascript | function(local_record, referenced_record) {
var referenced_guid = referenced_record.guid;
if (referenced_guid in this._collections_by_foreign_guid) {
if (Lava.schema.DEBUG && this._collections_by_foreign_guid[referenced_guid].indexOf(local_record) != -1)
Lava.t("Duplicate record");
this._collections_by... | [
"function",
"(",
"local_record",
",",
"referenced_record",
")",
"{",
"var",
"referenced_guid",
"=",
"referenced_record",
".",
"guid",
";",
"if",
"(",
"referenced_guid",
"in",
"this",
".",
"_collections_by_foreign_guid",
")",
"{",
"if",
"(",
"Lava",
".",
"schema"... | Add `local_record` to field's internal collection of records from local module, referenced by `referenced_record`
@param {Lava.data.Record} local_record
@param {Lava.data.Record} referenced_record The collection owner | [
"Add",
"local_record",
"to",
"field",
"s",
"internal",
"collection",
"of",
"records",
"from",
"local",
"module",
"referenced",
"by",
"referenced_record"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6490-L6511 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(record) {
if (Lava.schema.DEBUG && !(record.guid in this._properties_by_guid)) Lava.t("isLess: record does not belong to this module");
var ref_record_a = this._properties_by_guid[record.guid][this._name];
// must return undefined, cause comparison against nulls behaves differently
return ref_record_a... | javascript | function(record) {
if (Lava.schema.DEBUG && !(record.guid in this._properties_by_guid)) Lava.t("isLess: record does not belong to this module");
var ref_record_a = this._properties_by_guid[record.guid][this._name];
// must return undefined, cause comparison against nulls behaves differently
return ref_record_a... | [
"function",
"(",
"record",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"(",
"record",
".",
"guid",
"in",
"this",
".",
"_properties_by_guid",
")",
")",
"Lava",
".",
"t",
"(",
"\"isLess: record does not belong to this module\"",
")",
... | Get field's value equivalent for comparison
@param {Lava.data.Record} record
@returns {string} | [
"Get",
"field",
"s",
"value",
"equivalent",
"for",
"comparison"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6553-L6560 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(config) {
var field_name,
type,
constructor;
for (field_name in config.fields) {
type = config.fields[field_name].type || Lava.schema.data.DEFAULT_FIELD_TYPE;
constructor = Lava.ClassManager.getConstructor(type, 'Lava.data.field');
this._fields[field_name] = new constructor(
this,
... | javascript | function(config) {
var field_name,
type,
constructor;
for (field_name in config.fields) {
type = config.fields[field_name].type || Lava.schema.data.DEFAULT_FIELD_TYPE;
constructor = Lava.ClassManager.getConstructor(type, 'Lava.data.field');
this._fields[field_name] = new constructor(
this,
... | [
"function",
"(",
"config",
")",
"{",
"var",
"field_name",
",",
"type",
",",
"constructor",
";",
"for",
"(",
"field_name",
"in",
"config",
".",
"fields",
")",
"{",
"type",
"=",
"config",
".",
"fields",
"[",
"field_name",
"]",
".",
"type",
"||",
"Lava",
... | Create field instances and return the default record properties object
@param {(_cModule|_cMetaStorage)} config
@returns {Object} Default record properties object with initial values for each field | [
"Create",
"field",
"instances",
"and",
"return",
"the",
"default",
"record",
"properties",
"object"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6723-L6742 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
var default_properties = {},
field_name;
for (field_name in this._fields) {
this._fields[field_name].onModuleFieldsCreated(default_properties);
}
this._createRecordProperties = new Function(
"return " + Lava.serializer.serialize(default_properties)
);
} | javascript | function() {
var default_properties = {},
field_name;
for (field_name in this._fields) {
this._fields[field_name].onModuleFieldsCreated(default_properties);
}
this._createRecordProperties = new Function(
"return " + Lava.serializer.serialize(default_properties)
);
} | [
"function",
"(",
")",
"{",
"var",
"default_properties",
"=",
"{",
"}",
",",
"field_name",
";",
"for",
"(",
"field_name",
"in",
"this",
".",
"_fields",
")",
"{",
"this",
".",
"_fields",
"[",
"field_name",
"]",
".",
"onModuleFieldsCreated",
"(",
"default_pro... | Called by App instance. Do not call this function directly. | [
"Called",
"by",
"App",
"instance",
".",
"Do",
"not",
"call",
"this",
"function",
"directly",
"."
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6747-L6762 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(lava_app, config, name) {
this._app = lava_app;
this._config = config;
this._name = name;
this._createFields(config);
this._record_constructor = Lava.ClassManager.getConstructor(
config.record_class || Lava.schema.data.DEFAULT_RECORD_CLASS,
'Lava.data'
);
if ('id' in this._fields) {
... | javascript | function(lava_app, config, name) {
this._app = lava_app;
this._config = config;
this._name = name;
this._createFields(config);
this._record_constructor = Lava.ClassManager.getConstructor(
config.record_class || Lava.schema.data.DEFAULT_RECORD_CLASS,
'Lava.data'
);
if ('id' in this._fields) {
... | [
"function",
"(",
"lava_app",
",",
"config",
",",
"name",
")",
"{",
"this",
".",
"_app",
"=",
"lava_app",
";",
"this",
".",
"_config",
"=",
"config",
";",
"this",
".",
"_name",
"=",
"name",
";",
"this",
".",
"_createFields",
"(",
"config",
")",
";",
... | Create a Module instance, init fields, generate the method that returns initial record properties
@param {Lava.system.App} lava_app Application instance
@param {_cModule} config
@param {string} name Module's name | [
"Create",
"a",
"Module",
"instance",
"init",
"fields",
"generate",
"the",
"method",
"that",
"returns",
"initial",
"record",
"properties"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6876-L6896 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(raw_properties) {
var result;
if (Lava.schema.DEBUG && !raw_properties.id) Lava.t('safeLoadRecord: import data must have an id');
if (raw_properties.id in this._records_by_id) {
result = this._records_by_id[raw_properties.id];
} else {
result = this.loadRecord(raw_properties);
}
retur... | javascript | function(raw_properties) {
var result;
if (Lava.schema.DEBUG && !raw_properties.id) Lava.t('safeLoadRecord: import data must have an id');
if (raw_properties.id in this._records_by_id) {
result = this._records_by_id[raw_properties.id];
} else {
result = this.loadRecord(raw_properties);
}
retur... | [
"function",
"(",
"raw_properties",
")",
"{",
"var",
"result",
";",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"raw_properties",
".",
"id",
")",
"Lava",
".",
"t",
"(",
"'safeLoadRecord: import data must have an id'",
")",
";",
"if",
"(",
"ra... | Load record only if it has not been already loaded. `raw_properties` must have an ID
@param {Object} raw_properties Serialized record fields from server
@returns {Lava.data.Record} Newly loaded record instance, or the old one | [
"Load",
"record",
"only",
"if",
"it",
"has",
"not",
"been",
"already",
"loaded",
".",
"raw_properties",
"must",
"have",
"an",
"ID"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L6970-L6988 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(raw_records_array) {
var i = 0,
count = raw_records_array.length,
records = [];
for (; i < count; i++) {
records.push(this._createRecordInstance(raw_records_array[i]));
}
this._fire('records_loaded', {records: records});
return records;
} | javascript | function(raw_records_array) {
var i = 0,
count = raw_records_array.length,
records = [];
for (; i < count; i++) {
records.push(this._createRecordInstance(raw_records_array[i]));
}
this._fire('records_loaded', {records: records});
return records;
} | [
"function",
"(",
"raw_records_array",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"raw_records_array",
".",
"length",
",",
"records",
"=",
"[",
"]",
";",
"for",
"(",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{",
"records",
".",
"push",
... | Initialize module records from server-side data
@param {Array.<Object>} raw_records_array Server-side data for the records
@returns {Array.<Lava.data.Record>} Loaded record instances | [
"Initialize",
"module",
"records",
"from",
"server",
"-",
"side",
"data"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7044-L7060 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(module, fields, properties_ref, raw_properties) {
this.guid = Lava.guid++;
this._module = module;
this._fields = fields;
this._properties = properties_ref;
var field;
if (typeof(raw_properties) != 'undefined') {
for (field in fields) {
fields[field]['import'](this, properties_ref, raw_p... | javascript | function(module, fields, properties_ref, raw_properties) {
this.guid = Lava.guid++;
this._module = module;
this._fields = fields;
this._properties = properties_ref;
var field;
if (typeof(raw_properties) != 'undefined') {
for (field in fields) {
fields[field]['import'](this, properties_ref, raw_p... | [
"function",
"(",
"module",
",",
"fields",
",",
"properties_ref",
",",
"raw_properties",
")",
"{",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"this",
".",
"_module",
"=",
"module",
";",
"this",
".",
"_fields",
"=",
"fields",
";",
"this",
... | Create record instance
@param {Lava.data.ModuleAbstract} module Records module
@param {Object.<string, Lava.data.field.Abstract>} fields Object with module's fields
@param {Object} properties_ref Reference to an object with record's properties
@param {Object} raw_properties Object with record field values from server | [
"Create",
"record",
"instance"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7117-L7144 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(config) {
if ('id' in config.fields) Lava.t("Id field in MetaStorage is not permitted");
this._config = config;
this._createFields(config);
this.initFields(); // MetaStorage is constructed directly, not via App class
var field;
if (Lava.schema.DEBUG) {
for (field in this._fields) {
if (t... | javascript | function(config) {
if ('id' in config.fields) Lava.t("Id field in MetaStorage is not permitted");
this._config = config;
this._createFields(config);
this.initFields(); // MetaStorage is constructed directly, not via App class
var field;
if (Lava.schema.DEBUG) {
for (field in this._fields) {
if (t... | [
"function",
"(",
"config",
")",
"{",
"if",
"(",
"'id'",
"in",
"config",
".",
"fields",
")",
"Lava",
".",
"t",
"(",
"\"Id field in MetaStorage is not permitted\"",
")",
";",
"this",
".",
"_config",
"=",
"config",
";",
"this",
".",
"_createFields",
"(",
"con... | Create an instance of MetaStorage
@param {_cMetaStorage} config | [
"Create",
"an",
"instance",
"of",
"MetaStorage"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7268-L7287 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(ext_guid, raw_properties, original_record) {
if (ext_guid in this._properties) Lava.t("MetaRecord already exists");
var properties = this._createRecordProperties(),
record = new this._record_constructor(this, this._fields, properties, raw_properties, original_record);
record.ext_guid = ext_guid;
... | javascript | function(ext_guid, raw_properties, original_record) {
if (ext_guid in this._properties) Lava.t("MetaRecord already exists");
var properties = this._createRecordProperties(),
record = new this._record_constructor(this, this._fields, properties, raw_properties, original_record);
record.ext_guid = ext_guid;
... | [
"function",
"(",
"ext_guid",
",",
"raw_properties",
",",
"original_record",
")",
"{",
"if",
"(",
"ext_guid",
"in",
"this",
".",
"_properties",
")",
"Lava",
".",
"t",
"(",
"\"MetaRecord already exists\"",
")",
";",
"var",
"properties",
"=",
"this",
".",
"_cre... | Create a new MetaRecord instance
@param {_tGUID} ext_guid GUID of the external record, to which this MetaRecord will be attached
@param {Object} raw_properties Initial field values
@param {Object} [original_record] Original record, which will be saved in MetaRecord instance
@returns {Lava.data.MetaRecord} | [
"Create",
"a",
"new",
"MetaRecord",
"instance"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7317-L7334 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(property_name) {
if (!(property_name in this._data_bindings_by_property)) {
this._data_bindings_by_property[property_name] = new Lava.scope.DataBinding(this, property_name);
}
return this._data_bindings_by_property[property_name];
} | javascript | function(property_name) {
if (!(property_name in this._data_bindings_by_property)) {
this._data_bindings_by_property[property_name] = new Lava.scope.DataBinding(this, property_name);
}
return this._data_bindings_by_property[property_name];
} | [
"function",
"(",
"property_name",
")",
"{",
"if",
"(",
"!",
"(",
"property_name",
"in",
"this",
".",
"_data_bindings_by_property",
")",
")",
"{",
"this",
".",
"_data_bindings_by_property",
"[",
"property_name",
"]",
"=",
"new",
"Lava",
".",
"scope",
".",
"Da... | Get a scope, which is bound to property of the value of this container
@param {string} property_name
@returns {Lava.scope.DataBinding} | [
"Get",
"a",
"scope",
"which",
"is",
"bound",
"to",
"property",
"of",
"the",
"value",
"of",
"this",
"container"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7373-L7383 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(path_config) {
var widget = this._widget.locateViewByPathConfig(path_config);
if (Lava.schema.DEBUG && !widget.isWidget) Lava.t("Tried to call a modifier from non-widget view");
return /** @type {Lava.widget.Standard} */ widget;
} | javascript | function(path_config) {
var widget = this._widget.locateViewByPathConfig(path_config);
if (Lava.schema.DEBUG && !widget.isWidget) Lava.t("Tried to call a modifier from non-widget view");
return /** @type {Lava.widget.Standard} */ widget;
} | [
"function",
"(",
"path_config",
")",
"{",
"var",
"widget",
"=",
"this",
".",
"_widget",
".",
"locateViewByPathConfig",
"(",
"path_config",
")",
";",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"widget",
".",
"isWidget",
")",
"Lava",
".",
... | Get widget, that will be used to call a modifier
@param {_cKnownViewLocator} path_config Route to the widget
@returns {Lava.widget.Standard} | [
"Get",
"widget",
"that",
"will",
"be",
"used",
"to",
"call",
"a",
"modifier"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7584-L7591 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
var result = null;
// in production - wrap evaluation into try/catch block
if (Lava.schema.DEBUG) {
result = this._evaluator();
} else {
try {
result = this._evaluator();
} catch (e) {
Lava.logException(e);
}
}
return result;
} | javascript | function() {
var result = null;
// in production - wrap evaluation into try/catch block
if (Lava.schema.DEBUG) {
result = this._evaluator();
} else {
try {
result = this._evaluator();
} catch (e) {
Lava.logException(e);
}
}
return result;
} | [
"function",
"(",
")",
"{",
"var",
"result",
"=",
"null",
";",
"// in production - wrap evaluation into try/catch block",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
")",
"{",
"result",
"=",
"this",
".",
"_evaluator",
"(",
")",
";",
"}",
"else",
"{",
"t... | Execute `_evaluator` and return
@returns {*} The Argument's result | [
"Execute",
"_evaluator",
"and",
"return"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7606-L7631 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(index, arguments_array) {
return this._modifier_descriptors[index].widget.callModifier(this._modifier_descriptors[index].callback_name, arguments_array);
} | javascript | function(index, arguments_array) {
return this._modifier_descriptors[index].widget.callModifier(this._modifier_descriptors[index].callback_name, arguments_array);
} | [
"function",
"(",
"index",
",",
"arguments_array",
")",
"{",
"return",
"this",
".",
"_modifier_descriptors",
"[",
"index",
"]",
".",
"widget",
".",
"callModifier",
"(",
"this",
".",
"_modifier_descriptors",
"[",
"index",
"]",
".",
"callback_name",
",",
"argumen... | Call a modifier from widget
@param {number} index
@param {?Array.<*>} arguments_array
@returns {*} | [
"Call",
"a",
"modifier",
"from",
"widget"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7668-L7672 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(config, widget) {
this._widget = widget;
this._property_name = config.property_name;
this._scope = widget.getScopeByPathConfig(config.path_config);
if (config.from_widget) {
this._scope.setValue(this._widget.get(this._property_name));
} else {
this._widget.set(this._property_name, this._sc... | javascript | function(config, widget) {
this._widget = widget;
this._property_name = config.property_name;
this._scope = widget.getScopeByPathConfig(config.path_config);
if (config.from_widget) {
this._scope.setValue(this._widget.get(this._property_name));
} else {
this._widget.set(this._property_name, this._sc... | [
"function",
"(",
"config",
",",
"widget",
")",
"{",
"this",
".",
"_widget",
"=",
"widget",
";",
"this",
".",
"_property_name",
"=",
"config",
".",
"property_name",
";",
"this",
".",
"_scope",
"=",
"widget",
".",
"getScopeByPathConfig",
"(",
"config",
".",
... | Create Binding instance. Refresh widget's property value
@param {_cBinding} config
@param {Lava.widget.Standard} widget | [
"Create",
"Binding",
"instance",
".",
"Refresh",
"widget",
"s",
"property",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7754-L7774 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
// avoid setting nulls to non-nullable fields.
if (this._scope.isConnected()) {
// turning off both of them to avoid infinite loop. From architect's point of view, better solution would be
// to hang up developer's browser, but if it happens in production - it may have disastrous consequences.
... | javascript | function() {
// avoid setting nulls to non-nullable fields.
if (this._scope.isConnected()) {
// turning off both of them to avoid infinite loop. From architect's point of view, better solution would be
// to hang up developer's browser, but if it happens in production - it may have disastrous consequences.
... | [
"function",
"(",
")",
"{",
"// avoid setting nulls to non-nullable fields.",
"if",
"(",
"this",
".",
"_scope",
".",
"isConnected",
"(",
")",
")",
"{",
"// turning off both of them to avoid infinite loop. From architect's point of view, better solution would be",
"// to hang up deve... | Scope, which is bound to widget property, has changed. Refresh widget property value | [
"Scope",
"which",
"is",
"bound",
"to",
"widget",
"property",
"has",
"changed",
".",
"Refresh",
"widget",
"property",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7779-L7794 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
Lava.suspendListener(this._widget_property_changed_listener);
this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener);
this._scope.setValue(this._widget.get(this._property_name));
Lava.resumeListener(this._widget_property_changed_listener);
this._scope_changed_listener... | javascript | function() {
Lava.suspendListener(this._widget_property_changed_listener);
this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener);
this._scope.setValue(this._widget.get(this._property_name));
Lava.resumeListener(this._widget_property_changed_listener);
this._scope_changed_listener... | [
"function",
"(",
")",
"{",
"Lava",
".",
"suspendListener",
"(",
"this",
".",
"_widget_property_changed_listener",
")",
";",
"this",
".",
"_scope_changed_listener",
"&&",
"Lava",
".",
"suspendListener",
"(",
"this",
".",
"_scope_changed_listener",
")",
";",
"this",... | Widget property has changed. Refresh bound scope value | [
"Widget",
"property",
"has",
"changed",
".",
"Refresh",
"bound",
"scope",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7799-L7807 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(value_container, property_name) {
this.guid = Lava.guid++;
this._value_container = value_container;
this._property_name = property_name;
this.level = value_container.level + 1;
this._container_changed_listener = value_container.on('changed', this.onParentDataSourceChanged, this);
this._refreshValu... | javascript | function(value_container, property_name) {
this.guid = Lava.guid++;
this._value_container = value_container;
this._property_name = property_name;
this.level = value_container.level + 1;
this._container_changed_listener = value_container.on('changed', this.onParentDataSourceChanged, this);
this._refreshValu... | [
"function",
"(",
"value_container",
",",
"property_name",
")",
"{",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"this",
".",
"_value_container",
"=",
"value_container",
";",
"this",
".",
"_property_name",
"=",
"property_name",
";",
"this",
".",... | Create DataBinding instance
@param {_iValueContainer} value_container The scope, which provides the data source for this instance
@param {string} property_name | [
"Create",
"DataBinding",
"instance"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7893-L7904 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
var property_container = this._value_container.getValue(),
value = null,
is_connected = false;
if (property_container != null) {
// Collection implements Properties, so if _property_name is not a number - then `get` will be called
if (property_container.isCollection && /^\d+$/.test(this.... | javascript | function() {
var property_container = this._value_container.getValue(),
value = null,
is_connected = false;
if (property_container != null) {
// Collection implements Properties, so if _property_name is not a number - then `get` will be called
if (property_container.isCollection && /^\d+$/.test(this.... | [
"function",
"(",
")",
"{",
"var",
"property_container",
"=",
"this",
".",
"_value_container",
".",
"getValue",
"(",
")",
",",
"value",
"=",
"null",
",",
"is_connected",
"=",
"false",
";",
"if",
"(",
"property_container",
"!=",
"null",
")",
"{",
"// Collect... | Get `_property_container` from `_value_container`, and get `_property_name` from `_property_container` | [
"Get",
"_property_container",
"from",
"_value_container",
"and",
"get",
"_property_name",
"from",
"_property_container"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7909-L7959 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) {
// currently listening to the parent's old data source
this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener);
this._enumerable_... | javascript | function() {
if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) {
// currently listening to the parent's old data source
this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener);
this._enumerable_... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_property_changed_listener",
"&&",
"(",
"this",
".",
"_value_container",
".",
"getValue",
"(",
")",
"!=",
"this",
".",
"_property_container",
")",
")",
"{",
"// currently listening to the parent's old data source",... | Data source for this instance has changed. Remove listeners to old data source and schedule refresh | [
"Data",
"source",
"for",
"this",
"instance",
"has",
"changed",
".",
"Remove",
"listeners",
"to",
"old",
"data",
"source",
"and",
"schedule",
"refresh"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L7974-L7989 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(value) {
var property_container = this._value_container.getValue();
if (property_container) {
if (this._property_changed_listener) {
Lava.suspendListener(this._property_changed_listener);
property_container.set(this._property_name, value);
Lava.resumeListener(this._property_changed_liste... | javascript | function(value) {
var property_container = this._value_container.getValue();
if (property_container) {
if (this._property_changed_listener) {
Lava.suspendListener(this._property_changed_listener);
property_container.set(this._property_name, value);
Lava.resumeListener(this._property_changed_liste... | [
"function",
"(",
"value",
")",
"{",
"var",
"property_container",
"=",
"this",
".",
"_value_container",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"property_container",
")",
"{",
"if",
"(",
"this",
".",
"_property_changed_listener",
")",
"{",
"Lava",
".",
"... | If this instance is bound to existing object - set object's property value
@param {*} value | [
"If",
"this",
"instance",
"is",
"bound",
"to",
"existing",
"object",
"-",
"set",
"object",
"s",
"property",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8010-L8042 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(argument, view, widget, config) {
var i = 0,
count,
depends,
bind;
this.guid = Lava.guid++;
this._argument = argument;
this._view = view;
this._widget = widget;
this.level = argument.level + 1;
if (config) {
if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_e... | javascript | function(argument, view, widget, config) {
var i = 0,
count,
depends,
bind;
this.guid = Lava.guid++;
this._argument = argument;
this._view = view;
this._widget = widget;
this.level = argument.level + 1;
if (config) {
if (Lava.schema.DEBUG && ['Enumerable', 'DataView'].indexOf(config['own_e... | [
"function",
"(",
"argument",
",",
"view",
",",
"widget",
",",
"config",
")",
"{",
"var",
"i",
"=",
"0",
",",
"count",
",",
"depends",
",",
"bind",
";",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"this",
".",
"_argument",
"=",
"argu... | Create an instance of the Foreach scope. Refresh value
@param {Lava.scope.Argument} argument
@param {Lava.view.Foreach} view
@param {Lava.widget.Standard} widget
@param {?_cScopeForeach} config | [
"Create",
"an",
"instance",
"of",
"the",
"Foreach",
"scope",
".",
"Refresh",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8167-L8224 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function() {
var argument_value = this._argument.getValue();
if (argument_value) {
this._refreshDataSource(argument_value);
if (this._observable_listener == null) {
if (argument_value.isCollection) {
this._observable_listener = argument_value.on('collection_changed', this._onObservableChanged, ... | javascript | function() {
var argument_value = this._argument.getValue();
if (argument_value) {
this._refreshDataSource(argument_value);
if (this._observable_listener == null) {
if (argument_value.isCollection) {
this._observable_listener = argument_value.on('collection_changed', this._onObservableChanged, ... | [
"function",
"(",
")",
"{",
"var",
"argument_value",
"=",
"this",
".",
"_argument",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"argument_value",
")",
"{",
"this",
".",
"_refreshDataSource",
"(",
"argument_value",
")",
";",
"if",
"(",
"this",
".",
"_observ... | Get new value from the `_argument`, and create a new instance of local Enumerable, or update the content of the old one | [
"Get",
"new",
"value",
"from",
"the",
"_argument",
"and",
"create",
"a",
"new",
"instance",
"of",
"local",
"Enumerable",
"or",
"update",
"the",
"content",
"of",
"the",
"old",
"one"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8292-L8330 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, property_name, assign_config) {
this.guid = Lava.guid++;
this._view = view;
this._property_name = property_name;
if (assign_config) {
this._assign_argument = new Lava.scope.Argument(assign_config, view, view.getWidget());
this._assign_argument.on('changed', this.onAssignChanged, this);
... | javascript | function(view, property_name, assign_config) {
this.guid = Lava.guid++;
this._view = view;
this._property_name = property_name;
if (assign_config) {
this._assign_argument = new Lava.scope.Argument(assign_config, view, view.getWidget());
this._assign_argument.on('changed', this.onAssignChanged, this);
... | [
"function",
"(",
"view",
",",
"property_name",
",",
"assign_config",
")",
"{",
"this",
".",
"guid",
"=",
"Lava",
".",
"guid",
"++",
";",
"this",
".",
"_view",
"=",
"view",
";",
"this",
".",
"_property_name",
"=",
"property_name",
";",
"if",
"(",
"assig... | Create the PropertyBinding instance. Refresh value from view's property or set value from assign
@param {Lava.view.Abstract} view Scope's owner view, to which it's bound
@param {string} property_name
@param {_cAssign} assign_config Config for the Argument, in case this scope is created in "assign" mode | [
"Create",
"the",
"PropertyBinding",
"instance",
".",
"Refresh",
"value",
"from",
"view",
"s",
"property",
"or",
"set",
"value",
"from",
"assign"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8486-L8514 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(value) {
Lava.suspendListener(this._property_changed_listener);
this._view.set(this._property_name, value);
Lava.resumeListener(this._property_changed_listener);
this._queueForRefresh();
} | javascript | function(value) {
Lava.suspendListener(this._property_changed_listener);
this._view.set(this._property_name, value);
Lava.resumeListener(this._property_changed_listener);
this._queueForRefresh();
} | [
"function",
"(",
"value",
")",
"{",
"Lava",
".",
"suspendListener",
"(",
"this",
".",
"_property_changed_listener",
")",
";",
"this",
".",
"_view",
".",
"set",
"(",
"this",
".",
"_property_name",
",",
"value",
")",
";",
"Lava",
".",
"resumeListener",
"(",
... | Set property value to the bound view
@param {*} value | [
"Set",
"property",
"value",
"to",
"the",
"bound",
"view"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8559-L8567 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(container, name_source_container) {
if (Lava.schema.DEBUG && !name_source_container.isValueContainer) Lava.t();
if (Lava.schema.DEBUG && !name_source_container.guid) Lava.t("Name source for segments must be either PropertyBinding or DataBinding");
this._container = container;
this._property_name = na... | javascript | function(container, name_source_container) {
if (Lava.schema.DEBUG && !name_source_container.isValueContainer) Lava.t();
if (Lava.schema.DEBUG && !name_source_container.guid) Lava.t("Name source for segments must be either PropertyBinding or DataBinding");
this._container = container;
this._property_name = na... | [
"function",
"(",
"container",
",",
"name_source_container",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"!",
"name_source_container",
".",
"isValueContainer",
")",
"Lava",
".",
"t",
"(",
")",
";",
"if",
"(",
"Lava",
".",
"schema",
"."... | Create Segment instance. Refresh `_property_name`, `_data_binding` and get value
@param {(Lava.view.Abstract|Lava.scope.Abstract)} container
@param {(Lava.scope.PropertyBinding|Lava.scope.DataBinding)} name_source_container | [
"Create",
"Segment",
"instance",
".",
"Refresh",
"_property_name",
"_data_binding",
"and",
"get",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8664-L8685 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(view, config, widget) {
// About IOS bugfixes:
// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
// http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html
var needs_shim = Firestorm.Environment.platform == "ios";
Lava.ClassManager.patch(this, "Element", "addEve... | javascript | function(view, config, widget) {
// About IOS bugfixes:
// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
// http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html
var needs_shim = Firestorm.Environment.platform == "ios";
Lava.ClassManager.patch(this, "Element", "addEve... | [
"function",
"(",
"view",
",",
"config",
",",
"widget",
")",
"{",
"// About IOS bugfixes:",
"// http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html",
"// http://www.quirksmode.org/blog/archives/2010/10/click_event_del_1.html",
"var",
"needs_shim",
"=",
"Firestorm",
".... | One-time static constructor, which modifies container's prototype and replaces itself with correct version
@param {Lava.view.Abstract} view
@param {_cElementContainer} config
@param {Lava.widget.Standard} widget | [
"One",
"-",
"time",
"static",
"constructor",
"which",
"modifies",
"container",
"s",
"prototype",
"and",
"replaces",
"itself",
"with",
"correct",
"version"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L8909-L8922 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name, target) {
if (this._is_inDOM && event_name == 'click' && !(event_name in this._events)) {
this.getDOMElement().onclick = Lava.noop;
}
this.addEventTarget_Normal(event_name, target)
} | javascript | function(event_name, target) {
if (this._is_inDOM && event_name == 'click' && !(event_name in this._events)) {
this.getDOMElement().onclick = Lava.noop;
}
this.addEventTarget_Normal(event_name, target)
} | [
"function",
"(",
"event_name",
",",
"target",
")",
"{",
"if",
"(",
"this",
".",
"_is_inDOM",
"&&",
"event_name",
"==",
"'click'",
"&&",
"!",
"(",
"event_name",
"in",
"this",
".",
"_events",
")",
")",
"{",
"this",
".",
"getDOMElement",
"(",
")",
".",
... | Add a route for DOM event - IOS bugfix version
@param {string} event_name
@param {_cTarget} target | [
"Add",
"a",
"route",
"for",
"DOM",
"event",
"-",
"IOS",
"bugfix",
"version"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9027-L9034 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(event_name, target) {
if (!(event_name in this._events)) {
this._events[event_name] = [target];
} else {
this._events[event_name].push(target);
}
} | javascript | function(event_name, target) {
if (!(event_name in this._events)) {
this._events[event_name] = [target];
} else {
this._events[event_name].push(target);
}
} | [
"function",
"(",
"event_name",
",",
"target",
")",
"{",
"if",
"(",
"!",
"(",
"event_name",
"in",
"this",
".",
"_events",
")",
")",
"{",
"this",
".",
"_events",
"[",
"event_name",
"]",
"=",
"[",
"target",
"]",
";",
"}",
"else",
"{",
"this",
".",
"... | Add a route for DOM event - normal version
@param {string} event_name
@param {_cTarget} target | [
"Add",
"a",
"route",
"for",
"DOM",
"event",
"-",
"normal",
"version"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9041-L9053 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name, value) {
if (Lava.schema.DEBUG && name == 'id') Lava.t();
if (Lava.schema.DEBUG && (name in this._property_bindings)) Lava.t("Property is bound to an argument and cannot be set directly: " + name);
this._static_properties[name] = value;
} | javascript | function(name, value) {
if (Lava.schema.DEBUG && name == 'id') Lava.t();
if (Lava.schema.DEBUG && (name in this._property_bindings)) Lava.t("Property is bound to an argument and cannot be set directly: " + name);
this._static_properties[name] = value;
} | [
"function",
"(",
"name",
",",
"value",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"name",
"==",
"'id'",
")",
"Lava",
".",
"t",
"(",
")",
";",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"(",
"name",
"in",
"this",
... | Set static property to the container, but do not synchronize it with DOM element
@param {string} name
@param {string} value | [
"Set",
"static",
"property",
"to",
"the",
"container",
"but",
"do",
"not",
"synchronize",
"it",
"with",
"DOM",
"element"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9072-L9079 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(class_name, cancel_sync) {
if (Lava.schema.DEBUG && (!class_name || class_name.indexOf(' ') != -1)) Lava.t("addClass: expected one class name, got: " + class_name);
if (Firestorm.Array.include(this._static_classes, class_name)) {
if (this._is_inDOM && !cancel_sync) Firestorm.Element.addClass(this.get... | javascript | function(class_name, cancel_sync) {
if (Lava.schema.DEBUG && (!class_name || class_name.indexOf(' ') != -1)) Lava.t("addClass: expected one class name, got: " + class_name);
if (Firestorm.Array.include(this._static_classes, class_name)) {
if (this._is_inDOM && !cancel_sync) Firestorm.Element.addClass(this.get... | [
"function",
"(",
"class_name",
",",
"cancel_sync",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"(",
"!",
"class_name",
"||",
"class_name",
".",
"indexOf",
"(",
"' '",
")",
"!=",
"-",
"1",
")",
")",
"Lava",
".",
"t",
"(",
"\"addC... | Add static CSS class
@param {string} class_name
@param {boolean} cancel_sync If <kw>true</kw> - do not add that class to DOM element, just to local `_static_classes` array | [
"Add",
"static",
"CSS",
"class"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9107-L9117 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(class_name, cancel_sync) {
if (Firestorm.Array.exclude(this._static_classes, class_name)) {
if (this._is_inDOM && !cancel_sync) Firestorm.Element.removeClass(this.getDOMElement(), class_name);
}
} | javascript | function(class_name, cancel_sync) {
if (Firestorm.Array.exclude(this._static_classes, class_name)) {
if (this._is_inDOM && !cancel_sync) Firestorm.Element.removeClass(this.getDOMElement(), class_name);
}
} | [
"function",
"(",
"class_name",
",",
"cancel_sync",
")",
"{",
"if",
"(",
"Firestorm",
".",
"Array",
".",
"exclude",
"(",
"this",
".",
"_static_classes",
",",
"class_name",
")",
")",
"{",
"if",
"(",
"this",
".",
"_is_inDOM",
"&&",
"!",
"cancel_sync",
")",
... | Remove a static CSS class
@param {string} class_name
@param {boolean} cancel_sync If <kw>true</kw> - do not remove the class from DOM element, just from local `_static_classes` array | [
"Remove",
"a",
"static",
"CSS",
"class"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9124-L9132 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(class_names, cancel_sync) {
if (Lava.schema.DEBUG && typeof(class_names) == 'string') Lava.t();
for (var i = 0, count = class_names.length; i < count; i++) {
this.addClass(class_names[i], cancel_sync);
}
} | javascript | function(class_names, cancel_sync) {
if (Lava.schema.DEBUG && typeof(class_names) == 'string') Lava.t();
for (var i = 0, count = class_names.length; i < count; i++) {
this.addClass(class_names[i], cancel_sync);
}
} | [
"function",
"(",
"class_names",
",",
"cancel_sync",
")",
"{",
"if",
"(",
"Lava",
".",
"schema",
".",
"DEBUG",
"&&",
"typeof",
"(",
"class_names",
")",
"==",
"'string'",
")",
"Lava",
".",
"t",
"(",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
... | Add a list of static classes to the instance
@param {Array.<string>} class_names
@param {boolean} cancel_sync If <kw>true</kw> - do not add that classes to DOM element, just to local `_static_classes` array | [
"Add",
"a",
"list",
"of",
"static",
"classes",
"to",
"the",
"instance"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9139-L9149 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name, value, cancel_sync) {
if (value == null) {
this.removeStyle(name, cancel_sync);
} else {
this._static_styles[name] = value;
if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, value);
}
} | javascript | function(name, value, cancel_sync) {
if (value == null) {
this.removeStyle(name, cancel_sync);
} else {
this._static_styles[name] = value;
if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, value);
}
} | [
"function",
"(",
"name",
",",
"value",
",",
"cancel_sync",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"this",
".",
"removeStyle",
"(",
"name",
",",
"cancel_sync",
")",
";",
"}",
"else",
"{",
"this",
".",
"_static_styles",
"[",
"name",
"]",... | Set static style value
@param {string} name CSS property name
@param {string} value CSS property value
@param cancel_sync If <kw>true</kw> - do not add that style to DOM element, just to local `_static_styles` object | [
"Set",
"static",
"style",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9177-L9190 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(name, cancel_sync) {
if (name in this._static_styles) {
delete this._static_styles[name];
if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, null);
}
} | javascript | function(name, cancel_sync) {
if (name in this._static_styles) {
delete this._static_styles[name];
if (this._is_inDOM && !cancel_sync) Firestorm.Element.setStyle(this.getDOMElement(), name, null);
}
} | [
"function",
"(",
"name",
",",
"cancel_sync",
")",
"{",
"if",
"(",
"name",
"in",
"this",
".",
"_static_styles",
")",
"{",
"delete",
"this",
".",
"_static_styles",
"[",
"name",
"]",
";",
"if",
"(",
"this",
".",
"_is_inDOM",
"&&",
"!",
"cancel_sync",
")",... | Remove static CSS style
@param {string} name CSS style name
@param {boolean} cancel_sync If <kw>true</kw> - do not remove that style from DOM element, just from local `_static_styles` object | [
"Remove",
"static",
"CSS",
"style"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9197-L9204 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(configs, view, fn) {
var result = {},
argument;
for (var name in configs) {
argument = new Lava.scope.Argument(configs[name], view, this._widget);
result[name] = argument;
argument.on('changed', fn, this, {name: name})
}
return result;
} | javascript | function(configs, view, fn) {
var result = {},
argument;
for (var name in configs) {
argument = new Lava.scope.Argument(configs[name], view, this._widget);
result[name] = argument;
argument.on('changed', fn, this, {name: name})
}
return result;
} | [
"function",
"(",
"configs",
",",
"view",
",",
"fn",
")",
"{",
"var",
"result",
"=",
"{",
"}",
",",
"argument",
";",
"for",
"(",
"var",
"name",
"in",
"configs",
")",
"{",
"argument",
"=",
"new",
"Lava",
".",
"scope",
".",
"Argument",
"(",
"configs",... | Helper method to create style, class and property bindings
@param {?Object.<string, _cArgument>} configs
@param {Lava.view.Abstract} view
@param {!function} fn
@returns {!Object.<string, Lava.scope.Argument>} | [
"Helper",
"method",
"to",
"create",
"style",
"class",
"and",
"property",
"bindings"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9233-L9248 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(argument, event_args, listener_args) {
if (this._is_inDOM) {
// note: escape will be handled by framework
var value = argument.getValue();
if (value != null && value !== false) {
if (value === true) {
value = listener_args.name;
}
Firestorm.Element.setProperty(this.getDOMElemen... | javascript | function(argument, event_args, listener_args) {
if (this._is_inDOM) {
// note: escape will be handled by framework
var value = argument.getValue();
if (value != null && value !== false) {
if (value === true) {
value = listener_args.name;
}
Firestorm.Element.setProperty(this.getDOMElemen... | [
"function",
"(",
"argument",
",",
"event_args",
",",
"listener_args",
")",
"{",
"if",
"(",
"this",
".",
"_is_inDOM",
")",
"{",
"// note: escape will be handled by framework",
"var",
"value",
"=",
"argument",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"value",
... | Argument value for property binding has changed. If container's element is in DOM - update it's property value
@param {Lava.scope.Argument} argument
@param event_args
@param listener_args | [
"Argument",
"value",
"for",
"property",
"binding",
"has",
"changed",
".",
"If",
"container",
"s",
"element",
"is",
"in",
"DOM",
"-",
"update",
"it",
"s",
"property",
"value"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9256-L9279 | train | |
kogarashisan/LiquidLava | lib/packages/core-classes.js | function(argument, event_args, listener_args) {
var value = this._style_bindings[listener_args.name].getValue() || '';
if (this._is_inDOM) Firestorm.Element.setStyle(this.getDOMElement(), listener_args.name, value.toString().trim());
} | javascript | function(argument, event_args, listener_args) {
var value = this._style_bindings[listener_args.name].getValue() || '';
if (this._is_inDOM) Firestorm.Element.setStyle(this.getDOMElement(), listener_args.name, value.toString().trim());
} | [
"function",
"(",
"argument",
",",
"event_args",
",",
"listener_args",
")",
"{",
"var",
"value",
"=",
"this",
".",
"_style_bindings",
"[",
"listener_args",
".",
"name",
"]",
".",
"getValue",
"(",
")",
"||",
"''",
";",
"if",
"(",
"this",
".",
"_is_inDOM",
... | Argument value for style binding has changed. If container's element is in DOM - update it's style
@param {Lava.scope.Argument} argument
@param event_args
@param listener_args | [
"Argument",
"value",
"for",
"style",
"binding",
"has",
"changed",
".",
"If",
"container",
"s",
"element",
"is",
"in",
"DOM",
"-",
"update",
"it",
"s",
"style"
] | fb8618821a51fad373106b5cc9247464b0a23cf6 | https://github.com/kogarashisan/LiquidLava/blob/fb8618821a51fad373106b5cc9247464b0a23cf6/lib/packages/core-classes.js#L9287-L9292 | train |
Subsets and Splits
SQL Console for semeru/code-text-javascript
Retrieves 20,000 non-null code samples labeled as JavaScript, providing a basic overview of the dataset.